Remove `subscriptions.is_active` column

This commit is contained in:
Karina Kwiatek 2023-02-27 21:34:34 +01:00
parent 0a97a86d73
commit 51638d2eb2
2 changed files with 9 additions and 2 deletions

View File

@ -0,0 +1,8 @@
# frozen_string_literal: true
class RemoveIsActiveFromSubscriptions < ActiveRecord::Migration[6.1]
def up
execute "DELETE FROM subscriptions WHERE is_active = FALSE"
remove_column :subscriptions, :is_active
end
end

View File

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2023_02_25_143633) do
ActiveRecord::Schema.define(version: 2023_02_27_174822) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -261,7 +261,6 @@ ActiveRecord::Schema.define(version: 2023_02_25_143633) do
t.bigint "answer_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.boolean "is_active", default: true
t.index ["user_id", "answer_id"], name: "index_subscriptions_on_user_id_and_answer_id"
end