From 337755a7aa8f4b29adebfb416643eaf002c5ed15 Mon Sep 17 00:00:00 2001 From: Holden Hinkle Date: Mon, 8 Apr 2024 17:11:30 -0400 Subject: [PATCH] run migration --- db/schema.rb | 144 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 143 insertions(+), 1 deletion(-) diff --git a/db/schema.rb b/db/schema.rb index 5b965cc0c0d..9d376fb05b7 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.1].define(version: 2024_03_19_141429) do +ActiveRecord::Schema[7.1].define(version: 2024_04_05_184242) do # These are extensions that must be enabled in order to support this database enable_extension "btree_gin" enable_extension "pg_stat_statements" @@ -53,6 +53,146 @@ t.index ["uuid"], name: "index_accounts_on_uuid", unique: true end + create_table "accredited_attorneys", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + t.string "registration_number", null: false + t.string "poa_code", limit: 3, null: false + t.string "first_name" + t.string "middle_initial" + t.string "last_name" + t.string "full_name" + t.string "email" + t.string "phone" + t.string "address_type" + t.string "address_line1" + t.string "address_line2" + t.string "address_line3" + t.string "city" + t.string "country_code_iso3" + t.string "country_name" + t.string "county_name" + t.string "county_code" + t.string "international_postal_code" + t.string "province" + t.string "state_code" + t.string "zip_code" + t.string "zip_suffix" + t.jsonb "raw_address" + t.float "lat" + t.float "long" + t.geography "location", limit: {:srid=>4326, :type=>"st_point", :geographic=>true} + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["full_name"], name: "index_accredited_attorneys_on_full_name" + t.index ["location"], name: "index_accredited_attorneys_on_location", using: :gist + t.index ["poa_code"], name: "index_accredited_attorneys_on_poa_code", unique: true + t.index ["registration_number"], name: "index_accredited_attorneys_on_registration_number", unique: true + end + + create_table "accredited_claims_agents", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + t.string "registration_number", null: false + t.string "poa_code", limit: 3, null: false + t.string "first_name" + t.string "middle_initial" + t.string "last_name" + t.string "full_name" + t.string "email" + t.string "phone" + t.string "address_type" + t.string "address_line1" + t.string "address_line2" + t.string "address_line3" + t.string "city" + t.string "country_code_iso3" + t.string "country_name" + t.string "county_name" + t.string "county_code" + t.string "international_postal_code" + t.string "province" + t.string "state_code" + t.string "zip_code" + t.string "zip_suffix" + t.jsonb "raw_address" + t.float "lat" + t.float "long" + t.geography "location", limit: {:srid=>4326, :type=>"st_point", :geographic=>true} + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["full_name"], name: "index_accredited_claims_agents_on_full_name" + t.index ["location"], name: "index_accredited_claims_agents_on_location", using: :gist + t.index ["poa_code"], name: "index_accredited_claims_agents_on_poa_code", unique: true + t.index ["registration_number"], name: "index_accredited_claims_agents_on_registration_number", unique: true + end + + create_table "accredited_organizations", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + t.string "poa_code", limit: 3, null: false + t.string "name" + t.string "phone" + t.string "state", limit: 2 + t.string "address_type" + t.string "address_line1" + t.string "address_line2" + t.string "address_line3" + t.string "city" + t.string "country_code_iso3" + t.string "country_name" + t.string "county_name" + t.string "county_code" + t.string "international_postal_code" + t.string "province" + t.string "state_code" + t.string "zip_code" + t.string "zip_suffix" + t.jsonb "raw_address" + t.float "lat" + t.float "long" + t.geography "location", limit: {:srid=>4326, :type=>"st_point", :geographic=>true} + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["location"], name: "index_accredited_organizations_on_location", using: :gist + t.index ["name"], name: "index_accredited_organizations_on_name" + end + + create_table "accredited_organizations_accredited_representatives", id: false, force: :cascade do |t| + t.uuid "accredited_organization_id" + t.uuid "accredited_representative_id" + t.index ["accredited_organization_id", "accredited_representative_id"], name: "index_organization_representatives_on_rep_and_org", unique: true + t.index ["accredited_organization_id"], name: "idx_on_accredited_organization_id_4df677e34d" + t.index ["accredited_representative_id"], name: "idx_on_accredited_representative_id_c58ba2a35b" + end + + create_table "accredited_representatives", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + t.string "registration_number", null: false + t.string "first_name" + t.string "middle_initial" + t.string "last_name" + t.string "full_name" + t.string "email" + t.string "phone" + t.string "address_type" + t.string "address_line1" + t.string "address_line2" + t.string "address_line3" + t.string "city" + t.string "country_code_iso3" + t.string "country_name" + t.string "county_name" + t.string "county_code" + t.string "international_postal_code" + t.string "province" + t.string "state_code" + t.string "zip_code" + t.string "zip_suffix" + t.jsonb "raw_address" + t.float "lat" + t.float "long" + t.geography "location", limit: {:srid=>4326, :type=>"st_point", :geographic=>true} + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["full_name"], name: "index_accredited_representatives_on_full_name" + t.index ["location"], name: "index_accredited_representatives_on_location", using: :gist + t.index ["registration_number"], name: "index_accredited_representatives_on_registration_number", unique: true + end + create_table "active_storage_attachments", force: :cascade do |t| t.string "name", null: false t.string "record_type", null: false @@ -1422,6 +1562,8 @@ end add_foreign_key "account_login_stats", "accounts" + add_foreign_key "accredited_organizations_accredited_representatives", "accredited_organizations" + add_foreign_key "accredited_organizations_accredited_representatives", "accredited_representatives" 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 "appeal_submissions", "user_accounts"