SU2-30 | добавлена фикс таблица для кодов, убрана таблица DocumentTypes, изменена структура jsonb
This commit is contained in:
Generated
+11
-11
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.1].define(version: 2026_03_25_063000) do
|
||||
ActiveRecord::Schema[7.1].define(version: 2026_04_18_113000) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
||||
@@ -51,21 +51,13 @@ ActiveRecord::Schema[7.1].define(version: 2026_03_25_063000) do
|
||||
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", "document_type_id", "sheet_number"], name: "index_fs_on_yearly_file_doc_type_sheet", unique: true
|
||||
t.index ["yearly_file_id", "sheet_number"], name: "index_fs_on_yearly_file_sheet", unique: true
|
||||
t.index ["yearly_file_id"], name: "index_financial_statements_on_yearly_file_id"
|
||||
end
|
||||
|
||||
@@ -83,6 +75,15 @@ ActiveRecord::Schema[7.1].define(version: 2026_03_25_063000) do
|
||||
t.index ["inn"], name: "index_organizations_on_inn"
|
||||
end
|
||||
|
||||
create_table "report_codes", force: :cascade do |t|
|
||||
t.string "code", null: false
|
||||
t.string "name", null: false
|
||||
t.text "description", default: "", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["code"], name: "index_report_codes_on_code", unique: true
|
||||
end
|
||||
|
||||
create_table "reports", force: :cascade do |t|
|
||||
t.string "inn"
|
||||
t.string "status"
|
||||
@@ -129,7 +130,6 @@ ActiveRecord::Schema[7.1].define(version: 2026_03_25_063000) do
|
||||
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user