From cf91dfc8271b902419cbaaaa3c44e15d03dc2cf7 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 26 Nov 2019 18:28:42 +0300 Subject: Drop all database migrations to be backward compatible with only 0.12.0 (one minor version behind) --- migrate/migrate.cxx | 38 ++++---------------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) (limited to 'migrate') 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 using package_migration_entry_base = data_migration_entry; @@ -218,42 +219,11 @@ struct package_migration_entry: package_migration_entry_base : package_migration_entry_base (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 // -- cgit v1.1