aboutsummaryrefslogtreecommitdiff
path: root/migrate/migrate.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'migrate/migrate.cxx')
-rw-r--r--migrate/migrate.cxx32
1 files changed, 27 insertions, 5 deletions
diff --git a/migrate/migrate.cxx b/migrate/migrate.cxx
index 88c87c1..090fcac 100644
--- a/migrate/migrate.cxx
+++ b/migrate/migrate.cxx
@@ -12,8 +12,10 @@
#include <odb/pgsql/database.hxx>
-#include <libbutl/pager.mxx>
+#include <libbutl/pager.hxx>
+#include <libbrep/build.hxx>
+#include <libbrep/build-odb.hxx>
#include <libbrep/package.hxx>
#include <libbrep/package-odb.hxx>
#include <libbrep/database-lock.hxx>
@@ -113,7 +115,7 @@ schema (const char* s, string name)
string kw;
i >> kw;
- statement += " " + kw;
+ statement += ' ' + kw;
if (strcasecmp (kw.c_str (), "FUNCTION") == 0)
{
@@ -131,7 +133,7 @@ schema (const char* s, string name)
else if (strcasecmp (kw.c_str (), "FOREIGN") == 0)
{
i >> kw;
- statement += " " + kw;
+ statement += ' ' + kw;
valid = strcasecmp (kw.c_str (), "TABLE") == 0;
// Fall through.
@@ -218,8 +220,28 @@ struct package_migration_entry: package_migration_entry_base<v>
: package_migration_entry_base<v> (f, "package") {}
};
-static const package_migration_entry<20>
-package_migrate_v20 ([] (database& db)
+static const package_migration_entry<26>
+package_migrate_v26 ([] (database& db)
+{
+});
+#endif
+
+// Register the data migration functions for the build database schema.
+//
+#if 0
+template <schema_version v>
+using build_migration_entry_base =
+ data_migration_entry<v, LIBBREP_BUILD_SCHEMA_VERSION_BASE>;
+
+template <schema_version v>
+struct build_migration_entry: build_migration_entry_base<v>
+{
+ build_migration_entry (void (*f) (database& db))
+ : build_migration_entry_base<v> (f, "build") {}
+};
+
+static const build_migration_entry<19>
+build_migrate_v19 ([] (database& db)
{
});
#endif