diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-06-22 14:44:18 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-06-22 14:45:26 +0300 |
commit | 86455ac8a3f2e972a27a7d35eaaf1610dd360932 (patch) | |
tree | 5ab19d68b8069991ddc21d1f8a292f190086b5c5 | |
parent | 61dcc4ff7bc732065e51a99b2b74821a4f7f7559 (diff) |
Drop all database migrations to be backward compatible with only 0.11.0 (one minor version behind)
-rw-r--r-- | libbrep/package.hxx | 2 | ||||
-rw-r--r-- | migrate/migrate.cxx | 41 |
2 files changed, 4 insertions, 39 deletions
diff --git a/libbrep/package.hxx b/libbrep/package.hxx index 18cd629..86a1922 100644 --- a/libbrep/package.hxx +++ b/libbrep/package.hxx @@ -19,7 +19,7 @@ // Used by the data migration entries. // -#define LIBBREP_PACKAGE_SCHEMA_VERSION_BASE 11 +#define LIBBREP_PACKAGE_SCHEMA_VERSION_BASE 14 #pragma db model version(LIBBREP_PACKAGE_SCHEMA_VERSION_BASE, 14, closed) diff --git a/migrate/migrate.cxx b/migrate/migrate.cxx index 6cae116..35beb20 100644 --- a/migrate/migrate.cxx +++ b/migrate/migrate.cxx @@ -207,6 +207,7 @@ create (database& db, bool extra_only) const // Register the data migration functions for the package database schema. // +#if 0 template <schema_version v> using package_migration_entry_base = data_migration_entry<v, LIBBREP_PACKAGE_SCHEMA_VERSION_BASE>; @@ -219,46 +220,10 @@ struct package_migration_entry: package_migration_entry_base<v> }; static const package_migration_entry<12> -package_migrate_v12 ([] (database& db) +package_migrate_v15 ([] (database& db) { - // Set the text_type::plain type for the present package descriptions. - // - db.execute ("UPDATE package SET description_type = 'text/plain' " - "WHERE description IS NOT NULL"); -}); - -static const package_migration_entry<14> -package_migrate_v14 ([] (database& db) -{ - // Save the package tags as the package keywords. - // - db.execute ("INSERT INTO package_keywords (" - "tenant, " - "name, " - "version_epoch, " - "version_canonical_upstream, " - "version_canonical_release, " - "version_revision, " - "index, " - "keyword) " - "SELECT " - "tenant, " - "name, " - "version_epoch, " - "version_canonical_upstream, " - "version_canonical_release, " - "version_revision, " - "index, " - "tag " - "FROM package_tags"); - - // Note that the package keywords are the second-strongest search keywords - // and the package tags where the first-strongest search keywords. So, - // strictly speaking, we should update the package table search_index column - // to reflect the new ordering rules for the package search. But it feels - // like it isn't really worth the trouble. - // }); +#endif // main() function // |