test/dummy/db/schema.rb in disco_app-0.12.7 vs test/dummy/db/schema.rb in disco_app-0.13.0
- old
+ new
@@ -9,11 +9,11 @@
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20161105054746) do
+ActiveRecord::Schema.define(version: 20170327214540) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
create_table "carts", force: :cascade do |t|
@@ -97,10 +97,19 @@
t.jsonb "data", default: {}
end
add_index "disco_app_shops", ["shopify_domain"], name: "index_disco_app_shops_on_shopify_domain", unique: true, using: :btree
+ create_table "disco_app_sources", force: :cascade do |t|
+ t.string "source"
+ t.string "name"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ end
+
+ add_index "disco_app_sources", ["source"], name: "index_disco_app_sources_on_source", using: :btree
+
create_table "disco_app_subscriptions", force: :cascade do |t|
t.integer "shop_id"
t.integer "plan_id"
t.integer "status"
t.integer "subscription_type"
@@ -109,17 +118,28 @@
t.datetime "trial_start_at"
t.datetime "trial_end_at"
t.datetime "cancelled_at"
t.integer "amount", default: 0
t.integer "plan_code_id", limit: 8
- t.string "source"
t.integer "trial_period_days"
+ t.integer "source_id", limit: 8
end
add_index "disco_app_subscriptions", ["plan_id"], name: "index_disco_app_subscriptions_on_plan_id", using: :btree
add_index "disco_app_subscriptions", ["shop_id"], name: "index_disco_app_subscriptions_on_shop_id", using: :btree
+ create_table "disco_app_users", force: :cascade do |t|
+ t.integer "shop_id", limit: 8
+ t.string "first_name"
+ t.string "last_name"
+ t.string "email"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ end
+
+ add_index "disco_app_users", ["shop_id"], name: "index_disco_app_users_on_shop_id", unique: true, using: :btree
+
create_table "js_configurations", force: :cascade do |t|
t.integer "shop_id", limit: 8
t.string "label", default: "Default"
t.string "locale", default: "en"
end
@@ -144,9 +164,10 @@
add_foreign_key "disco_app_plan_codes", "disco_app_plans", column: "plan_id"
add_foreign_key "disco_app_recurring_application_charges", "disco_app_shops", column: "shop_id"
add_foreign_key "disco_app_recurring_application_charges", "disco_app_subscriptions", column: "subscription_id"
add_foreign_key "disco_app_sessions", "disco_app_shops", column: "shop_id", on_delete: :cascade
add_foreign_key "disco_app_subscriptions", "disco_app_plan_codes", column: "plan_code_id"
+ add_foreign_key "disco_app_subscriptions", "disco_app_sources", column: "source_id"
add_foreign_key "js_configurations", "disco_app_shops", column: "shop_id"
add_foreign_key "products", "disco_app_shops", column: "shop_id"
add_foreign_key "widget_configurations", "disco_app_shops", column: "shop_id"
end