From 9df221aa02837b67d5b4d6743e92478194932524 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Thu, 13 Aug 2020 03:38:24 +0300 Subject: [PATCH] Apply code style from .eslintrc to migrations --- .../20180224235946_add_close_at_to_threads.js | 16 ++++++++-------- .../20180421161550_add_alert_id_to_threads.js | 8 ++++---- ...20224224_remove_is_anonymous_from_snippets.js | 8 ++++---- ...4728_add_scheduled_close_silent_to_threads.js | 8 ++++---- ...306211534_add_scheduled_suspend_to_threads.js | 16 ++++++++-------- .../20190609161116_create_updates_table.js | 12 ++++++------ ...0609193213_add_expires_at_to_blocked_users.js | 8 ++++---- ...191206002418_add_number_to_thread_messages.js | 10 +++++----- ...8_add_thread_message_id_to_thread_messages.js | 10 +++++----- ...80113_add_dm_channel_id_to_thread_messages.js | 10 +++++----- 10 files changed, 53 insertions(+), 53 deletions(-) diff --git a/db/migrations/20180224235946_add_close_at_to_threads.js b/db/migrations/20180224235946_add_close_at_to_threads.js index dbbb04d..9d77d5d 100644 --- a/db/migrations/20180224235946_add_close_at_to_threads.js +++ b/db/migrations/20180224235946_add_close_at_to_threads.js @@ -1,15 +1,15 @@ exports.up = async function (knex, Promise) { - await knex.schema.table('threads', table => { - table.dateTime('scheduled_close_at').index().nullable().defaultTo(null).after('channel_id'); - table.string('scheduled_close_id', 20).nullable().defaultTo(null).after('channel_id'); - table.string('scheduled_close_name', 128).nullable().defaultTo(null).after('channel_id'); + await knex.schema.table("threads", table => { + table.dateTime("scheduled_close_at").index().nullable().defaultTo(null).after("channel_id"); + table.string("scheduled_close_id", 20).nullable().defaultTo(null).after("channel_id"); + table.string("scheduled_close_name", 128).nullable().defaultTo(null).after("channel_id"); }); }; exports.down = async function(knex, Promise) { - await knex.schema.table('threads', table => { - table.dropColumn('scheduled_close_at'); - table.dropColumn('scheduled_close_id'); - table.dropColumn('scheduled_close_name'); + await knex.schema.table("threads", table => { + table.dropColumn("scheduled_close_at"); + table.dropColumn("scheduled_close_id"); + table.dropColumn("scheduled_close_name"); }); }; diff --git a/db/migrations/20180421161550_add_alert_id_to_threads.js b/db/migrations/20180421161550_add_alert_id_to_threads.js index 5defc38..7a9f6f0 100644 --- a/db/migrations/20180421161550_add_alert_id_to_threads.js +++ b/db/migrations/20180421161550_add_alert_id_to_threads.js @@ -1,11 +1,11 @@ exports.up = async function (knex, Promise) { - await knex.schema.table('threads', table => { - table.string('alert_id', 20).nullable().defaultTo(null).after('scheduled_close_name'); + await knex.schema.table("threads", table => { + table.string("alert_id", 20).nullable().defaultTo(null).after("scheduled_close_name"); }); }; exports.down = async function(knex, Promise) { - await knex.schema.table('threads', table => { - table.dropColumn('alert_id'); + await knex.schema.table("threads", table => { + table.dropColumn("alert_id"); }); }; diff --git a/db/migrations/20180920224224_remove_is_anonymous_from_snippets.js b/db/migrations/20180920224224_remove_is_anonymous_from_snippets.js index ac33267..48a0293 100644 --- a/db/migrations/20180920224224_remove_is_anonymous_from_snippets.js +++ b/db/migrations/20180920224224_remove_is_anonymous_from_snippets.js @@ -1,11 +1,11 @@ exports.up = async function (knex, Promise) { - await knex.schema.table('snippets', table => { - table.dropColumn('is_anonymous'); + await knex.schema.table("snippets", table => { + table.dropColumn("is_anonymous"); }); }; exports.down = async function(knex, Promise) { - await knex.schema.table('snippets', table => { - table.integer('is_anonymous').unsigned().notNullable(); + await knex.schema.table("snippets", table => { + table.integer("is_anonymous").unsigned().notNullable(); }); }; diff --git a/db/migrations/20190306204728_add_scheduled_close_silent_to_threads.js b/db/migrations/20190306204728_add_scheduled_close_silent_to_threads.js index e61490d..0c0b254 100644 --- a/db/migrations/20190306204728_add_scheduled_close_silent_to_threads.js +++ b/db/migrations/20190306204728_add_scheduled_close_silent_to_threads.js @@ -1,11 +1,11 @@ exports.up = async function(knex, Promise) { - await knex.schema.table('threads', table => { - table.integer('scheduled_close_silent').nullable().after('scheduled_close_name'); + await knex.schema.table("threads", table => { + table.integer("scheduled_close_silent").nullable().after("scheduled_close_name"); }); }; exports.down = async function(knex, Promise) { - await knex.schema.table('threads', table => { - table.dropColumn('scheduled_close_silent'); + await knex.schema.table("threads", table => { + table.dropColumn("scheduled_close_silent"); }); }; diff --git a/db/migrations/20190306211534_add_scheduled_suspend_to_threads.js b/db/migrations/20190306211534_add_scheduled_suspend_to_threads.js index a22b5f3..0b6dfd0 100644 --- a/db/migrations/20190306211534_add_scheduled_suspend_to_threads.js +++ b/db/migrations/20190306211534_add_scheduled_suspend_to_threads.js @@ -1,15 +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'); + 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'); + await knex.schema.table("threads", table => { + table.dropColumn("scheduled_suspend_at"); + table.dropColumn("scheduled_suspend_id"); + table.dropColumn("scheduled_suspend_name"); }); }; diff --git a/db/migrations/20190609161116_create_updates_table.js b/db/migrations/20190609161116_create_updates_table.js index c90e9bd..f4e0f92 100644 --- a/db/migrations/20190609161116_create_updates_table.js +++ b/db/migrations/20190609161116_create_updates_table.js @@ -1,14 +1,14 @@ exports.up = async function(knex, Promise) { - if (! await knex.schema.hasTable('updates')) { - await knex.schema.createTable('updates', table => { - table.string('available_version', 16).nullable(); - table.dateTime('last_checked').nullable(); + if (! await knex.schema.hasTable("updates")) { + await knex.schema.createTable("updates", table => { + table.string("available_version", 16).nullable(); + table.dateTime("last_checked").nullable(); }); } }; exports.down = async function(knex, Promise) { - if (await knex.schema.hasTable('updates')) { - await knex.schema.dropTable('updates'); + if (await knex.schema.hasTable("updates")) { + await knex.schema.dropTable("updates"); } }; diff --git a/db/migrations/20190609193213_add_expires_at_to_blocked_users.js b/db/migrations/20190609193213_add_expires_at_to_blocked_users.js index ea456a6..c2afda4 100644 --- a/db/migrations/20190609193213_add_expires_at_to_blocked_users.js +++ b/db/migrations/20190609193213_add_expires_at_to_blocked_users.js @@ -1,11 +1,11 @@ exports.up = async function(knex, Promise) { - await knex.schema.table('blocked_users', table => { - table.dateTime('expires_at').nullable(); + await knex.schema.table("blocked_users", table => { + table.dateTime("expires_at").nullable(); }); }; exports.down = async function(knex, Promise) { - await knex.schema.table('blocked_users', table => { - table.dropColumn('expires_at'); + await knex.schema.table("blocked_users", table => { + table.dropColumn("expires_at"); }); }; diff --git a/db/migrations/20191206002418_add_number_to_thread_messages.js b/db/migrations/20191206002418_add_number_to_thread_messages.js index 3564b90..0b44113 100644 --- a/db/migrations/20191206002418_add_number_to_thread_messages.js +++ b/db/migrations/20191206002418_add_number_to_thread_messages.js @@ -1,11 +1,11 @@ -const Knex = require('knex'); +const Knex = require("knex"); /** * @param {Knex} knex */ exports.up = async function(knex) { - await knex.schema.table('thread_messages', table => { - table.integer('message_number').unsigned().nullable(); + await knex.schema.table("thread_messages", table => { + table.integer("message_number").unsigned().nullable(); }); }; @@ -13,7 +13,7 @@ exports.up = async function(knex) { * @param {Knex} knex */ exports.down = async function(knex) { - await knex.schema.table('thread_messages', table => { - table.dropColumn('message_number'); + await knex.schema.table("thread_messages", table => { + table.dropColumn("message_number"); }); }; diff --git a/db/migrations/20191206011638_add_thread_message_id_to_thread_messages.js b/db/migrations/20191206011638_add_thread_message_id_to_thread_messages.js index 475c066..f884a60 100644 --- a/db/migrations/20191206011638_add_thread_message_id_to_thread_messages.js +++ b/db/migrations/20191206011638_add_thread_message_id_to_thread_messages.js @@ -1,11 +1,11 @@ -const Knex = require('knex'); +const Knex = require("knex"); /** * @param {Knex} knex */ exports.up = async function(knex) { - await knex.schema.table('thread_messages', table => { - table.string('inbox_message_id', 20).nullable().unique(); + await knex.schema.table("thread_messages", table => { + table.string("inbox_message_id", 20).nullable().unique(); }); }; @@ -13,7 +13,7 @@ exports.up = async function(knex) { * @param {Knex} knex */ exports.down = async function(knex) { - await knex.schema.table('thread_messages', table => { - table.dropColumn('inbox_message_id'); + await knex.schema.table("thread_messages", table => { + table.dropColumn("inbox_message_id"); }); }; diff --git a/db/migrations/20191206180113_add_dm_channel_id_to_thread_messages.js b/db/migrations/20191206180113_add_dm_channel_id_to_thread_messages.js index 4b0aa6a..768dff8 100644 --- a/db/migrations/20191206180113_add_dm_channel_id_to_thread_messages.js +++ b/db/migrations/20191206180113_add_dm_channel_id_to_thread_messages.js @@ -1,11 +1,11 @@ -const Knex = require('knex'); +const Knex = require("knex"); /** * @param {Knex} knex */ exports.up = async function(knex) { - await knex.schema.table('thread_messages', table => { - table.string('dm_channel_id', 20).nullable(); + await knex.schema.table("thread_messages", table => { + table.string("dm_channel_id", 20).nullable(); }); }; @@ -13,7 +13,7 @@ exports.up = async function(knex) { * @param {Knex} knex */ exports.down = async function(knex) { - await knex.schema.table('thread_messages', table => { - table.dropColumn('dm_channel_id'); + await knex.schema.table("thread_messages", table => { + table.dropColumn("dm_channel_id"); }); };