effective_orders 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +856 -0
- data/Rakefile +24 -0
- data/app/assets/images/effective_orders/stripe_connect.png +0 -0
- data/app/assets/javascripts/effective_orders/shipping_address_toggle.js.coffee +30 -0
- data/app/assets/javascripts/effective_orders/stripe_charges.js.coffee +26 -0
- data/app/assets/javascripts/effective_orders/stripe_subscriptions.js.coffee +28 -0
- data/app/assets/javascripts/effective_orders.js +2 -0
- data/app/assets/stylesheets/effective_orders/_order.scss +30 -0
- data/app/assets/stylesheets/effective_orders.css.scss +1 -0
- data/app/controllers/admin/customers_controller.rb +15 -0
- data/app/controllers/admin/orders_controller.rb +22 -0
- data/app/controllers/effective/carts_controller.rb +70 -0
- data/app/controllers/effective/orders_controller.rb +191 -0
- data/app/controllers/effective/providers/moneris.rb +94 -0
- data/app/controllers/effective/providers/paypal.rb +29 -0
- data/app/controllers/effective/providers/stripe.rb +125 -0
- data/app/controllers/effective/providers/stripe_connect.rb +47 -0
- data/app/controllers/effective/subscriptions_controller.rb +123 -0
- data/app/controllers/effective/webhooks_controller.rb +86 -0
- data/app/helpers/effective_carts_helper.rb +90 -0
- data/app/helpers/effective_orders_helper.rb +108 -0
- data/app/helpers/effective_paypal_helper.rb +37 -0
- data/app/helpers/effective_stripe_helper.rb +63 -0
- data/app/mailers/effective/orders_mailer.rb +64 -0
- data/app/models/concerns/acts_as_purchasable.rb +134 -0
- data/app/models/effective/access_denied.rb +17 -0
- data/app/models/effective/cart.rb +65 -0
- data/app/models/effective/cart_item.rb +40 -0
- data/app/models/effective/customer.rb +61 -0
- data/app/models/effective/datatables/customers.rb +45 -0
- data/app/models/effective/datatables/orders.rb +53 -0
- data/app/models/effective/order.rb +247 -0
- data/app/models/effective/order_item.rb +69 -0
- data/app/models/effective/stripe_charge.rb +35 -0
- data/app/models/effective/subscription.rb +95 -0
- data/app/models/inputs/price_field.rb +63 -0
- data/app/models/inputs/price_form_input.rb +7 -0
- data/app/models/inputs/price_formtastic_input.rb +9 -0
- data/app/models/inputs/price_input.rb +19 -0
- data/app/models/inputs/price_simple_form_input.rb +8 -0
- data/app/models/validators/effective/sold_out_validator.rb +7 -0
- data/app/views/active_admin/effective_orders/orders/_show.html.haml +70 -0
- data/app/views/admin/customers/_actions.html.haml +2 -0
- data/app/views/admin/customers/index.html.haml +10 -0
- data/app/views/admin/orders/index.html.haml +7 -0
- data/app/views/admin/orders/show.html.haml +11 -0
- data/app/views/effective/carts/_cart.html.haml +33 -0
- data/app/views/effective/carts/show.html.haml +18 -0
- data/app/views/effective/orders/_checkout_step_1.html.haml +39 -0
- data/app/views/effective/orders/_checkout_step_2.html.haml +18 -0
- data/app/views/effective/orders/_my_purchases.html.haml +15 -0
- data/app/views/effective/orders/_order.html.haml +4 -0
- data/app/views/effective/orders/_order_header.html.haml +21 -0
- data/app/views/effective/orders/_order_items.html.haml +39 -0
- data/app/views/effective/orders/_order_payment_details.html.haml +11 -0
- data/app/views/effective/orders/_order_shipping.html.haml +19 -0
- data/app/views/effective/orders/_order_user_fields.html.haml +10 -0
- data/app/views/effective/orders/checkout.html.haml +3 -0
- data/app/views/effective/orders/declined.html.haml +10 -0
- data/app/views/effective/orders/moneris/_form.html.haml +34 -0
- data/app/views/effective/orders/my_purchases.html.haml +6 -0
- data/app/views/effective/orders/my_sales.html.haml +28 -0
- data/app/views/effective/orders/new.html.haml +4 -0
- data/app/views/effective/orders/paypal/_form.html.haml +5 -0
- data/app/views/effective/orders/purchased.html.haml +10 -0
- data/app/views/effective/orders/show.html.haml +17 -0
- data/app/views/effective/orders/stripe/_form.html.haml +8 -0
- data/app/views/effective/orders/stripe/_subscription_fields.html.haml +7 -0
- data/app/views/effective/orders_mailer/order_receipt_to_admin.html.haml +8 -0
- data/app/views/effective/orders_mailer/order_receipt_to_buyer.html.haml +8 -0
- data/app/views/effective/orders_mailer/order_receipt_to_seller.html.haml +30 -0
- data/app/views/effective/subscriptions/index.html.haml +16 -0
- data/app/views/effective/subscriptions/new.html.haml +10 -0
- data/app/views/effective/subscriptions/show.html.haml +49 -0
- data/config/routes.rb +57 -0
- data/db/migrate/01_create_effective_orders.rb.erb +91 -0
- data/db/upgrade/02_upgrade_effective_orders_from03x.rb.erb +29 -0
- data/db/upgrade/upgrade_price_column_on_table.rb.erb +17 -0
- data/lib/effective_orders/engine.rb +52 -0
- data/lib/effective_orders/version.rb +3 -0
- data/lib/effective_orders.rb +76 -0
- data/lib/generators/effective_orders/install_generator.rb +38 -0
- data/lib/generators/effective_orders/upgrade_from03x_generator.rb +34 -0
- data/lib/generators/effective_orders/upgrade_price_column_generator.rb +34 -0
- data/lib/generators/templates/README +1 -0
- data/lib/generators/templates/effective_orders.rb +210 -0
- data/spec/controllers/carts_controller_spec.rb +143 -0
- data/spec/controllers/moneris_orders_controller_spec.rb +245 -0
- data/spec/controllers/orders_controller_spec.rb +418 -0
- data/spec/controllers/stripe_orders_controller_spec.rb +127 -0
- data/spec/controllers/webhooks_controller_spec.rb +79 -0
- data/spec/dummy/README.rdoc +8 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/models/product.rb +17 -0
- data/spec/dummy/app/models/product_with_float_price.rb +17 -0
- data/spec/dummy/app/models/user.rb +28 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/config/application.rb +31 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +83 -0
- data/spec/dummy/config/environments/test.rb +39 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/devise.rb +254 -0
- data/spec/dummy/config/initializers/effective_addresses.rb +15 -0
- data/spec/dummy/config/initializers/effective_orders.rb +22 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/schema.rb +142 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +487 -0
- data/spec/dummy/log/test.log +347 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/helpers/effective_orders_helper_spec.rb +21 -0
- data/spec/models/acts_as_purchasable_spec.rb +107 -0
- data/spec/models/customer_spec.rb +71 -0
- data/spec/models/factories_spec.rb +13 -0
- data/spec/models/order_item_spec.rb +35 -0
- data/spec/models/order_spec.rb +323 -0
- data/spec/models/stripe_charge_spec.rb +39 -0
- data/spec/models/subscription_spec.rb +103 -0
- data/spec/spec_helper.rb +44 -0
- data/spec/support/factories.rb +118 -0
- metadata +387 -0
@@ -0,0 +1,487 @@
|
|
1
|
+
[1m[36m (1.2ms)[0m [1mCREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "addressable_type" varchar(255), "addressable_id" integer, "category" varchar(64), "full_name" varchar(255), "address1" varchar(255), "address2" varchar(255), "city" varchar(255), "state_code" varchar(255), "country_code" varchar(255), "postal_code" varchar(255), "updated_at" datetime, "created_at" datetime) [0m
|
2
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
3
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_addresses_on_addressable_id" ON "addresses" ("addressable_id")[0m
|
4
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
5
|
+
FROM sqlite_master
|
6
|
+
WHERE name='index_addresses_on_addressable_id' AND type='index'
|
7
|
+
UNION ALL
|
8
|
+
SELECT sql
|
9
|
+
FROM sqlite_temp_master
|
10
|
+
WHERE name='index_addresses_on_addressable_id' AND type='index'
|
11
|
+
|
12
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_addresses_on_addressable_type_and_addressable_id" ON "addresses" ("addressable_type", "addressable_id")[0m
|
13
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "cart_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "cart_id" integer, "purchasable_type" varchar(255), "purchasable_id" integer, "quantity" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
14
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_cart_items_on_cart_id" ON "cart_items" ("cart_id")[0m
|
15
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
16
|
+
FROM sqlite_master
|
17
|
+
WHERE name='index_cart_items_on_cart_id' AND type='index'
|
18
|
+
UNION ALL
|
19
|
+
SELECT sql
|
20
|
+
FROM sqlite_temp_master
|
21
|
+
WHERE name='index_cart_items_on_cart_id' AND type='index'
|
22
|
+
|
23
|
+
[1m[36m (0.8ms)[0m [1mCREATE INDEX "index_cart_items_on_purchasable_id" ON "cart_items" ("purchasable_id")[0m
|
24
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
25
|
+
FROM sqlite_master
|
26
|
+
WHERE name='index_cart_items_on_purchasable_id' AND type='index'
|
27
|
+
UNION ALL
|
28
|
+
SELECT sql
|
29
|
+
FROM sqlite_temp_master
|
30
|
+
WHERE name='index_cart_items_on_purchasable_id' AND type='index'
|
31
|
+
|
32
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
33
|
+
FROM sqlite_master
|
34
|
+
WHERE name='index_cart_items_on_cart_id' AND type='index'
|
35
|
+
UNION ALL
|
36
|
+
SELECT sql
|
37
|
+
FROM sqlite_temp_master
|
38
|
+
WHERE name='index_cart_items_on_cart_id' AND type='index'
|
39
|
+
[0m
|
40
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_cart_items_on_purchasable_type_and_purchasable_id" ON "cart_items" ("purchasable_type", "purchasable_id")
|
41
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "carts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
42
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_carts_on_user_id" ON "carts" ("user_id")
|
43
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "customers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "stripe_customer_id" varchar(255), "stripe_active_card" varchar(255), "stripe_connect_access_token" varchar(255), "plans" text, "created_at" datetime, "updated_at" datetime) [0m
|
44
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "order_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "order_id" integer, "seller_id" integer, "purchasable_type" varchar(255), "purchasable_id" integer, "title" varchar(255), "quantity" integer, "price" decimal(8,2) DEFAULT 0.0, "tax_exempt" boolean, "tax_rate" decimal(5,3) DEFAULT 0.0, "quickbooks_item_name" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
45
|
+
[1m[36m (0.9ms)[0m [1mCREATE INDEX "index_order_items_on_order_id" ON "order_items" ("order_id")[0m
|
46
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
47
|
+
FROM sqlite_master
|
48
|
+
WHERE name='index_order_items_on_order_id' AND type='index'
|
49
|
+
UNION ALL
|
50
|
+
SELECT sql
|
51
|
+
FROM sqlite_temp_master
|
52
|
+
WHERE name='index_order_items_on_order_id' AND type='index'
|
53
|
+
|
54
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_order_items_on_purchasable_id" ON "order_items" ("purchasable_id")[0m
|
55
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
56
|
+
FROM sqlite_master
|
57
|
+
WHERE name='index_order_items_on_purchasable_id' AND type='index'
|
58
|
+
UNION ALL
|
59
|
+
SELECT sql
|
60
|
+
FROM sqlite_temp_master
|
61
|
+
WHERE name='index_order_items_on_purchasable_id' AND type='index'
|
62
|
+
|
63
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
64
|
+
FROM sqlite_master
|
65
|
+
WHERE name='index_order_items_on_order_id' AND type='index'
|
66
|
+
UNION ALL
|
67
|
+
SELECT sql
|
68
|
+
FROM sqlite_temp_master
|
69
|
+
WHERE name='index_order_items_on_order_id' AND type='index'
|
70
|
+
[0m
|
71
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_order_items_on_purchasable_type_and_purchasable_id" ON "order_items" ("purchasable_type", "purchasable_id")
|
72
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "purchase_state" varchar(255), "purchased_at" datetime, "payment" text, "details" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
73
|
+
[1m[35m (0.7ms)[0m CREATE INDEX "index_orders_on_user_id" ON "orders" ("user_id")
|
74
|
+
[1m[36m (0.7ms)[0m [1mCREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "price" decimal(8,2) DEFAULT 0.0, "tax_exempt" boolean, "quickbooks_item_name" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
75
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "encrypted_password" varchar(255), "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "confirmation_sent_at" datetime, "confirmed_at" datetime, "confirmation_token" varchar(255), "unconfirmed_email" varchar(255), "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "email" varchar(255), "roles_mask" integer DEFAULT 0, "archived" boolean DEFAULT 'f', "updated_at" datetime, "created_at" datetime)
|
76
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
77
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
78
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
79
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('4')
|
80
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('1')[0m
|
81
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('2')
|
82
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('3')[0m
|
83
|
+
[1m[36m (1.5ms)[0m [1mCREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "addressable_type" varchar(255), "addressable_id" integer, "category" varchar(64), "full_name" varchar(255), "address1" varchar(255), "address2" varchar(255), "city" varchar(255), "state_code" varchar(255), "country_code" varchar(255), "postal_code" varchar(255), "updated_at" datetime, "created_at" datetime) [0m
|
84
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
85
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_addresses_on_addressable_id" ON "addresses" ("addressable_id")[0m
|
86
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
87
|
+
FROM sqlite_master
|
88
|
+
WHERE name='index_addresses_on_addressable_id' AND type='index'
|
89
|
+
UNION ALL
|
90
|
+
SELECT sql
|
91
|
+
FROM sqlite_temp_master
|
92
|
+
WHERE name='index_addresses_on_addressable_id' AND type='index'
|
93
|
+
|
94
|
+
[1m[36m (0.6ms)[0m [1mCREATE INDEX "index_addresses_on_addressable_type_and_addressable_id" ON "addresses" ("addressable_type", "addressable_id")[0m
|
95
|
+
[1m[35m (0.7ms)[0m CREATE TABLE "cart_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "cart_id" integer, "purchasable_type" varchar(255), "purchasable_id" integer, "quantity" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
96
|
+
[1m[36m (0.6ms)[0m [1mCREATE INDEX "index_cart_items_on_cart_id" ON "cart_items" ("cart_id")[0m
|
97
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
98
|
+
FROM sqlite_master
|
99
|
+
WHERE name='index_cart_items_on_cart_id' AND type='index'
|
100
|
+
UNION ALL
|
101
|
+
SELECT sql
|
102
|
+
FROM sqlite_temp_master
|
103
|
+
WHERE name='index_cart_items_on_cart_id' AND type='index'
|
104
|
+
|
105
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_cart_items_on_purchasable_id" ON "cart_items" ("purchasable_id")[0m
|
106
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
107
|
+
FROM sqlite_master
|
108
|
+
WHERE name='index_cart_items_on_purchasable_id' AND type='index'
|
109
|
+
UNION ALL
|
110
|
+
SELECT sql
|
111
|
+
FROM sqlite_temp_master
|
112
|
+
WHERE name='index_cart_items_on_purchasable_id' AND type='index'
|
113
|
+
|
114
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
115
|
+
FROM sqlite_master
|
116
|
+
WHERE name='index_cart_items_on_cart_id' AND type='index'
|
117
|
+
UNION ALL
|
118
|
+
SELECT sql
|
119
|
+
FROM sqlite_temp_master
|
120
|
+
WHERE name='index_cart_items_on_cart_id' AND type='index'
|
121
|
+
[0m
|
122
|
+
[1m[35m (0.7ms)[0m CREATE INDEX "index_cart_items_on_purchasable_type_and_purchasable_id" ON "cart_items" ("purchasable_type", "purchasable_id")
|
123
|
+
[1m[36m (0.6ms)[0m [1mCREATE TABLE "carts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
124
|
+
[1m[35m (0.6ms)[0m CREATE INDEX "index_carts_on_user_id" ON "carts" ("user_id")
|
125
|
+
[1m[36m (0.7ms)[0m [1mCREATE TABLE "customers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "stripe_customer_id" varchar(255), "stripe_active_card" varchar(255), "stripe_connect_access_token" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
126
|
+
[1m[35m (1.0ms)[0m CREATE TABLE "order_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "order_id" integer, "seller_id" integer, "purchasable_type" varchar(255), "purchasable_id" integer, "title" varchar(255), "quantity" integer, "price" decimal(8,2) DEFAULT 0.0, "tax_exempt" boolean, "tax_rate" decimal(5,3) DEFAULT 0.0, "quickbooks_item_name" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
127
|
+
[1m[36m (0.8ms)[0m [1mCREATE INDEX "index_order_items_on_order_id" ON "order_items" ("order_id")[0m
|
128
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
129
|
+
FROM sqlite_master
|
130
|
+
WHERE name='index_order_items_on_order_id' AND type='index'
|
131
|
+
UNION ALL
|
132
|
+
SELECT sql
|
133
|
+
FROM sqlite_temp_master
|
134
|
+
WHERE name='index_order_items_on_order_id' AND type='index'
|
135
|
+
|
136
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_order_items_on_purchasable_id" ON "order_items" ("purchasable_id")[0m
|
137
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
138
|
+
FROM sqlite_master
|
139
|
+
WHERE name='index_order_items_on_purchasable_id' AND type='index'
|
140
|
+
UNION ALL
|
141
|
+
SELECT sql
|
142
|
+
FROM sqlite_temp_master
|
143
|
+
WHERE name='index_order_items_on_purchasable_id' AND type='index'
|
144
|
+
|
145
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
146
|
+
FROM sqlite_master
|
147
|
+
WHERE name='index_order_items_on_order_id' AND type='index'
|
148
|
+
UNION ALL
|
149
|
+
SELECT sql
|
150
|
+
FROM sqlite_temp_master
|
151
|
+
WHERE name='index_order_items_on_order_id' AND type='index'
|
152
|
+
[0m
|
153
|
+
[1m[35m (0.6ms)[0m CREATE INDEX "index_order_items_on_purchasable_type_and_purchasable_id" ON "order_items" ("purchasable_type", "purchasable_id")
|
154
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "purchase_state" varchar(255), "purchased_at" datetime, "payment" text, "details" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
155
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_orders_on_user_id" ON "orders" ("user_id")
|
156
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "price" decimal(8,2) DEFAULT 0.0, "tax_exempt" boolean, "quickbooks_item_name" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
157
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "customer_id" integer, "stripe_plan_id" varchar(255), "stripe_subscription_id" varchar(255), "stripe_coupon_id" varchar(255), "title" varchar(255), "price" decimal(8,2) DEFAULT 0.0, "created_at" datetime, "updated_at" datetime)
|
158
|
+
[1m[36m (0.7ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "encrypted_password" varchar(255), "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "confirmation_sent_at" datetime, "confirmed_at" datetime, "confirmation_token" varchar(255), "unconfirmed_email" varchar(255), "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "email" varchar(255), "roles_mask" integer DEFAULT 0, "archived" boolean DEFAULT 'f', "updated_at" datetime, "created_at" datetime) [0m
|
159
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
160
|
+
[1m[36m (0.7ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
161
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
162
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('4')[0m
|
163
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('1')
|
164
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('2')[0m
|
165
|
+
[1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('3')
|
166
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "addressable_type" varchar(255), "addressable_id" integer, "category" varchar(64), "full_name" varchar(255), "address1" varchar(255), "address2" varchar(255), "city" varchar(255), "state_code" varchar(255), "country_code" varchar(255), "postal_code" varchar(255), "updated_at" datetime, "created_at" datetime) [0m
|
167
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
168
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_addresses_on_addressable_id" ON "addresses" ("addressable_id")[0m
|
169
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
170
|
+
FROM sqlite_master
|
171
|
+
WHERE name='index_addresses_on_addressable_id' AND type='index'
|
172
|
+
UNION ALL
|
173
|
+
SELECT sql
|
174
|
+
FROM sqlite_temp_master
|
175
|
+
WHERE name='index_addresses_on_addressable_id' AND type='index'
|
176
|
+
|
177
|
+
[1m[36m (0.6ms)[0m [1mCREATE INDEX "index_addresses_on_addressable_type_and_addressable_id" ON "addresses" ("addressable_type", "addressable_id")[0m
|
178
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "cart_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "cart_id" integer, "purchasable_type" varchar(255), "purchasable_id" integer, "quantity" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
179
|
+
[1m[36m (0.6ms)[0m [1mCREATE INDEX "index_cart_items_on_cart_id" ON "cart_items" ("cart_id")[0m
|
180
|
+
[1m[35m (0.2ms)[0m SELECT sql
|
181
|
+
FROM sqlite_master
|
182
|
+
WHERE name='index_cart_items_on_cart_id' AND type='index'
|
183
|
+
UNION ALL
|
184
|
+
SELECT sql
|
185
|
+
FROM sqlite_temp_master
|
186
|
+
WHERE name='index_cart_items_on_cart_id' AND type='index'
|
187
|
+
|
188
|
+
[1m[36m (0.8ms)[0m [1mCREATE INDEX "index_cart_items_on_purchasable_id" ON "cart_items" ("purchasable_id")[0m
|
189
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
190
|
+
FROM sqlite_master
|
191
|
+
WHERE name='index_cart_items_on_purchasable_id' AND type='index'
|
192
|
+
UNION ALL
|
193
|
+
SELECT sql
|
194
|
+
FROM sqlite_temp_master
|
195
|
+
WHERE name='index_cart_items_on_purchasable_id' AND type='index'
|
196
|
+
|
197
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
198
|
+
FROM sqlite_master
|
199
|
+
WHERE name='index_cart_items_on_cart_id' AND type='index'
|
200
|
+
UNION ALL
|
201
|
+
SELECT sql
|
202
|
+
FROM sqlite_temp_master
|
203
|
+
WHERE name='index_cart_items_on_cart_id' AND type='index'
|
204
|
+
[0m
|
205
|
+
[1m[35m (0.6ms)[0m CREATE INDEX "index_cart_items_on_purchasable_type_and_purchasable_id" ON "cart_items" ("purchasable_type", "purchasable_id")
|
206
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "carts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
207
|
+
[1m[35m (0.7ms)[0m CREATE INDEX "index_carts_on_user_id" ON "carts" ("user_id")
|
208
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "customers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "stripe_customer_id" varchar(255), "stripe_active_card" varchar(255), "stripe_connect_access_token" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
209
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "order_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "order_id" integer, "seller_id" integer, "purchasable_type" varchar(255), "purchasable_id" integer, "title" varchar(255), "quantity" integer, "price" integer DEFAULT 0, "tax_exempt" boolean, "tax_rate" decimal(5,3) DEFAULT 0.0, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
210
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_order_items_on_order_id" ON "order_items" ("order_id")[0m
|
211
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
212
|
+
FROM sqlite_master
|
213
|
+
WHERE name='index_order_items_on_order_id' AND type='index'
|
214
|
+
UNION ALL
|
215
|
+
SELECT sql
|
216
|
+
FROM sqlite_temp_master
|
217
|
+
WHERE name='index_order_items_on_order_id' AND type='index'
|
218
|
+
|
219
|
+
[1m[36m (0.6ms)[0m [1mCREATE INDEX "index_order_items_on_purchasable_id" ON "order_items" ("purchasable_id")[0m
|
220
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
221
|
+
FROM sqlite_master
|
222
|
+
WHERE name='index_order_items_on_purchasable_id' AND type='index'
|
223
|
+
UNION ALL
|
224
|
+
SELECT sql
|
225
|
+
FROM sqlite_temp_master
|
226
|
+
WHERE name='index_order_items_on_purchasable_id' AND type='index'
|
227
|
+
|
228
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
229
|
+
FROM sqlite_master
|
230
|
+
WHERE name='index_order_items_on_order_id' AND type='index'
|
231
|
+
UNION ALL
|
232
|
+
SELECT sql
|
233
|
+
FROM sqlite_temp_master
|
234
|
+
WHERE name='index_order_items_on_order_id' AND type='index'
|
235
|
+
[0m
|
236
|
+
[1m[35m (0.6ms)[0m CREATE INDEX "index_order_items_on_purchasable_type_and_purchasable_id" ON "order_items" ("purchasable_type", "purchasable_id")
|
237
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "purchase_state" varchar(255), "purchased_at" datetime, "payment" text, "details" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
238
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_orders_on_user_id" ON "orders" ("user_id")
|
239
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "price" integer DEFAULT 0, "tax_exempt" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
240
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "customer_id" integer, "stripe_plan_id" varchar(255), "stripe_subscription_id" varchar(255), "stripe_coupon_id" varchar(255), "title" varchar(255), "price" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime)
|
241
|
+
[1m[36m (1.2ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "encrypted_password" varchar(255), "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "confirmation_sent_at" datetime, "confirmed_at" datetime, "confirmation_token" varchar(255), "unconfirmed_email" varchar(255), "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "email" varchar(255), "roles_mask" integer DEFAULT 0, "archived" boolean DEFAULT 'f', "updated_at" datetime, "created_at" datetime) [0m
|
242
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
243
|
+
[1m[36m (0.9ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
244
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
245
|
+
[1m[36m (0.5ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('4')[0m
|
246
|
+
[1m[36m (3.1ms)[0m [1mCREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "addressable_type" varchar(255), "addressable_id" integer, "category" varchar(64), "full_name" varchar(255), "address1" varchar(255), "address2" varchar(255), "city" varchar(255), "state_code" varchar(255), "country_code" varchar(255), "postal_code" varchar(255), "updated_at" datetime, "created_at" datetime) [0m
|
247
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
248
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_addresses_on_addressable_id" ON "addresses" ("addressable_id")[0m
|
249
|
+
[1m[35m (0.2ms)[0m SELECT sql
|
250
|
+
FROM sqlite_master
|
251
|
+
WHERE name='index_addresses_on_addressable_id' AND type='index'
|
252
|
+
UNION ALL
|
253
|
+
SELECT sql
|
254
|
+
FROM sqlite_temp_master
|
255
|
+
WHERE name='index_addresses_on_addressable_id' AND type='index'
|
256
|
+
|
257
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_addresses_on_addressable_type_and_addressable_id" ON "addresses" ("addressable_type", "addressable_id")[0m
|
258
|
+
[1m[35m (0.7ms)[0m CREATE TABLE "cart_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "cart_id" integer, "purchasable_type" varchar(255), "purchasable_id" integer, "quantity" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
259
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_cart_items_on_cart_id" ON "cart_items" ("cart_id")[0m
|
260
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
261
|
+
FROM sqlite_master
|
262
|
+
WHERE name='index_cart_items_on_cart_id' AND type='index'
|
263
|
+
UNION ALL
|
264
|
+
SELECT sql
|
265
|
+
FROM sqlite_temp_master
|
266
|
+
WHERE name='index_cart_items_on_cart_id' AND type='index'
|
267
|
+
|
268
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_cart_items_on_purchasable_id" ON "cart_items" ("purchasable_id")[0m
|
269
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
270
|
+
FROM sqlite_master
|
271
|
+
WHERE name='index_cart_items_on_purchasable_id' AND type='index'
|
272
|
+
UNION ALL
|
273
|
+
SELECT sql
|
274
|
+
FROM sqlite_temp_master
|
275
|
+
WHERE name='index_cart_items_on_purchasable_id' AND type='index'
|
276
|
+
|
277
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
278
|
+
FROM sqlite_master
|
279
|
+
WHERE name='index_cart_items_on_cart_id' AND type='index'
|
280
|
+
UNION ALL
|
281
|
+
SELECT sql
|
282
|
+
FROM sqlite_temp_master
|
283
|
+
WHERE name='index_cart_items_on_cart_id' AND type='index'
|
284
|
+
[0m
|
285
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_cart_items_on_purchasable_type_and_purchasable_id" ON "cart_items" ("purchasable_type", "purchasable_id")
|
286
|
+
[1m[36m (0.7ms)[0m [1mCREATE TABLE "carts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
287
|
+
[1m[35m (0.7ms)[0m CREATE INDEX "index_carts_on_user_id" ON "carts" ("user_id")
|
288
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "customers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "stripe_customer_id" varchar(255), "stripe_active_card" varchar(255), "stripe_connect_access_token" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
289
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "order_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "order_id" integer, "seller_id" integer, "purchasable_type" varchar(255), "purchasable_id" integer, "title" varchar(255), "quantity" integer, "price" integer DEFAULT 0, "tax_exempt" boolean, "tax_rate" decimal(5,3) DEFAULT 0.0, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
290
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_order_items_on_order_id" ON "order_items" ("order_id")[0m
|
291
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
292
|
+
FROM sqlite_master
|
293
|
+
WHERE name='index_order_items_on_order_id' AND type='index'
|
294
|
+
UNION ALL
|
295
|
+
SELECT sql
|
296
|
+
FROM sqlite_temp_master
|
297
|
+
WHERE name='index_order_items_on_order_id' AND type='index'
|
298
|
+
|
299
|
+
[1m[36m (0.8ms)[0m [1mCREATE INDEX "index_order_items_on_purchasable_id" ON "order_items" ("purchasable_id")[0m
|
300
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
301
|
+
FROM sqlite_master
|
302
|
+
WHERE name='index_order_items_on_purchasable_id' AND type='index'
|
303
|
+
UNION ALL
|
304
|
+
SELECT sql
|
305
|
+
FROM sqlite_temp_master
|
306
|
+
WHERE name='index_order_items_on_purchasable_id' AND type='index'
|
307
|
+
|
308
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
309
|
+
FROM sqlite_master
|
310
|
+
WHERE name='index_order_items_on_order_id' AND type='index'
|
311
|
+
UNION ALL
|
312
|
+
SELECT sql
|
313
|
+
FROM sqlite_temp_master
|
314
|
+
WHERE name='index_order_items_on_order_id' AND type='index'
|
315
|
+
[0m
|
316
|
+
[1m[35m (0.6ms)[0m CREATE INDEX "index_order_items_on_purchasable_type_and_purchasable_id" ON "order_items" ("purchasable_type", "purchasable_id")
|
317
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "purchase_state" varchar(255), "purchased_at" datetime, "payment" text, "details" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
318
|
+
[1m[35m (0.7ms)[0m CREATE INDEX "index_orders_on_user_id" ON "orders" ("user_id")
|
319
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "price" integer DEFAULT 0, "tax_exempt" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
320
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "product_with_float_prices" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "price" decimal DEFAULT 0.0, "tax_exempt" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
321
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "customer_id" integer, "stripe_plan_id" varchar(255), "stripe_subscription_id" varchar(255), "stripe_coupon_id" varchar(255), "title" varchar(255), "price" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime) [0m
|
322
|
+
[1m[35m (0.7ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "encrypted_password" varchar(255), "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "confirmation_sent_at" datetime, "confirmed_at" datetime, "confirmation_token" varchar(255), "unconfirmed_email" varchar(255), "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "email" varchar(255), "roles_mask" integer DEFAULT 0, "archived" boolean DEFAULT 'f', "updated_at" datetime, "created_at" datetime)
|
323
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
324
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
325
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
326
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('4')
|
327
|
+
[1m[36m (3.3ms)[0m [1mCREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "addressable_type" varchar(255), "addressable_id" integer, "category" varchar(64), "full_name" varchar(255), "address1" varchar(255), "address2" varchar(255), "city" varchar(255), "state_code" varchar(255), "country_code" varchar(255), "postal_code" varchar(255), "updated_at" datetime, "created_at" datetime) [0m
|
328
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
329
|
+
[1m[36m (0.9ms)[0m [1mCREATE INDEX "index_addresses_on_addressable_id" ON "addresses" ("addressable_id")[0m
|
330
|
+
[1m[35m (0.2ms)[0m SELECT sql
|
331
|
+
FROM sqlite_master
|
332
|
+
WHERE name='index_addresses_on_addressable_id' AND type='index'
|
333
|
+
UNION ALL
|
334
|
+
SELECT sql
|
335
|
+
FROM sqlite_temp_master
|
336
|
+
WHERE name='index_addresses_on_addressable_id' AND type='index'
|
337
|
+
|
338
|
+
[1m[36m (0.6ms)[0m [1mCREATE INDEX "index_addresses_on_addressable_type_and_addressable_id" ON "addresses" ("addressable_type", "addressable_id")[0m
|
339
|
+
[1m[35m (1.0ms)[0m CREATE TABLE "cart_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "cart_id" integer, "purchasable_type" varchar(255), "purchasable_id" integer, "quantity" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
340
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_cart_items_on_cart_id" ON "cart_items" ("cart_id")[0m
|
341
|
+
[1m[35m (0.2ms)[0m SELECT sql
|
342
|
+
FROM sqlite_master
|
343
|
+
WHERE name='index_cart_items_on_cart_id' AND type='index'
|
344
|
+
UNION ALL
|
345
|
+
SELECT sql
|
346
|
+
FROM sqlite_temp_master
|
347
|
+
WHERE name='index_cart_items_on_cart_id' AND type='index'
|
348
|
+
|
349
|
+
[1m[36m (0.6ms)[0m [1mCREATE INDEX "index_cart_items_on_purchasable_id" ON "cart_items" ("purchasable_id")[0m
|
350
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
351
|
+
FROM sqlite_master
|
352
|
+
WHERE name='index_cart_items_on_purchasable_id' AND type='index'
|
353
|
+
UNION ALL
|
354
|
+
SELECT sql
|
355
|
+
FROM sqlite_temp_master
|
356
|
+
WHERE name='index_cart_items_on_purchasable_id' AND type='index'
|
357
|
+
|
358
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
359
|
+
FROM sqlite_master
|
360
|
+
WHERE name='index_cart_items_on_cart_id' AND type='index'
|
361
|
+
UNION ALL
|
362
|
+
SELECT sql
|
363
|
+
FROM sqlite_temp_master
|
364
|
+
WHERE name='index_cart_items_on_cart_id' AND type='index'
|
365
|
+
[0m
|
366
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_cart_items_on_purchasable_type_and_purchasable_id" ON "cart_items" ("purchasable_type", "purchasable_id")
|
367
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "carts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
368
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_carts_on_user_id" ON "carts" ("user_id")
|
369
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "customers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "stripe_customer_id" varchar(255), "stripe_active_card" varchar(255), "stripe_connect_access_token" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
370
|
+
[1m[35m (1.1ms)[0m CREATE TABLE "order_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "order_id" integer, "seller_id" integer, "purchasable_type" varchar(255), "purchasable_id" integer, "title" varchar(255), "quantity" integer, "price" integer DEFAULT 0, "tax_exempt" boolean, "tax_rate" decimal(5,3) DEFAULT 0.0, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
371
|
+
[1m[36m (0.9ms)[0m [1mCREATE INDEX "index_order_items_on_order_id" ON "order_items" ("order_id")[0m
|
372
|
+
[1m[35m (0.2ms)[0m SELECT sql
|
373
|
+
FROM sqlite_master
|
374
|
+
WHERE name='index_order_items_on_order_id' AND type='index'
|
375
|
+
UNION ALL
|
376
|
+
SELECT sql
|
377
|
+
FROM sqlite_temp_master
|
378
|
+
WHERE name='index_order_items_on_order_id' AND type='index'
|
379
|
+
|
380
|
+
[1m[36m (0.9ms)[0m [1mCREATE INDEX "index_order_items_on_purchasable_id" ON "order_items" ("purchasable_id")[0m
|
381
|
+
[1m[35m (0.2ms)[0m SELECT sql
|
382
|
+
FROM sqlite_master
|
383
|
+
WHERE name='index_order_items_on_purchasable_id' AND type='index'
|
384
|
+
UNION ALL
|
385
|
+
SELECT sql
|
386
|
+
FROM sqlite_temp_master
|
387
|
+
WHERE name='index_order_items_on_purchasable_id' AND type='index'
|
388
|
+
|
389
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
390
|
+
FROM sqlite_master
|
391
|
+
WHERE name='index_order_items_on_order_id' AND type='index'
|
392
|
+
UNION ALL
|
393
|
+
SELECT sql
|
394
|
+
FROM sqlite_temp_master
|
395
|
+
WHERE name='index_order_items_on_order_id' AND type='index'
|
396
|
+
[0m
|
397
|
+
[1m[35m (0.7ms)[0m CREATE INDEX "index_order_items_on_purchasable_type_and_purchasable_id" ON "order_items" ("purchasable_type", "purchasable_id")
|
398
|
+
[1m[36m (0.7ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "purchase_state" varchar(255), "purchased_at" datetime, "payment" text, "details" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
399
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_orders_on_user_id" ON "orders" ("user_id")
|
400
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "price" integer DEFAULT 0, "tax_exempt" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
401
|
+
[1m[35m (1.0ms)[0m CREATE TABLE "subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "customer_id" integer, "stripe_plan_id" varchar(255), "stripe_subscription_id" varchar(255), "stripe_coupon_id" varchar(255), "title" varchar(255), "price" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime)
|
402
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "encrypted_password" varchar(255), "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "confirmation_sent_at" datetime, "confirmed_at" datetime, "confirmation_token" varchar(255), "unconfirmed_email" varchar(255), "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "email" varchar(255), "roles_mask" integer DEFAULT 0, "archived" boolean DEFAULT 'f', "updated_at" datetime, "created_at" datetime) [0m
|
403
|
+
[1m[35m (1.1ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
404
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
405
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
406
|
+
[1m[36m (0.5ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('4')[0m
|
407
|
+
[1m[36m (3.0ms)[0m [1mCREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "addressable_type" varchar(255), "addressable_id" integer, "category" varchar(64), "full_name" varchar(255), "address1" varchar(255), "address2" varchar(255), "city" varchar(255), "state_code" varchar(255), "country_code" varchar(255), "postal_code" varchar(255), "updated_at" datetime, "created_at" datetime) [0m
|
408
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
409
|
+
[1m[36m (0.9ms)[0m [1mCREATE INDEX "index_addresses_on_addressable_id" ON "addresses" ("addressable_id")[0m
|
410
|
+
[1m[35m (0.2ms)[0m SELECT sql
|
411
|
+
FROM sqlite_master
|
412
|
+
WHERE name='index_addresses_on_addressable_id' AND type='index'
|
413
|
+
UNION ALL
|
414
|
+
SELECT sql
|
415
|
+
FROM sqlite_temp_master
|
416
|
+
WHERE name='index_addresses_on_addressable_id' AND type='index'
|
417
|
+
|
418
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_addresses_on_addressable_type_and_addressable_id" ON "addresses" ("addressable_type", "addressable_id")[0m
|
419
|
+
[1m[35m (0.7ms)[0m CREATE TABLE "cart_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "cart_id" integer, "purchasable_type" varchar(255), "purchasable_id" integer, "quantity" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
420
|
+
[1m[36m (0.6ms)[0m [1mCREATE INDEX "index_cart_items_on_cart_id" ON "cart_items" ("cart_id")[0m
|
421
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
422
|
+
FROM sqlite_master
|
423
|
+
WHERE name='index_cart_items_on_cart_id' AND type='index'
|
424
|
+
UNION ALL
|
425
|
+
SELECT sql
|
426
|
+
FROM sqlite_temp_master
|
427
|
+
WHERE name='index_cart_items_on_cart_id' AND type='index'
|
428
|
+
|
429
|
+
[1m[36m (0.8ms)[0m [1mCREATE INDEX "index_cart_items_on_purchasable_id" ON "cart_items" ("purchasable_id")[0m
|
430
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
431
|
+
FROM sqlite_master
|
432
|
+
WHERE name='index_cart_items_on_purchasable_id' AND type='index'
|
433
|
+
UNION ALL
|
434
|
+
SELECT sql
|
435
|
+
FROM sqlite_temp_master
|
436
|
+
WHERE name='index_cart_items_on_purchasable_id' AND type='index'
|
437
|
+
|
438
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
439
|
+
FROM sqlite_master
|
440
|
+
WHERE name='index_cart_items_on_cart_id' AND type='index'
|
441
|
+
UNION ALL
|
442
|
+
SELECT sql
|
443
|
+
FROM sqlite_temp_master
|
444
|
+
WHERE name='index_cart_items_on_cart_id' AND type='index'
|
445
|
+
[0m
|
446
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_cart_items_on_purchasable_type_and_purchasable_id" ON "cart_items" ("purchasable_type", "purchasable_id")
|
447
|
+
[1m[36m (0.7ms)[0m [1mCREATE TABLE "carts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
448
|
+
[1m[35m (0.7ms)[0m CREATE INDEX "index_carts_on_user_id" ON "carts" ("user_id")
|
449
|
+
[1m[36m (0.7ms)[0m [1mCREATE TABLE "customers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "stripe_customer_id" varchar(255), "stripe_active_card" varchar(255), "stripe_connect_access_token" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
450
|
+
[1m[35m (1.0ms)[0m CREATE TABLE "order_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "order_id" integer, "seller_id" integer, "purchasable_type" varchar(255), "purchasable_id" integer, "title" varchar(255), "quantity" integer, "price" integer DEFAULT 0, "tax_exempt" boolean, "tax_rate" decimal(5,3) DEFAULT 0.0, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
451
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_order_items_on_order_id" ON "order_items" ("order_id")[0m
|
452
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
453
|
+
FROM sqlite_master
|
454
|
+
WHERE name='index_order_items_on_order_id' AND type='index'
|
455
|
+
UNION ALL
|
456
|
+
SELECT sql
|
457
|
+
FROM sqlite_temp_master
|
458
|
+
WHERE name='index_order_items_on_order_id' AND type='index'
|
459
|
+
|
460
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_order_items_on_purchasable_id" ON "order_items" ("purchasable_id")[0m
|
461
|
+
[1m[35m (0.2ms)[0m SELECT sql
|
462
|
+
FROM sqlite_master
|
463
|
+
WHERE name='index_order_items_on_purchasable_id' AND type='index'
|
464
|
+
UNION ALL
|
465
|
+
SELECT sql
|
466
|
+
FROM sqlite_temp_master
|
467
|
+
WHERE name='index_order_items_on_purchasable_id' AND type='index'
|
468
|
+
|
469
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
470
|
+
FROM sqlite_master
|
471
|
+
WHERE name='index_order_items_on_order_id' AND type='index'
|
472
|
+
UNION ALL
|
473
|
+
SELECT sql
|
474
|
+
FROM sqlite_temp_master
|
475
|
+
WHERE name='index_order_items_on_order_id' AND type='index'
|
476
|
+
[0m
|
477
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_order_items_on_purchasable_type_and_purchasable_id" ON "order_items" ("purchasable_type", "purchasable_id")
|
478
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "purchase_state" varchar(255), "purchased_at" datetime, "payment" text, "details" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
479
|
+
[1m[35m (0.6ms)[0m CREATE INDEX "index_orders_on_user_id" ON "orders" ("user_id")
|
480
|
+
[1m[36m (0.7ms)[0m [1mCREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "price" integer DEFAULT 0, "tax_exempt" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
481
|
+
[1m[35m (1.0ms)[0m CREATE TABLE "product_with_float_prices" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "price" decimal DEFAULT 0, "tax_exempt" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
482
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "customer_id" integer, "stripe_plan_id" varchar(255), "stripe_subscription_id" varchar(255), "stripe_coupon_id" varchar(255), "title" varchar(255), "price" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime) [0m
|
483
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "encrypted_password" varchar(255), "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "confirmation_sent_at" datetime, "confirmed_at" datetime, "confirmation_token" varchar(255), "unconfirmed_email" varchar(255), "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "email" varchar(255), "roles_mask" integer DEFAULT 0, "archived" boolean DEFAULT 'f', "updated_at" datetime, "created_at" datetime)
|
484
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
485
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
486
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
487
|
+
[1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('4')
|