Convert migration to knex migration

This commit is contained in:
Wampie Driessen 2023-09-13 11:32:55 +02:00
parent 7226686bde
commit c3b4ad85e5
2 changed files with 15 additions and 5 deletions

View file

@ -0,0 +1,15 @@
exports.up = function (knex) {
return knex.schema
.alterTable("status_page", function (table) {
table.boolean("show_locale_selector").notNullable().defaultTo(false);
table.string("default_locale").nullable().defaultTo("");
});
};
exports.down = function (knex) {
return knex.schema
.alterTable("status_page", function (table) {
table.dropColumn("default_locale");
table.dropColumn("show_locale_selector");
});
};

View file

@ -1,5 +0,0 @@
-- You should not modify if this have pushed to Github, unless it does serious wrong with the db.
BEGIN TRANSACTION;
ALTER TABLE status_page ADD show_locale_selector BOOLEAN NOT NULL DEFAULT 0;
ALTER TABLE status_page ADD default_locale TEXT DEFAULT "";
COMMIT;