Skip to content

Commit

Permalink
Remove CheckoutPayment model
Browse files Browse the repository at this point in the history
  • Loading branch information
kpuputti committed Aug 17, 2016
1 parent af33bbc commit ee19fc8
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 95 deletions.
2 changes: 1 addition & 1 deletion app/models/braintree_payment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# payment_gateway_id :integer
# sum_cents :integer
# currency :string(255)
# type :string(255) default("CheckoutPayment")
# type :string(255) default("BraintreePayment")
# braintree_transaction_id :string(255)
#
# Indexes
Expand Down
48 changes: 0 additions & 48 deletions app/models/checkout_payment.rb

This file was deleted.

2 changes: 1 addition & 1 deletion app/models/community_membership.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Table name: community_memberships
#
# id :integer not null, primary key
# person_id :string(255) default(""), not null
# person_id :string(255) not null
# community_id :integer not null
# admin :boolean default(FALSE)
# created_at :datetime
Expand Down
2 changes: 1 addition & 1 deletion app/models/payment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# payment_gateway_id :integer
# sum_cents :integer
# currency :string(255)
# type :string(255) default("CheckoutPayment")
# type :string(255) default("BraintreePayment")
# braintree_transaction_id :string(255)
#
# Indexes
Expand Down
38 changes: 0 additions & 38 deletions app/models/payment_row.rb

This file was deleted.

9 changes: 9 additions & 0 deletions db/migrate/20160816123633_change_default_payment_type.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class ChangeDefaultPaymentType < ActiveRecord::Migration
def up
change_column :payments, :type, :string, default: "BraintreePayment"
end

def down
change_column :payments, :type, :string, default: "CheckoutPayment"
end
end
8 changes: 4 additions & 4 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20160816083607) do
ActiveRecord::Schema.define(version: 20160816123633) do

create_table "auth_tokens", force: :cascade do |t|
t.string "token", limit: 255
Expand Down Expand Up @@ -779,13 +779,13 @@
t.string "organization_id", limit: 255
t.integer "transaction_id", limit: 4
t.string "status", limit: 255
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "community_id", limit: 4
t.integer "payment_gateway_id", limit: 4
t.integer "sum_cents", limit: 4
t.string "currency", limit: 255
t.string "type", limit: 255, default: "CheckoutPayment"
t.string "type", limit: 255, default: "BraintreePayment"
t.string "braintree_transaction_id", limit: 255
end

Expand Down
2 changes: 1 addition & 1 deletion spec/models/community_membership_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Table name: community_memberships
#
# id :integer not null, primary key
# person_id :string(255) default(""), not null
# person_id :string(255) not null
# community_id :integer not null
# admin :boolean default(FALSE)
# created_at :datetime
Expand Down
2 changes: 1 addition & 1 deletion spec/models/payment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# payment_gateway_id :integer
# sum_cents :integer
# currency :string(255)
# type :string(255) default("CheckoutPayment")
# type :string(255) default("BraintreePayment")
# braintree_transaction_id :string(255)
#
# Indexes
Expand Down

0 comments on commit ee19fc8

Please sign in to comment.