add personalization settings

This commit is contained in:
Alex Turchyn
2023-08-16 22:57:59 +03:00
parent 545b18086a
commit 187b354605
34 changed files with 244 additions and 60 deletions
@@ -0,0 +1,15 @@
# frozen_string_literal: true
class CreateAccountConfigs < ActiveRecord::Migration[7.0]
def change
create_table :account_configs do |t|
t.references :account, null: false, foreign_key: true, index: true
t.string :key, null: false
t.text :value, null: false
t.index %i[account_id key], unique: true
t.timestamps
end
end
end
+12 -1
View File
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.0].define(version: 2023_08_06_140534) do
ActiveRecord::Schema[7.0].define(version: 2023_08_15_190540) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -24,6 +24,16 @@ ActiveRecord::Schema[7.0].define(version: 2023_08_06_140534) do
t.index ["user_id"], name: "index_access_tokens_on_user_id"
end
create_table "account_configs", force: :cascade do |t|
t.bigint "account_id", null: false
t.string "key", null: false
t.text "value", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["account_id", "key"], name: "index_account_configs_on_account_id_and_key", unique: true
t.index ["account_id"], name: "index_account_configs_on_account_id"
end
create_table "accounts", force: :cascade do |t|
t.string "name", null: false
t.string "timezone", null: false
@@ -159,6 +169,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_08_06_140534) do
end
add_foreign_key "access_tokens", "users"
add_foreign_key "account_configs", "accounts"
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
add_foreign_key "document_generation_events", "submitters"