From 17e48b8980d89f0c5c3a00d4066c764093838e5a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 5 Apr 2013 10:51:03 +0200 Subject: Explicitly specify NULL for nullable columns in generated schema --- odb/relational/mysql/schema.cxx | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'odb/relational/mysql') diff --git a/odb/relational/mysql/schema.cxx b/odb/relational/mysql/schema.cxx index 6ce619b..2ae47ae 100644 --- a/odb/relational/mysql/schema.cxx +++ b/odb/relational/mysql/schema.cxx @@ -143,29 +143,6 @@ namespace relational create_column (base const& x): base (x) {} virtual void - null (sema_rel::column& c) - { - // MySQL TIMESTAMP is by default NOT NULL. If we want it - // to contain NULL values, we need to explicitly declare - // the column as NULL. - // - if (c.null ()) - { - // This should never fail since we have already parsed this. - // - sql_type const& t (parse_sql_type (c.type ())); - - if (t.type == sql_type::TIMESTAMP) - { - os << " NULL"; - return; - } - } - - base::null (c); - } - - virtual void auto_ (sema_rel::column&) { os << " AUTO_INCREMENT"; -- cgit v1.1