Sha256: ecbc2718b6906413b4b630c6e5042cbca285623fc391241a10eaa8482b019111

Contents?: true

Size: 724 Bytes

Versions: 15

Compression:

Stored size: 724 Bytes

Contents

class AddPositionToDrugTypes < ActiveRecord::Migration[5.2]
  def change
    within_renalware_schema do
      add_column(
        :drug_types,
        :position,
        :integer,
        default: 0,
        null: false,
        index: true,
        comment: "Controls display order"
      )
      add_column(
        :drug_types,
        :weighting,
        :integer,
        null: false,
        default: 0,
        comment: "More important drug types have a higher value so their colour trumps other "\
                 "types a drug might have."
      )
      add_column(
        :drug_types,
        :colour,
        :string,
        null: true,
        comment: "A CSS colour e.f. '#A12A12'"
      )
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
renalware-core-2.1.1 db/migrate/20201015160542_add_position_to_drug_types.rb
renalware-core-2.1.0 db/migrate/20201015160542_add_position_to_drug_types.rb
renalware-core-2.0.167 db/migrate/20201015160542_add_position_to_drug_types.rb
renalware-core-2.0.166 db/migrate/20201015160542_add_position_to_drug_types.rb
renalware-core-2.0.165 db/migrate/20201015160542_add_position_to_drug_types.rb
renalware-core-2.0.164 db/migrate/20201015160542_add_position_to_drug_types.rb
renalware-core-2.0.163 db/migrate/20201015160542_add_position_to_drug_types.rb
renalware-core-2.0.162 db/migrate/20201015160542_add_position_to_drug_types.rb
renalware-core-2.0.161 db/migrate/20201015160542_add_position_to_drug_types.rb
renalware-core-2.0.160 db/migrate/20201015160542_add_position_to_drug_types.rb
renalware-core-2.0.159 db/migrate/20201015160542_add_position_to_drug_types.rb
renalware-core-2.0.158 db/migrate/20201015160542_add_position_to_drug_types.rb
renalware-core-2.0.157 db/migrate/20201015160542_add_position_to_drug_types.rb
renalware-core-2.0.156 db/migrate/20201015160542_add_position_to_drug_types.rb
renalware-core-2.0.155 db/migrate/20201015160542_add_position_to_drug_types.rb