From 65ba2b47c8d6c83e37fe772a7b54fd6b7480ce17 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 1 Apr 2020 23:01:02 +0300 Subject: Add support for test-exclude task manifest value Note that the last two commits demonstrate an approach to use for migrating data on the ODB object member type change. --- migrate/migrate.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'migrate/migrate.cxx') diff --git a/migrate/migrate.cxx b/migrate/migrate.cxx index 1577f1b..9b9a5bd 100644 --- a/migrate/migrate.cxx +++ b/migrate/migrate.cxx @@ -221,8 +221,7 @@ struct package_migration_entry: package_migration_entry_base // boolean to enumeration. // Note that changing the data member type is not automatically handled by the -// migration machinery. Thus, we split the schema change into two steps, -// delaying the second step until the next commit: +// migration machinery. Thus, we split the schema change into two steps: // // - Rename the buildable data member column preserving its boolean type and // migrate the data copying it from the original column into the new @@ -243,6 +242,15 @@ package_migrate_v18 ([] (database& db) db.execute ("UPDATE package SET buildable_ = buildable"); }); +static const package_migration_entry<19> +package_migrate_v19 ([] (database& db) +{ + // Convert the buildable flag values to the enumeration values. + // + db.execute ("UPDATE package SET buildable = " + "CASE WHEN buildable_ THEN 'buildable' ELSE 'unbuildable' END"); +}); + // main() function // int -- cgit v1.1