Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

fix[Op#57516]: Reset column info and primary key after migration for fresh state

Kabiru Mwenja403cf7c20435
diff --git a/spec/migrations/add_primary_key_to_custom_fields_projects_spec.rb b/spec/migrations/add_primary_key_to_custom_fields_projects_spec.rb
index 62411f854e9..bc34d92112f 100644
--- a/spec/migrations/add_primary_key_to_custom_fields_projects_spec.rb
+++ b/spec/migrations/add_primary_key_to_custom_fields_projects_spec.rb
@@ -34,6 +34,8 @@ RSpec.describe AddPrimaryKeyToCustomFieldsProjects, type: :model do
it "adds an `id` primary key column with backfilled values" do
ActiveRecord::Migration.suppress_messages { described_class.migrate(:down) }
+ CustomFieldsProject.reset_column_information
+ CustomFieldsProject.reset_primary_key
create_list(:custom_fields_project, 5)