uptime-kuma/db/knex_migrations/2024-01-22-0000-stats-extras.js
Nelson Chan b8858f4605
Feat: Handle maintenance in UptimeCalculator (#4406)
Co-authored-by: Frank Elsinga <frank@elsinga.de>
2024-03-27 10:19:25 +08:00

27 lines
938 B
JavaScript

exports.up = function (knex) {
return knex.schema
.alterTable("stat_daily", function (table) {
table.text("extras").defaultTo(null).comment("Extra statistics during this time period");
})
.alterTable("stat_minutely", function (table) {
table.text("extras").defaultTo(null).comment("Extra statistics during this time period");
})
.alterTable("stat_hourly", function (table) {
table.text("extras").defaultTo(null).comment("Extra statistics during this time period");
});
};
exports.down = function (knex) {
return knex.schema
.alterTable("stat_daily", function (table) {
table.dropColumn("extras");
})
.alterTable("stat_minutely", function (table) {
table.dropColumn("extras");
})
.alterTable("stat_hourly", function (table) {
table.dropColumn("extras");
});
};