Kuma/db/knex_migrations/2024-03-23-0302_status-page-description.js
David Roizenman 56fc66a2ab
feat: show monitor descriptions on status page
- configure description visibility per monitor
- configure description visiblitiy per status page
2024-03-22 21:43:38 -07:00

27 lines
811 B
JavaScript

/**
* @param { import("knex").Knex } knex Knex instance
* @returns { Promise<void> }
*/
exports.up = function (knex) {
return knex.schema
.alterTable("status_page", function (table) {
table.boolean("show_descriptions").notNullable().defaultTo(false);
})
.alterTable("monitor", function (table) {
table.boolean("show_description").notNullable().defaultTo(false);
});
};
/**
* @param { import("knex").Knex } knex Knex instance
* @returns { Promise<void> }
*/
exports.down = function (knex) {
return knex.schema
.alterTable("status_page", function (table) {
table.dropColumn("show_descriptions");
})
.alterTable("monitor", function (table) {
table.dropColumn("show_description");
});
};