diff options
-rw-r--r-- | odb/relational/schema.hxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/odb/relational/schema.hxx b/odb/relational/schema.hxx index 855f67f..81e1453 100644 --- a/odb/relational/schema.hxx +++ b/odb/relational/schema.hxx @@ -285,6 +285,10 @@ namespace relational os << " " << quote_id (c.name ()) << " "; type (c, pk != 0 && pk->auto_ ()); + + if (!c.default_ ().empty ()) + os << " DEFAULT " << c.default_ (); + null (c); // If this is a single-column primary key, generate it inline. @@ -295,9 +299,6 @@ namespace relational if (pk != 0 && pk->auto_ ()) auto_ (c); - if (!c.default_ ().empty ()) - os << " DEFAULT " << c.default_ (); - if (!c.options ().empty ()) os << " " << c.options (); } |