From 311019b4787e8640c407083ba0412d72f3836216 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 15 Nov 2021 15:32:20 +0300 Subject: Drop all database migrations to be backward compatible with only 0.14.0 (one minor version behind) --- libbrep/build.hxx | 2 +- libbrep/build.xml | 40 +++++++++++----------------------------- libbrep/package.hxx | 6 +++--- libbrep/package.xml | 18 ++++-------------- migrate/migrate.cxx | 22 ++++++---------------- 5 files changed, 25 insertions(+), 63 deletions(-) diff --git a/libbrep/build.hxx b/libbrep/build.hxx index fbab13d..29d9890 100644 --- a/libbrep/build.hxx +++ b/libbrep/build.hxx @@ -28,7 +28,7 @@ // Used by the data migration entries. // -#define LIBBREP_BUILD_SCHEMA_VERSION_BASE 12 +#define LIBBREP_BUILD_SCHEMA_VERSION_BASE 15 #pragma db model version(LIBBREP_BUILD_SCHEMA_VERSION_BASE, 15, closed) diff --git a/libbrep/build.xml b/libbrep/build.xml index 6a2301b..42de81a 100644 --- a/libbrep/build.xml +++ b/libbrep/build.xml @@ -1,31 +1,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -44,15 +18,22 @@ + - + + + + + + + @@ -151,7 +132,8 @@ - + + diff --git a/libbrep/package.hxx b/libbrep/package.hxx index 67536ce..0ce8553 100644 --- a/libbrep/package.hxx +++ b/libbrep/package.hxx @@ -18,7 +18,7 @@ // Used by the data migration entries. // -#define LIBBREP_PACKAGE_SCHEMA_VERSION_BASE 19 +#define LIBBREP_PACKAGE_SCHEMA_VERSION_BASE 21 #pragma db model version(LIBBREP_PACKAGE_SCHEMA_VERSION_BASE, 21, closed) @@ -191,7 +191,7 @@ namespace brep // Database mapping. // - #pragma db member(buildtime) default(false) // @@ TMP + #pragma db member(buildtime) }; // certificate @@ -237,7 +237,7 @@ namespace brep // Database mapping. // #pragma db member(id) id - #pragma db member(private_) default(false) // @@ TMP + #pragma db member(private_) private: friend class odb::access; diff --git a/libbrep/package.xml b/libbrep/package.xml index 093f54e..69f5731 100644 --- a/libbrep/package.xml +++ b/libbrep/package.xml @@ -1,20 +1,9 @@ - - - - - - - - - - - - - - +
+ + @@ -628,6 +617,7 @@ + diff --git a/migrate/migrate.cxx b/migrate/migrate.cxx index 468d411..6c66bf0 100644 --- a/migrate/migrate.cxx +++ b/migrate/migrate.cxx @@ -220,14 +220,15 @@ struct package_migration_entry: package_migration_entry_base : package_migration_entry_base (f, "package") {} }; -static const package_migration_entry<20> -package_migrate_v20 ([] (database& db) +static const package_migration_entry<22> +package_migrate_v22 ([] (database& db) { }); #endif // Register the data migration functions for the build database schema. // +#if 0 template using build_migration_entry_base = data_migration_entry; @@ -239,22 +240,11 @@ struct build_migration_entry: build_migration_entry_base : build_migration_entry_base (f, "build") {} }; -static const build_migration_entry<15> -build_migrate_v15 ([] (database& db) +static const build_migration_entry<16> +build_migrate_v16 ([] (database& db) { - // Setting proper checksums here feels a bit hairy. Let's assign them - // naturally on the first rebuild. - // - db.execute ("UPDATE build SET " - "soft_timestamp = completion_timestamp, " - "hard_timestamp = completion_timestamp, " - "controller_checksum = '', " - "machine_checksum = ''"); - - db.execute ("UPDATE build_delay SET " - "report_soft_timestamp = report_timestamp, " - "report_hard_timestamp = report_timestamp"); }); +#endif // main() function // -- cgit v1.1