solidus_i18n 1.2.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +35 -0
- data/.gem_release.yml +5 -0
- data/.github/stale.yml +17 -0
- data/.gitignore +4 -8
- data/.hound.yml +1 -1
- data/.rspec +2 -0
- data/.rubocop.yml +3 -6
- data/.rubocop_todo.yml +18 -0
- data/Gemfile +20 -10
- data/{LICENSE.md → LICENSE} +2 -2
- data/README.md +47 -46
- data/Rakefile +8 -24
- data/bin/console +17 -0
- data/bin/rails +12 -4
- data/bin/setup +8 -0
- data/config/locales/bg.yml +1 -47
- data/config/locales/ca.yml +12 -49
- data/config/locales/cs.yml +1 -48
- data/config/locales/da.yml +1 -47
- data/config/locales/de-CH.yml +0 -48
- data/config/locales/de.yml +408 -257
- data/config/locales/en-AU.yml +0 -48
- data/config/locales/en-GB.yml +1 -47
- data/config/locales/en-IN.yml +7 -53
- data/config/locales/en-NZ.yml +0 -48
- data/config/locales/es-CL.yml +1 -49
- data/config/locales/es-EC.yml +1 -47
- data/config/locales/es-MX.yml +417 -111
- data/config/locales/es.yml +27 -63
- data/config/locales/et.yml +0 -50
- data/config/locales/fa.yml +0 -48
- data/config/locales/fi.yml +1 -47
- data/config/locales/fr.yml +660 -264
- data/config/locales/id.yml +2 -46
- data/config/locales/it.yml +1196 -646
- data/config/locales/ja.yml +7 -53
- data/config/locales/ko.yml +0 -48
- data/config/locales/lv.yml +0 -48
- data/config/locales/nb.yml +0 -48
- data/config/locales/nl.yml +1 -47
- data/config/locales/pl.yml +1 -47
- data/config/locales/pt-BR.yml +1093 -251
- data/config/locales/pt.yml +0 -48
- data/config/locales/ro.yml +3 -48
- data/config/locales/ru.yml +1884 -1240
- data/config/locales/sk.yml +1 -45
- data/config/locales/sl-SI.yml +0 -48
- data/config/locales/sv.yml +1 -47
- data/config/locales/th.yml +1 -45
- data/config/locales/tr.yml +1 -45
- data/config/locales/uk.yml +1 -49
- data/config/locales/vi.yml +1 -45
- data/config/locales/zh-CN.yml +1 -45
- data/config/locales/zh-TW.yml +1 -45
- data/config/routes.rb +2 -8
- data/i18n-tasks.yml +4 -0
- data/lib/generators/solidus_i18n/install/install_generator.rb +10 -13
- data/lib/solidus_i18n/engine.rb +9 -36
- data/lib/solidus_i18n/factories.rb +4 -0
- data/lib/solidus_i18n/version.rb +3 -16
- data/lib/solidus_i18n.rb +4 -5
- data/lib/tasks/solidus_i18n/upgrade.rake +13 -11
- data/solidus_i18n.gemspec +29 -37
- data/spec/dummy/README.md +24 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/config/manifest.js +2 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/channels/application_cable/channel.rb +4 -0
- data/spec/dummy/app/channels/application_cable/connection.rb +4 -0
- data/spec/dummy/app/controllers/application_controller.rb +2 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/jobs/application_job.rb +7 -0
- data/spec/dummy/app/mailers/application_mailer.rb +4 -0
- data/spec/dummy/app/models/application_record.rb +3 -0
- data/spec/dummy/app/views/layouts/application.html.erb +15 -0
- data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/setup +33 -0
- data/spec/dummy/config/application.rb +53 -0
- data/spec/dummy/config/boot.rb +6 -0
- data/spec/dummy/config/cable.yml +10 -0
- data/spec/dummy/config/credentials.yml.enc +1 -0
- data/spec/dummy/config/database.yml +12 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +76 -0
- data/spec/dummy/config/environments/production.rb +120 -0
- data/spec/dummy/config/environments/test.rb +36 -0
- data/spec/dummy/config/initializers/application_controller_renderer.rb +8 -0
- data/spec/dummy/config/initializers/assets.rb +12 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +8 -0
- data/spec/dummy/config/initializers/content_security_policy.rb +28 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +6 -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/permissions_policy.rb +11 -0
- data/spec/dummy/config/initializers/spree.rb +74 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +33 -0
- data/spec/dummy/config/master.key +1 -0
- data/spec/dummy/config/routes.rb +9 -0
- data/spec/dummy/config/storage.yml +34 -0
- data/spec/dummy/config.ru +6 -0
- data/spec/dummy/db/migrate/20210218213814_create_active_storage_tables.active_storage.rb +36 -0
- data/spec/dummy/db/migrate/20210218213818_create_action_mailbox_tables.action_mailbox.rb +14 -0
- data/spec/dummy/db/migrate/20210218213819_create_action_text_tables.action_text.rb +14 -0
- data/spec/dummy/db/migrate/20210218213820_solidus_one_four.spree.rb +1103 -0
- data/spec/dummy/db/migrate/20210218213821_create_spree_wallet_payment_sources.spree.rb +28 -0
- data/spec/dummy/db/migrate/20210218213822_migrate_credit_cards_to_wallet_payment_sources.spree.rb +30 -0
- data/spec/dummy/db/migrate/20210218213823_remove_is_default_from_prices.spree.rb +8 -0
- data/spec/dummy/db/migrate/20210218213824_remove_currency_from_line_items.spree.rb +8 -0
- data/spec/dummy/db/migrate/20210218213825_add_available_to_columns_and_remove_display_on_from_payment_methods.spree.rb +31 -0
- data/spec/dummy/db/migrate/20210218213826_create_spree_promotion_code_batch.spree.rb +39 -0
- data/spec/dummy/db/migrate/20210218213827_add_available_to_users_and_remove_display_on_from_shipping_methods.spree.rb +23 -0
- data/spec/dummy/db/migrate/20210218213828_add_index_to_spree_payments_number.spree.rb +8 -0
- data/spec/dummy/db/migrate/20210218213829_remove_spree_store_credits_column.spree.rb +8 -0
- data/spec/dummy/db/migrate/20210218213830_add_lft_and_rgt_indexes_to_taxons.spree.rb +9 -0
- data/spec/dummy/db/migrate/20210218213831_remove_order_id_from_inventory_units.spree.rb +31 -0
- data/spec/dummy/db/migrate/20210218213832_transform_tax_rate_category_relation.spree.rb +51 -0
- data/spec/dummy/db/migrate/20210218213833_add_roles_unique_constraints.spree.rb +9 -0
- data/spec/dummy/db/migrate/20210218213834_add_time_range_to_tax_rate.spree.rb +9 -0
- data/spec/dummy/db/migrate/20210218213835_rename_bogus_gateways.spree.rb +19 -0
- data/spec/dummy/db/migrate/20210218213836_remove_default_tax_from_spree_zones.spree.rb +8 -0
- data/spec/dummy/db/migrate/20210218213837_create_promotion_rule_stores.spree.rb +13 -0
- data/spec/dummy/db/migrate/20210218213838_create_store_shipping_methods.spree.rb +13 -0
- data/spec/dummy/db/migrate/20210218213839_add_available_locales_to_stores.spree.rb +10 -0
- data/spec/dummy/db/migrate/20210218213840_add_amount_remaining_to_store_credit_events.spree.rb +62 -0
- data/spec/dummy/db/migrate/20210218213841_add_join_characters_to_promotion_code_batch.spree.rb +12 -0
- data/spec/dummy/db/migrate/20210218213842_add_apply_to_all_to_variant_property_rule.spree.rb +13 -0
- data/spec/dummy/db/migrate/20210218213843_create_spree_store_credit_reasons_table.spree.rb +56 -0
- data/spec/dummy/db/migrate/20210218213844_remove_code_from_spree_promotions.spree.rb +43 -0
- data/spec/dummy/db/migrate/20210218213845_drop_spree_store_credit_update_reasons.spree.rb +20 -0
- data/spec/dummy/db/migrate/20210218213846_add_default_billng_flag_to_user_addresses.spree.rb +7 -0
- data/spec/dummy/db/migrate/20210218213847_add_bcc_email_to_spree_stores.spree.rb +8 -0
- data/spec/dummy/db/migrate/20210218213848_add_discontinue_on_to_spree_products.spree.rb +8 -0
- data/spec/dummy/db/migrate/20210218213849_add_name_to_spree_addresses.spree.rb +14 -0
- data/spec/dummy/db/migrate/20210218213850_add_api_key_to_spree_users.spree_api.rb +10 -0
- data/spec/dummy/db/migrate/20210218213851_resize_api_key_field.spree_api.rb +10 -0
- data/spec/dummy/db/migrate/20210218213852_rename_api_key_to_spree_api_key.spree_api.rb +10 -0
- data/spec/dummy/db/migrate/20210218213853_add_index_to_user_spree_api_key.spree_api.rb +10 -0
- data/spec/dummy/db/schema.rb +1215 -0
- data/spec/dummy/db/seeds.rb +10 -0
- data/spec/dummy/db/solidus_test.sqlite3 +0 -0
- data/spec/dummy/log/test.log +1198 -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/apple-touch-icon-precomposed.png +0 -0
- data/spec/dummy/public/apple-touch-icon.png +0 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/tmp/development_secret.txt +1 -0
- data/spec/dummy/vendor/assets/javascripts/spree/backend/all.js +10 -0
- data/spec/dummy/vendor/assets/javascripts/spree/frontend/all.js +10 -0
- data/{app/assets/stylesheets/spree/backend/solidus_i18n.css → spec/dummy/vendor/assets/stylesheets/spree/backend/all.css} +1 -0
- data/{app/assets/stylesheets/spree/frontend/solidus_i18n.css → spec/dummy/vendor/assets/stylesheets/spree/frontend/all.css} +1 -0
- data/spec/examples.txt +4 -0
- data/spec/solidus_i18n_spec.rb +67 -0
- data/spec/spec_helper.rb +15 -13
- metadata +222 -264
- data/.travis.yml +0 -30
- data/app/assets/javascripts/spree/backend/solidus_i18n.js +0 -2
- data/app/assets/javascripts/spree/backend/translations.js.coffee +0 -5
- data/app/assets/javascripts/spree/frontend/locale.js.coffee +0 -3
- data/app/assets/javascripts/spree/frontend/solidus_i18n.js +0 -2
- data/app/controllers/spree/admin/locales_controller.rb +0 -16
- data/app/controllers/spree/api/base_controller_decorator.rb +0 -3
- data/app/controllers/spree/base_controller_decorator.rb +0 -3
- data/app/controllers/spree/locale_controller_decorator.rb +0 -6
- data/app/helpers/solidus_i18n/locale_helper.rb +0 -31
- data/app/overrides/spree/admin/shared/_configuration_menu/add_i18n_tab.html.erb.deface +0 -2
- data/app/overrides/spree/shared/_main_nav_bar/locale_selector.html.erb.deface +0 -16
- data/app/views/spree/admin/locales/show.html.erb +0 -27
- data/config/initializers/country_names.rb +0 -51
- data/config/initializers/routing_filter.rb +0 -2
- data/db/migrate/20150609154031_remove_translations_from_spree_tables.rb +0 -65
- data/lib/solidus_i18n/configuration.rb +0 -9
- data/lib/solidus_i18n/controller_locale_helper.rb +0 -29
- data/lib/solidus_i18n/locale.rb +0 -13
- data/spec/controllers/locales_controller_spec.rb +0 -24
- data/spec/features/admin/translations_spec.rb +0 -34
- data/spec/features/russian_errors_translation_spec.rb +0 -17
- data/spec/features/translation_spec.rb +0 -31
- data/spec/features/translations_spec.rb +0 -28
- data/spec/support/capybara.rb +0 -11
- data/spec/support/database_cleaner.rb +0 -23
- data/spec/support/factory_girl.rb +0 -5
- data/spec/support/i18n.rb +0 -5
- data/spec/support/spree.rb +0 -12
@@ -0,0 +1,1215 @@
|
|
1
|
+
# This file is auto-generated from the current state of the database. Instead
|
2
|
+
# of editing this file, please use the migrations feature of Active Record to
|
3
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
4
|
+
#
|
5
|
+
# This file is the source Rails uses to define your schema when running `bin/rails
|
6
|
+
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
|
7
|
+
# be faster and is potentially less error prone than running all of your
|
8
|
+
# migrations from scratch. Old migrations may fail to apply correctly if those
|
9
|
+
# migrations use external dependencies or application code.
|
10
|
+
#
|
11
|
+
# It's strongly recommended that you check this file into your version control system.
|
12
|
+
|
13
|
+
ActiveRecord::Schema.define(version: 2021_02_18_213853) do
|
14
|
+
|
15
|
+
create_table "action_mailbox_inbound_emails", force: :cascade do |t|
|
16
|
+
t.integer "status", default: 0, null: false
|
17
|
+
t.string "message_id", null: false
|
18
|
+
t.string "message_checksum", null: false
|
19
|
+
t.datetime "created_at", precision: 6, null: false
|
20
|
+
t.datetime "updated_at", precision: 6, null: false
|
21
|
+
t.index ["message_id", "message_checksum"], name: "index_action_mailbox_inbound_emails_uniqueness", unique: true
|
22
|
+
end
|
23
|
+
|
24
|
+
create_table "action_text_rich_texts", force: :cascade do |t|
|
25
|
+
t.string "name", null: false
|
26
|
+
t.text "body"
|
27
|
+
t.string "record_type", null: false
|
28
|
+
t.bigint "record_id", null: false
|
29
|
+
t.datetime "created_at", precision: 6, null: false
|
30
|
+
t.datetime "updated_at", precision: 6, null: false
|
31
|
+
t.index ["record_type", "record_id", "name"], name: "index_action_text_rich_texts_uniqueness", unique: true
|
32
|
+
end
|
33
|
+
|
34
|
+
create_table "active_storage_attachments", force: :cascade do |t|
|
35
|
+
t.string "name", null: false
|
36
|
+
t.string "record_type", null: false
|
37
|
+
t.integer "record_id", null: false
|
38
|
+
t.integer "blob_id", null: false
|
39
|
+
t.datetime "created_at", null: false
|
40
|
+
t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id"
|
41
|
+
t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true
|
42
|
+
end
|
43
|
+
|
44
|
+
create_table "active_storage_blobs", force: :cascade do |t|
|
45
|
+
t.string "key", null: false
|
46
|
+
t.string "filename", null: false
|
47
|
+
t.string "content_type"
|
48
|
+
t.text "metadata"
|
49
|
+
t.string "service_name", null: false
|
50
|
+
t.bigint "byte_size", null: false
|
51
|
+
t.string "checksum", null: false
|
52
|
+
t.datetime "created_at", null: false
|
53
|
+
t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
|
54
|
+
end
|
55
|
+
|
56
|
+
create_table "active_storage_variant_records", force: :cascade do |t|
|
57
|
+
t.integer "blob_id", null: false
|
58
|
+
t.string "variation_digest", null: false
|
59
|
+
t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true
|
60
|
+
end
|
61
|
+
|
62
|
+
create_table "friendly_id_slugs", force: :cascade do |t|
|
63
|
+
t.string "slug", null: false
|
64
|
+
t.integer "sluggable_id", null: false
|
65
|
+
t.string "sluggable_type", limit: 50
|
66
|
+
t.string "scope"
|
67
|
+
t.datetime "created_at", precision: 6
|
68
|
+
t.datetime "updated_at", precision: 6
|
69
|
+
t.index ["slug", "sluggable_type", "scope"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope", unique: true
|
70
|
+
t.index ["slug", "sluggable_type"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type"
|
71
|
+
t.index ["sluggable_id"], name: "index_friendly_id_slugs_on_sluggable_id"
|
72
|
+
t.index ["sluggable_type"], name: "index_friendly_id_slugs_on_sluggable_type"
|
73
|
+
end
|
74
|
+
|
75
|
+
create_table "spree_addresses", force: :cascade do |t|
|
76
|
+
t.string "firstname"
|
77
|
+
t.string "lastname"
|
78
|
+
t.string "address1"
|
79
|
+
t.string "address2"
|
80
|
+
t.string "city"
|
81
|
+
t.string "zipcode"
|
82
|
+
t.string "phone"
|
83
|
+
t.string "state_name"
|
84
|
+
t.string "alternative_phone"
|
85
|
+
t.string "company"
|
86
|
+
t.integer "state_id"
|
87
|
+
t.integer "country_id"
|
88
|
+
t.datetime "created_at", precision: 6
|
89
|
+
t.datetime "updated_at", precision: 6
|
90
|
+
t.string "name"
|
91
|
+
t.index ["country_id"], name: "index_spree_addresses_on_country_id"
|
92
|
+
t.index ["firstname"], name: "index_addresses_on_firstname"
|
93
|
+
t.index ["lastname"], name: "index_addresses_on_lastname"
|
94
|
+
t.index ["name"], name: "index_spree_addresses_on_name"
|
95
|
+
t.index ["state_id"], name: "index_spree_addresses_on_state_id"
|
96
|
+
end
|
97
|
+
|
98
|
+
create_table "spree_adjustment_reasons", force: :cascade do |t|
|
99
|
+
t.string "name"
|
100
|
+
t.string "code"
|
101
|
+
t.boolean "active", default: true
|
102
|
+
t.datetime "created_at", precision: 6
|
103
|
+
t.datetime "updated_at", precision: 6
|
104
|
+
t.index ["active"], name: "index_spree_adjustment_reasons_on_active"
|
105
|
+
t.index ["code"], name: "index_spree_adjustment_reasons_on_code"
|
106
|
+
end
|
107
|
+
|
108
|
+
create_table "spree_adjustments", force: :cascade do |t|
|
109
|
+
t.string "source_type"
|
110
|
+
t.integer "source_id"
|
111
|
+
t.string "adjustable_type"
|
112
|
+
t.integer "adjustable_id", null: false
|
113
|
+
t.decimal "amount", precision: 10, scale: 2
|
114
|
+
t.string "label"
|
115
|
+
t.boolean "eligible", default: true
|
116
|
+
t.datetime "created_at", precision: 6
|
117
|
+
t.datetime "updated_at", precision: 6
|
118
|
+
t.integer "order_id", null: false
|
119
|
+
t.boolean "included", default: false
|
120
|
+
t.integer "promotion_code_id"
|
121
|
+
t.integer "adjustment_reason_id"
|
122
|
+
t.boolean "finalized", default: false, null: false
|
123
|
+
t.index ["adjustable_id", "adjustable_type"], name: "index_spree_adjustments_on_adjustable_id_and_adjustable_type"
|
124
|
+
t.index ["adjustable_id"], name: "index_adjustments_on_order_id"
|
125
|
+
t.index ["eligible"], name: "index_spree_adjustments_on_eligible"
|
126
|
+
t.index ["order_id"], name: "index_spree_adjustments_on_order_id"
|
127
|
+
t.index ["promotion_code_id"], name: "index_spree_adjustments_on_promotion_code_id"
|
128
|
+
t.index ["source_id", "source_type"], name: "index_spree_adjustments_on_source_id_and_source_type"
|
129
|
+
end
|
130
|
+
|
131
|
+
create_table "spree_assets", force: :cascade do |t|
|
132
|
+
t.string "viewable_type"
|
133
|
+
t.integer "viewable_id"
|
134
|
+
t.integer "attachment_width"
|
135
|
+
t.integer "attachment_height"
|
136
|
+
t.integer "attachment_file_size"
|
137
|
+
t.integer "position"
|
138
|
+
t.string "attachment_content_type"
|
139
|
+
t.string "attachment_file_name"
|
140
|
+
t.string "type", limit: 75
|
141
|
+
t.datetime "attachment_updated_at"
|
142
|
+
t.text "alt"
|
143
|
+
t.datetime "created_at", precision: 6
|
144
|
+
t.datetime "updated_at", precision: 6
|
145
|
+
t.index ["viewable_id"], name: "index_assets_on_viewable_id"
|
146
|
+
t.index ["viewable_type", "type"], name: "index_assets_on_viewable_type_and_type"
|
147
|
+
end
|
148
|
+
|
149
|
+
create_table "spree_calculators", force: :cascade do |t|
|
150
|
+
t.string "type"
|
151
|
+
t.string "calculable_type"
|
152
|
+
t.integer "calculable_id"
|
153
|
+
t.datetime "created_at", precision: 6
|
154
|
+
t.datetime "updated_at", precision: 6
|
155
|
+
t.text "preferences"
|
156
|
+
t.index ["calculable_id", "calculable_type"], name: "index_spree_calculators_on_calculable_id_and_calculable_type"
|
157
|
+
t.index ["id", "type"], name: "index_spree_calculators_on_id_and_type"
|
158
|
+
end
|
159
|
+
|
160
|
+
create_table "spree_cartons", force: :cascade do |t|
|
161
|
+
t.string "number"
|
162
|
+
t.string "external_number"
|
163
|
+
t.integer "stock_location_id"
|
164
|
+
t.integer "address_id"
|
165
|
+
t.integer "shipping_method_id"
|
166
|
+
t.string "tracking"
|
167
|
+
t.datetime "shipped_at"
|
168
|
+
t.datetime "created_at", precision: 6
|
169
|
+
t.datetime "updated_at", precision: 6
|
170
|
+
t.integer "imported_from_shipment_id"
|
171
|
+
t.index ["external_number"], name: "index_spree_cartons_on_external_number"
|
172
|
+
t.index ["imported_from_shipment_id"], name: "index_spree_cartons_on_imported_from_shipment_id", unique: true
|
173
|
+
t.index ["number"], name: "index_spree_cartons_on_number", unique: true
|
174
|
+
t.index ["stock_location_id"], name: "index_spree_cartons_on_stock_location_id"
|
175
|
+
end
|
176
|
+
|
177
|
+
create_table "spree_countries", force: :cascade do |t|
|
178
|
+
t.string "iso_name"
|
179
|
+
t.string "iso"
|
180
|
+
t.string "iso3"
|
181
|
+
t.string "name"
|
182
|
+
t.integer "numcode"
|
183
|
+
t.boolean "states_required", default: false
|
184
|
+
t.datetime "updated_at", precision: 6
|
185
|
+
t.datetime "created_at", precision: 6
|
186
|
+
t.index ["iso"], name: "index_spree_countries_on_iso"
|
187
|
+
end
|
188
|
+
|
189
|
+
create_table "spree_credit_cards", force: :cascade do |t|
|
190
|
+
t.string "month"
|
191
|
+
t.string "year"
|
192
|
+
t.string "cc_type"
|
193
|
+
t.string "last_digits"
|
194
|
+
t.string "gateway_customer_profile_id"
|
195
|
+
t.string "gateway_payment_profile_id"
|
196
|
+
t.datetime "created_at", precision: 6
|
197
|
+
t.datetime "updated_at", precision: 6
|
198
|
+
t.string "name"
|
199
|
+
t.integer "user_id"
|
200
|
+
t.integer "payment_method_id"
|
201
|
+
t.boolean "default", default: false, null: false
|
202
|
+
t.integer "address_id"
|
203
|
+
t.index ["payment_method_id"], name: "index_spree_credit_cards_on_payment_method_id"
|
204
|
+
t.index ["user_id"], name: "index_spree_credit_cards_on_user_id"
|
205
|
+
end
|
206
|
+
|
207
|
+
create_table "spree_customer_returns", force: :cascade do |t|
|
208
|
+
t.string "number"
|
209
|
+
t.integer "stock_location_id"
|
210
|
+
t.datetime "created_at", precision: 6
|
211
|
+
t.datetime "updated_at", precision: 6
|
212
|
+
end
|
213
|
+
|
214
|
+
create_table "spree_inventory_units", force: :cascade do |t|
|
215
|
+
t.string "state"
|
216
|
+
t.integer "variant_id"
|
217
|
+
t.integer "shipment_id"
|
218
|
+
t.datetime "created_at", precision: 6
|
219
|
+
t.datetime "updated_at", precision: 6
|
220
|
+
t.boolean "pending", default: true
|
221
|
+
t.integer "line_item_id"
|
222
|
+
t.integer "carton_id"
|
223
|
+
t.index ["carton_id"], name: "index_spree_inventory_units_on_carton_id"
|
224
|
+
t.index ["line_item_id"], name: "index_spree_inventory_units_on_line_item_id"
|
225
|
+
t.index ["shipment_id"], name: "index_inventory_units_on_shipment_id"
|
226
|
+
t.index ["variant_id"], name: "index_inventory_units_on_variant_id"
|
227
|
+
end
|
228
|
+
|
229
|
+
create_table "spree_line_item_actions", force: :cascade do |t|
|
230
|
+
t.integer "line_item_id", null: false
|
231
|
+
t.integer "action_id", null: false
|
232
|
+
t.integer "quantity", default: 0
|
233
|
+
t.datetime "created_at", precision: 6
|
234
|
+
t.datetime "updated_at", precision: 6
|
235
|
+
t.index ["action_id"], name: "index_spree_line_item_actions_on_action_id"
|
236
|
+
t.index ["line_item_id"], name: "index_spree_line_item_actions_on_line_item_id"
|
237
|
+
end
|
238
|
+
|
239
|
+
create_table "spree_line_items", force: :cascade do |t|
|
240
|
+
t.integer "variant_id"
|
241
|
+
t.integer "order_id"
|
242
|
+
t.integer "quantity", null: false
|
243
|
+
t.decimal "price", precision: 10, scale: 2, null: false
|
244
|
+
t.datetime "created_at", precision: 6
|
245
|
+
t.datetime "updated_at", precision: 6
|
246
|
+
t.decimal "cost_price", precision: 10, scale: 2
|
247
|
+
t.integer "tax_category_id"
|
248
|
+
t.decimal "adjustment_total", precision: 10, scale: 2, default: "0.0"
|
249
|
+
t.decimal "additional_tax_total", precision: 10, scale: 2, default: "0.0"
|
250
|
+
t.decimal "promo_total", precision: 10, scale: 2, default: "0.0"
|
251
|
+
t.decimal "included_tax_total", precision: 10, scale: 2, default: "0.0", null: false
|
252
|
+
t.index ["order_id"], name: "index_spree_line_items_on_order_id"
|
253
|
+
t.index ["variant_id"], name: "index_spree_line_items_on_variant_id"
|
254
|
+
end
|
255
|
+
|
256
|
+
create_table "spree_log_entries", force: :cascade do |t|
|
257
|
+
t.string "source_type"
|
258
|
+
t.integer "source_id"
|
259
|
+
t.text "details"
|
260
|
+
t.datetime "created_at", precision: 6
|
261
|
+
t.datetime "updated_at", precision: 6
|
262
|
+
t.index ["source_id", "source_type"], name: "index_spree_log_entries_on_source_id_and_source_type"
|
263
|
+
end
|
264
|
+
|
265
|
+
create_table "spree_option_type_prototypes", force: :cascade do |t|
|
266
|
+
t.integer "prototype_id"
|
267
|
+
t.integer "option_type_id"
|
268
|
+
t.datetime "created_at", precision: 6
|
269
|
+
t.datetime "updated_at", precision: 6
|
270
|
+
end
|
271
|
+
|
272
|
+
create_table "spree_option_types", force: :cascade do |t|
|
273
|
+
t.string "name", limit: 100
|
274
|
+
t.string "presentation", limit: 100
|
275
|
+
t.integer "position", default: 0, null: false
|
276
|
+
t.datetime "created_at", precision: 6
|
277
|
+
t.datetime "updated_at", precision: 6
|
278
|
+
t.index ["position"], name: "index_spree_option_types_on_position"
|
279
|
+
end
|
280
|
+
|
281
|
+
create_table "spree_option_values", force: :cascade do |t|
|
282
|
+
t.integer "position"
|
283
|
+
t.string "name"
|
284
|
+
t.string "presentation"
|
285
|
+
t.integer "option_type_id"
|
286
|
+
t.datetime "created_at", precision: 6
|
287
|
+
t.datetime "updated_at", precision: 6
|
288
|
+
t.index ["option_type_id"], name: "index_spree_option_values_on_option_type_id"
|
289
|
+
t.index ["position"], name: "index_spree_option_values_on_position"
|
290
|
+
end
|
291
|
+
|
292
|
+
create_table "spree_option_values_variants", force: :cascade do |t|
|
293
|
+
t.integer "variant_id"
|
294
|
+
t.integer "option_value_id"
|
295
|
+
t.datetime "created_at", precision: 6
|
296
|
+
t.datetime "updated_at", precision: 6
|
297
|
+
t.index ["variant_id", "option_value_id"], name: "index_option_values_variants_on_variant_id_and_option_value_id"
|
298
|
+
t.index ["variant_id"], name: "index_spree_option_values_variants_on_variant_id"
|
299
|
+
end
|
300
|
+
|
301
|
+
create_table "spree_order_mutexes", force: :cascade do |t|
|
302
|
+
t.integer "order_id", null: false
|
303
|
+
t.datetime "created_at", precision: 6
|
304
|
+
t.index ["order_id"], name: "index_spree_order_mutexes_on_order_id", unique: true
|
305
|
+
end
|
306
|
+
|
307
|
+
create_table "spree_orders", force: :cascade do |t|
|
308
|
+
t.string "number", limit: 32
|
309
|
+
t.decimal "item_total", precision: 10, scale: 2, default: "0.0", null: false
|
310
|
+
t.decimal "total", precision: 10, scale: 2, default: "0.0", null: false
|
311
|
+
t.string "state"
|
312
|
+
t.decimal "adjustment_total", precision: 10, scale: 2, default: "0.0", null: false
|
313
|
+
t.integer "user_id"
|
314
|
+
t.datetime "completed_at"
|
315
|
+
t.integer "bill_address_id"
|
316
|
+
t.integer "ship_address_id"
|
317
|
+
t.decimal "payment_total", precision: 10, scale: 2, default: "0.0"
|
318
|
+
t.string "shipment_state"
|
319
|
+
t.string "payment_state"
|
320
|
+
t.string "email"
|
321
|
+
t.text "special_instructions"
|
322
|
+
t.datetime "created_at", precision: 6
|
323
|
+
t.datetime "updated_at", precision: 6
|
324
|
+
t.string "currency"
|
325
|
+
t.string "last_ip_address"
|
326
|
+
t.integer "created_by_id"
|
327
|
+
t.decimal "shipment_total", precision: 10, scale: 2, default: "0.0", null: false
|
328
|
+
t.decimal "additional_tax_total", precision: 10, scale: 2, default: "0.0"
|
329
|
+
t.decimal "promo_total", precision: 10, scale: 2, default: "0.0"
|
330
|
+
t.string "channel", default: "spree"
|
331
|
+
t.decimal "included_tax_total", precision: 10, scale: 2, default: "0.0", null: false
|
332
|
+
t.integer "item_count", default: 0
|
333
|
+
t.integer "approver_id"
|
334
|
+
t.datetime "approved_at"
|
335
|
+
t.boolean "confirmation_delivered", default: false
|
336
|
+
t.string "guest_token"
|
337
|
+
t.datetime "canceled_at"
|
338
|
+
t.integer "canceler_id"
|
339
|
+
t.integer "store_id"
|
340
|
+
t.string "approver_name"
|
341
|
+
t.boolean "frontend_viewable", default: true, null: false
|
342
|
+
t.index ["approver_id"], name: "index_spree_orders_on_approver_id"
|
343
|
+
t.index ["bill_address_id"], name: "index_spree_orders_on_bill_address_id"
|
344
|
+
t.index ["completed_at"], name: "index_spree_orders_on_completed_at"
|
345
|
+
t.index ["created_by_id"], name: "index_spree_orders_on_created_by_id"
|
346
|
+
t.index ["guest_token"], name: "index_spree_orders_on_guest_token"
|
347
|
+
t.index ["number"], name: "index_spree_orders_on_number"
|
348
|
+
t.index ["ship_address_id"], name: "index_spree_orders_on_ship_address_id"
|
349
|
+
t.index ["user_id", "created_by_id"], name: "index_spree_orders_on_user_id_and_created_by_id"
|
350
|
+
t.index ["user_id"], name: "index_spree_orders_on_user_id"
|
351
|
+
end
|
352
|
+
|
353
|
+
create_table "spree_orders_promotions", force: :cascade do |t|
|
354
|
+
t.integer "order_id"
|
355
|
+
t.integer "promotion_id"
|
356
|
+
t.integer "promotion_code_id"
|
357
|
+
t.datetime "created_at", precision: 6
|
358
|
+
t.datetime "updated_at", precision: 6
|
359
|
+
t.index ["order_id", "promotion_id"], name: "index_spree_orders_promotions_on_order_id_and_promotion_id"
|
360
|
+
t.index ["promotion_code_id"], name: "index_spree_orders_promotions_on_promotion_code_id"
|
361
|
+
end
|
362
|
+
|
363
|
+
create_table "spree_payment_capture_events", force: :cascade do |t|
|
364
|
+
t.decimal "amount", precision: 10, scale: 2, default: "0.0"
|
365
|
+
t.integer "payment_id"
|
366
|
+
t.datetime "created_at", precision: 6
|
367
|
+
t.datetime "updated_at", precision: 6
|
368
|
+
t.index ["payment_id"], name: "index_spree_payment_capture_events_on_payment_id"
|
369
|
+
end
|
370
|
+
|
371
|
+
create_table "spree_payment_methods", force: :cascade do |t|
|
372
|
+
t.string "type"
|
373
|
+
t.string "name"
|
374
|
+
t.text "description"
|
375
|
+
t.boolean "active", default: true
|
376
|
+
t.datetime "deleted_at"
|
377
|
+
t.datetime "created_at", precision: 6
|
378
|
+
t.datetime "updated_at", precision: 6
|
379
|
+
t.boolean "auto_capture"
|
380
|
+
t.text "preferences"
|
381
|
+
t.string "preference_source"
|
382
|
+
t.integer "position", default: 0
|
383
|
+
t.boolean "available_to_users", default: true
|
384
|
+
t.boolean "available_to_admin", default: true
|
385
|
+
t.index ["id", "type"], name: "index_spree_payment_methods_on_id_and_type"
|
386
|
+
end
|
387
|
+
|
388
|
+
create_table "spree_payments", force: :cascade do |t|
|
389
|
+
t.decimal "amount", precision: 10, scale: 2, default: "0.0", null: false
|
390
|
+
t.integer "order_id"
|
391
|
+
t.string "source_type"
|
392
|
+
t.integer "source_id"
|
393
|
+
t.integer "payment_method_id"
|
394
|
+
t.string "state"
|
395
|
+
t.string "response_code"
|
396
|
+
t.string "avs_response"
|
397
|
+
t.datetime "created_at", precision: 6
|
398
|
+
t.datetime "updated_at", precision: 6
|
399
|
+
t.string "number"
|
400
|
+
t.string "cvv_response_code"
|
401
|
+
t.string "cvv_response_message"
|
402
|
+
t.index ["number"], name: "index_spree_payments_on_number", unique: true
|
403
|
+
t.index ["order_id"], name: "index_spree_payments_on_order_id"
|
404
|
+
t.index ["payment_method_id"], name: "index_spree_payments_on_payment_method_id"
|
405
|
+
t.index ["source_id", "source_type"], name: "index_spree_payments_on_source_id_and_source_type"
|
406
|
+
end
|
407
|
+
|
408
|
+
create_table "spree_preferences", force: :cascade do |t|
|
409
|
+
t.text "value"
|
410
|
+
t.string "key"
|
411
|
+
t.datetime "created_at", precision: 6
|
412
|
+
t.datetime "updated_at", precision: 6
|
413
|
+
t.index ["key"], name: "index_spree_preferences_on_key", unique: true
|
414
|
+
end
|
415
|
+
|
416
|
+
create_table "spree_prices", force: :cascade do |t|
|
417
|
+
t.integer "variant_id", null: false
|
418
|
+
t.decimal "amount", precision: 10, scale: 2
|
419
|
+
t.string "currency"
|
420
|
+
t.datetime "deleted_at"
|
421
|
+
t.datetime "created_at", precision: 6
|
422
|
+
t.datetime "updated_at", precision: 6
|
423
|
+
t.string "country_iso", limit: 2
|
424
|
+
t.index ["country_iso"], name: "index_spree_prices_on_country_iso"
|
425
|
+
t.index ["variant_id", "currency"], name: "index_spree_prices_on_variant_id_and_currency"
|
426
|
+
end
|
427
|
+
|
428
|
+
create_table "spree_product_option_types", force: :cascade do |t|
|
429
|
+
t.integer "position"
|
430
|
+
t.integer "product_id"
|
431
|
+
t.integer "option_type_id"
|
432
|
+
t.datetime "created_at", precision: 6
|
433
|
+
t.datetime "updated_at", precision: 6
|
434
|
+
t.index ["option_type_id"], name: "index_spree_product_option_types_on_option_type_id"
|
435
|
+
t.index ["position"], name: "index_spree_product_option_types_on_position"
|
436
|
+
t.index ["product_id"], name: "index_spree_product_option_types_on_product_id"
|
437
|
+
end
|
438
|
+
|
439
|
+
create_table "spree_product_promotion_rules", force: :cascade do |t|
|
440
|
+
t.integer "product_id"
|
441
|
+
t.integer "promotion_rule_id"
|
442
|
+
t.datetime "created_at", precision: 6
|
443
|
+
t.datetime "updated_at", precision: 6
|
444
|
+
t.index ["product_id"], name: "index_products_promotion_rules_on_product_id"
|
445
|
+
t.index ["promotion_rule_id"], name: "index_products_promotion_rules_on_promotion_rule_id"
|
446
|
+
end
|
447
|
+
|
448
|
+
create_table "spree_product_properties", force: :cascade do |t|
|
449
|
+
t.string "value"
|
450
|
+
t.integer "product_id"
|
451
|
+
t.integer "property_id"
|
452
|
+
t.datetime "created_at", precision: 6
|
453
|
+
t.datetime "updated_at", precision: 6
|
454
|
+
t.integer "position", default: 0
|
455
|
+
t.index ["position"], name: "index_spree_product_properties_on_position"
|
456
|
+
t.index ["product_id"], name: "index_product_properties_on_product_id"
|
457
|
+
t.index ["property_id"], name: "index_spree_product_properties_on_property_id"
|
458
|
+
end
|
459
|
+
|
460
|
+
create_table "spree_products", force: :cascade do |t|
|
461
|
+
t.string "name", default: "", null: false
|
462
|
+
t.text "description"
|
463
|
+
t.datetime "available_on"
|
464
|
+
t.datetime "deleted_at"
|
465
|
+
t.string "slug"
|
466
|
+
t.text "meta_description"
|
467
|
+
t.string "meta_keywords"
|
468
|
+
t.integer "tax_category_id"
|
469
|
+
t.integer "shipping_category_id"
|
470
|
+
t.datetime "created_at", precision: 6
|
471
|
+
t.datetime "updated_at", precision: 6
|
472
|
+
t.boolean "promotionable", default: true
|
473
|
+
t.string "meta_title"
|
474
|
+
t.datetime "discontinue_on"
|
475
|
+
t.index ["available_on"], name: "index_spree_products_on_available_on"
|
476
|
+
t.index ["deleted_at"], name: "index_spree_products_on_deleted_at"
|
477
|
+
t.index ["name"], name: "index_spree_products_on_name"
|
478
|
+
t.index ["slug"], name: "index_spree_products_on_slug", unique: true
|
479
|
+
end
|
480
|
+
|
481
|
+
create_table "spree_products_taxons", force: :cascade do |t|
|
482
|
+
t.integer "product_id"
|
483
|
+
t.integer "taxon_id"
|
484
|
+
t.integer "position"
|
485
|
+
t.datetime "created_at", precision: 6
|
486
|
+
t.datetime "updated_at", precision: 6
|
487
|
+
t.index ["position"], name: "index_spree_products_taxons_on_position"
|
488
|
+
t.index ["product_id"], name: "index_spree_products_taxons_on_product_id"
|
489
|
+
t.index ["taxon_id"], name: "index_spree_products_taxons_on_taxon_id"
|
490
|
+
end
|
491
|
+
|
492
|
+
create_table "spree_promotion_action_line_items", force: :cascade do |t|
|
493
|
+
t.integer "promotion_action_id"
|
494
|
+
t.integer "variant_id"
|
495
|
+
t.integer "quantity", default: 1
|
496
|
+
t.datetime "created_at", precision: 6
|
497
|
+
t.datetime "updated_at", precision: 6
|
498
|
+
t.index ["promotion_action_id"], name: "index_spree_promotion_action_line_items_on_promotion_action_id"
|
499
|
+
t.index ["variant_id"], name: "index_spree_promotion_action_line_items_on_variant_id"
|
500
|
+
end
|
501
|
+
|
502
|
+
create_table "spree_promotion_actions", force: :cascade do |t|
|
503
|
+
t.integer "promotion_id"
|
504
|
+
t.integer "position"
|
505
|
+
t.string "type"
|
506
|
+
t.datetime "deleted_at"
|
507
|
+
t.text "preferences"
|
508
|
+
t.datetime "created_at", precision: 6
|
509
|
+
t.datetime "updated_at", precision: 6
|
510
|
+
t.index ["deleted_at"], name: "index_spree_promotion_actions_on_deleted_at"
|
511
|
+
t.index ["id", "type"], name: "index_spree_promotion_actions_on_id_and_type"
|
512
|
+
t.index ["promotion_id"], name: "index_spree_promotion_actions_on_promotion_id"
|
513
|
+
end
|
514
|
+
|
515
|
+
create_table "spree_promotion_categories", force: :cascade do |t|
|
516
|
+
t.string "name"
|
517
|
+
t.datetime "created_at", precision: 6
|
518
|
+
t.datetime "updated_at", precision: 6
|
519
|
+
t.string "code"
|
520
|
+
end
|
521
|
+
|
522
|
+
create_table "spree_promotion_code_batches", force: :cascade do |t|
|
523
|
+
t.integer "promotion_id", null: false
|
524
|
+
t.string "base_code", null: false
|
525
|
+
t.integer "number_of_codes", null: false
|
526
|
+
t.string "email"
|
527
|
+
t.string "error"
|
528
|
+
t.string "state", default: "pending"
|
529
|
+
t.datetime "created_at", precision: 6, null: false
|
530
|
+
t.datetime "updated_at", precision: 6, null: false
|
531
|
+
t.string "join_characters", default: "_", null: false
|
532
|
+
t.index ["promotion_id"], name: "index_spree_promotion_code_batches_on_promotion_id"
|
533
|
+
end
|
534
|
+
|
535
|
+
create_table "spree_promotion_codes", force: :cascade do |t|
|
536
|
+
t.integer "promotion_id", null: false
|
537
|
+
t.string "value", null: false
|
538
|
+
t.datetime "created_at", precision: 6
|
539
|
+
t.datetime "updated_at", precision: 6
|
540
|
+
t.integer "promotion_code_batch_id"
|
541
|
+
t.index ["promotion_code_batch_id"], name: "index_spree_promotion_codes_on_promotion_code_batch_id"
|
542
|
+
t.index ["promotion_id"], name: "index_spree_promotion_codes_on_promotion_id"
|
543
|
+
t.index ["value"], name: "index_spree_promotion_codes_on_value", unique: true
|
544
|
+
end
|
545
|
+
|
546
|
+
create_table "spree_promotion_rule_taxons", force: :cascade do |t|
|
547
|
+
t.integer "taxon_id"
|
548
|
+
t.integer "promotion_rule_id"
|
549
|
+
t.datetime "created_at", precision: 6
|
550
|
+
t.datetime "updated_at", precision: 6
|
551
|
+
t.index ["promotion_rule_id"], name: "index_spree_promotion_rule_taxons_on_promotion_rule_id"
|
552
|
+
t.index ["taxon_id"], name: "index_spree_promotion_rule_taxons_on_taxon_id"
|
553
|
+
end
|
554
|
+
|
555
|
+
create_table "spree_promotion_rules", force: :cascade do |t|
|
556
|
+
t.integer "promotion_id"
|
557
|
+
t.integer "product_group_id"
|
558
|
+
t.string "type"
|
559
|
+
t.datetime "created_at", precision: 6
|
560
|
+
t.datetime "updated_at", precision: 6
|
561
|
+
t.string "code"
|
562
|
+
t.text "preferences"
|
563
|
+
t.index ["product_group_id"], name: "index_promotion_rules_on_product_group_id"
|
564
|
+
t.index ["promotion_id"], name: "index_spree_promotion_rules_on_promotion_id"
|
565
|
+
end
|
566
|
+
|
567
|
+
create_table "spree_promotion_rules_stores", force: :cascade do |t|
|
568
|
+
t.integer "store_id", null: false
|
569
|
+
t.integer "promotion_rule_id", null: false
|
570
|
+
t.datetime "created_at", null: false
|
571
|
+
t.datetime "updated_at", null: false
|
572
|
+
t.index ["promotion_rule_id"], name: "index_spree_promotion_rules_stores_on_promotion_rule_id"
|
573
|
+
t.index ["store_id"], name: "index_spree_promotion_rules_stores_on_store_id"
|
574
|
+
end
|
575
|
+
|
576
|
+
create_table "spree_promotion_rules_users", force: :cascade do |t|
|
577
|
+
t.integer "user_id"
|
578
|
+
t.integer "promotion_rule_id"
|
579
|
+
t.datetime "created_at", precision: 6
|
580
|
+
t.datetime "updated_at", precision: 6
|
581
|
+
t.index ["promotion_rule_id"], name: "index_promotion_rules_users_on_promotion_rule_id"
|
582
|
+
t.index ["user_id"], name: "index_promotion_rules_users_on_user_id"
|
583
|
+
end
|
584
|
+
|
585
|
+
create_table "spree_promotions", force: :cascade do |t|
|
586
|
+
t.string "description"
|
587
|
+
t.datetime "expires_at"
|
588
|
+
t.datetime "starts_at"
|
589
|
+
t.string "name"
|
590
|
+
t.string "type"
|
591
|
+
t.integer "usage_limit"
|
592
|
+
t.string "match_policy", default: "all"
|
593
|
+
t.boolean "advertise", default: false
|
594
|
+
t.string "path"
|
595
|
+
t.datetime "created_at", precision: 6
|
596
|
+
t.datetime "updated_at", precision: 6
|
597
|
+
t.integer "promotion_category_id"
|
598
|
+
t.integer "per_code_usage_limit"
|
599
|
+
t.boolean "apply_automatically", default: false
|
600
|
+
t.index ["advertise"], name: "index_spree_promotions_on_advertise"
|
601
|
+
t.index ["apply_automatically"], name: "index_spree_promotions_on_apply_automatically"
|
602
|
+
t.index ["expires_at"], name: "index_spree_promotions_on_expires_at"
|
603
|
+
t.index ["id", "type"], name: "index_spree_promotions_on_id_and_type"
|
604
|
+
t.index ["promotion_category_id"], name: "index_spree_promotions_on_promotion_category_id"
|
605
|
+
t.index ["starts_at"], name: "index_spree_promotions_on_starts_at"
|
606
|
+
end
|
607
|
+
|
608
|
+
create_table "spree_properties", force: :cascade do |t|
|
609
|
+
t.string "name"
|
610
|
+
t.string "presentation", null: false
|
611
|
+
t.datetime "created_at", precision: 6
|
612
|
+
t.datetime "updated_at", precision: 6
|
613
|
+
end
|
614
|
+
|
615
|
+
create_table "spree_property_prototypes", force: :cascade do |t|
|
616
|
+
t.integer "prototype_id"
|
617
|
+
t.integer "property_id"
|
618
|
+
t.datetime "created_at", precision: 6
|
619
|
+
t.datetime "updated_at", precision: 6
|
620
|
+
end
|
621
|
+
|
622
|
+
create_table "spree_prototype_taxons", force: :cascade do |t|
|
623
|
+
t.integer "taxon_id"
|
624
|
+
t.integer "prototype_id"
|
625
|
+
t.datetime "created_at", precision: 6
|
626
|
+
t.datetime "updated_at", precision: 6
|
627
|
+
t.index ["prototype_id"], name: "index_spree_prototype_taxons_on_prototype_id"
|
628
|
+
t.index ["taxon_id"], name: "index_spree_prototype_taxons_on_taxon_id"
|
629
|
+
end
|
630
|
+
|
631
|
+
create_table "spree_prototypes", force: :cascade do |t|
|
632
|
+
t.string "name"
|
633
|
+
t.datetime "created_at", precision: 6
|
634
|
+
t.datetime "updated_at", precision: 6
|
635
|
+
end
|
636
|
+
|
637
|
+
create_table "spree_refund_reasons", force: :cascade do |t|
|
638
|
+
t.string "name"
|
639
|
+
t.boolean "active", default: true
|
640
|
+
t.boolean "mutable", default: true
|
641
|
+
t.datetime "created_at", precision: 6
|
642
|
+
t.datetime "updated_at", precision: 6
|
643
|
+
t.string "code"
|
644
|
+
end
|
645
|
+
|
646
|
+
create_table "spree_refunds", force: :cascade do |t|
|
647
|
+
t.integer "payment_id"
|
648
|
+
t.decimal "amount", precision: 10, scale: 2, default: "0.0", null: false
|
649
|
+
t.string "transaction_id"
|
650
|
+
t.datetime "created_at", precision: 6
|
651
|
+
t.datetime "updated_at", precision: 6
|
652
|
+
t.integer "refund_reason_id"
|
653
|
+
t.integer "reimbursement_id"
|
654
|
+
t.index ["payment_id"], name: "index_spree_refunds_on_payment_id"
|
655
|
+
t.index ["refund_reason_id"], name: "index_refunds_on_refund_reason_id"
|
656
|
+
t.index ["reimbursement_id"], name: "index_spree_refunds_on_reimbursement_id"
|
657
|
+
end
|
658
|
+
|
659
|
+
create_table "spree_reimbursement_credits", force: :cascade do |t|
|
660
|
+
t.decimal "amount", precision: 10, scale: 2, default: "0.0", null: false
|
661
|
+
t.integer "reimbursement_id"
|
662
|
+
t.integer "creditable_id"
|
663
|
+
t.string "creditable_type"
|
664
|
+
t.datetime "created_at", precision: 6
|
665
|
+
t.datetime "updated_at", precision: 6
|
666
|
+
end
|
667
|
+
|
668
|
+
create_table "spree_reimbursement_types", force: :cascade do |t|
|
669
|
+
t.string "name"
|
670
|
+
t.boolean "active", default: true
|
671
|
+
t.boolean "mutable", default: true
|
672
|
+
t.datetime "created_at", precision: 6
|
673
|
+
t.datetime "updated_at", precision: 6
|
674
|
+
t.string "type"
|
675
|
+
t.index ["type"], name: "index_spree_reimbursement_types_on_type"
|
676
|
+
end
|
677
|
+
|
678
|
+
create_table "spree_reimbursements", force: :cascade do |t|
|
679
|
+
t.string "number"
|
680
|
+
t.string "reimbursement_status"
|
681
|
+
t.integer "customer_return_id"
|
682
|
+
t.integer "order_id"
|
683
|
+
t.decimal "total", precision: 10, scale: 2
|
684
|
+
t.datetime "created_at", precision: 6
|
685
|
+
t.datetime "updated_at", precision: 6
|
686
|
+
t.index ["customer_return_id"], name: "index_spree_reimbursements_on_customer_return_id"
|
687
|
+
t.index ["order_id"], name: "index_spree_reimbursements_on_order_id"
|
688
|
+
end
|
689
|
+
|
690
|
+
create_table "spree_return_authorizations", force: :cascade do |t|
|
691
|
+
t.string "number"
|
692
|
+
t.string "state"
|
693
|
+
t.integer "order_id"
|
694
|
+
t.text "memo"
|
695
|
+
t.datetime "created_at", precision: 6
|
696
|
+
t.datetime "updated_at", precision: 6
|
697
|
+
t.integer "stock_location_id"
|
698
|
+
t.integer "return_reason_id"
|
699
|
+
t.index ["return_reason_id"], name: "index_return_authorizations_on_return_authorization_reason_id"
|
700
|
+
end
|
701
|
+
|
702
|
+
create_table "spree_return_items", force: :cascade do |t|
|
703
|
+
t.integer "return_authorization_id"
|
704
|
+
t.integer "inventory_unit_id"
|
705
|
+
t.integer "exchange_variant_id"
|
706
|
+
t.datetime "created_at", precision: 6
|
707
|
+
t.datetime "updated_at", precision: 6
|
708
|
+
t.decimal "amount", precision: 12, scale: 4, default: "0.0", null: false
|
709
|
+
t.decimal "included_tax_total", precision: 12, scale: 4, default: "0.0", null: false
|
710
|
+
t.decimal "additional_tax_total", precision: 12, scale: 4, default: "0.0", null: false
|
711
|
+
t.string "reception_status"
|
712
|
+
t.string "acceptance_status"
|
713
|
+
t.integer "customer_return_id"
|
714
|
+
t.integer "reimbursement_id"
|
715
|
+
t.integer "exchange_inventory_unit_id"
|
716
|
+
t.text "acceptance_status_errors"
|
717
|
+
t.integer "preferred_reimbursement_type_id"
|
718
|
+
t.integer "override_reimbursement_type_id"
|
719
|
+
t.boolean "resellable", default: true, null: false
|
720
|
+
t.integer "return_reason_id"
|
721
|
+
t.index ["customer_return_id"], name: "index_return_items_on_customer_return_id"
|
722
|
+
t.index ["exchange_inventory_unit_id"], name: "index_spree_return_items_on_exchange_inventory_unit_id"
|
723
|
+
end
|
724
|
+
|
725
|
+
create_table "spree_return_reasons", force: :cascade do |t|
|
726
|
+
t.string "name"
|
727
|
+
t.boolean "active", default: true
|
728
|
+
t.boolean "mutable", default: true
|
729
|
+
t.datetime "created_at", precision: 6
|
730
|
+
t.datetime "updated_at", precision: 6
|
731
|
+
end
|
732
|
+
|
733
|
+
create_table "spree_roles", force: :cascade do |t|
|
734
|
+
t.string "name"
|
735
|
+
t.datetime "created_at", precision: 6
|
736
|
+
t.datetime "updated_at", precision: 6
|
737
|
+
t.index ["name"], name: "index_spree_roles_on_name", unique: true
|
738
|
+
end
|
739
|
+
|
740
|
+
create_table "spree_roles_users", force: :cascade do |t|
|
741
|
+
t.integer "role_id"
|
742
|
+
t.integer "user_id"
|
743
|
+
t.datetime "created_at", precision: 6
|
744
|
+
t.datetime "updated_at", precision: 6
|
745
|
+
t.index ["role_id"], name: "index_spree_roles_users_on_role_id"
|
746
|
+
t.index ["user_id", "role_id"], name: "index_spree_roles_users_on_user_id_and_role_id", unique: true
|
747
|
+
t.index ["user_id"], name: "index_spree_roles_users_on_user_id"
|
748
|
+
end
|
749
|
+
|
750
|
+
create_table "spree_shipments", force: :cascade do |t|
|
751
|
+
t.string "tracking"
|
752
|
+
t.string "number"
|
753
|
+
t.decimal "cost", precision: 10, scale: 2, default: "0.0"
|
754
|
+
t.datetime "shipped_at"
|
755
|
+
t.integer "order_id"
|
756
|
+
t.integer "deprecated_address_id"
|
757
|
+
t.string "state"
|
758
|
+
t.datetime "created_at", precision: 6
|
759
|
+
t.datetime "updated_at", precision: 6
|
760
|
+
t.integer "stock_location_id"
|
761
|
+
t.decimal "adjustment_total", precision: 10, scale: 2, default: "0.0"
|
762
|
+
t.decimal "additional_tax_total", precision: 10, scale: 2, default: "0.0"
|
763
|
+
t.decimal "promo_total", precision: 10, scale: 2, default: "0.0"
|
764
|
+
t.decimal "included_tax_total", precision: 10, scale: 2, default: "0.0", null: false
|
765
|
+
t.index ["deprecated_address_id"], name: "index_spree_shipments_on_deprecated_address_id"
|
766
|
+
t.index ["number"], name: "index_shipments_on_number"
|
767
|
+
t.index ["order_id"], name: "index_spree_shipments_on_order_id"
|
768
|
+
t.index ["stock_location_id"], name: "index_spree_shipments_on_stock_location_id"
|
769
|
+
end
|
770
|
+
|
771
|
+
create_table "spree_shipping_categories", force: :cascade do |t|
|
772
|
+
t.string "name"
|
773
|
+
t.datetime "created_at", precision: 6
|
774
|
+
t.datetime "updated_at", precision: 6
|
775
|
+
end
|
776
|
+
|
777
|
+
create_table "spree_shipping_method_categories", force: :cascade do |t|
|
778
|
+
t.integer "shipping_method_id", null: false
|
779
|
+
t.integer "shipping_category_id", null: false
|
780
|
+
t.datetime "created_at", precision: 6
|
781
|
+
t.datetime "updated_at", precision: 6
|
782
|
+
t.index ["shipping_category_id", "shipping_method_id"], name: "unique_spree_shipping_method_categories", unique: true
|
783
|
+
t.index ["shipping_method_id"], name: "index_spree_shipping_method_categories_on_shipping_method_id"
|
784
|
+
end
|
785
|
+
|
786
|
+
create_table "spree_shipping_method_stock_locations", force: :cascade do |t|
|
787
|
+
t.integer "shipping_method_id"
|
788
|
+
t.integer "stock_location_id"
|
789
|
+
t.datetime "created_at", precision: 6
|
790
|
+
t.datetime "updated_at", precision: 6
|
791
|
+
t.index ["shipping_method_id"], name: "shipping_method_id_spree_sm_sl"
|
792
|
+
t.index ["stock_location_id"], name: "sstock_location_id_spree_sm_sl"
|
793
|
+
end
|
794
|
+
|
795
|
+
create_table "spree_shipping_method_zones", force: :cascade do |t|
|
796
|
+
t.integer "shipping_method_id"
|
797
|
+
t.integer "zone_id"
|
798
|
+
t.datetime "created_at", precision: 6
|
799
|
+
t.datetime "updated_at", precision: 6
|
800
|
+
end
|
801
|
+
|
802
|
+
create_table "spree_shipping_methods", force: :cascade do |t|
|
803
|
+
t.string "name"
|
804
|
+
t.datetime "deleted_at"
|
805
|
+
t.datetime "created_at", precision: 6
|
806
|
+
t.datetime "updated_at", precision: 6
|
807
|
+
t.string "tracking_url"
|
808
|
+
t.string "admin_name"
|
809
|
+
t.integer "tax_category_id"
|
810
|
+
t.string "code"
|
811
|
+
t.boolean "available_to_all", default: true
|
812
|
+
t.string "carrier"
|
813
|
+
t.string "service_level"
|
814
|
+
t.boolean "available_to_users", default: true
|
815
|
+
t.index ["tax_category_id"], name: "index_spree_shipping_methods_on_tax_category_id"
|
816
|
+
end
|
817
|
+
|
818
|
+
create_table "spree_shipping_rate_taxes", force: :cascade do |t|
|
819
|
+
t.decimal "amount", precision: 8, scale: 2, default: "0.0", null: false
|
820
|
+
t.integer "tax_rate_id"
|
821
|
+
t.integer "shipping_rate_id"
|
822
|
+
t.datetime "created_at", precision: 6, null: false
|
823
|
+
t.datetime "updated_at", precision: 6, null: false
|
824
|
+
t.index ["shipping_rate_id"], name: "index_spree_shipping_rate_taxes_on_shipping_rate_id"
|
825
|
+
t.index ["tax_rate_id"], name: "index_spree_shipping_rate_taxes_on_tax_rate_id"
|
826
|
+
end
|
827
|
+
|
828
|
+
create_table "spree_shipping_rates", force: :cascade do |t|
|
829
|
+
t.integer "shipment_id"
|
830
|
+
t.integer "shipping_method_id"
|
831
|
+
t.boolean "selected", default: false
|
832
|
+
t.decimal "cost", precision: 8, scale: 2, default: "0.0"
|
833
|
+
t.datetime "created_at", precision: 6
|
834
|
+
t.datetime "updated_at", precision: 6
|
835
|
+
t.integer "tax_rate_id"
|
836
|
+
t.index ["shipment_id", "shipping_method_id"], name: "spree_shipping_rates_join_index", unique: true
|
837
|
+
end
|
838
|
+
|
839
|
+
create_table "spree_state_changes", force: :cascade do |t|
|
840
|
+
t.string "name"
|
841
|
+
t.string "previous_state"
|
842
|
+
t.integer "stateful_id"
|
843
|
+
t.integer "user_id"
|
844
|
+
t.string "stateful_type"
|
845
|
+
t.string "next_state"
|
846
|
+
t.datetime "created_at", precision: 6
|
847
|
+
t.datetime "updated_at", precision: 6
|
848
|
+
t.index ["stateful_id", "stateful_type"], name: "index_spree_state_changes_on_stateful_id_and_stateful_type"
|
849
|
+
t.index ["user_id"], name: "index_spree_state_changes_on_user_id"
|
850
|
+
end
|
851
|
+
|
852
|
+
create_table "spree_states", force: :cascade do |t|
|
853
|
+
t.string "name"
|
854
|
+
t.string "abbr"
|
855
|
+
t.integer "country_id"
|
856
|
+
t.datetime "updated_at", precision: 6
|
857
|
+
t.datetime "created_at", precision: 6
|
858
|
+
t.index ["country_id"], name: "index_spree_states_on_country_id"
|
859
|
+
end
|
860
|
+
|
861
|
+
create_table "spree_stock_items", force: :cascade do |t|
|
862
|
+
t.integer "stock_location_id"
|
863
|
+
t.integer "variant_id"
|
864
|
+
t.integer "count_on_hand", default: 0, null: false
|
865
|
+
t.datetime "created_at", precision: 6
|
866
|
+
t.datetime "updated_at", precision: 6
|
867
|
+
t.boolean "backorderable", default: false
|
868
|
+
t.datetime "deleted_at"
|
869
|
+
t.index ["deleted_at"], name: "index_spree_stock_items_on_deleted_at"
|
870
|
+
t.index ["stock_location_id", "variant_id"], name: "stock_item_by_loc_and_var_id"
|
871
|
+
t.index ["stock_location_id"], name: "index_spree_stock_items_on_stock_location_id"
|
872
|
+
t.index ["variant_id", "stock_location_id"], name: "index_spree_stock_items_on_variant_id_and_stock_location_id", unique: true, where: "deleted_at is null"
|
873
|
+
end
|
874
|
+
|
875
|
+
create_table "spree_stock_locations", force: :cascade do |t|
|
876
|
+
t.string "name"
|
877
|
+
t.datetime "created_at", precision: 6
|
878
|
+
t.datetime "updated_at", precision: 6
|
879
|
+
t.boolean "default", default: false, null: false
|
880
|
+
t.string "address1"
|
881
|
+
t.string "address2"
|
882
|
+
t.string "city"
|
883
|
+
t.integer "state_id"
|
884
|
+
t.string "state_name"
|
885
|
+
t.integer "country_id"
|
886
|
+
t.string "zipcode"
|
887
|
+
t.string "phone"
|
888
|
+
t.boolean "active", default: true
|
889
|
+
t.boolean "backorderable_default", default: false
|
890
|
+
t.boolean "propagate_all_variants", default: true
|
891
|
+
t.string "admin_name"
|
892
|
+
t.integer "position", default: 0
|
893
|
+
t.boolean "restock_inventory", default: true, null: false
|
894
|
+
t.boolean "fulfillable", default: true, null: false
|
895
|
+
t.string "code"
|
896
|
+
t.boolean "check_stock_on_transfer", default: true
|
897
|
+
t.index ["country_id"], name: "index_spree_stock_locations_on_country_id"
|
898
|
+
t.index ["state_id"], name: "index_spree_stock_locations_on_state_id"
|
899
|
+
end
|
900
|
+
|
901
|
+
create_table "spree_stock_movements", force: :cascade do |t|
|
902
|
+
t.integer "stock_item_id"
|
903
|
+
t.integer "quantity", default: 0
|
904
|
+
t.string "action"
|
905
|
+
t.datetime "created_at", precision: 6, null: false
|
906
|
+
t.datetime "updated_at", precision: 6, null: false
|
907
|
+
t.string "originator_type"
|
908
|
+
t.integer "originator_id"
|
909
|
+
t.index ["stock_item_id"], name: "index_spree_stock_movements_on_stock_item_id"
|
910
|
+
end
|
911
|
+
|
912
|
+
create_table "spree_store_credit_categories", force: :cascade do |t|
|
913
|
+
t.string "name"
|
914
|
+
t.datetime "created_at", precision: 6
|
915
|
+
t.datetime "updated_at", precision: 6
|
916
|
+
end
|
917
|
+
|
918
|
+
create_table "spree_store_credit_events", force: :cascade do |t|
|
919
|
+
t.integer "store_credit_id", null: false
|
920
|
+
t.string "action", null: false
|
921
|
+
t.decimal "amount", precision: 8, scale: 2
|
922
|
+
t.decimal "user_total_amount", precision: 8, scale: 2, default: "0.0", null: false
|
923
|
+
t.string "authorization_code", null: false
|
924
|
+
t.datetime "deleted_at"
|
925
|
+
t.string "originator_type"
|
926
|
+
t.integer "originator_id"
|
927
|
+
t.datetime "created_at", precision: 6
|
928
|
+
t.datetime "updated_at", precision: 6
|
929
|
+
t.decimal "amount_remaining", precision: 8, scale: 2
|
930
|
+
t.integer "store_credit_reason_id"
|
931
|
+
t.index ["deleted_at"], name: "index_spree_store_credit_events_on_deleted_at"
|
932
|
+
t.index ["store_credit_id"], name: "index_spree_store_credit_events_on_store_credit_id"
|
933
|
+
end
|
934
|
+
|
935
|
+
create_table "spree_store_credit_reasons", force: :cascade do |t|
|
936
|
+
t.string "name"
|
937
|
+
t.boolean "active", default: true
|
938
|
+
t.datetime "created_at", null: false
|
939
|
+
t.datetime "updated_at", null: false
|
940
|
+
end
|
941
|
+
|
942
|
+
create_table "spree_store_credit_types", force: :cascade do |t|
|
943
|
+
t.string "name"
|
944
|
+
t.integer "priority"
|
945
|
+
t.datetime "created_at", precision: 6
|
946
|
+
t.datetime "updated_at", precision: 6
|
947
|
+
t.index ["priority"], name: "index_spree_store_credit_types_on_priority"
|
948
|
+
end
|
949
|
+
|
950
|
+
create_table "spree_store_credits", force: :cascade do |t|
|
951
|
+
t.integer "user_id"
|
952
|
+
t.integer "category_id"
|
953
|
+
t.integer "created_by_id"
|
954
|
+
t.decimal "amount", precision: 8, scale: 2, default: "0.0", null: false
|
955
|
+
t.decimal "amount_used", precision: 8, scale: 2, default: "0.0", null: false
|
956
|
+
t.decimal "amount_authorized", precision: 8, scale: 2, default: "0.0", null: false
|
957
|
+
t.string "currency"
|
958
|
+
t.text "memo"
|
959
|
+
t.datetime "deleted_at"
|
960
|
+
t.datetime "created_at", precision: 6
|
961
|
+
t.datetime "updated_at", precision: 6
|
962
|
+
t.integer "type_id"
|
963
|
+
t.datetime "invalidated_at"
|
964
|
+
t.index ["deleted_at"], name: "index_spree_store_credits_on_deleted_at"
|
965
|
+
t.index ["type_id"], name: "index_spree_store_credits_on_type_id"
|
966
|
+
t.index ["user_id"], name: "index_spree_store_credits_on_user_id"
|
967
|
+
end
|
968
|
+
|
969
|
+
create_table "spree_store_payment_methods", force: :cascade do |t|
|
970
|
+
t.integer "store_id", null: false
|
971
|
+
t.integer "payment_method_id", null: false
|
972
|
+
t.datetime "created_at", precision: 6, null: false
|
973
|
+
t.datetime "updated_at", precision: 6, null: false
|
974
|
+
t.index ["payment_method_id"], name: "index_spree_store_payment_methods_on_payment_method_id"
|
975
|
+
t.index ["store_id"], name: "index_spree_store_payment_methods_on_store_id"
|
976
|
+
end
|
977
|
+
|
978
|
+
create_table "spree_store_shipping_methods", force: :cascade do |t|
|
979
|
+
t.integer "store_id", null: false
|
980
|
+
t.integer "shipping_method_id", null: false
|
981
|
+
t.datetime "created_at", precision: 6, null: false
|
982
|
+
t.datetime "updated_at", precision: 6, null: false
|
983
|
+
t.index ["shipping_method_id"], name: "index_spree_store_shipping_methods_on_shipping_method_id"
|
984
|
+
t.index ["store_id"], name: "index_spree_store_shipping_methods_on_store_id"
|
985
|
+
end
|
986
|
+
|
987
|
+
create_table "spree_stores", force: :cascade do |t|
|
988
|
+
t.string "name"
|
989
|
+
t.string "url"
|
990
|
+
t.text "meta_description"
|
991
|
+
t.text "meta_keywords"
|
992
|
+
t.string "seo_title"
|
993
|
+
t.string "mail_from_address"
|
994
|
+
t.string "default_currency"
|
995
|
+
t.string "code"
|
996
|
+
t.boolean "default", default: false, null: false
|
997
|
+
t.datetime "created_at", precision: 6
|
998
|
+
t.datetime "updated_at", precision: 6
|
999
|
+
t.string "cart_tax_country_iso"
|
1000
|
+
t.string "available_locales"
|
1001
|
+
t.string "bcc_email"
|
1002
|
+
t.index ["code"], name: "index_spree_stores_on_code"
|
1003
|
+
t.index ["default"], name: "index_spree_stores_on_default"
|
1004
|
+
end
|
1005
|
+
|
1006
|
+
create_table "spree_tax_categories", force: :cascade do |t|
|
1007
|
+
t.string "name"
|
1008
|
+
t.string "description"
|
1009
|
+
t.boolean "is_default", default: false
|
1010
|
+
t.datetime "deleted_at"
|
1011
|
+
t.datetime "created_at", precision: 6
|
1012
|
+
t.datetime "updated_at", precision: 6
|
1013
|
+
t.string "tax_code"
|
1014
|
+
end
|
1015
|
+
|
1016
|
+
create_table "spree_tax_rate_tax_categories", force: :cascade do |t|
|
1017
|
+
t.integer "tax_category_id", null: false
|
1018
|
+
t.integer "tax_rate_id", null: false
|
1019
|
+
t.index ["tax_category_id"], name: "index_spree_tax_rate_tax_categories_on_tax_category_id"
|
1020
|
+
t.index ["tax_rate_id"], name: "index_spree_tax_rate_tax_categories_on_tax_rate_id"
|
1021
|
+
end
|
1022
|
+
|
1023
|
+
create_table "spree_tax_rates", force: :cascade do |t|
|
1024
|
+
t.decimal "amount", precision: 8, scale: 5
|
1025
|
+
t.integer "zone_id"
|
1026
|
+
t.boolean "included_in_price", default: false
|
1027
|
+
t.datetime "created_at", precision: 6
|
1028
|
+
t.datetime "updated_at", precision: 6
|
1029
|
+
t.string "name"
|
1030
|
+
t.boolean "show_rate_in_label", default: true
|
1031
|
+
t.datetime "deleted_at"
|
1032
|
+
t.datetime "starts_at"
|
1033
|
+
t.datetime "expires_at"
|
1034
|
+
t.index ["deleted_at"], name: "index_spree_tax_rates_on_deleted_at"
|
1035
|
+
t.index ["zone_id"], name: "index_spree_tax_rates_on_zone_id"
|
1036
|
+
end
|
1037
|
+
|
1038
|
+
create_table "spree_taxonomies", force: :cascade do |t|
|
1039
|
+
t.string "name", null: false
|
1040
|
+
t.datetime "created_at", precision: 6
|
1041
|
+
t.datetime "updated_at", precision: 6
|
1042
|
+
t.integer "position", default: 0
|
1043
|
+
t.index ["position"], name: "index_spree_taxonomies_on_position"
|
1044
|
+
end
|
1045
|
+
|
1046
|
+
create_table "spree_taxons", force: :cascade do |t|
|
1047
|
+
t.integer "parent_id"
|
1048
|
+
t.integer "position", default: 0
|
1049
|
+
t.string "name", null: false
|
1050
|
+
t.string "permalink"
|
1051
|
+
t.integer "taxonomy_id"
|
1052
|
+
t.integer "lft"
|
1053
|
+
t.integer "rgt"
|
1054
|
+
t.string "icon_file_name"
|
1055
|
+
t.string "icon_content_type"
|
1056
|
+
t.integer "icon_file_size"
|
1057
|
+
t.datetime "icon_updated_at"
|
1058
|
+
t.text "description"
|
1059
|
+
t.datetime "created_at", precision: 6
|
1060
|
+
t.datetime "updated_at", precision: 6
|
1061
|
+
t.string "meta_title"
|
1062
|
+
t.string "meta_description"
|
1063
|
+
t.string "meta_keywords"
|
1064
|
+
t.integer "depth"
|
1065
|
+
t.index ["lft"], name: "index_spree_taxons_on_lft"
|
1066
|
+
t.index ["parent_id"], name: "index_taxons_on_parent_id"
|
1067
|
+
t.index ["permalink"], name: "index_taxons_on_permalink"
|
1068
|
+
t.index ["position"], name: "index_spree_taxons_on_position"
|
1069
|
+
t.index ["rgt"], name: "index_spree_taxons_on_rgt"
|
1070
|
+
t.index ["taxonomy_id"], name: "index_taxons_on_taxonomy_id"
|
1071
|
+
end
|
1072
|
+
|
1073
|
+
create_table "spree_unit_cancels", force: :cascade do |t|
|
1074
|
+
t.integer "inventory_unit_id", null: false
|
1075
|
+
t.string "reason"
|
1076
|
+
t.string "created_by"
|
1077
|
+
t.datetime "created_at", precision: 6
|
1078
|
+
t.datetime "updated_at", precision: 6
|
1079
|
+
t.index ["inventory_unit_id"], name: "index_spree_unit_cancels_on_inventory_unit_id"
|
1080
|
+
end
|
1081
|
+
|
1082
|
+
create_table "spree_user_addresses", force: :cascade do |t|
|
1083
|
+
t.integer "user_id", null: false
|
1084
|
+
t.integer "address_id", null: false
|
1085
|
+
t.boolean "default", default: false
|
1086
|
+
t.boolean "archived", default: false
|
1087
|
+
t.datetime "created_at", precision: 6, null: false
|
1088
|
+
t.datetime "updated_at", precision: 6, null: false
|
1089
|
+
t.boolean "default_billing", default: false
|
1090
|
+
t.index ["address_id"], name: "index_spree_user_addresses_on_address_id"
|
1091
|
+
t.index ["user_id", "address_id"], name: "index_spree_user_addresses_on_user_id_and_address_id", unique: true
|
1092
|
+
t.index ["user_id"], name: "index_spree_user_addresses_on_user_id"
|
1093
|
+
end
|
1094
|
+
|
1095
|
+
create_table "spree_user_stock_locations", force: :cascade do |t|
|
1096
|
+
t.integer "user_id"
|
1097
|
+
t.integer "stock_location_id"
|
1098
|
+
t.datetime "created_at", precision: 6
|
1099
|
+
t.datetime "updated_at", precision: 6
|
1100
|
+
t.index ["user_id"], name: "index_spree_user_stock_locations_on_user_id"
|
1101
|
+
end
|
1102
|
+
|
1103
|
+
create_table "spree_users", force: :cascade do |t|
|
1104
|
+
t.string "crypted_password", limit: 128
|
1105
|
+
t.string "salt", limit: 128
|
1106
|
+
t.string "email"
|
1107
|
+
t.string "remember_token"
|
1108
|
+
t.string "remember_token_expires_at"
|
1109
|
+
t.string "persistence_token"
|
1110
|
+
t.string "single_access_token"
|
1111
|
+
t.string "perishable_token"
|
1112
|
+
t.integer "login_count", default: 0, null: false
|
1113
|
+
t.integer "failed_login_count", default: 0, null: false
|
1114
|
+
t.datetime "last_request_at"
|
1115
|
+
t.datetime "current_login_at"
|
1116
|
+
t.datetime "last_login_at"
|
1117
|
+
t.string "current_login_ip"
|
1118
|
+
t.string "last_login_ip"
|
1119
|
+
t.string "login"
|
1120
|
+
t.integer "ship_address_id"
|
1121
|
+
t.integer "bill_address_id"
|
1122
|
+
t.datetime "created_at", precision: 6, null: false
|
1123
|
+
t.datetime "updated_at", precision: 6, null: false
|
1124
|
+
t.string "openid_identifier"
|
1125
|
+
t.string "spree_api_key", limit: 48
|
1126
|
+
t.index ["spree_api_key"], name: "index_spree_users_on_spree_api_key"
|
1127
|
+
end
|
1128
|
+
|
1129
|
+
create_table "spree_variant_property_rule_conditions", force: :cascade do |t|
|
1130
|
+
t.integer "option_value_id"
|
1131
|
+
t.integer "variant_property_rule_id"
|
1132
|
+
t.datetime "created_at", precision: 6, null: false
|
1133
|
+
t.datetime "updated_at", precision: 6, null: false
|
1134
|
+
t.index ["variant_property_rule_id", "option_value_id"], name: "index_spree_variant_prop_rule_conditions_on_rule_and_optval"
|
1135
|
+
end
|
1136
|
+
|
1137
|
+
create_table "spree_variant_property_rule_values", force: :cascade do |t|
|
1138
|
+
t.text "value"
|
1139
|
+
t.integer "position", default: 0
|
1140
|
+
t.integer "property_id"
|
1141
|
+
t.integer "variant_property_rule_id"
|
1142
|
+
t.datetime "created_at", precision: 6
|
1143
|
+
t.datetime "updated_at", precision: 6
|
1144
|
+
t.index ["property_id"], name: "index_spree_variant_property_rule_values_on_property_id"
|
1145
|
+
t.index ["variant_property_rule_id"], name: "index_spree_variant_property_rule_values_on_rule"
|
1146
|
+
end
|
1147
|
+
|
1148
|
+
create_table "spree_variant_property_rules", force: :cascade do |t|
|
1149
|
+
t.integer "product_id"
|
1150
|
+
t.datetime "created_at", precision: 6, null: false
|
1151
|
+
t.datetime "updated_at", precision: 6, null: false
|
1152
|
+
t.boolean "apply_to_all", default: true, null: false
|
1153
|
+
t.index ["product_id"], name: "index_spree_variant_property_rules_on_product_id"
|
1154
|
+
end
|
1155
|
+
|
1156
|
+
create_table "spree_variants", force: :cascade do |t|
|
1157
|
+
t.string "sku", default: "", null: false
|
1158
|
+
t.decimal "weight", precision: 8, scale: 2, default: "0.0"
|
1159
|
+
t.decimal "height", precision: 8, scale: 2
|
1160
|
+
t.decimal "width", precision: 8, scale: 2
|
1161
|
+
t.decimal "depth", precision: 8, scale: 2
|
1162
|
+
t.datetime "deleted_at"
|
1163
|
+
t.boolean "is_master", default: false
|
1164
|
+
t.integer "product_id"
|
1165
|
+
t.decimal "cost_price", precision: 10, scale: 2
|
1166
|
+
t.integer "position"
|
1167
|
+
t.string "cost_currency"
|
1168
|
+
t.boolean "track_inventory", default: true
|
1169
|
+
t.integer "tax_category_id"
|
1170
|
+
t.datetime "updated_at", precision: 6
|
1171
|
+
t.datetime "created_at", precision: 6
|
1172
|
+
t.index ["position"], name: "index_spree_variants_on_position"
|
1173
|
+
t.index ["product_id"], name: "index_spree_variants_on_product_id"
|
1174
|
+
t.index ["sku"], name: "index_spree_variants_on_sku"
|
1175
|
+
t.index ["tax_category_id"], name: "index_spree_variants_on_tax_category_id"
|
1176
|
+
t.index ["track_inventory"], name: "index_spree_variants_on_track_inventory"
|
1177
|
+
end
|
1178
|
+
|
1179
|
+
create_table "spree_wallet_payment_sources", force: :cascade do |t|
|
1180
|
+
t.integer "user_id", null: false
|
1181
|
+
t.string "payment_source_type", null: false
|
1182
|
+
t.integer "payment_source_id", null: false
|
1183
|
+
t.boolean "default", default: false, null: false
|
1184
|
+
t.datetime "created_at", precision: 6, null: false
|
1185
|
+
t.datetime "updated_at", precision: 6, null: false
|
1186
|
+
t.index ["user_id", "payment_source_id", "payment_source_type"], name: "index_spree_wallet_payment_sources_on_source_and_user", unique: true
|
1187
|
+
t.index ["user_id"], name: "index_spree_wallet_payment_sources_on_user_id"
|
1188
|
+
end
|
1189
|
+
|
1190
|
+
create_table "spree_zone_members", force: :cascade do |t|
|
1191
|
+
t.string "zoneable_type"
|
1192
|
+
t.integer "zoneable_id"
|
1193
|
+
t.integer "zone_id"
|
1194
|
+
t.datetime "created_at", precision: 6
|
1195
|
+
t.datetime "updated_at", precision: 6
|
1196
|
+
t.index ["zone_id"], name: "index_spree_zone_members_on_zone_id"
|
1197
|
+
t.index ["zoneable_id", "zoneable_type"], name: "index_spree_zone_members_on_zoneable_id_and_zoneable_type"
|
1198
|
+
end
|
1199
|
+
|
1200
|
+
create_table "spree_zones", force: :cascade do |t|
|
1201
|
+
t.string "name"
|
1202
|
+
t.string "description"
|
1203
|
+
t.integer "zone_members_count", default: 0
|
1204
|
+
t.datetime "created_at", precision: 6
|
1205
|
+
t.datetime "updated_at", precision: 6
|
1206
|
+
end
|
1207
|
+
|
1208
|
+
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
|
1209
|
+
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
|
1210
|
+
add_foreign_key "spree_promotion_code_batches", "spree_promotions", column: "promotion_id"
|
1211
|
+
add_foreign_key "spree_promotion_codes", "spree_promotion_code_batches", column: "promotion_code_batch_id"
|
1212
|
+
add_foreign_key "spree_tax_rate_tax_categories", "spree_tax_categories", column: "tax_category_id"
|
1213
|
+
add_foreign_key "spree_tax_rate_tax_categories", "spree_tax_rates", column: "tax_rate_id"
|
1214
|
+
add_foreign_key "spree_wallet_payment_sources", "spree_users", column: "user_id"
|
1215
|
+
end
|