summaryrefslogtreecommitdiff
path: root/odb/relational/mysql
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-04-05 10:51:03 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-04-10 18:46:44 +0200
commit17e48b8980d89f0c5c3a00d4066c764093838e5a (patch)
tree2c48164e1a1f9b34cc4cfde2a531f29f7f13a7fb /odb/relational/mysql
parent853d76b58e96aab4e6182cc1234652dfcdd74c14 (diff)
Explicitly specify NULL for nullable columns in generated schema
Diffstat (limited to 'odb/relational/mysql')
-rw-r--r--odb/relational/mysql/schema.cxx23
1 files changed, 0 insertions, 23 deletions
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";