ecom_core 1.2.5 → 1.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/app/models/ecom/core/attendance_sheet.rb +24 -19
  3. data/app/models/ecom/core/attendance_sheet_entry.rb +1 -1
  4. data/app/models/ecom/core/company.rb +10 -0
  5. data/app/models/ecom/core/crew.rb +0 -2
  6. data/app/models/ecom/core/crew_overtime.rb +1 -1
  7. data/app/models/ecom/core/crew_time.rb +0 -3
  8. data/app/models/ecom/core/overtime_sheet.rb +13 -10
  9. data/app/models/ecom/core/payment_detail.rb +1 -1
  10. data/app/models/ecom/core/payroll.rb +1 -0
  11. data/app/models/ecom/core/project.rb +4 -0
  12. data/app/models/ecom/core/project_crew.rb +15 -0
  13. data/db/migrate/20190101085530_create_ecom_core_companies.rb +14 -0
  14. data/db/migrate/20191119012030_create_ecom_core_task_templates.rb +4 -3
  15. data/db/migrate/20191119013236_create_ecom_core_work_product_templates.rb +4 -3
  16. data/db/migrate/20191119144618_create_ecom_core_stakeholders.rb +4 -3
  17. data/db/migrate/20191201131341_create_ecom_core_product_types.rb +4 -2
  18. data/db/migrate/20191201134420_create_ecom_core_work_component_templates.rb +8 -6
  19. data/db/migrate/20191201145848_create_ecom_core_projects.rb +28 -13
  20. data/db/migrate/20191202103735_create_ecom_core_tasks.rb +8 -5
  21. data/db/migrate/20191202105355_create_task_templates_resource_types.rb +8 -7
  22. data/db/migrate/20191202220832_create_ecom_core_users.rb +9 -6
  23. data/db/migrate/20191202220953_create_ecom_core_user_roles.rb +13 -8
  24. data/db/migrate/20191202221423_create_ecom_core_menus.rb +16 -9
  25. data/db/migrate/20191202235434_create_ecom_core_work_products.rb +29 -15
  26. data/db/migrate/20191206104247_create_ecom_core_work_components.rb +24 -14
  27. data/db/migrate/20191225100054_create_ecom_core_crews.rb +5 -3
  28. data/db/migrate/20191225121850_create_ecom_core_project_crews.rb +19 -0
  29. data/db/migrate/{20200401040433_create_ecom_core_attendance_sheets.rb → 20191225140433_create_ecom_core_attendance_sheets.rb} +4 -0
  30. data/db/migrate/20191225162539_create_ecom_core_attendance_sheet_entries.rb +17 -0
  31. data/db/migrate/20191225211712_create_ecom_core_crew_times.rb +15 -9
  32. data/db/migrate/20200126081005_create_ecom_core_payrolls.rb +4 -0
  33. data/db/migrate/20200126082103_create_ecom_core_payments.rb +6 -3
  34. data/db/migrate/20200126183218_create_ecom_core_payment_details.rb +10 -5
  35. data/db/migrate/20200307112519_create_ecom_core_custom_payment_details.rb +4 -3
  36. data/db/migrate/20200315145215_create_ecom_core_equipment_locations.rb +4 -3
  37. data/db/migrate/20200315150500_create_ecom_core_equipment_categories.rb +4 -2
  38. data/db/migrate/20200315152143_create_ecom_core_equipment.rb +4 -2
  39. data/db/migrate/20200315153640_create_ecom_core_equipment_items.rb +8 -5
  40. data/db/migrate/20200315160810_create_ecom_core_equipment_valuations.rb +4 -3
  41. data/db/migrate/20200316125323_create_ecom_core_equipment_components.rb +4 -3
  42. data/db/migrate/20200410090701_create_ecom_core_overtime_sheets.rb +4 -0
  43. data/db/migrate/20200410100035_create_ecom_core_overtime_sheet_entries.rb +8 -5
  44. data/db/migrate/20200410111827_create_ecom_core_crew_overtimes.rb +17 -11
  45. data/lib/ecom/core/version.rb +1 -1
  46. data/spec/factories/ecom/core/application_modules.rb +1 -1
  47. data/spec/factories/ecom/core/attendance_sheet_entries.rb +1 -1
  48. data/spec/factories/ecom/core/attendance_sheets.rb +2 -1
  49. data/spec/factories/ecom/core/companies.rb +9 -0
  50. data/spec/factories/ecom/core/crew_overtimes.rb +1 -1
  51. data/spec/factories/ecom/core/crew_times.rb +1 -1
  52. data/spec/factories/ecom/core/crew_types.rb +1 -1
  53. data/spec/factories/ecom/core/crews.rb +1 -1
  54. data/spec/factories/ecom/core/currencies.rb +1 -1
  55. data/spec/factories/ecom/core/custom_payment_details.rb +1 -1
  56. data/spec/factories/ecom/core/equipment.rb +1 -1
  57. data/spec/factories/ecom/core/equipment_categories.rb +1 -1
  58. data/spec/factories/ecom/core/equipment_components.rb +1 -1
  59. data/spec/factories/ecom/core/equipment_items.rb +1 -1
  60. data/spec/factories/ecom/core/equipment_locations.rb +1 -1
  61. data/spec/factories/ecom/core/equipment_types.rb +1 -1
  62. data/spec/factories/ecom/core/equipment_valuations.rb +1 -1
  63. data/spec/factories/ecom/core/location_types.rb +1 -1
  64. data/spec/factories/ecom/core/lookups.rb +1 -1
  65. data/spec/factories/ecom/core/material_types.rb +1 -1
  66. data/spec/factories/ecom/core/menus.rb +1 -1
  67. data/spec/factories/ecom/core/overtime_sheet_entries.rb +1 -1
  68. data/spec/factories/ecom/core/overtime_sheets.rb +2 -1
  69. data/spec/factories/ecom/core/overtime_types.rb +1 -1
  70. data/spec/factories/ecom/core/payment_details.rb +1 -1
  71. data/spec/factories/ecom/core/payments.rb +1 -1
  72. data/spec/factories/ecom/core/payrolls.rb +2 -1
  73. data/spec/factories/ecom/core/product_types.rb +1 -1
  74. data/spec/factories/ecom/core/project_crews.rb +9 -0
  75. data/spec/factories/ecom/core/projects.rb +2 -1
  76. data/spec/factories/ecom/core/resource_types.rb +1 -1
  77. data/spec/factories/ecom/core/stakeholder_types.rb +1 -1
  78. data/spec/factories/ecom/core/stakeholders.rb +1 -1
  79. data/spec/factories/ecom/core/task_template_types.rb +1 -1
  80. data/spec/factories/ecom/core/task_templates.rb +1 -1
  81. data/spec/factories/ecom/core/tasks.rb +1 -1
  82. data/spec/factories/ecom/core/user_roles.rb +1 -1
  83. data/spec/factories/ecom/core/users.rb +1 -1
  84. data/spec/factories/ecom/core/work_component_templates.rb +1 -1
  85. data/spec/factories/ecom/core/work_components.rb +1 -1
  86. data/spec/factories/ecom/core/work_product_templates.rb +1 -1
  87. data/spec/factories/ecom/core/work_products.rb +2 -2
  88. metadata +25 -15
  89. data/db/migrate/20200207035823_add_additional_columns_to_payment.rb +0 -6
  90. data/db/migrate/20200207040844_add_net_pay_column_to_payment_details.rb +0 -5
  91. data/db/migrate/20200210095535_add_advance_column_to_payment_details.rb +0 -5
  92. data/db/migrate/20200221123207_add_employee_id_to_crew.rb +0 -5
  93. data/db/migrate/20200401071343_remove_date_column_from_crew_times.rb +0 -5
  94. data/db/migrate/20200401122539_create_ecom_core_attendance_sheet_entries.rb +0 -14
  95. data/db/migrate/20200401142959_relate_crew_time_with_attendance_sheet_entry.rb +0 -8
  96. data/db/migrate/20200401144137_remove_crew_time_id_from_crew.rb +0 -7
  97. data/db/migrate/20200413144023_fix_crew_time_columns.rb +0 -17
  98. data/db/migrate/20200414044144_adjust_crew_overtime_column_names.rb +0 -6
  99. data/db/migrate/20200414185248_change_time_columns_to_datetime.rb +0 -8
@@ -1,5 +1,5 @@
1
1
  FactoryBot.define do
2
- factory :payment, class: 'Ecom::Core::Payment' do
2
+ factory :payment, class: Ecom::Core::Payment do
3
3
  from { Date.parse('2000-01-01') }
4
4
  to { Date.parse('2000-01-15') }
5
5
  approved { false }
@@ -1,7 +1,8 @@
1
1
  FactoryBot.define do
2
- factory :payroll, class: 'Ecom::Core::Payroll' do
2
+ factory :payroll, class: Ecom::Core::Payroll do
3
3
  month { 1 }
4
4
  year { 2000 }
5
5
  approved { false }
6
+ association :project
6
7
  end
7
8
  end
@@ -1,5 +1,5 @@
1
1
  FactoryBot.define do
2
- factory :product_type, class: 'Ecom::Core::ProductType' do
2
+ factory :product_type, class: Ecom::Core::ProductType do
3
3
  name { FFaker::Name.name }
4
4
  association :work_product_template
5
5
  dimension { [{ name: 'length', label: 'length' }, { name: 'width', label: 'width' }] }
@@ -0,0 +1,9 @@
1
+ FactoryBot.define do
2
+ factory :project_crew, class: Ecom::Core::ProjectCrew do
3
+ association :project
4
+ association :crew
5
+ start_date { 1.month.ago }
6
+ end_date { Date.tomorrow }
7
+ status { Ecom::Core::ProjectCrew::ACTIVE }
8
+ end
9
+ end
@@ -1,5 +1,5 @@
1
1
  FactoryBot.define do
2
- factory :project, class: 'Ecom::Core::Project' do
2
+ factory :project, class: Ecom::Core::Project do
3
3
  name { FFaker::Name.name }
4
4
  description { FFaker::Name.name }
5
5
  location { FFaker::Name.name }
@@ -19,5 +19,6 @@ FactoryBot.define do
19
19
  retention { FFaker::Random.rand(0..100) }
20
20
  remark { FFaker::Name.name }
21
21
  association :currency
22
+ association :company
22
23
  end
23
24
  end
@@ -1,5 +1,5 @@
1
1
  FactoryBot.define do
2
- factory :resource_type, class: 'Ecom::Core::ResourceType' do
2
+ factory :resource_type, class: Ecom::Core::ResourceType do
3
3
  code { FFaker::Name.name }
4
4
  name { FFaker::Name.name }
5
5
  base_unit { FFaker::Name.name }
@@ -1,5 +1,5 @@
1
1
  FactoryBot.define do
2
- factory :stakeholder_type, class: 'Ecom::Core::StakeholderType' do
2
+ factory :stakeholder_type, class: Ecom::Core::StakeholderType do
3
3
  name { FFaker::Name.name }
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  FactoryBot.define do
2
- factory :stakeholder, class: 'Ecom::Core::Stakeholder' do
2
+ factory :stakeholder, class: Ecom::Core::Stakeholder do
3
3
  name { FFaker::Name.unique.name }
4
4
  type_of_business { FFaker::Name.name }
5
5
  address { FFaker::Name.name }
@@ -1,5 +1,5 @@
1
1
  FactoryBot.define do
2
- factory :task_template_type, class: 'Ecom::Core::TaskTemplateType' do
2
+ factory :task_template_type, class: Ecom::Core::TaskTemplateType do
3
3
  code { FFaker::Name.unique.name }
4
4
  name { FFaker::Name.unique.name }
5
5
  end
@@ -1,5 +1,5 @@
1
1
  FactoryBot.define do
2
- factory :task_template, class: 'Ecom::Core::TaskTemplate' do
2
+ factory :task_template, class: Ecom::Core::TaskTemplate do
3
3
  code { FFaker::Name.name }
4
4
  name { FFaker::Name.name }
5
5
  description { FFaker::Name.name }
@@ -1,5 +1,5 @@
1
1
  FactoryBot.define do
2
- factory :task, class: 'Ecom::Core::Task' do
2
+ factory :task, class: Ecom::Core::Task do
3
3
  code { FFaker::Name.name }
4
4
  name { FFaker::Name.name }
5
5
  description { FFaker::Name.name }
@@ -1,5 +1,5 @@
1
1
  FactoryBot.define do
2
- factory :user_role, class: 'Ecom::Core::UserRole' do
2
+ factory :user_role, class: Ecom::Core::UserRole do
3
3
  name { FFaker::Name.name }
4
4
  association :application_module
5
5
  end
@@ -1,5 +1,5 @@
1
1
  FactoryBot.define do
2
- factory :user, class: 'Ecom::Core::User' do
2
+ factory :user, class: Ecom::Core::User do
3
3
  first_name { FFaker::Name.name }
4
4
  last_name { FFaker::Name.name }
5
5
  email { FFaker::Internet.email }
@@ -1,5 +1,5 @@
1
1
  FactoryBot.define do
2
- factory :work_component_template, class: 'Ecom::Core::WorkComponentTemplate' do
2
+ factory :work_component_template, class: Ecom::Core::WorkComponentTemplate do
3
3
  code { FFaker::Name.name }
4
4
  name { FFaker::Name.name }
5
5
  description { FFaker::Name.name }
@@ -1,5 +1,5 @@
1
1
  FactoryBot.define do
2
- factory :work_component, class: 'Ecom::Core::WorkComponent' do
2
+ factory :work_component, class: Ecom::Core::WorkComponent do
3
3
  name { FFaker::Name.name }
4
4
  dimension { [{ label: 'Length', name: 'length', value: 10 }] }
5
5
  assignment_status { :unassigned }
@@ -1,5 +1,5 @@
1
1
  FactoryBot.define do
2
- factory :work_product_template, class: 'Ecom::Core::WorkProductTemplate' do
2
+ factory :work_product_template, class: Ecom::Core::WorkProductTemplate do
3
3
  code { FFaker::Name.unique.name }
4
4
  name { FFaker::Name.unique.name }
5
5
  description { FFaker::Name.name }
@@ -1,7 +1,7 @@
1
1
  FactoryBot.define do
2
- factory :work_product, class: 'Ecom::Core::WorkProduct' do
2
+ factory :work_product, class: Ecom::Core::WorkProduct do
3
3
  code { FFaker::Name.unique.name }
4
- name { FFaker::Name.name }
4
+ name { FFaker::Name.unique.name }
5
5
  description { FFaker::Name.name }
6
6
  design_reference_no { FFaker::Name.name }
7
7
  dimension { [{ label: 'Length', name: 'length', value: 12 }] }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecom_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.5
4
+ version: 1.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henock L.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-10 00:00:00.000000000 Z
11
+ date: 2020-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aasm
@@ -122,6 +122,20 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: pg
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
125
139
  - !ruby/object:Gem::Dependency
126
140
  name: rspec-rails
127
141
  requirement: !ruby/object:Gem::Requirement
@@ -165,7 +179,7 @@ dependencies:
165
179
  - !ruby/object:Gem::Version
166
180
  version: '0'
167
181
  - !ruby/object:Gem::Dependency
168
- name: sqlite3
182
+ name: solargraph
169
183
  requirement: !ruby/object:Gem::Requirement
170
184
  requirements:
171
185
  - - ">="
@@ -204,6 +218,7 @@ files:
204
218
  - app/models/ecom/core/application_record.rb
205
219
  - app/models/ecom/core/attendance_sheet.rb
206
220
  - app/models/ecom/core/attendance_sheet_entry.rb
221
+ - app/models/ecom/core/company.rb
207
222
  - app/models/ecom/core/crew.rb
208
223
  - app/models/ecom/core/crew_overtime.rb
209
224
  - app/models/ecom/core/crew_time.rb
@@ -229,6 +244,7 @@ files:
229
244
  - app/models/ecom/core/payroll.rb
230
245
  - app/models/ecom/core/product_type.rb
231
246
  - app/models/ecom/core/project.rb
247
+ - app/models/ecom/core/project_crew.rb
232
248
  - app/models/ecom/core/resource_type.rb
233
249
  - app/models/ecom/core/stakeholder.rb
234
250
  - app/models/ecom/core/stakeholder_type.rb
@@ -250,6 +266,7 @@ files:
250
266
  - app/services/ecom/core/token_auth_service.rb
251
267
  - config/database.ci.yml
252
268
  - config/routes.rb
269
+ - db/migrate/20190101085530_create_ecom_core_companies.rb
253
270
  - db/migrate/20190101112620_create_ecom_core_lookups.rb
254
271
  - db/migrate/20190101112625_create_ecom_core_overtime_types.rb
255
272
  - db/migrate/20191119010518_create_ecom_core_task_template_types.rb
@@ -271,14 +288,13 @@ files:
271
288
  - db/migrate/20191202235434_create_ecom_core_work_products.rb
272
289
  - db/migrate/20191206104247_create_ecom_core_work_components.rb
273
290
  - db/migrate/20191225100054_create_ecom_core_crews.rb
291
+ - db/migrate/20191225121850_create_ecom_core_project_crews.rb
292
+ - db/migrate/20191225140433_create_ecom_core_attendance_sheets.rb
293
+ - db/migrate/20191225162539_create_ecom_core_attendance_sheet_entries.rb
274
294
  - db/migrate/20191225211712_create_ecom_core_crew_times.rb
275
295
  - db/migrate/20200126081005_create_ecom_core_payrolls.rb
276
296
  - db/migrate/20200126082103_create_ecom_core_payments.rb
277
297
  - db/migrate/20200126183218_create_ecom_core_payment_details.rb
278
- - db/migrate/20200207035823_add_additional_columns_to_payment.rb
279
- - db/migrate/20200207040844_add_net_pay_column_to_payment_details.rb
280
- - db/migrate/20200210095535_add_advance_column_to_payment_details.rb
281
- - db/migrate/20200221123207_add_employee_id_to_crew.rb
282
298
  - db/migrate/20200307112519_create_ecom_core_custom_payment_details.rb
283
299
  - db/migrate/20200315145215_create_ecom_core_equipment_locations.rb
284
300
  - db/migrate/20200315150500_create_ecom_core_equipment_categories.rb
@@ -286,17 +302,9 @@ files:
286
302
  - db/migrate/20200315153640_create_ecom_core_equipment_items.rb
287
303
  - db/migrate/20200315160810_create_ecom_core_equipment_valuations.rb
288
304
  - db/migrate/20200316125323_create_ecom_core_equipment_components.rb
289
- - db/migrate/20200401040433_create_ecom_core_attendance_sheets.rb
290
- - db/migrate/20200401071343_remove_date_column_from_crew_times.rb
291
- - db/migrate/20200401122539_create_ecom_core_attendance_sheet_entries.rb
292
- - db/migrate/20200401142959_relate_crew_time_with_attendance_sheet_entry.rb
293
- - db/migrate/20200401144137_remove_crew_time_id_from_crew.rb
294
305
  - db/migrate/20200410090701_create_ecom_core_overtime_sheets.rb
295
306
  - db/migrate/20200410100035_create_ecom_core_overtime_sheet_entries.rb
296
307
  - db/migrate/20200410111827_create_ecom_core_crew_overtimes.rb
297
- - db/migrate/20200413144023_fix_crew_time_columns.rb
298
- - db/migrate/20200414044144_adjust_crew_overtime_column_names.rb
299
- - db/migrate/20200414185248_change_time_columns_to_datetime.rb
300
308
  - lib/ecom/core.rb
301
309
  - lib/ecom/core/engine.rb
302
310
  - lib/ecom/core/version.rb
@@ -305,6 +313,7 @@ files:
305
313
  - spec/factories/ecom/core/application_modules.rb
306
314
  - spec/factories/ecom/core/attendance_sheet_entries.rb
307
315
  - spec/factories/ecom/core/attendance_sheets.rb
316
+ - spec/factories/ecom/core/companies.rb
308
317
  - spec/factories/ecom/core/crew_overtimes.rb
309
318
  - spec/factories/ecom/core/crew_times.rb
310
319
  - spec/factories/ecom/core/crew_types.rb
@@ -329,6 +338,7 @@ files:
329
338
  - spec/factories/ecom/core/payments.rb
330
339
  - spec/factories/ecom/core/payrolls.rb
331
340
  - spec/factories/ecom/core/product_types.rb
341
+ - spec/factories/ecom/core/project_crews.rb
332
342
  - spec/factories/ecom/core/projects.rb
333
343
  - spec/factories/ecom/core/resource_types.rb
334
344
  - spec/factories/ecom/core/stakeholder_types.rb
@@ -1,6 +0,0 @@
1
- class AddAdditionalColumnsToPayment < ActiveRecord::Migration[6.0]
2
- def change
3
- add_column :ecom_core_payments, :approved, :boolean, null: false, default: false
4
- add_column :ecom_core_payments, :payment_order, :integer, null: false, default: 1
5
- end
6
- end
@@ -1,5 +0,0 @@
1
- class AddNetPayColumnToPaymentDetails < ActiveRecord::Migration[6.0]
2
- def change
3
- add_column :ecom_core_payment_details, :net_pay, :float, null: false, default: 0
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- class AddAdvanceColumnToPaymentDetails < ActiveRecord::Migration[6.0]
2
- def change
3
- add_column :ecom_core_payment_details, :advance, :float, null: false, default: 0
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- class AddEmployeeIdToCrew < ActiveRecord::Migration[6.0]
2
- def change
3
- add_column :ecom_core_crews, :employee_id, :string
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- class RemoveDateColumnFromCrewTimes < ActiveRecord::Migration[6.0]
2
- def change
3
- remove_column :ecom_core_crew_times, :date
4
- end
5
- end
@@ -1,14 +0,0 @@
1
- class CreateEcomCoreAttendanceSheetEntries < ActiveRecord::Migration[6.0]
2
- def change
3
- create_table :ecom_core_attendance_sheet_entries do |t|
4
- t.references :attendance_sheet, null: false, index: { name: 'ase_on_as_indx' }
5
- t.references :crew, null: false, index: { name: 'ase_on_crew_indx' }
6
- t.float :total_hours
7
-
8
- t.timestamps
9
- end
10
- add_foreign_key :ecom_core_attendance_sheet_entries, :ecom_core_attendance_sheets,
11
- column: :attendance_sheet_id
12
- add_foreign_key :ecom_core_attendance_sheet_entries, :ecom_core_crews, column: :crew_id
13
- end
14
- end
@@ -1,8 +0,0 @@
1
- class RelateCrewTimeWithAttendanceSheetEntry < ActiveRecord::Migration[6.0]
2
- def change
3
- add_column :ecom_core_crew_times, :attendance_sheet_entry_id, :integer,
4
- index: { name: 'ase_on_ct_indx' }
5
- add_foreign_key :ecom_core_crew_times, :ecom_core_attendance_sheet_entries,
6
- column: :attendance_sheet_entry_id
7
- end
8
- end
@@ -1,7 +0,0 @@
1
- class RemoveCrewTimeIdFromCrew < ActiveRecord::Migration[6.0]
2
- def change
3
- remove_foreign_key :ecom_core_crew_times, :ecom_core_crews, column: :crew_id
4
- remove_index :ecom_core_crew_times, name: 'ct_on_crew_indx'
5
- remove_column :ecom_core_crew_times, :crew_id
6
- end
7
- end
@@ -1,17 +0,0 @@
1
- class FixCrewTimeColumns < ActiveRecord::Migration[6.0]
2
- def change
3
- remove_column :ecom_core_crew_times, :overtime, :boolean
4
- remove_column :ecom_core_crew_times, :overtime_type_id, :integer
5
- remove_column :ecom_core_crew_times, :converted_hours, :float
6
-
7
- add_column :ecom_core_crew_times, :revised, :boolean, default: false, null: false
8
- add_column :ecom_core_crew_times, :revision_to_id, :integer
9
- add_column :ecom_core_crew_times, :created_by_id, :integer
10
-
11
- add_index :ecom_core_crew_times, :revision_to_id, name: 'ct_on_rt_indx'
12
- add_index :ecom_core_crew_times, :created_by_id, name: 'cb_on_ct_indx'
13
-
14
- add_foreign_key :ecom_core_crew_times, :ecom_core_crew_times, column: :revision_to_id
15
- add_foreign_key :ecom_core_crew_times, :ecom_core_users, column: :created_by_id
16
- end
17
- end
@@ -1,6 +0,0 @@
1
- class AdjustCrewOvertimeColumnNames < ActiveRecord::Migration[6.0]
2
- def change
3
- rename_column :ecom_core_crew_overtimes, :hours, :raw_hours
4
- rename_column :ecom_core_crew_overtimes, :converted_hours, :hours
5
- end
6
- end
@@ -1,8 +0,0 @@
1
- class ChangeTimeColumnsToDatetime < ActiveRecord::Migration[6.0]
2
- def change
3
- remove_column :ecom_core_crew_times, :checkin_time, :time
4
- add_column :ecom_core_crew_times, :checkin_time, :datetime
5
- remove_column :ecom_core_crew_times, :checkout_time, :time
6
- add_column :ecom_core_crew_times, :checkout_time, :datetime
7
- end
8
- end