From 9e39d970cae3f52a9ea6974c2bf0c49ca0b2b0e5 Mon Sep 17 00:00:00 2001 From: Luis Ramos Date: Tue, 23 Jun 2020 19:19:18 +0100 Subject: [PATCH 1/2] Result of running db:migrate --- db/schema.rb | 256 +++++++++++++++++++++++++-------------------------- 1 file changed, 128 insertions(+), 128 deletions(-) diff --git a/db/schema.rb b/db/schema.rb index d166fdfd3c..1dbb9dcb8a 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -32,8 +32,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.string "action_name", null: false t.string "column_name", null: false t.boolean "visible", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end add_index "column_preferences", ["user_id", "action_name", "column_name"], name: "index_column_prefs_on_user_id_and_action_name_and_column_name", unique: true, using: :btree @@ -51,8 +51,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "enterprise_id", null: false t.string "code" t.integer "user_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "bill_address_id" t.integer "ship_address_id" t.string "name" @@ -75,8 +75,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.datetime "failed_at" t.string "locked_by" t.string "queue" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end add_index "delayed_jobs", ["priority", "run_at"], name: "delayed_jobs_priority", using: :btree @@ -92,8 +92,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "distributors_shipping_methods", force: true do |t| t.integer "distributor_id" t.integer "shipping_method_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end add_index "distributors_shipping_methods", ["distributor_id"], name: "index_distributors_shipping_methods_on_distributor_id", using: :btree @@ -103,8 +103,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "enterprise_id" t.string "fee_type" t.string "name" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "tax_category_id" t.boolean "inherits_tax_category", default: false, null: false end @@ -190,8 +190,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "address_id" t.text "pickup_times" t.string "next_collection_at" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.text "distributor_info" t.string "logo_file_name" t.string "logo_content_type" @@ -229,8 +229,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "exchange_fees", force: true do |t| t.integer "exchange_id" t.integer "enterprise_fee_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end add_index "exchange_fees", ["enterprise_fee_id"], name: "index_exchange_fees_on_enterprise_fee_id", using: :btree @@ -239,8 +239,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "exchange_variants", force: true do |t| t.integer "exchange_id" t.integer "variant_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end add_index "exchange_variants", ["exchange_id"], name: "index_exchange_variants_on_exchange_id", using: :btree @@ -252,8 +252,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "receiver_id" t.text "pickup_time" t.text "pickup_instructions" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.boolean "incoming", default: false, null: false t.text "receival_instructions" end @@ -266,15 +266,15 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "enterprise_id", null: false t.integer "variant_id", null: false t.boolean "visible", default: true, null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end add_index "inventory_items", ["enterprise_id", "variant_id"], name: "index_inventory_items_on_enterprise_id_and_variant_id", unique: true, using: :btree create_table "order_cycle_schedules", force: true do |t| - t.integer "order_cycle_id", null: false - t.integer "schedule_id", null: false + t.integer "order_cycle_id", null: false + t.integer "schedule_id", null: false t.datetime "created_at" t.datetime "updated_at" end @@ -287,8 +287,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.datetime "orders_open_at" t.datetime "orders_close_at" t.integer "coordinator_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "producer_properties", force: true do |t| @@ -296,8 +296,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "producer_id" t.integer "property_id" t.integer "position", default: 0, null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end add_index "producer_properties", ["position"], name: "index_producer_properties_on_position", using: :btree @@ -308,8 +308,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "subscription_id", null: false t.integer "order_id" t.datetime "canceled_at" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "order_cycle_id", null: false t.datetime "placed_at" t.datetime "confirmed_at" @@ -321,15 +321,15 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "schedules", force: true do |t| t.string "name", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "sessions", force: true do |t| t.string "session_id", null: false t.text "data" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end add_index "sessions", ["session_id"], name: "index_sessions_on_session_id", using: :btree @@ -363,8 +363,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.string "alternative_phone" t.integer "state_id" t.integer "country_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "company" t.float "latitude" t.float "longitude" @@ -379,8 +379,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.string "label" t.string "source_type" t.integer "adjustable_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.boolean "mandatory" t.integer "originator_id" t.string "originator_type" @@ -413,15 +413,15 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.string "type" t.integer "calculable_id", null: false t.string "calculable_type", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "spree_configurations", force: true do |t| t.string "name" t.string "type", limit: 50 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end add_index "spree_configurations", ["name", "type"], name: "index_configurations_on_name_and_type", using: :btree @@ -446,8 +446,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.string "start_year" t.string "issue_number" t.integer "address_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "gateway_customer_profile_id" t.string "gateway_payment_profile_id" t.integer "user_id" @@ -466,16 +466,16 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.string "environment", default: "development" t.string "server", default: "test" t.boolean "test_mode", default: true - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "spree_inventory_units", force: true do |t| t.string "state" t.integer "variant_id" t.integer "order_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "shipment_id" t.integer "return_authorization_id" t.boolean "pending", default: true @@ -490,8 +490,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "variant_id" t.integer "quantity", null: false t.decimal "price", precision: 8, scale: 2, null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "max_quantity" t.string "currency" t.decimal "distribution_fee", precision: 10, scale: 2 @@ -507,15 +507,15 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "source_id" t.string "source_type" t.text "details" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "spree_option_types", force: true do |t| t.string "name", limit: 100 t.string "presentation", limit: 100 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "position", default: 0, null: false end @@ -524,8 +524,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.string "name" t.string "presentation" t.integer "option_type_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "spree_option_values_line_items", id: false, force: true do |t| @@ -550,8 +550,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.string "state" t.decimal "adjustment_total", precision: 10, scale: 2, default: 0.0, null: false t.integer "user_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.datetime "completed_at" t.integer "bill_address_id" t.integer "ship_address_id" @@ -570,8 +570,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do add_index "spree_orders", ["completed_at", "user_id", "created_by_id", "created_at"], name: "spree_orders_completed_at_user_id_created_by_id_created_at_idx", using: :btree add_index "spree_orders", ["customer_id"], name: "index_spree_orders_on_customer_id", using: :btree - add_index "spree_orders", ["number"], name: "index_orders_on_number", using: :btree add_index "spree_orders", ["distributor_id"], name: "index_spree_orders_on_distributor_id", using: :btree + add_index "spree_orders", ["number"], name: "index_orders_on_number", using: :btree add_index "spree_orders", ["order_cycle_id"], name: "index_spree_orders_on_order_cycle_id", using: :btree add_index "spree_orders", ["user_id"], name: "index_spree_orders_on_user_id", using: :btree @@ -581,8 +581,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.text "description" t.boolean "active", default: true t.string "environment", default: "development" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.datetime "deleted_at" t.string "display_on" end @@ -590,8 +590,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "spree_payments", force: true do |t| t.decimal "amount", precision: 10, scale: 2, default: 0.0, null: false t.integer "order_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "source_id" t.string "source_type" t.integer "payment_method_id" @@ -635,8 +635,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "spree_preferences", force: true do |t| t.text "value" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "key" t.string "value_type" end @@ -644,9 +644,9 @@ ActiveRecord::Schema.define(version: 20200623140437) do add_index "spree_preferences", ["key"], name: "index_spree_preferences_on_key", unique: true, using: :btree create_table "spree_prices", force: true do |t| - t.integer "variant_id", null: false - t.decimal "amount", precision: 8, scale: 2 - t.string "currency" + t.integer "variant_id", null: false + t.decimal "amount", precision: 8, scale: 2 + t.string "currency" t.datetime "deleted_at" end @@ -670,16 +670,16 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "position" t.integer "product_id" t.integer "option_type_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "spree_product_properties", force: true do |t| t.string "value" t.integer "product_id" t.integer "property_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "position", default: 0 end @@ -704,8 +704,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.string "meta_keywords" t.integer "tax_category_id" t.integer "shipping_category_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "supplier_id" t.boolean "group_buy" t.float "group_buy_unit_size" @@ -723,7 +723,7 @@ ActiveRecord::Schema.define(version: 20200623140437) do add_index "spree_products", ["permalink"], name: "index_products_on_permalink", using: :btree add_index "spree_products", ["permalink"], name: "permalink_idx_unique", unique: true, using: :btree add_index "spree_products", ["primary_taxon_id"], name: "index_spree_products_on_primary_taxon_id", using: :btree - add_index "spree_products", ["supplier_id"], name: "index_spree_products_on_supplier_id" + add_index "spree_products", ["supplier_id"], name: "index_spree_products_on_supplier_id", using: :btree create_table "spree_products_promotion_rules", id: false, force: true do |t| t.integer "product_id" @@ -758,8 +758,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "user_id" t.integer "product_group_id" t.string "type" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end add_index "spree_promotion_rules", ["product_group_id"], name: "index_promotion_rules_on_product_group_id", using: :btree @@ -776,8 +776,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "spree_properties", force: true do |t| t.string "name" t.string "presentation", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "spree_return_authorizations", force: true do |t| @@ -786,8 +786,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.decimal "amount", precision: 10, scale: 2, default: 0.0, null: false t.integer "order_id" t.text "reason" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "stock_location_id" end @@ -810,8 +810,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.datetime "shipped_at" t.integer "order_id" t.integer "address_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "state" t.integer "stock_location_id" end @@ -821,16 +821,16 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "spree_shipping_categories", force: true do |t| t.string "name" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.boolean "temperature_controlled", default: false, null: false end create_table "spree_shipping_method_categories", force: true do |t| t.integer "shipping_method_id", null: false t.integer "shipping_category_id", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end add_index "spree_shipping_method_categories", ["shipping_category_id"], name: "index_spree_shipping_method_categories_on_shipping_category_id", using: :btree @@ -838,8 +838,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "spree_shipping_methods", force: true do |t| t.string "name" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "display_on" t.datetime "deleted_at" t.boolean "require_ship_address", default: true @@ -857,8 +857,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "shipping_method_id" t.boolean "selected", default: false t.decimal "cost", precision: 8, scale: 2, default: 0.0 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end add_index "spree_shipping_rates", ["shipment_id", "shipping_method_id"], name: "spree_shipping_rates_join_index", unique: true, using: :btree @@ -870,8 +870,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "transaction_id" t.integer "customer_id" t.string "payment_type" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "spree_state_changes", force: true do |t| @@ -879,8 +879,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.string "previous_state" t.integer "stateful_id" t.integer "user_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "stateful_type" t.string "next_state" end @@ -895,8 +895,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "stock_location_id" t.integer "variant_id" t.integer "count_on_hand", default: 0, null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.boolean "backorderable", default: false t.datetime "deleted_at" end @@ -907,8 +907,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "spree_stock_locations", force: true do |t| t.string "name" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "address1" t.string "address2" t.string "city" @@ -926,8 +926,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "stock_item_id" t.integer "quantity", default: 0 t.string "action" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "originator_id" t.string "originator_type" end @@ -939,8 +939,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.string "reference" t.integer "source_location_id" t.integer "destination_location_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "number" end @@ -951,8 +951,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "spree_tax_categories", force: true do |t| t.string "name" t.string "description" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.boolean "is_default", default: false t.datetime "deleted_at" end @@ -961,8 +961,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.decimal "amount", precision: 8, scale: 5 t.integer "zone_id" t.integer "tax_category_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.boolean "included_in_price", default: false t.string "name" t.boolean "show_rate_in_label", default: true @@ -971,8 +971,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "spree_taxonomies", force: true do |t| t.string "name", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "position", default: 0 end @@ -982,8 +982,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.string "name", null: false t.string "permalink" t.integer "taxonomy_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "lft" t.integer "rgt" t.string "icon_file_name" @@ -1004,8 +1004,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "permissable_id" t.string "permissable_type" t.string "token" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end add_index "spree_tokenized_permissions", ["permissable_id", "permissable_type"], name: "index_tokenized_name_and_type", using: :btree @@ -1028,8 +1028,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.string "login" t.integer "ship_address_id" t.integer "bill_address_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "authentication_token" t.string "unlock_token" t.datetime "locked_at" @@ -1075,15 +1075,15 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "zoneable_id" t.string "zoneable_type" t.integer "zone_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "spree_zones", force: true do |t| t.string "name" t.string "description" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.boolean "default_tax", default: false t.integer "zone_members_count", default: 0 end @@ -1091,8 +1091,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "stripe_accounts", force: true do |t| t.string "stripe_user_id" t.string "stripe_publishable_key" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "enterprise_id" end @@ -1102,8 +1102,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "subscription_id", null: false t.integer "variant_id", null: false t.integer "quantity", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.decimal "price_estimate", precision: 8, scale: 2 end @@ -1118,8 +1118,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "shipping_method_id", null: false t.datetime "begins_at" t.datetime "ends_at" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "bill_address_id", null: false t.integer "ship_address_id", null: false t.datetime "canceled_at" @@ -1147,8 +1147,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "tag_rules", force: true do |t| t.integer "enterprise_id", null: false t.string "type", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.boolean "is_default", default: false, null: false t.integer "priority", default: 99, null: false end @@ -1189,9 +1189,9 @@ ActiveRecord::Schema.define(version: 20200623140437) do add_index "variant_overrides", ["variant_id", "hub_id"], name: "index_variant_overrides_on_variant_id_and_hub_id", using: :btree create_table "versions", force: true do |t| - t.string "item_type", null: false - t.integer "item_id", null: false - t.string "event", null: false + t.string "item_type", null: false + t.integer "item_id", null: false + t.string "event", null: false t.string "whodunnit" t.text "object" t.datetime "created_at" From 68946a765e1106f84d7ff350e6ecfd1f11a58279 Mon Sep 17 00:00:00 2001 From: Luis Ramos Date: Wed, 24 Jun 2020 10:36:04 +0100 Subject: [PATCH 2/2] Make timestamps nullable --- ...20200624091611_make_timestamps_nullable.rb | 251 ++++++++++++++++++ db/schema.rb | 238 ++++++++--------- 2 files changed, 370 insertions(+), 119 deletions(-) create mode 100644 db/migrate/20200624091611_make_timestamps_nullable.rb diff --git a/db/migrate/20200624091611_make_timestamps_nullable.rb b/db/migrate/20200624091611_make_timestamps_nullable.rb new file mode 100644 index 0000000000..32ea61ac43 --- /dev/null +++ b/db/migrate/20200624091611_make_timestamps_nullable.rb @@ -0,0 +1,251 @@ +class MakeTimestampsNullable < ActiveRecord::Migration + def up + change_column_null :customers, :created_at, true + change_column_null :customers, :updated_at, true + change_column_null :delayed_jobs, :created_at, true + change_column_null :delayed_jobs, :updated_at, true + change_column_null :distributors_shipping_methods, :created_at, true + change_column_null :distributors_shipping_methods, :updated_at, true + change_column_null :enterprise_fees, :created_at, true + change_column_null :enterprise_fees, :updated_at, true + change_column_null :enterprises, :created_at, true + change_column_null :enterprises, :updated_at, true + change_column_null :exchange_fees, :created_at, true + change_column_null :exchange_fees, :updated_at, true + change_column_null :exchange_variants, :created_at, true + change_column_null :exchange_variants, :updated_at, true + change_column_null :exchanges, :created_at, true + change_column_null :exchanges, :updated_at, true + change_column_null :inventory_items, :created_at, true + change_column_null :inventory_items, :updated_at, true + change_column_null :order_cycle_schedules, :created_at, true + change_column_null :order_cycle_schedules, :updated_at, true + change_column_null :order_cycles, :created_at, true + change_column_null :order_cycles, :updated_at, true + change_column_null :producer_properties, :created_at, true + change_column_null :producer_properties, :updated_at, true + change_column_null :proxy_orders, :created_at, true + change_column_null :proxy_orders, :updated_at, true + change_column_null :schedules, :created_at, true + change_column_null :schedules, :updated_at, true + change_column_null :sessions, :created_at, true + change_column_null :sessions, :updated_at, true + change_column_null :spree_activators, :created_at, true + change_column_null :spree_activators, :updated_at, true + change_column_null :spree_addresses, :created_at, true + change_column_null :spree_addresses, :updated_at, true + change_column_null :spree_adjustments, :created_at, true + change_column_null :spree_adjustments, :updated_at, true + change_column_null :spree_calculators, :created_at, true + change_column_null :spree_calculators, :updated_at, true + change_column_null :spree_configurations, :created_at, true + change_column_null :spree_configurations, :updated_at, true + change_column_null :spree_credit_cards, :created_at, true + change_column_null :spree_credit_cards, :updated_at, true + change_column_null :spree_gateways, :created_at, true + change_column_null :spree_gateways, :updated_at, true + change_column_null :spree_inventory_units, :created_at, true + change_column_null :spree_inventory_units, :updated_at, true + change_column_null :spree_line_items, :created_at, true + change_column_null :spree_line_items, :updated_at, true + change_column_null :spree_log_entries, :created_at, true + change_column_null :spree_log_entries, :updated_at, true + change_column_null :spree_option_types, :created_at, true + change_column_null :spree_option_types, :updated_at, true + change_column_null :spree_option_values, :created_at, true + change_column_null :spree_option_values, :updated_at, true + change_column_null :spree_orders, :created_at, true + change_column_null :spree_orders, :updated_at, true + change_column_null :spree_payment_methods, :created_at, true + change_column_null :spree_payment_methods, :updated_at, true + change_column_null :spree_payments, :created_at, true + change_column_null :spree_payments, :updated_at, true + change_column_null :spree_preferences, :created_at, true + change_column_null :spree_preferences, :updated_at, true + change_column_null :spree_product_option_types, :created_at, true + change_column_null :spree_product_option_types, :updated_at, true + change_column_null :spree_product_properties, :created_at, true + change_column_null :spree_product_properties, :updated_at, true + change_column_null :spree_products, :created_at, true + change_column_null :spree_products, :updated_at, true + change_column_null :spree_promotion_rules, :created_at, true + change_column_null :spree_promotion_rules, :updated_at, true + change_column_null :spree_properties, :created_at, true + change_column_null :spree_properties, :updated_at, true + change_column_null :spree_return_authorizations, :created_at, true + change_column_null :spree_return_authorizations, :updated_at, true + change_column_null :spree_shipments, :created_at, true + change_column_null :spree_shipments, :updated_at, true + change_column_null :spree_shipping_categories, :created_at, true + change_column_null :spree_shipping_categories, :updated_at, true + change_column_null :spree_shipping_method_categories, :created_at, true + change_column_null :spree_shipping_method_categories, :updated_at, true + change_column_null :spree_shipping_methods, :created_at, true + change_column_null :spree_shipping_methods, :updated_at, true + change_column_null :spree_shipping_rates, :created_at, true + change_column_null :spree_shipping_rates, :updated_at, true + change_column_null :spree_skrill_transactions, :created_at, true + change_column_null :spree_skrill_transactions, :updated_at, true + change_column_null :spree_state_changes, :created_at, true + change_column_null :spree_state_changes, :updated_at, true + change_column_null :spree_stock_items, :created_at, true + change_column_null :spree_stock_items, :updated_at, true + change_column_null :spree_stock_locations, :created_at, true + change_column_null :spree_stock_locations, :updated_at, true + change_column_null :spree_stock_movements, :created_at, true + change_column_null :spree_stock_movements, :updated_at, true + change_column_null :spree_stock_transfers, :created_at, true + change_column_null :spree_stock_transfers, :updated_at, true + change_column_null :spree_tax_categories, :created_at, true + change_column_null :spree_tax_categories, :updated_at, true + change_column_null :spree_tax_rates, :created_at, true + change_column_null :spree_tax_rates, :updated_at, true + change_column_null :spree_taxonomies, :created_at, true + change_column_null :spree_taxonomies, :updated_at, true + change_column_null :spree_taxons, :created_at, true + change_column_null :spree_taxons, :updated_at, true + change_column_null :spree_tokenized_permissions, :created_at, true + change_column_null :spree_tokenized_permissions, :updated_at, true + change_column_null :spree_users, :created_at, true + change_column_null :spree_users, :updated_at, true + change_column_null :spree_zone_members, :created_at, true + change_column_null :spree_zone_members, :updated_at, true + change_column_null :spree_zones, :created_at, true + change_column_null :spree_zones, :updated_at, true + change_column_null :stripe_accounts, :created_at, true + change_column_null :stripe_accounts, :updated_at, true + change_column_null :subscription_line_items, :created_at, true + change_column_null :subscription_line_items, :updated_at, true + change_column_null :subscriptions, :created_at, true + change_column_null :subscriptions, :updated_at, true + change_column_null :tag_rules, :created_at, true + change_column_null :tag_rules, :updated_at, true + change_column_null :column_preferences, :created_at, true + change_column_null :column_preferences, :updated_at, true + end + + def down + change_column_null :customers, :created_at, false + change_column_null :customers, :updated_at, false + change_column_null :delayed_jobs, :created_at, false + change_column_null :delayed_jobs, :updated_at, false + change_column_null :distributors_shipping_methods, :created_at, false + change_column_null :distributors_shipping_methods, :updated_at, false + change_column_null :enterprise_fees, :created_at, false + change_column_null :enterprise_fees, :updated_at, false + change_column_null :enterprises, :created_at, false + change_column_null :enterprises, :updated_at, false + change_column_null :exchange_fees, :created_at, false + change_column_null :exchange_fees, :updated_at, false + change_column_null :exchange_variants, :created_at, false + change_column_null :exchange_variants, :updated_at, false + change_column_null :exchanges, :created_at, false + change_column_null :exchanges, :updated_at, false + change_column_null :inventory_items, :created_at, false + change_column_null :inventory_items, :updated_at, false + change_column_null :order_cycle_schedules, :created_at, false + change_column_null :order_cycle_schedules, :updated_at, false + change_column_null :order_cycles, :created_at, false + change_column_null :order_cycles, :updated_at, false + change_column_null :producer_properties, :created_at, false + change_column_null :producer_properties, :updated_at, false + change_column_null :proxy_orders, :created_at, false + change_column_null :proxy_orders, :updated_at, false + change_column_null :schedules, :created_at, false + change_column_null :schedules, :updated_at, false + change_column_null :sessions, :created_at, false + change_column_null :sessions, :updated_at, false + change_column_null :spree_activators, :created_at, false + change_column_null :spree_activators, :updated_at, false + change_column_null :spree_addresses, :created_at, false + change_column_null :spree_addresses, :updated_at, false + change_column_null :spree_adjustments, :created_at, false + change_column_null :spree_adjustments, :updated_at, false + change_column_null :spree_calculators, :created_at, false + change_column_null :spree_calculators, :updated_at, false + change_column_null :spree_configurations, :created_at, false + change_column_null :spree_configurations, :updated_at, false + change_column_null :spree_credit_cards, :created_at, false + change_column_null :spree_credit_cards, :updated_at, false + change_column_null :spree_gateways, :created_at, false + change_column_null :spree_gateways, :updated_at, false + change_column_null :spree_inventory_units, :created_at, false + change_column_null :spree_inventory_units, :updated_at, false + change_column_null :spree_line_items, :created_at, false + change_column_null :spree_line_items, :updated_at, false + change_column_null :spree_log_entries, :created_at, false + change_column_null :spree_log_entries, :updated_at, false + change_column_null :spree_option_types, :created_at, false + change_column_null :spree_option_types, :updated_at, false + change_column_null :spree_option_values, :created_at, false + change_column_null :spree_option_values, :updated_at, false + change_column_null :spree_orders, :created_at, false + change_column_null :spree_orders, :updated_at, false + change_column_null :spree_payment_methods, :created_at, false + change_column_null :spree_payment_methods, :updated_at, false + change_column_null :spree_payments, :created_at, false + change_column_null :spree_payments, :updated_at, false + change_column_null :spree_preferences, :created_at, false + change_column_null :spree_preferences, :updated_at, false + change_column_null :spree_product_option_types, :created_at, false + change_column_null :spree_product_option_types, :updated_at, false + change_column_null :spree_product_properties, :created_at, false + change_column_null :spree_product_properties, :updated_at, false + change_column_null :spree_products, :created_at, false + change_column_null :spree_products, :updated_at, false + change_column_null :spree_promotion_rules, :created_at, false + change_column_null :spree_promotion_rules, :updated_at, false + change_column_null :spree_properties, :created_at, false + change_column_null :spree_properties, :updated_at, false + change_column_null :spree_return_authorizations, :created_at, false + change_column_null :spree_return_authorizations, :updated_at, false + change_column_null :spree_shipments, :created_at, false + change_column_null :spree_shipments, :updated_at, false + change_column_null :spree_shipping_categories, :created_at, false + change_column_null :spree_shipping_categories, :updated_at, false + change_column_null :spree_shipping_method_categories, :created_at, false + change_column_null :spree_shipping_method_categories, :updated_at, false + change_column_null :spree_shipping_methods, :created_at, false + change_column_null :spree_shipping_methods, :updated_at, false + change_column_null :spree_shipping_rates, :created_at, false + change_column_null :spree_shipping_rates, :updated_at, false + change_column_null :spree_skrill_transactions, :created_at, false + change_column_null :spree_skrill_transactions, :updated_at, false + change_column_null :spree_state_changes, :created_at, false + change_column_null :spree_state_changes, :updated_at, false + change_column_null :spree_stock_items, :created_at, false + change_column_null :spree_stock_items, :updated_at, false + change_column_null :spree_stock_locations, :created_at, false + change_column_null :spree_stock_locations, :updated_at, false + change_column_null :spree_stock_movements, :created_at, false + change_column_null :spree_stock_movements, :updated_at, false + change_column_null :spree_stock_transfers, :created_at, false + change_column_null :spree_stock_transfers, :updated_at, false + change_column_null :spree_tax_categories, :created_at, false + change_column_null :spree_tax_categories, :updated_at, false + change_column_null :spree_tax_rates, :created_at, false + change_column_null :spree_tax_rates, :updated_at, false + change_column_null :spree_taxonomies, :created_at, false + change_column_null :spree_taxonomies, :updated_at, false + change_column_null :spree_taxons, :created_at, false + change_column_null :spree_taxons, :updated_at, false + change_column_null :spree_tokenized_permissions, :created_at, false + change_column_null :spree_tokenized_permissions, :updated_at, false + change_column_null :spree_users, :created_at, false + change_column_null :spree_users, :updated_at, false + change_column_null :spree_zone_members, :created_at, false + change_column_null :spree_zone_members, :updated_at, false + change_column_null :spree_zones, :created_at, false + change_column_null :spree_zones, :updated_at, false + change_column_null :stripe_accounts, :created_at, false + change_column_null :stripe_accounts, :updated_at, false + change_column_null :subscription_line_items, :created_at, false + change_column_null :subscription_line_items, :updated_at, false + change_column_null :subscriptions, :created_at, false + change_column_null :subscriptions, :updated_at, false + change_column_null :tag_rules, :created_at, false + change_column_null :tag_rules, :updated_at, false + change_column_null :column_preferences, :created_at, false + change_column_null :column_preferences, :updated_at, false + end +end diff --git a/db/schema.rb b/db/schema.rb index 1dbb9dcb8a..930e3e955d 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20200623140437) do +ActiveRecord::Schema.define(version: 20200624091611) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -32,8 +32,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.string "action_name", null: false t.string "column_name", null: false t.boolean "visible", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" end add_index "column_preferences", ["user_id", "action_name", "column_name"], name: "index_column_prefs_on_user_id_and_action_name_and_column_name", unique: true, using: :btree @@ -51,8 +51,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "enterprise_id", null: false t.string "code" t.integer "user_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.integer "bill_address_id" t.integer "ship_address_id" t.string "name" @@ -75,8 +75,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.datetime "failed_at" t.string "locked_by" t.string "queue" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" end add_index "delayed_jobs", ["priority", "run_at"], name: "delayed_jobs_priority", using: :btree @@ -92,8 +92,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "distributors_shipping_methods", force: true do |t| t.integer "distributor_id" t.integer "shipping_method_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" end add_index "distributors_shipping_methods", ["distributor_id"], name: "index_distributors_shipping_methods_on_distributor_id", using: :btree @@ -103,8 +103,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "enterprise_id" t.string "fee_type" t.string "name" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.integer "tax_category_id" t.boolean "inherits_tax_category", default: false, null: false end @@ -190,8 +190,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "address_id" t.text "pickup_times" t.string "next_collection_at" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.text "distributor_info" t.string "logo_file_name" t.string "logo_content_type" @@ -229,8 +229,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "exchange_fees", force: true do |t| t.integer "exchange_id" t.integer "enterprise_fee_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" end add_index "exchange_fees", ["enterprise_fee_id"], name: "index_exchange_fees_on_enterprise_fee_id", using: :btree @@ -239,8 +239,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "exchange_variants", force: true do |t| t.integer "exchange_id" t.integer "variant_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" end add_index "exchange_variants", ["exchange_id"], name: "index_exchange_variants_on_exchange_id", using: :btree @@ -252,8 +252,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "receiver_id" t.text "pickup_time" t.text "pickup_instructions" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.boolean "incoming", default: false, null: false t.text "receival_instructions" end @@ -266,8 +266,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "enterprise_id", null: false t.integer "variant_id", null: false t.boolean "visible", default: true, null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" end add_index "inventory_items", ["enterprise_id", "variant_id"], name: "index_inventory_items_on_enterprise_id_and_variant_id", unique: true, using: :btree @@ -287,8 +287,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.datetime "orders_open_at" t.datetime "orders_close_at" t.integer "coordinator_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" end create_table "producer_properties", force: true do |t| @@ -296,8 +296,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "producer_id" t.integer "property_id" t.integer "position", default: 0, null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" end add_index "producer_properties", ["position"], name: "index_producer_properties_on_position", using: :btree @@ -308,8 +308,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "subscription_id", null: false t.integer "order_id" t.datetime "canceled_at" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.integer "order_cycle_id", null: false t.datetime "placed_at" t.datetime "confirmed_at" @@ -321,15 +321,15 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "schedules", force: true do |t| t.string "name", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" end create_table "sessions", force: true do |t| t.string "session_id", null: false t.text "data" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" end add_index "sessions", ["session_id"], name: "index_sessions_on_session_id", using: :btree @@ -363,8 +363,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.string "alternative_phone" t.integer "state_id" t.integer "country_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.string "company" t.float "latitude" t.float "longitude" @@ -379,8 +379,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.string "label" t.string "source_type" t.integer "adjustable_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.boolean "mandatory" t.integer "originator_id" t.string "originator_type" @@ -413,15 +413,15 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.string "type" t.integer "calculable_id", null: false t.string "calculable_type", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" end create_table "spree_configurations", force: true do |t| t.string "name" t.string "type", limit: 50 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" end add_index "spree_configurations", ["name", "type"], name: "index_configurations_on_name_and_type", using: :btree @@ -446,8 +446,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.string "start_year" t.string "issue_number" t.integer "address_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.string "gateway_customer_profile_id" t.string "gateway_payment_profile_id" t.integer "user_id" @@ -466,16 +466,16 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.string "environment", default: "development" t.string "server", default: "test" t.boolean "test_mode", default: true - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" end create_table "spree_inventory_units", force: true do |t| t.string "state" t.integer "variant_id" t.integer "order_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.integer "shipment_id" t.integer "return_authorization_id" t.boolean "pending", default: true @@ -490,8 +490,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "variant_id" t.integer "quantity", null: false t.decimal "price", precision: 8, scale: 2, null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.integer "max_quantity" t.string "currency" t.decimal "distribution_fee", precision: 10, scale: 2 @@ -507,15 +507,15 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "source_id" t.string "source_type" t.text "details" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" end create_table "spree_option_types", force: true do |t| t.string "name", limit: 100 t.string "presentation", limit: 100 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.integer "position", default: 0, null: false end @@ -524,8 +524,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.string "name" t.string "presentation" t.integer "option_type_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" end create_table "spree_option_values_line_items", id: false, force: true do |t| @@ -550,8 +550,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.string "state" t.decimal "adjustment_total", precision: 10, scale: 2, default: 0.0, null: false t.integer "user_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.datetime "completed_at" t.integer "bill_address_id" t.integer "ship_address_id" @@ -581,8 +581,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.text "description" t.boolean "active", default: true t.string "environment", default: "development" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.datetime "deleted_at" t.string "display_on" end @@ -590,8 +590,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "spree_payments", force: true do |t| t.decimal "amount", precision: 10, scale: 2, default: 0.0, null: false t.integer "order_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.integer "source_id" t.string "source_type" t.integer "payment_method_id" @@ -635,8 +635,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "spree_preferences", force: true do |t| t.text "value" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.string "key" t.string "value_type" end @@ -670,16 +670,16 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "position" t.integer "product_id" t.integer "option_type_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" end create_table "spree_product_properties", force: true do |t| t.string "value" t.integer "product_id" t.integer "property_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.integer "position", default: 0 end @@ -704,8 +704,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.string "meta_keywords" t.integer "tax_category_id" t.integer "shipping_category_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.integer "supplier_id" t.boolean "group_buy" t.float "group_buy_unit_size" @@ -758,8 +758,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "user_id" t.integer "product_group_id" t.string "type" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" end add_index "spree_promotion_rules", ["product_group_id"], name: "index_promotion_rules_on_product_group_id", using: :btree @@ -776,8 +776,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "spree_properties", force: true do |t| t.string "name" t.string "presentation", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" end create_table "spree_return_authorizations", force: true do |t| @@ -786,8 +786,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.decimal "amount", precision: 10, scale: 2, default: 0.0, null: false t.integer "order_id" t.text "reason" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.integer "stock_location_id" end @@ -810,8 +810,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.datetime "shipped_at" t.integer "order_id" t.integer "address_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.string "state" t.integer "stock_location_id" end @@ -821,16 +821,16 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "spree_shipping_categories", force: true do |t| t.string "name" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.boolean "temperature_controlled", default: false, null: false end create_table "spree_shipping_method_categories", force: true do |t| t.integer "shipping_method_id", null: false t.integer "shipping_category_id", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" end add_index "spree_shipping_method_categories", ["shipping_category_id"], name: "index_spree_shipping_method_categories_on_shipping_category_id", using: :btree @@ -838,8 +838,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "spree_shipping_methods", force: true do |t| t.string "name" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.string "display_on" t.datetime "deleted_at" t.boolean "require_ship_address", default: true @@ -857,8 +857,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "shipping_method_id" t.boolean "selected", default: false t.decimal "cost", precision: 8, scale: 2, default: 0.0 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" end add_index "spree_shipping_rates", ["shipment_id", "shipping_method_id"], name: "spree_shipping_rates_join_index", unique: true, using: :btree @@ -870,8 +870,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "transaction_id" t.integer "customer_id" t.string "payment_type" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" end create_table "spree_state_changes", force: true do |t| @@ -879,8 +879,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.string "previous_state" t.integer "stateful_id" t.integer "user_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.string "stateful_type" t.string "next_state" end @@ -895,8 +895,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "stock_location_id" t.integer "variant_id" t.integer "count_on_hand", default: 0, null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.boolean "backorderable", default: false t.datetime "deleted_at" end @@ -907,8 +907,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "spree_stock_locations", force: true do |t| t.string "name" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.string "address1" t.string "address2" t.string "city" @@ -926,8 +926,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "stock_item_id" t.integer "quantity", default: 0 t.string "action" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.integer "originator_id" t.string "originator_type" end @@ -939,8 +939,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.string "reference" t.integer "source_location_id" t.integer "destination_location_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.string "number" end @@ -951,8 +951,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "spree_tax_categories", force: true do |t| t.string "name" t.string "description" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.boolean "is_default", default: false t.datetime "deleted_at" end @@ -961,8 +961,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.decimal "amount", precision: 8, scale: 5 t.integer "zone_id" t.integer "tax_category_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.boolean "included_in_price", default: false t.string "name" t.boolean "show_rate_in_label", default: true @@ -971,8 +971,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "spree_taxonomies", force: true do |t| t.string "name", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.integer "position", default: 0 end @@ -982,8 +982,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.string "name", null: false t.string "permalink" t.integer "taxonomy_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.integer "lft" t.integer "rgt" t.string "icon_file_name" @@ -1004,8 +1004,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "permissable_id" t.string "permissable_type" t.string "token" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" end add_index "spree_tokenized_permissions", ["permissable_id", "permissable_type"], name: "index_tokenized_name_and_type", using: :btree @@ -1028,8 +1028,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.string "login" t.integer "ship_address_id" t.integer "bill_address_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.string "authentication_token" t.string "unlock_token" t.datetime "locked_at" @@ -1075,15 +1075,15 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "zoneable_id" t.string "zoneable_type" t.integer "zone_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" end create_table "spree_zones", force: true do |t| t.string "name" t.string "description" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.boolean "default_tax", default: false t.integer "zone_members_count", default: 0 end @@ -1091,8 +1091,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "stripe_accounts", force: true do |t| t.string "stripe_user_id" t.string "stripe_publishable_key" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.integer "enterprise_id" end @@ -1102,8 +1102,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "subscription_id", null: false t.integer "variant_id", null: false t.integer "quantity", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.decimal "price_estimate", precision: 8, scale: 2 end @@ -1118,8 +1118,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do t.integer "shipping_method_id", null: false t.datetime "begins_at" t.datetime "ends_at" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.integer "bill_address_id", null: false t.integer "ship_address_id", null: false t.datetime "canceled_at" @@ -1147,8 +1147,8 @@ ActiveRecord::Schema.define(version: 20200623140437) do create_table "tag_rules", force: true do |t| t.integer "enterprise_id", null: false t.string "type", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at" + t.datetime "updated_at" t.boolean "is_default", default: false, null: false t.integer "priority", default: 99, null: false end