2023-08-17 21:29:22 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2023-08-17 21:53:41 +08:00
|
|
|
# rubocop:disable Rails/SkipsModelValidations
|
2023-08-17 21:18:46 +08:00
|
|
|
class UpdateValuesInMyModuleStatuses < ActiveRecord::Migration[7.0]
|
|
|
|
def up
|
|
|
|
MyModuleStatus.where(name: 'Not started').update_all(color: '#FFFFFF')
|
|
|
|
MyModuleStatus.where(name: 'In progress').update_all(color: '#3070ED')
|
|
|
|
MyModuleStatus.where(name: 'Completed').update_all(color: '#5EC66F')
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
MyModuleStatus.where(name: 'Not started').update_all(color: '#406d86')
|
|
|
|
MyModuleStatus.where(name: 'In progress').update_all(color: '#0065ff')
|
|
|
|
MyModuleStatus.where(name: 'Completed').update_all(color: '#00b900')
|
|
|
|
end
|
|
|
|
end
|
2023-08-17 21:53:41 +08:00
|
|
|
# rubocop:enable Rails/SkipsModelValidations
|