Sha256: 998028b1b71f1e6cd57f8924405c3dfc96b8f83633b90fa9630ca7c9fec9f04f

Contents?: true

Size: 857 Bytes

Versions: 54

Compression:

Stored size: 857 Bytes

Contents

# rubocop:disable Rails/CreateTableWithTimestamps
class CreateHDSessionFormBatchItems < ActiveRecord::Migration[5.2]
  def change
    within_renalware_schema do
      create_table :hd_session_form_batch_items do |t|
        t.references :batch, foreign_key: { to_table: :hd_session_form_batches }, null: false, index: false
        # As a precurosr to combining letter batches and session form batches into one table
        # eg print_batches, use a generic reference here to something printable, rather than a
        # t.references :patient etc
        t.integer :printable_id, null: false, index: false
        t.integer(:status, default: 0, null: false, limit: 2, index: true) # smallint
      end
      add_index :hd_session_form_batch_items, [:batch_id, :printable_id], unique: true
    end
  end
end
# rubocop:enable Rails/CreateTableWithTimestamps

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
renalware-core-2.1.1 db/migrate/20190927130911_create_hd_session_form_batch_items.rb
renalware-core-2.1.0 db/migrate/20190927130911_create_hd_session_form_batch_items.rb
renalware-core-2.0.167 db/migrate/20190927130911_create_hd_session_form_batch_items.rb
renalware-core-2.0.166 db/migrate/20190927130911_create_hd_session_form_batch_items.rb
renalware-core-2.0.165 db/migrate/20190927130911_create_hd_session_form_batch_items.rb
renalware-core-2.0.164 db/migrate/20190927130911_create_hd_session_form_batch_items.rb
renalware-core-2.0.163 db/migrate/20190927130911_create_hd_session_form_batch_items.rb
renalware-core-2.0.162 db/migrate/20190927130911_create_hd_session_form_batch_items.rb
renalware-core-2.0.161 db/migrate/20190927130911_create_hd_session_form_batch_items.rb
renalware-core-2.0.160 db/migrate/20190927130911_create_hd_session_form_batch_items.rb
renalware-core-2.0.159 db/migrate/20190927130911_create_hd_session_form_batch_items.rb
renalware-core-2.0.158 db/migrate/20190927130911_create_hd_session_form_batch_items.rb
renalware-core-2.0.157 db/migrate/20190927130911_create_hd_session_form_batch_items.rb
renalware-core-2.0.156 db/migrate/20190927130911_create_hd_session_form_batch_items.rb
renalware-core-2.0.155 db/migrate/20190927130911_create_hd_session_form_batch_items.rb
renalware-core-2.0.153 db/migrate/20190927130911_create_hd_session_form_batch_items.rb
renalware-core-2.0.152 db/migrate/20190927130911_create_hd_session_form_batch_items.rb
renalware-core-2.0.151 db/migrate/20190927130911_create_hd_session_form_batch_items.rb
renalware-core-2.0.149 db/migrate/20190927130911_create_hd_session_form_batch_items.rb
renalware-core-2.0.148 db/migrate/20190927130911_create_hd_session_form_batch_items.rb