diff --git a/db/migrate/20241030154245_create_project_life_cycle_step_definitions.rb b/db/migrate/20241030154245_create_project_life_cycles.rb similarity index 75% rename from db/migrate/20241030154245_create_project_life_cycle_step_definitions.rb rename to db/migrate/20241030154245_create_project_life_cycles.rb index 9be47cfe79cb..e3c28014eb1a 100644 --- a/db/migrate/20241030154245_create_project_life_cycle_step_definitions.rb +++ b/db/migrate/20241030154245_create_project_life_cycles.rb @@ -26,7 +26,7 @@ # See COPYRIGHT and LICENSE files for more details. #++ -class CreateProjectLifeCycleStepDefinitions < ActiveRecord::Migration[7.1] +class CreateProjectLifeCycles < ActiveRecord::Migration[7.1] def change create_table :project_life_cycle_step_definitions do |t| t.string :type @@ -36,5 +36,18 @@ def change t.timestamps end + + create_table :project_life_cycle_steps do |t| + t.string :type + t.date :start_date + t.date :end_date + t.boolean :active, default: false, null: false + t.references :project, foreign_key: true + t.references :definition, foreign_key: { to_table: :project_life_cycle_step_definitions } + + t.timestamps + end + + add_reference :work_packages, :project_life_cycle_step, null: true end end diff --git a/db/migrate/20241105151352_create_project_life_cycle_steps.rb b/db/migrate/20241105151352_create_project_life_cycle_steps.rb deleted file mode 100644 index cb4f7553b279..000000000000 --- a/db/migrate/20241105151352_create_project_life_cycle_steps.rb +++ /dev/null @@ -1,14 +0,0 @@ -class CreateProjectLifeCycleSteps < ActiveRecord::Migration[7.1] - def change - create_table :project_life_cycle_steps do |t| - t.string :type - t.date :start_date - t.date :end_date - t.boolean :active, default: false, null: false - t.references :project, foreign_key: true - t.references :definition, foreign_key: { to_table: :project_life_cycle_step_definitions } - - t.timestamps - end - end -end diff --git a/db/migrate/20241105175000_add_life_cycle_to_work_packages.rb b/db/migrate/20241105175000_add_life_cycle_to_work_packages.rb deleted file mode 100644 index 423eb83cac79..000000000000 --- a/db/migrate/20241105175000_add_life_cycle_to_work_packages.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddLifeCycleToWorkPackages < ActiveRecord::Migration[7.1] - def change - add_reference :work_packages, :project_life_cycle_step, null: true - end -end