From d3689b6cd0b01ea4872cefbe99dbaef95febd64d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 3 Sep 2013 12:49:15 +0200 Subject: Handling of dynamic empty statements as result of versioning --- evolution/drop-column/driver.cxx | 3 ++- evolution/drop-column/model.hxx | 11 ++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'evolution/drop-column') diff --git a/evolution/drop-column/driver.cxx b/evolution/drop-column/driver.cxx index 099fe0f..4078c58 100644 --- a/evolution/drop-column/driver.cxx +++ b/evolution/drop-column/driver.cxx @@ -70,7 +70,7 @@ main (int argc, char* argv[]) } case 2: { - using namespace v2; // @@ soft delete + using namespace v3; if (embedded) { @@ -108,6 +108,7 @@ main (int argc, char* argv[]) { transaction t (db->begin ()); auto_ptr p (db->load (1)); + assert (p->str == ""); t.commit (); } break; diff --git a/evolution/drop-column/model.hxx b/evolution/drop-column/model.hxx index 42a8f54..feff041 100644 --- a/evolution/drop-column/model.hxx +++ b/evolution/drop-column/model.hxx @@ -31,9 +31,18 @@ namespace MODEL_NAMESPACE(MODEL_VERSION) // SQLite doesn't support dropping of columns. // #ifndef DATABASE_SQLITE -#if MODEL_VERSION == 2 +#if MODEL_VERSION >= 2 + +#if MODEL_VERSION == 3 + #pragma db deleted(3) +#endif std::string str; + +#if MODEL_VERSION == 3 + #pragma db deleted(3) +#endif unsigned long num; + #endif #endif }; -- cgit v1.1