summaryrefslogtreecommitdiff
path: root/odb/relational/schema.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/relational/schema.hxx')
-rw-r--r--odb/relational/schema.hxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/odb/relational/schema.hxx b/odb/relational/schema.hxx
index 247dca2..ed0084e 100644
--- a/odb/relational/schema.hxx
+++ b/odb/relational/schema.hxx
@@ -515,12 +515,20 @@ namespace relational
os << quote_id (c.name ()) << " ";
type (c, pk != 0 && pk->auto_ ());
+ constraints (c, pk);
- if (!c.default_ ().empty ())
- os << " DEFAULT " << c.default_ ();
+ if (!c.options ().empty ())
+ os << " " << c.options ();
+ }
+ virtual void
+ constraints (sema_rel::column& c, sema_rel::primary_key* pk)
+ {
null (c);
+ if (!c.default_ ().empty ())
+ os << " DEFAULT " << c.default_ ();
+
// If this is a single-column primary key, generate it inline.
//
if (pk != 0 && pk->contains_size () == 1)
@@ -528,9 +536,6 @@ namespace relational
if (pk != 0 && pk->auto_ ())
auto_ (c);
-
- if (!c.options ().empty ())
- os << " " << c.options ();
}
virtual void