mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-23 14:54:05 +00:00
Convert migration to knex migration
This commit is contained in:
parent
7226686bde
commit
c3b4ad85e5
2 changed files with 15 additions and 5 deletions
15
db/knex_migrations/2023-09-13-1047-locale-on-statuspage.js
Normal file
15
db/knex_migrations/2023-09-13-1047-locale-on-statuspage.js
Normal 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");
|
||||
});
|
||||
};
|
|
@ -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;
|
Loading…
Reference in a new issue