[deploy] Remove ProMembership Table and Factory (#8020)
This commit is contained in:
parent
b536cac3de
commit
b8d72a36d8
3 changed files with 22 additions and 22 deletions
21
db/migrate/20200521153435_remove_pro_memberships.rb
Normal file
21
db/migrate/20200521153435_remove_pro_memberships.rb
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
class RemoveProMemberships < ActiveRecord::Migration[5.2]
|
||||
def up
|
||||
drop_table :pro_memberships
|
||||
end
|
||||
|
||||
def down
|
||||
create_table :pro_memberships do |t|
|
||||
t.references :user, foreign_key: true
|
||||
t.string :status, default: "active"
|
||||
t.datetime :expires_at, null: false
|
||||
t.datetime :expiration_notification_at
|
||||
t.integer :expiration_notifications_count, null: false, default: 0
|
||||
t.boolean :auto_recharge, null: false, default: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
add_index :pro_memberships, :status
|
||||
add_index :pro_memberships, :expires_at
|
||||
add_index :pro_memberships, :auto_recharge
|
||||
end
|
||||
end
|
||||
17
db/schema.rb
17
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: 2020_05_21_103952) do
|
||||
ActiveRecord::Schema.define(version: 2020_05_21_153435) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
|
@ -875,21 +875,6 @@ ActiveRecord::Schema.define(version: 2020_05_21_103952) do
|
|||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "pro_memberships", force: :cascade do |t|
|
||||
t.boolean "auto_recharge", default: false, null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "expiration_notification_at"
|
||||
t.integer "expiration_notifications_count", default: 0, null: false
|
||||
t.datetime "expires_at", null: false
|
||||
t.string "status", default: "active"
|
||||
t.datetime "updated_at", null: false
|
||||
t.bigint "user_id"
|
||||
t.index ["auto_recharge"], name: "index_pro_memberships_on_auto_recharge"
|
||||
t.index ["expires_at"], name: "index_pro_memberships_on_expires_at"
|
||||
t.index ["status"], name: "index_pro_memberships_on_status"
|
||||
t.index ["user_id"], name: "index_pro_memberships_on_user_id"
|
||||
end
|
||||
|
||||
create_table "profile_pins", force: :cascade do |t|
|
||||
t.datetime "created_at", null: false
|
||||
t.bigint "pinnable_id"
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
FactoryBot.define do
|
||||
factory :pro_membership do
|
||||
user
|
||||
status { "active" }
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Reference in a new issue