Sha256: 13db63f8ab1032385142e7d40dab0d90cb23affe204dbfafc4b9b3a488fc2d8b

Contents?: true

Size: 1.03 KB

Versions: 60

Compression:

Stored size: 1.03 KB

Contents

class AddDisplayGroupToObservationDesriptions < ActiveRecord::Migration[5.1]
  def change

    remove_column :pathology_observation_descriptions, :display_order, :integer
    remove_column :pathology_observation_descriptions, :display_order_letters, :integer

    add_column :pathology_observation_descriptions,
               :display_group,
               :integer

    add_column :pathology_observation_descriptions,
               :display_order,
               :integer

    add_column :pathology_observation_descriptions,
               :letter_group,
               :integer

    add_column :pathology_observation_descriptions,
               :letter_order,
               :integer

    # Only allow an obs desc to be in a group exactly once
    add_index :pathology_observation_descriptions,
              [:display_group, :display_order],
              name: :obx_unique_display_grouping

    add_index :pathology_observation_descriptions,
              [:letter_group, :letter_order],
              name: :obx_unique_letter_grouping
  end
end

Version data entries

60 entries across 60 versions & 1 rubygems

Version Path
renalware-core-2.0.64 db/migrate/20180305134959_add_display_group_to_observation_desriptions.rb
renalware-core-2.0.63 db/migrate/20180305134959_add_display_group_to_observation_desriptions.rb
renalware-core-2.0.62 db/migrate/20180305134959_add_display_group_to_observation_desriptions.rb
renalware-core-2.0.61 db/migrate/20180305134959_add_display_group_to_observation_desriptions.rb
renalware-core-2.0.60 db/migrate/20180305134959_add_display_group_to_observation_desriptions.rb
renalware-core-2.0.58 db/migrate/20180305134959_add_display_group_to_observation_desriptions.rb
renalware-core-2.0.57 db/migrate/20180305134959_add_display_group_to_observation_desriptions.rb
renalware-core-2.0.56 db/migrate/20180305134959_add_display_group_to_observation_desriptions.rb
renalware-core-2.0.55 db/migrate/20180305134959_add_display_group_to_observation_desriptions.rb
renalware-core-2.0.54 db/migrate/20180305134959_add_display_group_to_observation_desriptions.rb
renalware-core-2.0.53 db/migrate/20180305134959_add_display_group_to_observation_desriptions.rb
renalware-core-2.0.52 db/migrate/20180305134959_add_display_group_to_observation_desriptions.rb
renalware-core-2.0.51 db/migrate/20180305134959_add_display_group_to_observation_desriptions.rb
renalware-core-2.0.50 db/migrate/20180305134959_add_display_group_to_observation_desriptions.rb
renalware-core-2.0.48 db/migrate/20180305134959_add_display_group_to_observation_desriptions.rb
renalware-core-2.0.47 db/migrate/20180305134959_add_display_group_to_observation_desriptions.rb
renalware-core-2.0.46 db/migrate/20180305134959_add_display_group_to_observation_desriptions.rb
renalware-core-2.0.45 db/migrate/20180305134959_add_display_group_to_observation_desriptions.rb
renalware-core-2.0.44 db/migrate/20180305134959_add_display_group_to_observation_desriptions.rb
renalware-core-2.0.43 db/migrate/20180305134959_add_display_group_to_observation_desriptions.rb