Sha256: 8b941e8423c3ff6a45136b8fa0aa85c9f838d268f659a9b74cc015189ca9004b

Contents?: true

Size: 857 Bytes

Versions: 5

Compression:

Stored size: 857 Bytes

Contents

class CreateMksRateRateChangeRequests < ActiveRecord::Migration[5.1]
  def change
    create_table :mks_rate_rate_change_requests do |t|
      t.string :reference_number, unique: true
      t.string :authorized_by, null: false
      t.date :effective_on, null: false
      t.date :authorized_on, null: false
      t.json :rates, null: false
      t.string :status, null: false, default: 'SUBMITTED'
      t.references :created_by, index: { name: 'cb_on_rcr_indx' }
      t.references :approved_by, index: { name: 'ab_on_rcr_indx' }
      t.string :remark

      t.timestamps
    end

    add_index :mks_rate_rate_change_requests, :reference_number, unique: true
    add_foreign_key :mks_rate_rate_change_requests, :mks_auth_users, column: :created_by_id
    add_foreign_key :mks_rate_rate_change_requests, :mks_auth_users, column: :approved_by_id
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mks_rate-1.0.5 db/migrate/20171220133826_create_mks_rate_rate_change_requests.rb
mks_rate-1.0.4 db/migrate/20171220133826_create_mks_rate_rate_change_requests.rb
mks_rate-1.0.3 db/migrate/20171220133826_create_mks_rate_rate_change_requests.rb
mks_rate-1.0.2 db/migrate/20171220133826_create_mks_rate_rate_change_requests.rb
mks_rate-1.0.1 db/migrate/20171220133826_create_mks_rate_rate_change_requests.rb