payola-payments 1.2.2 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/payola/checkout_button.js +8 -1
- data/app/assets/javascripts/payola/subscription_form_onestep.js +13 -2
- data/app/assets/javascripts/payola/subscription_form_twostep.js +10 -1
- data/app/controllers/concerns/payola/async_behavior.rb +14 -5
- data/app/controllers/payola/subscriptions_controller.rb +16 -3
- data/app/controllers/payola/transactions_controller.rb +1 -1
- data/app/models/concerns/payola/plan.rb +1 -1
- data/app/models/payola/subscription.rb +7 -1
- data/app/services/payola/change_subscription_quantity.rb +25 -0
- data/app/services/payola/charge_card.rb +8 -4
- data/app/services/payola/create_subscription.rb +1 -0
- data/app/services/payola/start_subscription.rb +48 -12
- data/app/views/payola/subscriptions/_change_plan.html.erb +1 -1
- data/config/database.yml.ci +6 -0
- data/config/routes.rb +1 -0
- data/db/migrate/20141213205847_add_active_to_payola_coupon.rb +5 -0
- data/lib/payola.rb +4 -4
- data/lib/payola/engine.rb +1 -1
- data/lib/payola/version.rb +1 -1
- data/lib/payola/worker.rb +1 -1
- data/spec/concerns/plan_spec.rb +9 -0
- data/spec/concerns/sellable_spec.rb +1 -1
- data/spec/controllers/payola/subscriptions_controller_spec.rb +41 -13
- data/spec/controllers/payola/transactions_controller_spec.rb +7 -5
- data/spec/dummy/app/models/user.rb +2 -0
- data/spec/dummy/app/views/subscribe/index.html.erb +2 -0
- data/spec/dummy/config/environments/test.rb +5 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20141204170622_create_users.rb +8 -0
- data/spec/dummy/db/schema.rb +16 -10
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +131 -0
- data/spec/dummy/log/test.log +75119 -0
- data/spec/factories/subscription_plan.rb +2 -2
- data/spec/mailers/payola/receipt_mailer_spec.rb +6 -1
- data/spec/models/payola/coupon_spec.rb +27 -0
- data/spec/payola_spec.rb +2 -2
- data/spec/services/payola/change_subscription_plan_spec.rb +0 -1
- data/spec/services/payola/change_subscription_quantity_spec.rb +29 -0
- data/spec/services/payola/charge_card_spec.rb +9 -0
- data/spec/services/payola/start_subscription_spec.rb +37 -0
- data/spec/worker_spec.rb +1 -1
- metadata +15 -4
data/lib/payola/version.rb
CHANGED
data/lib/payola/worker.rb
CHANGED
data/spec/concerns/plan_spec.rb
CHANGED
@@ -34,5 +34,14 @@ module Payola
|
|
34
34
|
subscription_plan.save!
|
35
35
|
end
|
36
36
|
|
37
|
+
it "should not try to create the plan at stripe before the model is updated" do
|
38
|
+
subscription_plan = build(:subscription_plan)
|
39
|
+
subscription_plan.save!
|
40
|
+
subscription_plan.name = "new name"
|
41
|
+
|
42
|
+
Payola::CreatePlan.should_not_receive(:call)
|
43
|
+
subscription_plan.save!
|
44
|
+
end
|
45
|
+
|
37
46
|
end
|
38
47
|
end
|
@@ -2,6 +2,8 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
module Payola
|
4
4
|
describe SubscriptionsController do
|
5
|
+
routes { Payola::Engine.routes }
|
6
|
+
|
5
7
|
before do
|
6
8
|
@plan = create(:subscription_plan)
|
7
9
|
Payola.register_subscribable(@plan.class)
|
@@ -25,10 +27,11 @@ module Payola
|
|
25
27
|
'action' => 'create',
|
26
28
|
'plan' => @plan,
|
27
29
|
'coupon' => nil,
|
30
|
+
'quantity' => 1,
|
28
31
|
'affiliate' => nil
|
29
32
|
).and_return(subscription)
|
30
33
|
|
31
|
-
post :create, plan_class: @plan.plan_class, plan_id: @plan.id
|
34
|
+
post :create, plan_class: @plan.plan_class, plan_id: @plan.id
|
32
35
|
|
33
36
|
expect(response.status).to eq 200
|
34
37
|
parsed_body = JSON.load(response.body)
|
@@ -50,7 +53,7 @@ module Payola
|
|
50
53
|
CreateSubscription.should_receive(:call).and_return(subscription)
|
51
54
|
Payola.should_not_receive(:queue!)
|
52
55
|
|
53
|
-
post :create, plan_class: @plan.plan_class, plan_id: @plan.id
|
56
|
+
post :create, plan_class: @plan.plan_class, plan_id: @plan.id
|
54
57
|
|
55
58
|
expect(response.status).to eq 400
|
56
59
|
parsed_body = JSON.load(response.body)
|
@@ -61,12 +64,12 @@ module Payola
|
|
61
64
|
|
62
65
|
describe '#status' do
|
63
66
|
it "should return 404 if it can't find the subscription" do
|
64
|
-
get :status, guid: 'doesnotexist'
|
67
|
+
get :status, guid: 'doesnotexist'
|
65
68
|
expect(response.status).to eq 404
|
66
69
|
end
|
67
70
|
it "should return json with properties" do
|
68
71
|
subscription = create(:subscription)
|
69
|
-
get :status, guid: subscription.guid
|
72
|
+
get :status, guid: subscription.guid
|
70
73
|
|
71
74
|
expect(response.status).to eq 200
|
72
75
|
|
@@ -82,7 +85,7 @@ module Payola
|
|
82
85
|
it "should redirect to the product's redirect path" do
|
83
86
|
plan = create(:subscription_plan)
|
84
87
|
subscription = create(:subscription, :plan => plan)
|
85
|
-
get :show, guid: subscription.guid
|
88
|
+
get :show, guid: subscription.guid
|
86
89
|
|
87
90
|
expect(response).to redirect_to '/'
|
88
91
|
end
|
@@ -94,7 +97,7 @@ module Payola
|
|
94
97
|
end
|
95
98
|
it "call Payola::CancelSubscription and redirect" do
|
96
99
|
Payola::CancelSubscription.should_receive(:call)
|
97
|
-
delete :destroy, :
|
100
|
+
delete :destroy, guid: @subscription.guid
|
98
101
|
# TODO : Figure out why this needs to be a hardcoded path.
|
99
102
|
# Why doesn't subscription_path(@subscription) work?
|
100
103
|
expect(response).to redirect_to "/subdir/payola/confirm_subscription/#{@subscription.guid}"
|
@@ -104,7 +107,7 @@ module Payola
|
|
104
107
|
expect(Payola::CancelSubscription).to_not receive(:call)
|
105
108
|
expect_any_instance_of(::ApplicationController).to receive(:payola_can_modify_subscription?).and_return(false)
|
106
109
|
|
107
|
-
delete :destroy, :
|
110
|
+
delete :destroy, guid: @subscription.guid
|
108
111
|
expect(response).to redirect_to "/subdir/payola/confirm_subscription/#{@subscription.guid}"
|
109
112
|
expect(request.flash[:alert]).to eq 'You cannot modify this subscription.'
|
110
113
|
end
|
@@ -119,17 +122,42 @@ module Payola
|
|
119
122
|
it "should call Payola::ChangeSubscriptionPlan and redirect" do
|
120
123
|
expect(Payola::ChangeSubscriptionPlan).to receive(:call).with(@subscription, @plan)
|
121
124
|
|
122
|
-
post :change_plan, guid: @subscription.guid, plan_class: @plan.plan_class, plan_id: @plan.id
|
125
|
+
post :change_plan, guid: @subscription.guid, plan_class: @plan.plan_class, plan_id: @plan.id
|
123
126
|
|
124
127
|
expect(response).to redirect_to "/subdir/payola/confirm_subscription/#{@subscription.guid}"
|
125
128
|
expect(request.flash[:notice]).to eq 'Subscription plan updated'
|
126
129
|
end
|
127
130
|
|
128
|
-
it "should redirect with an error if it can't
|
129
|
-
expect(Payola::
|
131
|
+
it "should redirect with an error if it can't update the subscription" do
|
132
|
+
expect(Payola::ChangeSubscriptionPlan).to_not receive(:call)
|
133
|
+
expect_any_instance_of(::ApplicationController).to receive(:payola_can_modify_subscription?).and_return(false)
|
134
|
+
|
135
|
+
post :change_plan, guid: @subscription.guid, plan_class: @plan.plan_class, plan_id: @plan.id
|
136
|
+
expect(response).to redirect_to "/subdir/payola/confirm_subscription/#{@subscription.guid}"
|
137
|
+
expect(request.flash[:alert]).to eq 'You cannot modify this subscription.'
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
describe '#change_quantity' do
|
142
|
+
before :each do
|
143
|
+
@subscription = create(:subscription, state: :active)
|
144
|
+
@plan = create(:subscription_plan)
|
145
|
+
end
|
146
|
+
|
147
|
+
it "should call Payola::ChangeSubscriptionQuantity and redirect" do
|
148
|
+
expect(Payola::ChangeSubscriptionQuantity).to receive(:call).with(@subscription, 5)
|
149
|
+
|
150
|
+
post :change_quantity, guid: @subscription.guid, quantity: 5
|
151
|
+
|
152
|
+
expect(response).to redirect_to "/subdir/payola/confirm_subscription/#{@subscription.guid}"
|
153
|
+
expect(request.flash[:notice]).to eq 'Subscription quantity updated'
|
154
|
+
end
|
155
|
+
|
156
|
+
it "should redirect with an error if it can't update the subscription" do
|
157
|
+
expect(Payola::ChangeSubscriptionQuantity).to_not receive(:call)
|
130
158
|
expect_any_instance_of(::ApplicationController).to receive(:payola_can_modify_subscription?).and_return(false)
|
131
159
|
|
132
|
-
|
160
|
+
post :change_quantity, guid: @subscription.guid, quantity: 5
|
133
161
|
expect(response).to redirect_to "/subdir/payola/confirm_subscription/#{@subscription.guid}"
|
134
162
|
expect(request.flash[:alert]).to eq 'You cannot modify this subscription.'
|
135
163
|
end
|
@@ -144,7 +172,7 @@ module Payola
|
|
144
172
|
it "should call UpdateCard and redirect" do
|
145
173
|
expect(Payola::UpdateCard).to receive(:call).with(@subscription, 'tok_1234')
|
146
174
|
|
147
|
-
post :update_card, guid: @subscription.guid, stripeToken: 'tok_1234'
|
175
|
+
post :update_card, guid: @subscription.guid, stripeToken: 'tok_1234'
|
148
176
|
|
149
177
|
expect(response).to redirect_to "/subdir/payola/confirm_subscription/#{@subscription.guid}"
|
150
178
|
expect(request.flash[:notice]).to eq 'Card updated'
|
@@ -154,7 +182,7 @@ module Payola
|
|
154
182
|
expect(Payola::UpdateCard).to receive(:call).never
|
155
183
|
expect_any_instance_of(::ApplicationController).to receive(:payola_can_modify_subscription?).and_return(false)
|
156
184
|
|
157
|
-
post :update_card, guid: @subscription.guid, stripeToken: 'tok_1234'
|
185
|
+
post :update_card, guid: @subscription.guid, stripeToken: 'tok_1234'
|
158
186
|
|
159
187
|
expect(response).to redirect_to "/subdir/payola/confirm_subscription/#{@subscription.guid}"
|
160
188
|
expect(request.flash[:alert]).to eq 'You cannot modify this subscription.'
|
@@ -2,6 +2,8 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
module Payola
|
4
4
|
describe TransactionsController do
|
5
|
+
routes { Payola::Engine.routes }
|
6
|
+
|
5
7
|
before do
|
6
8
|
@product = create(:product)
|
7
9
|
Payola.register_sellable(@product.class)
|
@@ -29,7 +31,7 @@ module Payola
|
|
29
31
|
).and_return(sale)
|
30
32
|
|
31
33
|
Payola.should_receive(:queue!)
|
32
|
-
post :create, product_class: @product.product_class, permalink: @product.permalink
|
34
|
+
post :create, product_class: @product.product_class, permalink: @product.permalink
|
33
35
|
|
34
36
|
expect(response.status).to eq 200
|
35
37
|
parsed_body = JSON.load(response.body)
|
@@ -50,7 +52,7 @@ module Payola
|
|
50
52
|
CreateSale.should_receive(:call).and_return(sale)
|
51
53
|
Payola.should_not_receive(:queue!)
|
52
54
|
|
53
|
-
post :create, product_class: @product.product_class, permalink: @product.permalink
|
55
|
+
post :create, product_class: @product.product_class, permalink: @product.permalink
|
54
56
|
|
55
57
|
expect(response.status).to eq 400
|
56
58
|
parsed_body = JSON.load(response.body)
|
@@ -61,12 +63,12 @@ module Payola
|
|
61
63
|
|
62
64
|
describe '#status' do
|
63
65
|
it "should return 404 if it can't find the sale" do
|
64
|
-
get :status, guid: 'doesnotexist'
|
66
|
+
get :status, guid: 'doesnotexist'
|
65
67
|
expect(response.status).to eq 404
|
66
68
|
end
|
67
69
|
it "should return json with properties" do
|
68
70
|
sale = create(:sale)
|
69
|
-
get :status, guid: sale.guid
|
71
|
+
get :status, guid: sale.guid
|
70
72
|
|
71
73
|
expect(response.status).to eq 200
|
72
74
|
|
@@ -81,7 +83,7 @@ module Payola
|
|
81
83
|
describe '#show' do
|
82
84
|
it "should redirect to the product's redirect path" do
|
83
85
|
sale = create(:sale)
|
84
|
-
get :show, guid: sale.guid
|
86
|
+
get :show, guid: sale.guid
|
85
87
|
|
86
88
|
expect(response).to redirect_to '/'
|
87
89
|
end
|
@@ -16,6 +16,8 @@
|
|
16
16
|
<input type="text" data-stripe="cvc"></input><br>
|
17
17
|
Coupon Code<br>
|
18
18
|
<input type="text" name="coupon" data-payola="coupon"></input><br>
|
19
|
+
Quantity<br>
|
20
|
+
<input type="text" name="quantity" data-payola="quantity"></input><br>
|
19
21
|
<input type="submit"></input>
|
20
22
|
<% end %>
|
21
23
|
|
@@ -13,7 +13,11 @@ Rails.application.configure do
|
|
13
13
|
config.eager_load = false
|
14
14
|
|
15
15
|
# Configure static asset server for tests with Cache-Control for performance.
|
16
|
-
|
16
|
+
if Rails::VERSION::MAJOR >= 4 && Rails::VERSION::MINOR >= 2
|
17
|
+
config.serve_static_files = true
|
18
|
+
else
|
19
|
+
config.serve_static_asses = true
|
20
|
+
end
|
17
21
|
config.static_cache_control = 'public, max-age=3600'
|
18
22
|
|
19
23
|
# Show full error reports and disable caching.
|
Binary file
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,14 +11,14 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(version:
|
14
|
+
ActiveRecord::Schema.define(version: 20141213205847) do
|
15
15
|
|
16
|
-
create_table "owners", force:
|
16
|
+
create_table "owners", force: :cascade do |t|
|
17
17
|
t.datetime "created_at"
|
18
18
|
t.datetime "updated_at"
|
19
19
|
end
|
20
20
|
|
21
|
-
create_table "payola_affiliates", force:
|
21
|
+
create_table "payola_affiliates", force: :cascade do |t|
|
22
22
|
t.string "code"
|
23
23
|
t.string "email"
|
24
24
|
t.integer "percent"
|
@@ -26,14 +26,15 @@ ActiveRecord::Schema.define(version: 20141122020755) do
|
|
26
26
|
t.datetime "updated_at"
|
27
27
|
end
|
28
28
|
|
29
|
-
create_table "payola_coupons", force:
|
29
|
+
create_table "payola_coupons", force: :cascade do |t|
|
30
30
|
t.string "code"
|
31
31
|
t.integer "percent_off"
|
32
32
|
t.datetime "created_at"
|
33
33
|
t.datetime "updated_at"
|
34
|
+
t.boolean "active", default: true
|
34
35
|
end
|
35
36
|
|
36
|
-
create_table "payola_sales", force:
|
37
|
+
create_table "payola_sales", force: :cascade do |t|
|
37
38
|
t.string "email"
|
38
39
|
t.string "guid"
|
39
40
|
t.integer "product_id"
|
@@ -69,13 +70,13 @@ ActiveRecord::Schema.define(version: 20141122020755) do
|
|
69
70
|
add_index "payola_sales", ["product_id", "product_type"], name: "index_payola_sales_on_product"
|
70
71
|
add_index "payola_sales", ["stripe_customer_id"], name: "index_payola_sales_on_stripe_customer_id"
|
71
72
|
|
72
|
-
create_table "payola_stripe_webhooks", force:
|
73
|
+
create_table "payola_stripe_webhooks", force: :cascade do |t|
|
73
74
|
t.string "stripe_id"
|
74
75
|
t.datetime "created_at"
|
75
76
|
t.datetime "updated_at"
|
76
77
|
end
|
77
78
|
|
78
|
-
create_table "payola_subscriptions", force:
|
79
|
+
create_table "payola_subscriptions", force: :cascade do |t|
|
79
80
|
t.string "plan_type"
|
80
81
|
t.integer "plan_id"
|
81
82
|
t.datetime "start"
|
@@ -115,7 +116,7 @@ ActiveRecord::Schema.define(version: 20141122020755) do
|
|
115
116
|
|
116
117
|
add_index "payola_subscriptions", ["guid"], name: "index_payola_subscriptions_on_guid"
|
117
118
|
|
118
|
-
create_table "products", force:
|
119
|
+
create_table "products", force: :cascade do |t|
|
119
120
|
t.string "name"
|
120
121
|
t.string "permalink"
|
121
122
|
t.integer "price"
|
@@ -123,7 +124,7 @@ ActiveRecord::Schema.define(version: 20141122020755) do
|
|
123
124
|
t.datetime "updated_at"
|
124
125
|
end
|
125
126
|
|
126
|
-
create_table "subscription_plan_without_interval_counts", force:
|
127
|
+
create_table "subscription_plan_without_interval_counts", force: :cascade do |t|
|
127
128
|
t.string "name"
|
128
129
|
t.string "stripe_id"
|
129
130
|
t.integer "amount"
|
@@ -132,7 +133,7 @@ ActiveRecord::Schema.define(version: 20141122020755) do
|
|
132
133
|
t.datetime "updated_at"
|
133
134
|
end
|
134
135
|
|
135
|
-
create_table "subscription_plans", force:
|
136
|
+
create_table "subscription_plans", force: :cascade do |t|
|
136
137
|
t.integer "amount"
|
137
138
|
t.string "interval"
|
138
139
|
t.integer "interval_count"
|
@@ -143,4 +144,9 @@ ActiveRecord::Schema.define(version: 20141122020755) do
|
|
143
144
|
t.datetime "updated_at"
|
144
145
|
end
|
145
146
|
|
147
|
+
create_table "users", force: :cascade do |t|
|
148
|
+
t.datetime "created_at"
|
149
|
+
t.datetime "updated_at"
|
150
|
+
end
|
151
|
+
|
146
152
|
end
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -6210,3 +6210,134 @@ Started GET "/assets/payola.js?body=1" for 127.0.0.1 at 2014-11-25 16:56:14 -050
|
|
6210
6210
|
Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2014-11-25 16:56:14 -0500
|
6211
6211
|
Terminating 3 actors...
|
6212
6212
|
Terminating task: type=:finalizer, meta={:method_name=>:__shutdown__}, status=:callwait
|
6213
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6214
|
+
Migrating to AddSetupFeeToPayolaSubscriptions (20141122020755)
|
6215
|
+
[1m[35m (0.2ms)[0m begin transaction
|
6216
|
+
[1m[36m (0.5ms)[0m [1mALTER TABLE "payola_subscriptions" ADD "setup_fee" integer[0m
|
6217
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141122020755"]]
|
6218
|
+
[1m[36m (1.1ms)[0m [1mcommit transaction[0m
|
6219
|
+
Migrating to CreateUsers (20141204170622)
|
6220
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6221
|
+
[1m[36m (0.3ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [0m
|
6222
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141204170622"]]
|
6223
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
6224
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
6225
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6226
|
+
FROM sqlite_master
|
6227
|
+
WHERE name='index_payola_sales_on_owner_id_and_owner_type' AND type='index'
|
6228
|
+
UNION ALL
|
6229
|
+
SELECT sql
|
6230
|
+
FROM sqlite_temp_master
|
6231
|
+
WHERE name='index_payola_sales_on_owner_id_and_owner_type' AND type='index'
|
6232
|
+
[0m
|
6233
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6234
|
+
FROM sqlite_master
|
6235
|
+
WHERE name='index_payola_sales_on_stripe_customer_id' AND type='index'
|
6236
|
+
UNION ALL
|
6237
|
+
SELECT sql
|
6238
|
+
FROM sqlite_temp_master
|
6239
|
+
WHERE name='index_payola_sales_on_stripe_customer_id' AND type='index'
|
6240
|
+
|
6241
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6242
|
+
FROM sqlite_master
|
6243
|
+
WHERE name='index_payola_sales_on_product' AND type='index'
|
6244
|
+
UNION ALL
|
6245
|
+
SELECT sql
|
6246
|
+
FROM sqlite_temp_master
|
6247
|
+
WHERE name='index_payola_sales_on_product' AND type='index'
|
6248
|
+
[0m
|
6249
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6250
|
+
FROM sqlite_master
|
6251
|
+
WHERE name='index_payola_sales_on_guid' AND type='index'
|
6252
|
+
UNION ALL
|
6253
|
+
SELECT sql
|
6254
|
+
FROM sqlite_temp_master
|
6255
|
+
WHERE name='index_payola_sales_on_guid' AND type='index'
|
6256
|
+
|
6257
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6258
|
+
FROM sqlite_master
|
6259
|
+
WHERE name='index_payola_sales_on_email' AND type='index'
|
6260
|
+
UNION ALL
|
6261
|
+
SELECT sql
|
6262
|
+
FROM sqlite_temp_master
|
6263
|
+
WHERE name='index_payola_sales_on_email' AND type='index'
|
6264
|
+
[0m
|
6265
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6266
|
+
FROM sqlite_master
|
6267
|
+
WHERE name='index_payola_sales_on_coupon_id' AND type='index'
|
6268
|
+
UNION ALL
|
6269
|
+
SELECT sql
|
6270
|
+
FROM sqlite_temp_master
|
6271
|
+
WHERE name='index_payola_sales_on_coupon_id' AND type='index'
|
6272
|
+
|
6273
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6274
|
+
FROM sqlite_master
|
6275
|
+
WHERE name='index_payola_subscriptions_on_guid' AND type='index'
|
6276
|
+
UNION ALL
|
6277
|
+
SELECT sql
|
6278
|
+
FROM sqlite_temp_master
|
6279
|
+
WHERE name='index_payola_subscriptions_on_guid' AND type='index'
|
6280
|
+
[0m
|
6281
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6282
|
+
Migrating to AddActiveToPayolaCoupon (20141213205847)
|
6283
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6284
|
+
[1m[36m (1.0ms)[0m [1mALTER TABLE "payola_coupons" ADD "active" boolean DEFAULT 't'[0m
|
6285
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141213205847"]]
|
6286
|
+
[1m[36m (1.4ms)[0m [1mcommit transaction[0m
|
6287
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
6288
|
+
[1m[36m (0.2ms)[0m [1m SELECT sql
|
6289
|
+
FROM sqlite_master
|
6290
|
+
WHERE name='index_payola_sales_on_owner_id_and_owner_type' AND type='index'
|
6291
|
+
UNION ALL
|
6292
|
+
SELECT sql
|
6293
|
+
FROM sqlite_temp_master
|
6294
|
+
WHERE name='index_payola_sales_on_owner_id_and_owner_type' AND type='index'
|
6295
|
+
[0m
|
6296
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6297
|
+
FROM sqlite_master
|
6298
|
+
WHERE name='index_payola_sales_on_stripe_customer_id' AND type='index'
|
6299
|
+
UNION ALL
|
6300
|
+
SELECT sql
|
6301
|
+
FROM sqlite_temp_master
|
6302
|
+
WHERE name='index_payola_sales_on_stripe_customer_id' AND type='index'
|
6303
|
+
|
6304
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6305
|
+
FROM sqlite_master
|
6306
|
+
WHERE name='index_payola_sales_on_product' AND type='index'
|
6307
|
+
UNION ALL
|
6308
|
+
SELECT sql
|
6309
|
+
FROM sqlite_temp_master
|
6310
|
+
WHERE name='index_payola_sales_on_product' AND type='index'
|
6311
|
+
[0m
|
6312
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6313
|
+
FROM sqlite_master
|
6314
|
+
WHERE name='index_payola_sales_on_guid' AND type='index'
|
6315
|
+
UNION ALL
|
6316
|
+
SELECT sql
|
6317
|
+
FROM sqlite_temp_master
|
6318
|
+
WHERE name='index_payola_sales_on_guid' AND type='index'
|
6319
|
+
|
6320
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6321
|
+
FROM sqlite_master
|
6322
|
+
WHERE name='index_payola_sales_on_email' AND type='index'
|
6323
|
+
UNION ALL
|
6324
|
+
SELECT sql
|
6325
|
+
FROM sqlite_temp_master
|
6326
|
+
WHERE name='index_payola_sales_on_email' AND type='index'
|
6327
|
+
[0m
|
6328
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6329
|
+
FROM sqlite_master
|
6330
|
+
WHERE name='index_payola_sales_on_coupon_id' AND type='index'
|
6331
|
+
UNION ALL
|
6332
|
+
SELECT sql
|
6333
|
+
FROM sqlite_temp_master
|
6334
|
+
WHERE name='index_payola_sales_on_coupon_id' AND type='index'
|
6335
|
+
|
6336
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6337
|
+
FROM sqlite_master
|
6338
|
+
WHERE name='index_payola_subscriptions_on_guid' AND type='index'
|
6339
|
+
UNION ALL
|
6340
|
+
SELECT sql
|
6341
|
+
FROM sqlite_temp_master
|
6342
|
+
WHERE name='index_payola_subscriptions_on_guid' AND type='index'
|
6343
|
+
[0m
|