Added enum to Task model. Added project to project to tasks. Changed Status data type in Tasks.
This commit is contained in:
6
db/migrate/20260126091632_change_status_type_in_tasks.rb
Normal file
6
db/migrate/20260126091632_change_status_type_in_tasks.rb
Normal file
@@ -0,0 +1,6 @@
|
||||
class ChangeStatusTypeInTasks < ActiveRecord::Migration[8.1]
|
||||
def change
|
||||
remove_column :tasks, :status, :string
|
||||
add_column :tasks, :status, :integer, default: 0, null: false
|
||||
end
|
||||
end
|
||||
5
db/migrate/20260126094649_add_project_to_tasks.rb
Normal file
5
db/migrate/20260126094649_add_project_to_tasks.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddProjectToTasks < ActiveRecord::Migration[8.1]
|
||||
def change
|
||||
add_reference :tasks, :project, null: false, foreign_key: true
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user