From 475771f84d3fb6197fea772d67e5a59c46b512e5 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 20 Nov 2024 15:17:26 +0200 Subject: Add support for tenant service reference count --- migrate/migrate.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'migrate') 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 using package_migration_entry_base = data_migration_entry; @@ -220,11 +219,14 @@ struct package_migration_entry: package_migration_entry_base : package_migration_entry_base (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. // -- cgit v1.1