aboutsummaryrefslogtreecommitdiff
path: root/db/migrations/20190306211534_add_scheduled_suspend_to_threads.js
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrations/20190306211534_add_scheduled_suspend_to_threads.js')
-rw-r--r--db/migrations/20190306211534_add_scheduled_suspend_to_threads.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrations/20190306211534_add_scheduled_suspend_to_threads.js b/db/migrations/20190306211534_add_scheduled_suspend_to_threads.js
new file mode 100644
index 0000000..a22b5f3
--- /dev/null
+++ b/db/migrations/20190306211534_add_scheduled_suspend_to_threads.js
@@ -0,0 +1,15 @@
+exports.up = async function(knex, Promise) {
+ await knex.schema.table('threads', table => {
+ table.dateTime('scheduled_suspend_at').index().nullable().defaultTo(null).after('channel_id');
+ table.string('scheduled_suspend_id', 20).nullable().defaultTo(null).after('channel_id');
+ table.string('scheduled_suspend_name', 128).nullable().defaultTo(null).after('channel_id');
+ });
+};
+
+exports.down = async function(knex, Promise) {
+ await knex.schema.table('threads', table => {
+ table.dropColumn('scheduled_suspend_at');
+ table.dropColumn('scheduled_suspend_id');
+ table.dropColumn('scheduled_suspend_name');
+ });
+};