diff --git a/twenty-backend/lib/twenty-backend/migration/1_create_projects.rb b/twenty-backend/lib/twenty-backend/migration/1_create_projects.rb index b6532f8..cd9f571 100644 --- a/twenty-backend/lib/twenty-backend/migration/1_create_projects.rb +++ b/twenty-backend/lib/twenty-backend/migration/1_create_projects.rb @@ -7,6 +7,7 @@ class CreateProjects < ActiveRecord::Migration[7.1] t.string :path, null: false t.timestamps end + add_index :projects, [:name, :path], unique: true end def down diff --git a/twenty-backend/lib/twenty-backend/migration/3_add_unique_index_to_projects.rb b/twenty-backend/lib/twenty-backend/migration/3_add_unique_index_to_projects.rb deleted file mode 100644 index 276ff32..0000000 --- a/twenty-backend/lib/twenty-backend/migration/3_add_unique_index_to_projects.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class AddUniqueIndexToProjects < ActiveRecord::Migration[7.1] - def up - add_index :projects, [:name, :path], unique: true - end - - def down - remove_index :projects, [:name, :path], unique: true - end -end