From 70e05d5ff638554a9fd7648b1ff8f413e8af0253 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 24 Aug 2022 22:26:36 +0300 Subject: Drop all database migrations to be backward compatible with 0.14.0 and above (two minor versions behind) --- bdep/database.cxx | 12 ++++-------- bdep/project.hxx | 2 +- bdep/project.xml | 9 ++------- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/bdep/database.cxx b/bdep/database.cxx index 7fd375c..202e1d7 100644 --- a/bdep/database.cxx +++ b/bdep/database.cxx @@ -22,19 +22,15 @@ namespace bdep // Register the data migration functions. // +#if 0 template using migration_entry = odb::data_migration_entry; - static const migration_entry<2> - migrate_v2 ([] (odb::database& db) + static const migration_entry<3> + migrate_v3 ([] (odb::database& db) { - for (const shared_ptr& c: - pointer_result (db.query ())) - { - c->type = "target"; - db.update (c); - } }); +#endif database open (const dir_path& d, tracer& tr, bool create) diff --git a/bdep/project.hxx b/bdep/project.hxx index a26dffd..c0fd1d8 100644 --- a/bdep/project.hxx +++ b/bdep/project.hxx @@ -17,7 +17,7 @@ // Used by the data migration entries. // -#define DB_SCHEMA_VERSION_BASE 1 +#define DB_SCHEMA_VERSION_BASE 2 #pragma db model version(DB_SCHEMA_VERSION_BASE, 2, closed) diff --git a/bdep/project.xml b/bdep/project.xml index 805d741..44902f2 100644 --- a/bdep/project.xml +++ b/bdep/project.xml @@ -1,14 +1,9 @@ - - - - - - - + + -- cgit v1.1