summaryrefslogtreecommitdiffstats
path: root/db/knex_migrations/2024-01-22-0000-stats-extras.js
diff options
context:
space:
mode:
Diffstat (limited to 'db/knex_migrations/2024-01-22-0000-stats-extras.js')
-rw-r--r--db/knex_migrations/2024-01-22-0000-stats-extras.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/db/knex_migrations/2024-01-22-0000-stats-extras.js b/db/knex_migrations/2024-01-22-0000-stats-extras.js
new file mode 100644
index 0000000..b92e889
--- /dev/null
+++ b/db/knex_migrations/2024-01-22-0000-stats-extras.js
@@ -0,0 +1,26 @@
+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");
+ });
+};