mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-08-07 10:14:59 +00:00
Fix: Set default value for ping column to 0 in stat tables (#6188)
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
// Fix for #4315. Logically, setting it to 0 ping may not be correct, but it is better than throwing errors
|
||||
|
||||
exports.up = function (knex) {
|
||||
return knex.schema
|
||||
.alterTable("stat_daily", function (table) {
|
||||
table.integer("ping").defaultTo(0).alter();
|
||||
})
|
||||
.alterTable("stat_hourly", function (table) {
|
||||
table.integer("ping").defaultTo(0).alter();
|
||||
})
|
||||
.alterTable("stat_minutely", function (table) {
|
||||
table.integer("ping").defaultTo(0).alter();
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = function (knex) {
|
||||
return knex.schema
|
||||
.alterTable("stat_daily", function (table) {
|
||||
table.integer("ping").alter();
|
||||
})
|
||||
.alterTable("stat_hourly", function (table) {
|
||||
table.integer("ping").alter();
|
||||
})
|
||||
.alterTable("stat_minutely", function (table) {
|
||||
table.integer("ping").alter();
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user