mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-10-10 03:09:21 +08:00
Refactor migration to new knex migrations
This commit is contained in:
16
db/knex_migrations/2024-03-15-0000-hide-uptime-percentage.js
Normal file
16
db/knex_migrations/2024-03-15-0000-hide-uptime-percentage.js
Normal file
@@ -0,0 +1,16 @@
|
||||
exports.up = function (knex) {
|
||||
// Add new column status_page.hide_uptime_percentage
|
||||
return knex.schema
|
||||
.alterTable("status_page", function (table) {
|
||||
table.boolean("hide_uptime_percentage").notNullable().defaultTo(false);
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
exports.down = function (knex) {
|
||||
// Drop column status_page.hide_uptime_percentage
|
||||
return knex.schema
|
||||
.alterTable("status_page", function (table) {
|
||||
table.dropColumn("hide_uptime_percentage");
|
||||
});
|
||||
};
|
Reference in New Issue
Block a user