diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2024-11-20 15:17:26 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2024-12-10 16:44:55 +0200 |
commit | 475771f84d3fb6197fea772d67e5a59c46b512e5 (patch) | |
tree | d3a80f655cb0261d5cfd5728a5159e064050320c /migrate | |
parent | 40a3855e2341529624050b4324e73e774967111a (diff) |
Add support for tenant service reference count
Diffstat (limited to 'migrate')
-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. // |