Workflow model

This commit is contained in:
2026-03-21 14:02:55 +02:00
parent 5a7cc10f23
commit dbd849589b
6 changed files with 50 additions and 1 deletions
@@ -0,0 +1,14 @@
class CreateWorkflows < ActiveRecord::Migration[8.1]
def change
create_table :workflows do |t|
t.belongs_to :project, null: false, foreign_key: true
t.string :name, null: false
t.string :icon, null: false
t.string :color, null: false
t.index %i[project_id name], unique: true
t.timestamps
end
end
end
@@ -0,0 +1,6 @@
class AddWorkflowIdToStatusesAndTasks < ActiveRecord::Migration[8.1]
def change
add_belongs_to :tasks, :workflow
add_belongs_to :task_statuses, :workflow
end
end