diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2024-11-20 15:17:26 +0200 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-11-26 10:39:50 +0200 |
commit | f7f899aabfa43515ae645d16b9b94738eed4d07d (patch) | |
tree | 4e08c4fa6f62311f7476fbf86fca61b8d86deb9d /migrate/migrate.cxx | |
parent | ae9c34d3256de0edb53d6965969ae740e63be82d (diff) |
Add support for tenant service reference count
Diffstat (limited to 'migrate/migrate.cxx')
-rw-r--r-- | migrate/migrate.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/migrate/migrate.cxx b/migrate/migrate.cxx index 090fcac..095e6a3 100644 --- a/migrate/migrate.cxx +++ b/migrate/migrate.cxx @@ -208,7 +208,6 @@ 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>; @@ -220,11 +219,14 @@ struct package_migration_entry: package_migration_entry_base<v> : package_migration_entry_base<v> (f, "package") {} }; -static const package_migration_entry<26> -package_migrate_v26 ([] (database& db) +static const package_migration_entry<36> +package_migrate_v36 ([] (database& db) { + // Set the reference count to 1 for tenant associated services. + // + db.execute ("UPDATE tenant SET service_ref_count = 1 " + "WHERE service_id IS NOT NULL"); }); -#endif // Register the data migration functions for the build database schema. // |