From 72866f7a84cb4c7639f7bfe3d600d3e1831e6aea Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Wed, 6 Jul 2022 19:49:31 +0200 Subject: [PATCH] Add migration to drop `comment_smiles` table --- .../20220706174816_drop_comment_smiles_table.rb | 7 +++++++ db/schema.rb | 12 +----------- 2 files changed, 8 insertions(+), 11 deletions(-) create mode 100644 db/migrate/20220706174816_drop_comment_smiles_table.rb diff --git a/db/migrate/20220706174816_drop_comment_smiles_table.rb b/db/migrate/20220706174816_drop_comment_smiles_table.rb new file mode 100644 index 00000000..c72ae845 --- /dev/null +++ b/db/migrate/20220706174816_drop_comment_smiles_table.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class DropCommentSmilesTable < ActiveRecord::Migration[6.1] + def up + drop_table :comment_smiles + end +end diff --git a/db/schema.rb b/db/schema.rb index 3f6fedee..a7e7ab97 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_06_174120) do +ActiveRecord::Schema.define(version: 2022_07_06_174816) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -62,16 +62,6 @@ ActiveRecord::Schema.define(version: 2022_07_06_174120) do t.index ["user_id", "created_at"], name: "index_appendables_on_user_id_and_created_at" end - create_table "comment_smiles", id: :bigint, default: -> { "gen_timestamp_id('comment_smiles'::text)" }, force: :cascade do |t| - t.bigint "user_id" - t.bigint "comment_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["comment_id"], name: "index_comment_smiles_on_comment_id" - t.index ["user_id", "comment_id"], name: "index_comment_smiles_on_user_id_and_comment_id", unique: true - t.index ["user_id"], name: "index_comment_smiles_on_user_id" - end - create_table "comments", id: :bigint, default: -> { "gen_timestamp_id('comments'::text)" }, force: :cascade do |t| t.string "content" t.bigint "answer_id"