Sha256: c2dce5e432192755f2335c33c8254722aa484b4e6247b75f32303c982b9eb908

Contents?: true

Size: 633 Bytes

Versions: 17

Compression:

Stored size: 633 Bytes

Contents

class CreateEcomCoreAttendanceSheets < ActiveRecord::Migration[6.0]
  def change
    create_table :ecom_core_attendance_sheets do |t|
      t.date :date, null: false
      t.datetime :opened_at, null: false
      t.datetime :submitted_at
      t.datetime :approved_at
      t.string :remark
      t.string :status, null: false, default: 'Open'
      t.references :site,
                   null: false,
                   index: { name: 'as_on_site_indx' },
                   foreign_key: { to_table: :ecom_core_sites }

      t.timestamps
    end
    add_index :ecom_core_attendance_sheets, %i[date site_id], unique: true
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
ecom_core-1.3.14 db/migrate/20191225140433_create_ecom_core_attendance_sheets.rb
ecom_core-1.3.13 db/migrate/20191225140433_create_ecom_core_attendance_sheets.rb
ecom_core-1.3.12 db/migrate/20191225140433_create_ecom_core_attendance_sheets.rb
ecom_core-1.3.11 db/migrate/20191225140433_create_ecom_core_attendance_sheets.rb
ecom_core-1.3.10 db/migrate/20191225140433_create_ecom_core_attendance_sheets.rb
ecom_core-1.3.9 db/migrate/20191225140433_create_ecom_core_attendance_sheets.rb
ecom_core-1.3.8 db/migrate/20191225140433_create_ecom_core_attendance_sheets.rb
ecom_core-1.3.7 db/migrate/20191225140433_create_ecom_core_attendance_sheets.rb
ecom_core-1.3.6 db/migrate/20191225140433_create_ecom_core_attendance_sheets.rb
ecom_core-1.3.5 db/migrate/20191225140433_create_ecom_core_attendance_sheets.rb
ecom_core-1.3.4 db/migrate/20191225140433_create_ecom_core_attendance_sheets.rb
ecom_core-1.3.3 db/migrate/20191225140433_create_ecom_core_attendance_sheets.rb
ecom_core-1.3.2 db/migrate/20191225140433_create_ecom_core_attendance_sheets.rb
ecom_core-1.3.1 db/migrate/20191225140433_create_ecom_core_attendance_sheets.rb
ecom_core-1.3.0 db/migrate/20191225140433_create_ecom_core_attendance_sheets.rb
ecom_core-1.2.36 db/migrate/20191225140433_create_ecom_core_attendance_sheets.rb
ecom_core-1.2.35 db/migrate/20191225140433_create_ecom_core_attendance_sheets.rb