From 8b0bbbff21569fdc90c12fdb8f7aeb96c004c9b3 Mon Sep 17 00:00:00 2001 From: Dombi Attila <83396+dombesz@users.noreply.github.com> Date: Fri, 22 Nov 2024 12:50:18 +0200 Subject: [PATCH] Remove default from position --- app/models/project/life_cycle_step.rb | 2 -- ...20241030154245_create_project_life_cycle_step_definitions.rb | 2 +- db/migrate/20241105151352_create_project_life_cycle_steps.rb | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/app/models/project/life_cycle_step.rb b/app/models/project/life_cycle_step.rb index 90d4e74faffb..dc317a69bc88 100644 --- a/app/models/project/life_cycle_step.rb +++ b/app/models/project/life_cycle_step.rb @@ -37,8 +37,6 @@ class Project::LifeCycleStep < ApplicationRecord validates :type, inclusion: { in: %w[Project::Stage Project::Gate], message: :must_be_a_stage_or_gate } - acts_as_list - def initialize(*args) if instance_of? Project::LifeCycleStep # Do not allow directly instantiating this class diff --git a/db/migrate/20241030154245_create_project_life_cycle_step_definitions.rb b/db/migrate/20241030154245_create_project_life_cycle_step_definitions.rb index a019e15c5868..9be47cfe79cb 100644 --- a/db/migrate/20241030154245_create_project_life_cycle_step_definitions.rb +++ b/db/migrate/20241030154245_create_project_life_cycle_step_definitions.rb @@ -31,7 +31,7 @@ def change create_table :project_life_cycle_step_definitions do |t| t.string :type t.string :name - t.integer :position, default: 1, null: true + t.integer :position, null: true t.references :color, foreign_key: true t.timestamps diff --git a/db/migrate/20241105151352_create_project_life_cycle_steps.rb b/db/migrate/20241105151352_create_project_life_cycle_steps.rb index 3858a90d66e3..cb4f7553b279 100644 --- a/db/migrate/20241105151352_create_project_life_cycle_steps.rb +++ b/db/migrate/20241105151352_create_project_life_cycle_steps.rb @@ -5,7 +5,6 @@ def change t.date :start_date t.date :end_date t.boolean :active, default: false, null: false - t.integer :position, default: 1, null: true t.references :project, foreign_key: true t.references :definition, foreign_key: { to_table: :project_life_cycle_step_definitions }