Sha256: f2cbcdce57d4818370a588a89bc00a3cac31237128b18b7f3b7b98d79b2b1d74

Contents?: true

Size: 816 Bytes

Versions: 16

Compression:

Stored size: 816 Bytes

Contents

class FixCrewTimeColumns < ActiveRecord::Migration[6.0]
  def change
    remove_column :ecom_core_crew_times, :overtime, :boolean
    remove_column :ecom_core_crew_times, :overtime_type_id, :integer
    remove_column :ecom_core_crew_times, :converted_hours, :float

    add_column :ecom_core_crew_times, :revised, :boolean, default: false, null: false
    add_column :ecom_core_crew_times, :revision_to_id, :integer
    add_column :ecom_core_crew_times, :created_by_id, :integer

    add_index :ecom_core_crew_times, :revision_to_id, name: 'ct_on_rt_indx'
    add_index :ecom_core_crew_times, :created_by_id, name: 'cb_on_ct_indx'

    add_foreign_key :ecom_core_crew_times, :ecom_core_crew_times, column: :revision_to_id
    add_foreign_key :ecom_core_crew_times, :ecom_core_users, column: :created_by_id
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ecom_core-1.2.5 db/migrate/20200413144023_fix_crew_time_columns.rb
ecom_core-1.2.4 db/migrate/20200413144023_fix_crew_time_columns.rb
ecom_core-1.2.3 db/migrate/20200413144023_fix_crew_time_columns.rb
ecom_core-1.2.2 db/migrate/20200413144023_fix_crew_time_columns.rb
ecom_core-1.2.1 db/migrate/20200413144023_fix_crew_time_columns.rb
ecom_core-1.2.0 db/migrate/20200413144023_fix_crew_time_columns.rb
ecom_core-1.1.28 db/migrate/20200413144023_fix_crew_time_columns.rb
ecom_core-1.1.27 db/migrate/20200413144023_fix_crew_time_columns.rb
ecom_core-1.1.26 db/migrate/20200413144023_fix_crew_time_columns.rb
ecom_core-1.1.25 db/migrate/20200413144023_fix_crew_time_columns.rb
ecom_core-1.1.24 db/migrate/20200413144023_fix_crew_time_columns.rb
ecom_core-1.1.23 db/migrate/20200413144023_fix_crew_time_columns.rb
ecom_core-1.1.22 db/migrate/20200413144023_fix_crew_time_columns.rb
ecom_core-1.1.21 db/migrate/20200413144023_fix_crew_time_columns.rb
ecom_core-1.1.20 db/migrate/20200413144023_fix_crew_time_columns.rb
ecom_core-1.1.19 db/migrate/20200413144023_fix_crew_time_columns.rb