|
|
|
@ -10,7 +10,7 @@ |
|
|
|
# |
|
|
|
# |
|
|
|
# It's strongly recommended that you check this file into your version control system. |
|
|
|
# It's strongly recommended that you check this file into your version control system. |
|
|
|
|
|
|
|
|
|
|
|
ActiveRecord::Schema[7.0].define(version: 2023_07_18_151955) do |
|
|
|
ActiveRecord::Schema[7.0].define(version: 2023_07_25_081029) do |
|
|
|
# These are extensions that must be enabled in order to support this database |
|
|
|
# These are extensions that must be enabled in order to support this database |
|
|
|
enable_extension "plpgsql" |
|
|
|
enable_extension "plpgsql" |
|
|
|
|
|
|
|
|
|
|
|
@ -434,6 +434,8 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_18_151955) do |
|
|
|
t.string "old_org_id" |
|
|
|
t.string "old_org_id" |
|
|
|
t.string "old_visible_id" |
|
|
|
t.string "old_visible_id" |
|
|
|
t.datetime "merge_date" |
|
|
|
t.datetime "merge_date" |
|
|
|
|
|
|
|
t.bigint "absorbing_organisation_id" |
|
|
|
|
|
|
|
t.index ["absorbing_organisation_id"], name: "index_organisations_on_absorbing_organisation_id" |
|
|
|
t.index ["old_visible_id"], name: "index_organisations_on_old_visible_id", unique: true |
|
|
|
t.index ["old_visible_id"], name: "index_organisations_on_old_visible_id", unique: true |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
@ -715,6 +717,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_18_151955) do |
|
|
|
add_foreign_key "locations", "schemes" |
|
|
|
add_foreign_key "locations", "schemes" |
|
|
|
add_foreign_key "organisation_relationships", "organisations", column: "child_organisation_id" |
|
|
|
add_foreign_key "organisation_relationships", "organisations", column: "child_organisation_id" |
|
|
|
add_foreign_key "organisation_relationships", "organisations", column: "parent_organisation_id" |
|
|
|
add_foreign_key "organisation_relationships", "organisations", column: "parent_organisation_id" |
|
|
|
|
|
|
|
add_foreign_key "organisations", "organisations", column: "absorbing_organisation_id" |
|
|
|
add_foreign_key "sales_logs", "organisations", column: "owning_organisation_id", on_delete: :cascade |
|
|
|
add_foreign_key "sales_logs", "organisations", column: "owning_organisation_id", on_delete: :cascade |
|
|
|
add_foreign_key "schemes", "organisations", column: "owning_organisation_id", on_delete: :cascade |
|
|
|
add_foreign_key "schemes", "organisations", column: "owning_organisation_id", on_delete: :cascade |
|
|
|
add_foreign_key "users", "organisations", on_delete: :cascade |
|
|
|
add_foreign_key "users", "organisations", on_delete: :cascade |
|
|
|
|