Sha256: 62130e22206374326c678ddc0a9d0ecef0042c7ab4bde2f7ce3e6a48ff71d62e

Contents?: true

Size: 1.97 KB

Versions: 4

Compression:

Stored size: 1.97 KB

Contents

class CreateEcomCoreJobCards < ActiveRecord::Migration[6.0]
  def change
    create_table :ecom_core_job_cards do |t|
      t.string :code, unique: true
      t.date :start_date
      t.date :due_date
      t.date :checkin_date
      t.date :checkout_date
      t.boolean :approved, null: false, default: false
      t.boolean :checkin_confirmed, null: false, default: false
      t.boolean :checkout_confirmed, null: false, default: false
      t.references :maintenance_service_order,
                   null: false,
                   index: { name: 'jc_on_mso_indx' },
                   foreign_key: { to_table: :ecom_core_maintenance_service_orders }
      t.references :service_provider,
                   null: false,
                   index: { name: 'jc_on_sp_indx' },
                   foreign_key: { to_table: :ecom_core_equipment_locations }
      t.references :checkout_by,
                   null: true,
                   index: { name: 'jc_on_cb_indx' },
                   foreign_key: { to_table: :ecom_core_users }
      t.references :checkout_to,
                   null: true,
                   index: { name: 'jc_on_ct_indx' },
                   foreign_key: { to_table: :ecom_core_equipment_locations }
      t.references :maintenance_status,
                   null: false,
                   index: { name: 'jc_on_ms_indx' },
                   foreign_key: { to_table: :ecom_core_lookups }
      t.references :checkin_by,
                   null: true,
                   index: { name: 'jc_on_cib_indx' },
                   foreign_key: { to_table: :ecom_core_users }
      t.references :checkin_to,
                   null: true,
                   index: { name: 'jc_on_cit_indx' },
                   foreign_key: { to_table: :ecom_core_equipment_locations }
      t.references :prepared_by,
                   null: false,
                   index: { name: 'jc_on_pb_indx' },
                   foreign_key: { to_table: :ecom_core_users }

      t.timestamps
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ecom_core-1.2.32 db/migrate/20200919085613_create_ecom_core_job_cards.rb
ecom_core-1.2.31 db/migrate/20200919085613_create_ecom_core_job_cards.rb
ecom_core-1.2.30 db/migrate/20200919085613_create_ecom_core_job_cards.rb
ecom_core-1.2.29 db/migrate/20200919085613_create_ecom_core_job_cards.rb