DB restructure, print page
This commit is contained in:
@@ -43,6 +43,7 @@ class CreateIdCardProviderSections < ActiveRecord::Migration[7.2]
|
||||
t.string :precert_4
|
||||
t.string :precert_5
|
||||
t.string :precert_6
|
||||
t.boolean :default, default: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
class CreateIdCardRxSections < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :id_card_rx_sections do |t|
|
||||
t.string :title
|
||||
t.string :help_desk
|
||||
t.string :customer_service
|
||||
t.string :web_url
|
||||
|
||||
@@ -5,6 +5,7 @@ class CreateIdCardNetworkLogos < ActiveRecord::Migration[7.2]
|
||||
t.binary :image_data
|
||||
t.string :content_type
|
||||
t.float :aspect_ratio
|
||||
t.boolean :default, default: false
|
||||
t.boolean :active, default: false
|
||||
|
||||
t.timestamps
|
||||
|
||||
+3
-2
@@ -1,10 +1,11 @@
|
||||
class CreateIdCardSetups < ActiveRecord::Migration[7.2]
|
||||
class CreateIdCardConfigurations < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :id_card_setups do |t|
|
||||
create_table :id_card_configurations do |t|
|
||||
t.string :print_name
|
||||
t.string :network_provider
|
||||
t.string :card_template
|
||||
t.string :rx_group_number
|
||||
t.string :pl_plan_key
|
||||
t.boolean :active, default: false
|
||||
t.belongs_to :employer, null: false, foreign_key: true
|
||||
t.belongs_to :employer_logo, null: true, foreign_key: { to_table: :id_card_employer_logos }
|
||||
@@ -5,7 +5,7 @@ class CreateIdCardPlans < ActiveRecord::Migration[7.2]
|
||||
t.integer :pb_product_key
|
||||
t.string :pl_plan_key
|
||||
t.boolean :template
|
||||
t.belongs_to :setup, null: true, foreign_key: { to_table: :id_card_setups }
|
||||
t.belongs_to :configuration, null: true, foreign_key: { to_table: :id_card_configurations }
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
class CreateIdCardExceptions < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :id_card_exceptions do |t|
|
||||
t.string :type
|
||||
t.string :value
|
||||
t.belongs_to :setup, null: false, foreign_key: { to_table: :id_card_setups }
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,11 @@
|
||||
class CreateIdCardFieldExceptions < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :id_card_field_exceptions do |t|
|
||||
t.string :exception_type
|
||||
t.string :exception_value
|
||||
t.belongs_to :configuration, null: false, foreign_key: { to_table: :id_card_configurations }
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
class CreateIdCardExceptionItems < ActiveRecord::Migration[7.2]
|
||||
class CreateIdCardFieldExceptionItems < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :id_card_exception_items do |t|
|
||||
create_table :id_card_field_exception_items do |t|
|
||||
t.string :field_name
|
||||
t.string :field_value
|
||||
t.belongs_to :exception, null: false, foreign_key: { to_table: :id_card_exceptions }
|
||||
t.belongs_to :field_exception, null: false, foreign_key: { to_table: :id_card_field_exceptions }
|
||||
t.belongs_to :network_logo, null: true, foreign_key: { to_table: :id_card_network_logos }
|
||||
t.belongs_to :provider_section, null: true, foreign_key: { to_table: :id_card_provider_sections }
|
||||
|
||||
Reference in New Issue
Block a user