Skip to content

Commit

Permalink
feat(subscription): remove active column
Browse files Browse the repository at this point in the history
  • Loading branch information
orlando committed Jun 1, 2021
1 parent 88d7a8d commit 9e102e8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 0 additions & 3 deletions app/models/subscription.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ def raven_context
end

class Subscription < ApplicationRecord
# TODO: remove this after we run the migrations correctly on production and we can delete the `active :boolean` column
self.ignored_columns = ["active"]

has_paper_trail(
only: [:amount, :status]
)
Expand Down
5 changes: 5 additions & 0 deletions db/migrate/20210601004722_remove_active_from_subscriptions.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class RemoveActiveFromSubscriptions < ActiveRecord::Migration[6.1]
def change
remove_column :subscriptions, :active
end
end
3 changes: 1 addition & 2 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2021_05_22_002128) do
ActiveRecord::Schema.define(version: 2021_06_01_004722) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Expand Down Expand Up @@ -91,7 +91,6 @@

create_table "subscriptions", force: :cascade do |t|
t.bigint "user_id"
t.boolean "active"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.datetime "start_date"
Expand Down

0 comments on commit 9e102e8

Please sign in to comment.