diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2022-08-24 22:49:30 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2022-08-24 22:49:30 +0300 |
commit | 340cf0935a199240f6daaab8a347e22172f4d15b (patch) | |
tree | d532ba24756792423843e569025cce15b620c376 /migrate | |
parent | 754caf4077e4bfcf7ebb2de9cc531e78350fe7e3 (diff) |
Drop all database migrations to be backward compatible with only 0.15.0 (one minor version behind)
Diffstat (limited to 'migrate')
-rw-r--r-- | migrate/migrate.cxx | 109 |
1 files changed, 6 insertions, 103 deletions
diff --git a/migrate/migrate.cxx b/migrate/migrate.cxx index 7e009e0..172c374 100644 --- a/migrate/migrate.cxx +++ b/migrate/migrate.cxx @@ -208,6 +208,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,109 +220,11 @@ struct package_migration_entry: package_migration_entry_base<v> : package_migration_entry_base<v> (f, "package") {} }; -static const package_migration_entry<22> -package_migrate_v22 ([] (database& db) +static const package_migration_entry<26> +package_migrate_v26 ([] (database& db) { - // Note that for both dependency and requirement - // package_*_alternative_*s.alternative_index is copied from - // package_*_alternatives.index and package_*_alternative_*s.index is set to - // 0. - // - - // Migrate dependencies. - // - db.execute ( - "INSERT INTO \"package_dependency_alternative_dependencies\" " - "(\"tenant\", " - "\"name\", " - "\"version_epoch\", " - "\"version_canonical_upstream\", " - "\"version_canonical_release\", " - "\"version_revision\", " - "\"dependency_index\", " - "\"alternative_index\", " - "\"index\", " - "\"dep_name\", " - "\"dep_min_version_epoch\", " - "\"dep_min_version_canonical_upstream\", " - "\"dep_min_version_canonical_release\", " - "\"dep_min_version_revision\", " - "\"dep_min_version_upstream\", " - "\"dep_min_version_release\", " - "\"dep_max_version_epoch\", " - "\"dep_max_version_canonical_upstream\", " - "\"dep_max_version_canonical_release\", " - "\"dep_max_version_revision\", " - "\"dep_max_version_upstream\", " - "\"dep_max_version_release\", " - "\"dep_min_open\", " - "\"dep_max_open\", " - "\"dep_package_tenant\", " - "\"dep_package_name\", " - "\"dep_package_version_epoch\", " - "\"dep_package_version_canonical_upstream\", " - "\"dep_package_version_canonical_release\", " - "\"dep_package_version_revision\") " - "SELECT " - "\"tenant\", " - "\"name\", " - "\"version_epoch\", " - "\"version_canonical_upstream\", " - "\"version_canonical_release\", " - "\"version_revision\", " - "\"dependency_index\", " - "\"index\", " - "0, " - "\"dep_name\", " - "\"dep_min_version_epoch\", " - "\"dep_min_version_canonical_upstream\", " - "\"dep_min_version_canonical_release\", " - "\"dep_min_version_revision\", " - "\"dep_min_version_upstream\", " - "\"dep_min_version_release\", " - "\"dep_max_version_epoch\", " - "\"dep_max_version_canonical_upstream\", " - "\"dep_max_version_canonical_release\", " - "\"dep_max_version_revision\", " - "\"dep_max_version_upstream\", " - "\"dep_max_version_release\", " - "\"dep_min_open\", " - "\"dep_max_open\", " - "\"dep_package_tenant\", " - "\"dep_package_name\", " - "\"dep_package_version_epoch\", " - "\"dep_package_version_canonical_upstream\", " - "\"dep_package_version_canonical_release\", " - "\"dep_package_version_revision\" " - "FROM \"package_dependency_alternatives\""); - - // Migrate requirements. - // - db.execute ( - "INSERT INTO \"package_requirement_alternative_requirements\" " - "(\"tenant\", " - "\"name\", " - "\"version_epoch\", " - "\"version_canonical_upstream\", " - "\"version_canonical_release\", " - "\"version_revision\", " - "\"requirement_index\", " - "\"alternative_index\", " - "\"index\", " - "\"id\") " - "SELECT " - "\"tenant\", " - "\"name\", " - "\"version_epoch\", " - "\"version_canonical_upstream\", " - "\"version_canonical_release\", " - "\"version_revision\", " - "\"requirement_index\", " - "\"index\", " - "0, " - "\"id\" " - "FROM \"package_requirement_alternatives\""); }); +#endif // Register the data migration functions for the build database schema. // @@ -337,8 +240,8 @@ struct build_migration_entry: build_migration_entry_base<v> : build_migration_entry_base<v> (f, "build") {} }; -static const build_migration_entry<16> -build_migrate_v16 ([] (database& db) +static const build_migration_entry<19> +build_migrate_v19 ([] (database& db) { }); #endif |