aboutsummaryrefslogtreecommitdiff
path: root/migrate/migrate.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'migrate/migrate.cxx')
-rw-r--r--migrate/migrate.cxx12
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