Halfway through table redesign, saving to revert to working version
This commit is contained in:
@@ -1,57 +0,0 @@
|
||||
# This migration comes from active_storage (originally 20170806125915)
|
||||
class CreateActiveStorageTables < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# Use Active Record's configured type for primary and foreign keys
|
||||
primary_key_type, foreign_key_type = primary_and_foreign_key_types
|
||||
|
||||
create_table :active_storage_blobs, id: primary_key_type do |t|
|
||||
t.string :key, null: false
|
||||
t.string :filename, null: false
|
||||
t.string :content_type
|
||||
t.text :metadata
|
||||
t.string :service_name, null: false
|
||||
t.bigint :byte_size, null: false
|
||||
t.string :checksum
|
||||
|
||||
if connection.supports_datetime_with_precision?
|
||||
t.datetime :created_at, precision: 6, null: false
|
||||
else
|
||||
t.datetime :created_at, null: false
|
||||
end
|
||||
|
||||
t.index [ :key ], unique: true
|
||||
end
|
||||
|
||||
create_table :active_storage_attachments, id: primary_key_type do |t|
|
||||
t.string :name, null: false
|
||||
t.references :record, null: false, polymorphic: true, index: false, type: foreign_key_type
|
||||
t.references :blob, null: false, type: foreign_key_type
|
||||
|
||||
if connection.supports_datetime_with_precision?
|
||||
t.datetime :created_at, precision: 6, null: false
|
||||
else
|
||||
t.datetime :created_at, null: false
|
||||
end
|
||||
|
||||
t.index [ :record_type, :record_id, :name, :blob_id ], name: :index_active_storage_attachments_uniqueness, unique: true
|
||||
t.foreign_key :active_storage_blobs, column: :blob_id
|
||||
end
|
||||
|
||||
create_table :active_storage_variant_records, id: primary_key_type do |t|
|
||||
t.belongs_to :blob, null: false, index: false, type: foreign_key_type
|
||||
t.string :variation_digest, null: false
|
||||
|
||||
t.index [ :blob_id, :variation_digest ], name: :index_active_storage_variant_records_uniqueness, unique: true
|
||||
t.foreign_key :active_storage_blobs, column: :blob_id
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def primary_and_foreign_key_types
|
||||
config = Rails.configuration.generators
|
||||
setting = config.options[config.orm][:primary_key_type]
|
||||
primary_key_type = setting || :primary_key
|
||||
foreign_key_type = setting || :bigint
|
||||
[ primary_key_type, foreign_key_type ]
|
||||
end
|
||||
end
|
||||
@@ -1,26 +0,0 @@
|
||||
# This migration comes from action_text (originally 20180528164100)
|
||||
class CreateActionTextTables < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
# Use Active Record's configured type for primary and foreign keys
|
||||
primary_key_type, foreign_key_type = primary_and_foreign_key_types
|
||||
|
||||
create_table :action_text_rich_texts, id: primary_key_type do |t|
|
||||
t.string :name, null: false
|
||||
t.text :body, size: :long
|
||||
t.references :record, null: false, polymorphic: true, index: false, type: foreign_key_type
|
||||
|
||||
t.timestamps
|
||||
|
||||
t.index [ :record_type, :record_id, :name ], name: "index_action_text_rich_texts_uniqueness", unique: true
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def primary_and_foreign_key_types
|
||||
config = Rails.configuration.generators
|
||||
setting = config.options[config.orm][:primary_key_type]
|
||||
primary_key_type = setting || :primary_key
|
||||
foreign_key_type = setting || :bigint
|
||||
[ primary_key_type, foreign_key_type ]
|
||||
end
|
||||
end
|
||||
@@ -1,22 +0,0 @@
|
||||
# This migration comes from active_storage (originally 20190112182829)
|
||||
class AddServiceNameToActiveStorageBlobs < ActiveRecord::Migration[6.0]
|
||||
def up
|
||||
return unless table_exists?(:active_storage_blobs)
|
||||
|
||||
unless column_exists?(:active_storage_blobs, :service_name)
|
||||
add_column :active_storage_blobs, :service_name, :string
|
||||
|
||||
if configured_service = ActiveStorage::Blob.service.name
|
||||
ActiveStorage::Blob.unscoped.update_all(service_name: configured_service)
|
||||
end
|
||||
|
||||
change_column :active_storage_blobs, :service_name, :string, null: false
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
return unless table_exists?(:active_storage_blobs)
|
||||
|
||||
remove_column :active_storage_blobs, :service_name
|
||||
end
|
||||
end
|
||||
@@ -1,27 +0,0 @@
|
||||
# This migration comes from active_storage (originally 20191206030411)
|
||||
class CreateActiveStorageVariantRecords < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
return unless table_exists?(:active_storage_blobs)
|
||||
|
||||
# Use Active Record's configured type for primary key
|
||||
create_table :active_storage_variant_records, id: primary_key_type, if_not_exists: true do |t|
|
||||
t.belongs_to :blob, null: false, index: false, type: blobs_primary_key_type
|
||||
t.string :variation_digest, null: false
|
||||
|
||||
t.index %i[ blob_id variation_digest ], name: "index_active_storage_variant_records_uniqueness", unique: true
|
||||
t.foreign_key :active_storage_blobs, column: :blob_id
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def primary_key_type
|
||||
config = Rails.configuration.generators
|
||||
config.options[config.orm][:primary_key_type] || :primary_key
|
||||
end
|
||||
|
||||
def blobs_primary_key_type
|
||||
pkey_name = connection.primary_key(:active_storage_blobs)
|
||||
pkey_column = connection.columns(:active_storage_blobs).find { |c| c.name == pkey_name }
|
||||
pkey_column.bigint? ? :bigint : pkey_column.type
|
||||
end
|
||||
end
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
# This migration comes from active_storage (originally 20211119233751)
|
||||
class RemoveNotNullOnActiveStorageBlobsChecksum < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
return unless table_exists?(:active_storage_blobs)
|
||||
|
||||
change_column_null(:active_storage_blobs, :checksum, true)
|
||||
end
|
||||
end
|
||||
@@ -1,9 +0,0 @@
|
||||
class CreateIdCardBenefitsTemplates < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :id_card_benefits_templates do |t|
|
||||
t.string :title
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,12 +0,0 @@
|
||||
class CreateIdCardBenefits < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :id_card_benefits do |t|
|
||||
t.string :benefit_desc
|
||||
t.string :benefit
|
||||
t.integer :sequence
|
||||
t.references :id_card_benefits_template, null: false, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -2,24 +2,14 @@ class CreateEmployers < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :employers do |t|
|
||||
t.string :name
|
||||
t.string :id_card_display_name
|
||||
t.string :slug
|
||||
t.string :pl_plan_key
|
||||
t.integer :company_pb_entity_key
|
||||
t.integer :plan_id
|
||||
t.string :group_number
|
||||
t.string :rx_group_number
|
||||
t.string :effective_date
|
||||
t.string :employer_logo_filename
|
||||
t.string :network_provider
|
||||
t.string :default_network_logo
|
||||
t.string :single_card_template
|
||||
t.string :multiple_card_template
|
||||
t.boolean :active, default: false
|
||||
|
||||
|
||||
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
class CreatePlans < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :plans do |t|
|
||||
t.string :title
|
||||
t.integer :pb_product_key
|
||||
t.references :employer, null: false, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,12 +0,0 @@
|
||||
class CreatePlanBenefits < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :plan_benefits do |t|
|
||||
t.string :benefit_desc
|
||||
t.string :benefit
|
||||
t.integer :sequence
|
||||
t.references :plan, null: false, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
+3
-2
@@ -1,6 +1,7 @@
|
||||
class CreateCardProviders < ActiveRecord::Migration[7.2]
|
||||
class CreateIdCardProviderSections < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :card_providers do |t|
|
||||
create_table :id_card_provider_sections do |t|
|
||||
t.string :title
|
||||
t.string :provider_code
|
||||
t.string :provider_line_1
|
||||
t.string :provider_line_2
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
class CreateCardRxes < ActiveRecord::Migration[7.2]
|
||||
class CreateIdCardRxSections < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :card_rxes do |t|
|
||||
create_table :id_card_rx_sections do |t|
|
||||
t.string :help_desk
|
||||
t.string :customer_service
|
||||
t.string :web_url
|
||||
+3
-3
@@ -1,10 +1,10 @@
|
||||
class CreateCardLogoFiles < ActiveRecord::Migration[7.2]
|
||||
class CreateIdCardNetworkLogos < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :card_logo_files do |t|
|
||||
create_table :id_card_network_logos do |t|
|
||||
t.string :filename
|
||||
t.binary :image_data
|
||||
t.string :content_type
|
||||
t.string :logo_type
|
||||
t.float :aspect_ratio
|
||||
t.boolean :active, default: false
|
||||
|
||||
t.timestamps
|
||||
@@ -0,0 +1,13 @@
|
||||
class CreateIdCardEmployerLogos < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :id_card_employer_logos do |t|
|
||||
t.string :filename
|
||||
t.binary :image_data
|
||||
t.string :content_type
|
||||
t.float :aspect_ratio
|
||||
t.boolean :active, default: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,18 @@
|
||||
class CreateIdCardSetups < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :id_card_setups do |t|
|
||||
t.string :print_name
|
||||
t.string :network_provider
|
||||
t.string :card_template
|
||||
t.string :rx_group_number
|
||||
t.boolean :active, default: false
|
||||
t.belongs_to :employer, null: false, foreign_key: true
|
||||
t.belongs_to :id_card_employer_logo, null: true, foreign_key: true
|
||||
t.belongs_to :id_card_network_logo, null: true, foreign_key: true
|
||||
t.belongs_to :id_card_provider_section, null: false, foreign_key: true
|
||||
t.belongs_to :id_card_rx_section, null: false, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,12 @@
|
||||
class CreateIdCardPlans < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :id_card_plans do |t|
|
||||
t.string :title
|
||||
t.integer :pb_product_key
|
||||
t.string :pl_plan_key
|
||||
t.belongs_to :id_card_setup, null: true, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,12 @@
|
||||
class CreateIdCardPlanBenefits < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :id_card_plan_benefits do |t|
|
||||
t.string :benefit_desc
|
||||
t.string :benefit
|
||||
t.integer :sequence
|
||||
t.belongs_to :id_card_plan, null: false, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,12 +0,0 @@
|
||||
class CreateNetworkLogos < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
create_table :alternate_network_logos do |t|
|
||||
t.string :network_logo_filename
|
||||
t.string :exception_type
|
||||
t.string :exception_value
|
||||
t.belongs_to :employer, null: false, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
+4
-2
@@ -1,10 +1,12 @@
|
||||
class CreateSampleIdCards < ActiveRecord::Migration[7.0]
|
||||
class CreateIdCardPrintData < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
create_table :sample_id_cards do |t|
|
||||
create_table :id_card_print_data do |t|
|
||||
t.string :full_name
|
||||
t.string :full_name_last_name_first
|
||||
t.string :family_id
|
||||
t.string :primary_mb_member_key
|
||||
t.string :employer_name
|
||||
t.string :pl_plan_key
|
||||
t.string :group_number
|
||||
t.string :rx_group
|
||||
t.string :medical_eff_date
|
||||
@@ -1,11 +0,0 @@
|
||||
class CreateEmployerCardLogos < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :employer_card_logos do |t|
|
||||
t.references :employer, null: false, foreign_key: true
|
||||
t.references :card_logo_file, null: false, foreign_key: true
|
||||
t.string :logo_type
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,6 +0,0 @@
|
||||
class AddCardRxToEmployers < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
add_reference :employers, :card_provider, null: true, foreign_key: true
|
||||
add_reference :employers, :card_rx, null: true, foreign_key: true
|
||||
end
|
||||
end
|
||||
@@ -8,7 +8,7 @@ class CreateMembers < ActiveRecord::Migration[7.2]
|
||||
t.integer :pb_entity_key
|
||||
t.integer :pl_plan_key
|
||||
t.belongs_to :employer, foreign_key: true
|
||||
t.belongs_to :plan, null: true, foreign_key: true
|
||||
t.belongs_to :id_card_plan, null: true, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
class CreateCardExceptions < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :card_exceptions do |t|
|
||||
t.string :type
|
||||
t.string :value
|
||||
t.belongs_to :employer, null: false, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,11 @@
|
||||
class CreateIdCardExceptions < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :id_card_exceptions do |t|
|
||||
t.string :type
|
||||
t.string :value
|
||||
t.belongs_to :id_card_setup, null: false, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,13 +0,0 @@
|
||||
class CreateCardExceptionItems < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :card_exception_items do |t|
|
||||
t.string :field_name
|
||||
t.string :field_value
|
||||
t.belongs_to :card_exception, null: false, foreign_key: true
|
||||
t.belongs_to :card_logo_file, null: true, foreign_key: true
|
||||
t.belongs_to :card_provider, null: true, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,13 @@
|
||||
class CreateIdCardExceptionItems < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :id_card_exception_items do |t|
|
||||
t.string :field_name
|
||||
t.string :field_value
|
||||
t.belongs_to :id_card_exception, null: false, foreign_key: true
|
||||
t.belongs_to :id_card_network_logo, null: true, foreign_key: true
|
||||
t.belongs_to :id_card_provider_section, null: true, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,5 +0,0 @@
|
||||
class AddAspectRatioToCardLogoFiles < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
add_column :card_logo_files, :aspect_ratio, :float
|
||||
end
|
||||
end
|
||||
@@ -1,5 +0,0 @@
|
||||
class AddLastNameToSampleIdCard < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
add_column :sample_id_cards, :name, :string
|
||||
end
|
||||
end
|
||||
@@ -1,5 +0,0 @@
|
||||
class RenameCardFieldExceptionsToCardExceptionItems < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
rename_table :card_field_exceptions, :card_exception_items
|
||||
end
|
||||
end
|
||||
@@ -1,5 +0,0 @@
|
||||
class AddTitleToCardProviders < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
add_column :card_providers, :title, :string
|
||||
end
|
||||
end
|
||||
+155
-209
@@ -10,230 +10,89 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.2].define(version: 2026_02_27_213305) do
|
||||
create_table "action_text_rich_texts", force: :cascade do |t|
|
||||
t.string "name", null: false
|
||||
t.text "body"
|
||||
t.string "record_type", null: false
|
||||
t.bigint "record_id", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["record_type", "record_id", "name"], name: "index_action_text_rich_texts_uniqueness", unique: true
|
||||
end
|
||||
|
||||
create_table "active_storage_attachments", force: :cascade do |t|
|
||||
t.string "name", null: false
|
||||
t.string "record_type", null: false
|
||||
t.bigint "record_id", null: false
|
||||
t.bigint "blob_id", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id"
|
||||
t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true
|
||||
end
|
||||
|
||||
create_table "active_storage_blobs", force: :cascade do |t|
|
||||
t.string "key", null: false
|
||||
t.string "filename", null: false
|
||||
t.string "content_type"
|
||||
t.text "metadata"
|
||||
t.string "service_name", null: false
|
||||
t.bigint "byte_size", null: false
|
||||
t.string "checksum"
|
||||
t.datetime "created_at", null: false
|
||||
t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
|
||||
end
|
||||
|
||||
create_table "active_storage_variant_records", force: :cascade do |t|
|
||||
t.bigint "blob_id", null: false
|
||||
t.string "variation_digest", null: false
|
||||
t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true
|
||||
end
|
||||
|
||||
create_table "alternate_network_logos", force: :cascade do |t|
|
||||
t.string "network_logo_filename"
|
||||
t.string "exception_type"
|
||||
t.string "exception_value"
|
||||
t.bigint "employer_id", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["employer_id"], name: "index_alternate_network_logos_on_employer_id"
|
||||
end
|
||||
|
||||
create_table "card_exception_items", force: :cascade do |t|
|
||||
t.string "field_name"
|
||||
t.string "field_value"
|
||||
t.bigint "card_logo_file_id"
|
||||
t.bigint "card_provider_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["card_logo_file_id"], name: "index_card_exception_items_on_card_logo_file_id"
|
||||
t.index ["card_provider_id"], name: "index_card_exception_items_on_card_provider_id"
|
||||
end
|
||||
|
||||
create_table "card_exceptions", force: :cascade do |t|
|
||||
t.string "type"
|
||||
t.string "value"
|
||||
t.bigint "employer_id", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["employer_id"], name: "index_card_exceptions_on_employer_id"
|
||||
end
|
||||
|
||||
create_table "card_logo_files", force: :cascade do |t|
|
||||
t.string "filename"
|
||||
t.binary "image_data"
|
||||
t.string "content_type"
|
||||
t.string "logo_type"
|
||||
t.boolean "active", default: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.float "aspect_ratio"
|
||||
end
|
||||
|
||||
create_table "card_providers", force: :cascade do |t|
|
||||
t.string "provider_code"
|
||||
t.string "provider_line_1"
|
||||
t.string "provider_line_2"
|
||||
t.string "provider_line_3"
|
||||
t.string "provider_line_4"
|
||||
t.string "provider_line_5"
|
||||
t.string "provider_line_6"
|
||||
t.string "provider_line_7"
|
||||
t.string "provider_line_8"
|
||||
t.string "provider_line_9"
|
||||
t.string "provider_line_10"
|
||||
t.string "provider_line_11"
|
||||
t.string "provider_line_12"
|
||||
t.string "claim_to_1"
|
||||
t.string "claim_to_2"
|
||||
t.string "claim_to_3"
|
||||
t.string "claim_to_4"
|
||||
t.string "claim_to_5"
|
||||
t.string "claim_to_6"
|
||||
t.string "claim_to_7"
|
||||
t.string "claim_to_8"
|
||||
t.string "claim_to_9"
|
||||
t.string "claim_to_10"
|
||||
t.string "claim_to_11"
|
||||
t.string "claim_to_12"
|
||||
t.string "mail_to"
|
||||
t.string "mail_to_2"
|
||||
t.string "contact_line_1"
|
||||
t.string "contact_line_2"
|
||||
t.string "contact_line_3"
|
||||
t.string "group_number"
|
||||
t.string "rx_group_id"
|
||||
t.string "rx_contact"
|
||||
t.string "provider_lookup_1"
|
||||
t.string "provider_lookup_2"
|
||||
t.string "precert_1"
|
||||
t.string "precert_2"
|
||||
t.string "precert_3"
|
||||
t.string "precert_4"
|
||||
t.string "precert_5"
|
||||
t.string "precert_6"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.string "title"
|
||||
end
|
||||
|
||||
create_table "card_rxes", force: :cascade do |t|
|
||||
t.string "help_desk"
|
||||
t.string "customer_service"
|
||||
t.string "web_url"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "employer_card_logos", force: :cascade do |t|
|
||||
t.bigint "employer_id", null: false
|
||||
t.bigint "card_logo_file_id", null: false
|
||||
t.string "logo_type"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["card_logo_file_id"], name: "index_employer_card_logos_on_card_logo_file_id"
|
||||
t.index ["employer_id"], name: "index_employer_card_logos_on_employer_id"
|
||||
end
|
||||
|
||||
ActiveRecord::Schema[7.2].define(version: 2026_01_16_182836) do
|
||||
create_table "employers", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "id_card_display_name"
|
||||
t.string "slug"
|
||||
t.string "pl_plan_key"
|
||||
t.integer "company_pb_entity_key"
|
||||
t.integer "plan_id"
|
||||
t.string "group_number"
|
||||
t.string "rx_group_number"
|
||||
t.string "effective_date"
|
||||
t.string "employer_logo_filename"
|
||||
t.string "network_provider"
|
||||
t.string "default_network_logo"
|
||||
t.string "single_card_template"
|
||||
t.string "multiple_card_template"
|
||||
t.boolean "active", default: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.bigint "card_provider_id"
|
||||
t.bigint "card_rx_id"
|
||||
t.index ["card_provider_id"], name: "index_employers_on_card_provider_id"
|
||||
t.index ["card_rx_id"], name: "index_employers_on_card_rx_id"
|
||||
end
|
||||
|
||||
create_table "id_card_benefits", force: :cascade do |t|
|
||||
create_table "id_card_employer_logos", force: :cascade do |t|
|
||||
t.string "filename"
|
||||
t.binary "image_data"
|
||||
t.string "content_type"
|
||||
t.float "aspect_ratio"
|
||||
t.boolean "active", default: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "id_card_exception_items", force: :cascade do |t|
|
||||
t.string "field_name"
|
||||
t.string "field_value"
|
||||
t.bigint "id_card_exception_id", null: false
|
||||
t.bigint "id_card_network_logo_id"
|
||||
t.bigint "id_card_provider_section_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["id_card_exception_id"], name: "index_id_card_exception_items_on_id_card_exception_id"
|
||||
t.index ["id_card_network_logo_id"], name: "index_id_card_exception_items_on_id_card_network_logo_id"
|
||||
t.index ["id_card_provider_section_id"], name: "index_id_card_exception_items_on_id_card_provider_section_id"
|
||||
end
|
||||
|
||||
create_table "id_card_exceptions", force: :cascade do |t|
|
||||
t.string "type"
|
||||
t.string "value"
|
||||
t.bigint "id_card_setup_id", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["id_card_setup_id"], name: "index_id_card_exceptions_on_id_card_setup_id"
|
||||
end
|
||||
|
||||
create_table "id_card_network_logos", force: :cascade do |t|
|
||||
t.string "filename"
|
||||
t.binary "image_data"
|
||||
t.string "content_type"
|
||||
t.float "aspect_ratio"
|
||||
t.boolean "active", default: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "id_card_plan_benefits", force: :cascade do |t|
|
||||
t.string "benefit_desc"
|
||||
t.string "benefit"
|
||||
t.integer "sequence"
|
||||
t.bigint "id_card_benefits_template_id", null: false
|
||||
t.bigint "id_card_plan_id", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["id_card_benefits_template_id"], name: "index_id_card_benefits_on_id_card_benefits_template_id"
|
||||
t.index ["id_card_plan_id"], name: "index_id_card_plan_benefits_on_id_card_plan_id"
|
||||
end
|
||||
|
||||
create_table "id_card_benefits_templates", force: :cascade do |t|
|
||||
t.string "title"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "members", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "id_card_display_name"
|
||||
t.string "family_id"
|
||||
t.integer "mb_member_key"
|
||||
t.integer "pb_entity_key"
|
||||
t.integer "pl_plan_key"
|
||||
t.bigint "employer_id"
|
||||
t.bigint "plan_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["employer_id"], name: "index_members_on_employer_id"
|
||||
t.index ["plan_id"], name: "index_members_on_plan_id"
|
||||
end
|
||||
|
||||
create_table "plan_benefits", force: :cascade do |t|
|
||||
t.string "benefit_desc"
|
||||
t.string "benefit"
|
||||
t.integer "sequence"
|
||||
t.bigint "plan_id", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["plan_id"], name: "index_plan_benefits_on_plan_id"
|
||||
end
|
||||
|
||||
create_table "plans", force: :cascade do |t|
|
||||
create_table "id_card_plans", force: :cascade do |t|
|
||||
t.string "title"
|
||||
t.integer "pb_product_key"
|
||||
t.bigint "employer_id", null: false
|
||||
t.string "pl_plan_key"
|
||||
t.bigint "id_card_setup_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["employer_id"], name: "index_plans_on_employer_id"
|
||||
t.index ["id_card_setup_id"], name: "index_id_card_plans_on_id_card_setup_id"
|
||||
end
|
||||
|
||||
create_table "sample_id_cards", force: :cascade do |t|
|
||||
create_table "id_card_print_data", force: :cascade do |t|
|
||||
t.string "full_name"
|
||||
t.string "full_name_last_name_first"
|
||||
t.string "family_id"
|
||||
t.string "primary_mb_member_key"
|
||||
t.string "employer_name"
|
||||
t.string "pl_plan_key"
|
||||
t.string "group_number"
|
||||
t.string "rx_group"
|
||||
t.string "medical_eff_date"
|
||||
@@ -303,22 +162,109 @@ ActiveRecord::Schema[7.2].define(version: 2026_02_27_213305) do
|
||||
t.string "benefit_14"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.string "name"
|
||||
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 "alternate_network_logos", "employers"
|
||||
add_foreign_key "card_exception_items", "card_logo_files"
|
||||
add_foreign_key "card_exception_items", "card_providers"
|
||||
add_foreign_key "card_exceptions", "employers"
|
||||
add_foreign_key "employer_card_logos", "card_logo_files"
|
||||
add_foreign_key "employer_card_logos", "employers"
|
||||
add_foreign_key "employers", "card_providers"
|
||||
add_foreign_key "employers", "card_rxes"
|
||||
add_foreign_key "id_card_benefits", "id_card_benefits_templates"
|
||||
create_table "id_card_provider_sections", force: :cascade do |t|
|
||||
t.string "title"
|
||||
t.string "provider_code"
|
||||
t.string "provider_line_1"
|
||||
t.string "provider_line_2"
|
||||
t.string "provider_line_3"
|
||||
t.string "provider_line_4"
|
||||
t.string "provider_line_5"
|
||||
t.string "provider_line_6"
|
||||
t.string "provider_line_7"
|
||||
t.string "provider_line_8"
|
||||
t.string "provider_line_9"
|
||||
t.string "provider_line_10"
|
||||
t.string "provider_line_11"
|
||||
t.string "provider_line_12"
|
||||
t.string "claim_to_1"
|
||||
t.string "claim_to_2"
|
||||
t.string "claim_to_3"
|
||||
t.string "claim_to_4"
|
||||
t.string "claim_to_5"
|
||||
t.string "claim_to_6"
|
||||
t.string "claim_to_7"
|
||||
t.string "claim_to_8"
|
||||
t.string "claim_to_9"
|
||||
t.string "claim_to_10"
|
||||
t.string "claim_to_11"
|
||||
t.string "claim_to_12"
|
||||
t.string "mail_to"
|
||||
t.string "mail_to_2"
|
||||
t.string "contact_line_1"
|
||||
t.string "contact_line_2"
|
||||
t.string "contact_line_3"
|
||||
t.string "group_number"
|
||||
t.string "rx_group_id"
|
||||
t.string "rx_contact"
|
||||
t.string "provider_lookup_1"
|
||||
t.string "provider_lookup_2"
|
||||
t.string "precert_1"
|
||||
t.string "precert_2"
|
||||
t.string "precert_3"
|
||||
t.string "precert_4"
|
||||
t.string "precert_5"
|
||||
t.string "precert_6"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "id_card_rx_sections", force: :cascade do |t|
|
||||
t.string "help_desk"
|
||||
t.string "customer_service"
|
||||
t.string "web_url"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "id_card_setups", force: :cascade do |t|
|
||||
t.string "print_name"
|
||||
t.string "network_provider"
|
||||
t.string "card_template"
|
||||
t.string "rx_group_number"
|
||||
t.boolean "active", default: false
|
||||
t.bigint "employer_id", null: false
|
||||
t.bigint "id_card_employer_logo_id"
|
||||
t.bigint "id_card_network_logo_id"
|
||||
t.bigint "id_card_provider_section_id", null: false
|
||||
t.bigint "id_card_rx_section_id", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["employer_id"], name: "index_id_card_setups_on_employer_id"
|
||||
t.index ["id_card_employer_logo_id"], name: "index_id_card_setups_on_id_card_employer_logo_id"
|
||||
t.index ["id_card_network_logo_id"], name: "index_id_card_setups_on_id_card_network_logo_id"
|
||||
t.index ["id_card_provider_section_id"], name: "index_id_card_setups_on_id_card_provider_section_id"
|
||||
t.index ["id_card_rx_section_id"], name: "index_id_card_setups_on_id_card_rx_section_id"
|
||||
end
|
||||
|
||||
create_table "members", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "id_card_display_name"
|
||||
t.string "family_id"
|
||||
t.integer "mb_member_key"
|
||||
t.integer "pb_entity_key"
|
||||
t.integer "pl_plan_key"
|
||||
t.bigint "employer_id"
|
||||
t.bigint "id_card_plan_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["employer_id"], name: "index_members_on_employer_id"
|
||||
t.index ["id_card_plan_id"], name: "index_members_on_id_card_plan_id"
|
||||
end
|
||||
|
||||
add_foreign_key "id_card_exception_items", "id_card_exceptions"
|
||||
add_foreign_key "id_card_exception_items", "id_card_network_logos"
|
||||
add_foreign_key "id_card_exception_items", "id_card_provider_sections"
|
||||
add_foreign_key "id_card_exceptions", "id_card_setups"
|
||||
add_foreign_key "id_card_plan_benefits", "id_card_plans"
|
||||
add_foreign_key "id_card_plans", "id_card_setups"
|
||||
add_foreign_key "id_card_setups", "employers"
|
||||
add_foreign_key "id_card_setups", "id_card_employer_logos"
|
||||
add_foreign_key "id_card_setups", "id_card_network_logos"
|
||||
add_foreign_key "id_card_setups", "id_card_provider_sections"
|
||||
add_foreign_key "id_card_setups", "id_card_rx_sections"
|
||||
add_foreign_key "members", "employers"
|
||||
add_foreign_key "members", "plans"
|
||||
add_foreign_key "plan_benefits", "plans"
|
||||
add_foreign_key "plans", "employers"
|
||||
add_foreign_key "members", "id_card_plans"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user