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

ensure order of columns when inserting from select

ulfertsf2fde5a9a6b6
diff --git a/db/migrate/20230309104056_unique_index_on_custom_fields_projects.rb b/db/migrate/20230309104056_unique_index_on_custom_fields_projects.rb
index 0e439d59e5d..cae19665624 100644
--- a/db/migrate/20230309104056_unique_index_on_custom_fields_projects.rb
+++ b/db/migrate/20230309104056_unique_index_on_custom_fields_projects.rb
@@ -62,6 +62,10 @@ class UniqueIndexOnCustomFieldsProjects < ActiveRecord::Migration[7.0]
insertion AS (
INSERT INTO
custom_fields_projects
+ (
+ project_id,
+ custom_field_id
+ )
SELECT
project_id,
custom_field_id