diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2020-04-01 23:01:02 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2020-04-06 15:09:41 +0300 |
commit | 65ba2b47c8d6c83e37fe772a7b54fd6b7480ce17 (patch) | |
tree | f24967df1c447e10c43206cf599007e98c24afb7 /migrate | |
parent | d1662abccb91be4844efc1508ff8b0427019a27c (diff) |
Add support for test-exclude task manifest valuemigration-example
Note that the last two commits demonstrate an approach to use for migrating
data on the ODB object member type change.
Diffstat (limited to 'migrate')
-rw-r--r-- | migrate/migrate.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
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<v> // 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 |