aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bdep/database.cxx12
-rw-r--r--bdep/project.hxx2
-rw-r--r--bdep/project.xml9
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 <odb::schema_version v>
using migration_entry = odb::data_migration_entry<v, DB_SCHEMA_VERSION_BASE>;
- static const migration_entry<2>
- migrate_v2 ([] (odb::database& db)
+ static const migration_entry<3>
+ migrate_v3 ([] (odb::database& db)
{
- for (const shared_ptr<configuration>& c:
- pointer_result (db.query<configuration> ()))
- {
- 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 @@
<changelog xmlns="http://www.codesynthesis.com/xmlns/odb/changelog" database="sqlite" version="1">
- <changeset version="2">
- <alter-table name="configuration">
- <add-column name="type" type="TEXT" null="true"/>
- </alter-table>
- </changeset>
-
- <model version="1">
+ <model version="2">
<table name="configuration" kind="object">
<column name="id" type="INTEGER" null="true"/>
<column name="name" type="TEXT" null="true"/>
+ <column name="type" type="TEXT" null="true"/>
<column name="path" type="TEXT" null="true"/>
<column name="relative_path" type="TEXT" null="true"/>
<column name="default" type="INTEGER" null="true"/>