From 0429c7b008594a874696f91c29b17ae4ee40efff Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 5 Apr 2013 12:27:59 +0200 Subject: Add NOT NULL column without default value initially as NULL --- evolution/alter-column/model.hxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'evolution/alter-column/model.hxx') diff --git a/evolution/alter-column/model.hxx b/evolution/alter-column/model.hxx index c244eb0..0b31e1c 100644 --- a/evolution/alter-column/model.hxx +++ b/evolution/alter-column/model.hxx @@ -30,9 +30,6 @@ namespace MODEL_NAMESPACE(MODEL_VERSION) odb::nullable str; unsigned long num; - - #pragma db null - unsigned long dummy; // Test multiple ALTER COLUMN clauses. #else // Use nullable to be able to access during migration. // @@ -41,7 +38,11 @@ namespace MODEL_NAMESPACE(MODEL_VERSION) odb::nullable num; - unsigned long dummy; + // Test adding NOT NULL column. It should be added NULL in pre + // and then converted to NOT NULL in post. + // + #pragma db not_null + odb::nullable num1; #endif }; } -- cgit v1.1