Добавление миграций БД и моделей
This commit is contained in:
Generated
+55
-1
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.1].define(version: 2025_12_09_142642) do
|
||||
ActiveRecord::Schema[7.1].define(version: 2026_03_12_000005) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
||||
@@ -42,6 +42,46 @@ ActiveRecord::Schema[7.1].define(version: 2025_12_09_142642) do
|
||||
t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true
|
||||
end
|
||||
|
||||
create_table "auditors", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "inn"
|
||||
t.string "ogrn"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["inn"], name: "index_auditors_on_inn"
|
||||
end
|
||||
|
||||
create_table "document_types", force: :cascade do |t|
|
||||
t.string "name", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "financial_statements", force: :cascade do |t|
|
||||
t.bigint "yearly_file_id", null: false
|
||||
t.bigint "document_type_id", null: false
|
||||
t.integer "sheet_number"
|
||||
t.jsonb "data", default: {}
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["document_type_id"], name: "index_financial_statements_on_document_type_id"
|
||||
t.index ["yearly_file_id"], name: "index_financial_statements_on_yearly_file_id"
|
||||
end
|
||||
|
||||
create_table "organizations", force: :cascade do |t|
|
||||
t.string "inn", null: false
|
||||
t.string "full_name"
|
||||
t.string "kpp"
|
||||
t.string "okpo"
|
||||
t.string "okfs"
|
||||
t.string "okopf"
|
||||
t.string "okved2"
|
||||
t.string "address"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["inn"], name: "index_organizations_on_inn"
|
||||
end
|
||||
|
||||
create_table "reports", force: :cascade do |t|
|
||||
t.string "inn"
|
||||
t.string "status"
|
||||
@@ -76,6 +116,20 @@ ActiveRecord::Schema[7.1].define(version: 2025_12_09_142642) do
|
||||
t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
|
||||
end
|
||||
|
||||
create_table "yearly_files", force: :cascade do |t|
|
||||
t.bigint "organization_id", null: false
|
||||
t.integer "year", null: false
|
||||
t.bigint "auditor_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["auditor_id"], name: "index_yearly_files_on_auditor_id"
|
||||
t.index ["organization_id"], name: "index_yearly_files_on_organization_id"
|
||||
end
|
||||
|
||||
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 "financial_statements", "document_types"
|
||||
add_foreign_key "financial_statements", "yearly_files"
|
||||
add_foreign_key "yearly_files", "auditors"
|
||||
add_foreign_key "yearly_files", "organizations"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user