Sha256: a5abd44cc4b84b8a2c9021627d9f7a98c544c141a45ecb8235a85ef8760f7a90

Contents?: true

Size: 668 Bytes

Versions: 98

Compression:

Stored size: 668 Bytes

Contents

class CreateConsultSites < ActiveRecord::Migration[5.1]
  # rubocop:disable Rails/CreateTableWithTimestamps, Rails/ReversibleMigration
  def change
    within_renalware_schema do
      create_table :admission_consult_sites do |t|
        t.string :name, index: :unique
      end

      remove_column :admission_consults, :hospital_unit_id
      add_column :admission_consults, :other_site_or_ward, :string
      add_reference :admission_consults,
                    :consult_site,
                    references: :admission_consult_sites,
                    index: true
    end
  end
  # rubocop:enable Rails/CreateTableWithTimestamps, Rails/ReversibleMigration
end

Version data entries

98 entries across 98 versions & 1 rubygems

Version Path
renalware-core-2.0.147 db/migrate/20171204112150_create_consult_sites.rb
renalware-core-2.0.146 db/migrate/20171204112150_create_consult_sites.rb
renalware-core-2.0.145 db/migrate/20171204112150_create_consult_sites.rb
renalware-core-2.0.144 db/migrate/20171204112150_create_consult_sites.rb
renalware-core-2.0.143 db/migrate/20171204112150_create_consult_sites.rb
renalware-core-2.0.142 db/migrate/20171204112150_create_consult_sites.rb
renalware-core-2.0.141 db/migrate/20171204112150_create_consult_sites.rb
renalware-core-2.0.140 db/migrate/20171204112150_create_consult_sites.rb
renalware-core-2.0.139 db/migrate/20171204112150_create_consult_sites.rb
renalware-core-2.0.138 db/migrate/20171204112150_create_consult_sites.rb
renalware-core-2.0.137 db/migrate/20171204112150_create_consult_sites.rb
renalware-core-2.0.136 db/migrate/20171204112150_create_consult_sites.rb
renalware-core-2.0.135 db/migrate/20171204112150_create_consult_sites.rb
renalware-core-2.0.134 db/migrate/20171204112150_create_consult_sites.rb
renalware-core-2.0.133 db/migrate/20171204112150_create_consult_sites.rb
renalware-core-2.0.132 db/migrate/20171204112150_create_consult_sites.rb
renalware-core-2.0.131 db/migrate/20171204112150_create_consult_sites.rb
renalware-core-2.0.130 db/migrate/20171204112150_create_consult_sites.rb
renalware-core-2.0.129 db/migrate/20171204112150_create_consult_sites.rb
renalware-core-2.0.128 db/migrate/20171204112150_create_consult_sites.rb