Move tenant settings on separate model (#196)

This commit is contained in:
Riccardo Graziosi
2023-02-04 15:43:15 +01:00
committed by GitHub
parent 6c03a0d750
commit d4242dd78e
17 changed files with 135 additions and 43 deletions

View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2022_07_27_094200) do
ActiveRecord::Schema.define(version: 2023_01_31_194858) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -124,6 +124,14 @@ ActiveRecord::Schema.define(version: 2022_07_27_094200) do
t.index ["user_id"], name: "index_posts_on_user_id"
end
create_table "tenant_settings", force: :cascade do |t|
t.integer "brand_display", default: 0, null: false
t.bigint "tenant_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["tenant_id"], name: "index_tenant_settings_on_tenant_id"
end
create_table "tenants", force: :cascade do |t|
t.string "site_name", null: false
t.string "site_logo"
@@ -132,7 +140,6 @@ ActiveRecord::Schema.define(version: 2022_07_27_094200) do
t.string "custom_url"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.integer "brand_display_setting", default: 0
t.integer "status"
end
@@ -180,5 +187,6 @@ ActiveRecord::Schema.define(version: 2022_07_27_094200) do
add_foreign_key "posts", "post_statuses"
add_foreign_key "posts", "tenants"
add_foreign_key "posts", "users"
add_foreign_key "tenant_settings", "tenants"
add_foreign_key "users", "tenants"
end