Sha256: 42318a6f647f3a4375a618c0eaf76b316449d5b98ef780f27afa609c78625215

Contents?: true

Size: 1.13 KB

Versions: 1

Compression:

Stored size: 1.13 KB

Contents

class CreateEcomCoreBookingRequests < ActiveRecord::Migration[6.0]
  def change
    create_table :ecom_core_booking_requests do |t|
      t.date :start_date, null: false
      t.date :end_date, null: false
      t.references :equipment,
                   null: false,
                   index: { name: 'br_on_equipment_indx' },
                   foreign_key: { to_table: :ecom_core_equipment }
      t.integer :quantity, null: false
      t.string :brand
      t.references :country,
                   null: true,
                   index: { name: 'br_on_country_indx' },
                   foreign_key: { to_table: :ecom_core_lookups }
      t.string :components, array: true, default: []
      t.string :status, null: false
      t.references :requested_by,
                   null: false,
                   index: { name: 'br_on_rb_indx' },
                   foreign_key: { to_table: :ecom_core_users }
      t.references :approved_by,
                   null: true,
                   index: { name: 'br_on_ab_indx' },
                   foreign_key: { to_table: :ecom_core_users }
      t.string :remark

      t.timestamps
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ecom_core-1.2.12 db/migrate/20200602130247_create_ecom_core_booking_requests.rb