From d2a6b2bb5782104da34820da4ec4c1ec08c2733d Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Mon, 18 Jul 2022 22:31:35 +0200 Subject: [PATCH] Add migration to drop `moderation_votes` table --- .../20220718201541_drop_moderation_votes_table.rb | 5 +++++ db/schema.rb | 13 +------------ 2 files changed, 6 insertions(+), 12 deletions(-) create mode 100644 db/migrate/20220718201541_drop_moderation_votes_table.rb diff --git a/db/migrate/20220718201541_drop_moderation_votes_table.rb b/db/migrate/20220718201541_drop_moderation_votes_table.rb new file mode 100644 index 00000000..45ba4531 --- /dev/null +++ b/db/migrate/20220718201541_drop_moderation_votes_table.rb @@ -0,0 +1,5 @@ +class DropModerationVotesTable < ActiveRecord::Migration[6.1] + def up + drop_table :moderation_votes + end +end diff --git a/db/schema.rb b/db/schema.rb index dbed8eb9..c86ea7b0 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2022_07_14_212414) do +ActiveRecord::Schema.define(version: 2022_07_18_201541) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -110,17 +110,6 @@ ActiveRecord::Schema.define(version: 2022_07_14_212414) do t.index ["user_id", "created_at"], name: "index_moderation_comments_on_user_id_and_created_at" end - create_table "moderation_votes", id: :serial, force: :cascade do |t| - t.integer "report_id", null: false - t.bigint "user_id", null: false - t.boolean "upvote", default: false, null: false - t.datetime "created_at" - t.datetime "updated_at" - t.index ["report_id"], name: "index_moderation_votes_on_report_id" - t.index ["user_id", "report_id"], name: "index_moderation_votes_on_user_id_and_report_id", unique: true - t.index ["user_id"], name: "index_moderation_votes_on_user_id" - end - create_table "mute_rules", id: :bigint, default: -> { "gen_timestamp_id('mute_rules'::text)" }, force: :cascade do |t| t.string "muted_phrase" t.datetime "created_at", null: false