summaryrefslogtreecommitdiff
path: root/odb/relational/schema.hxx
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/schema.hxx
parent853d76b58e96aab4e6182cc1234652dfcdd74c14 (diff)
Explicitly specify NULL for nullable columns in generated schema
Diffstat (limited to 'odb/relational/schema.hxx')
-rw-r--r--odb/relational/schema.hxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/odb/relational/schema.hxx b/odb/relational/schema.hxx
index 69e8089..fcb176f 100644
--- a/odb/relational/schema.hxx
+++ b/odb/relational/schema.hxx
@@ -410,8 +410,10 @@ namespace relational
virtual void
null (sema_rel::column& c)
{
- if (!c.null ())
- os << " NOT NULL";
+ // Specify both cases explicitly for better readability,
+ // especially in ALTER COLUMN clauses.
+ //
+ os << (c.null () ? " NULL" : " NOT NULL");
}
virtual void