diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-11-26 18:28:42 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-11-26 18:28:42 +0300 |
commit | cf91dfc8271b902419cbaaaa3c44e15d03dc2cf7 (patch) | |
tree | 35ba48b7f8940c5386e4f2aad7e0f065007befb2 /migrate | |
parent | 5730b9707e44c863144d27e73fdfe5739141f005 (diff) |
Drop all database migrations to be backward compatible with only 0.12.0 (one minor version behind)
Diffstat (limited to 'migrate')
-rw-r--r-- | migrate/migrate.cxx | 38 |
1 files changed, 4 insertions, 34 deletions
diff --git a/migrate/migrate.cxx b/migrate/migrate.cxx index 3e2c53d..c1f4dc1 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>; @@ -218,42 +219,11 @@ struct package_migration_entry: package_migration_entry_base<v> : package_migration_entry_base<v> (f, "package") {} }; -static const package_migration_entry<15> -package_migrate_v15 ([] (database& db) +static const package_migration_entry<18> +package_migrate_v18 ([] (database& db) { - // Set the buildable flag for the internal repositories. - // - db.execute ("UPDATE repository SET buildable = internal"); - - // Set the buildable flag for the internal non-stub packages. - // - db.execute ("UPDATE package SET buildable = " - "internal_repository_tenant IS NOT NULL AND " - "NOT (version_epoch = 0 AND " - "version_canonical_upstream = '' AND " - "version_canonical_release = '~')"); -}); - -static const package_migration_entry<16> -package_migrate_v16 ([] (database& db) -{ - // Set the zero version revision to NULL. - // - auto migrate_rev = [&db] (const char* table, const char* column) - { - db.execute (string ("UPDATE ") + table + " SET " + column + " = NULL " + - "WHERE " + column + " = 0"); - }; - - // The depends package manifest value endpoint versions. - // - // Note that previously the zero and absent revisions had the same - // semantics. Now the semantics differs and the zero revision is preserved - // (see libbpkg/manifest.hxx for details). - // - migrate_rev ("package_dependency_alternatives", "dep_min_version_revision"); - migrate_rev ("package_dependency_alternatives", "dep_max_version_revision"); }); +#endif // main() function // |