backend: merge migration 3 into migration 1
This commit is contained in:
parent
e27e317896
commit
628bd47e65
2 changed files with 1 additions and 11 deletions
|
@ -7,6 +7,7 @@ class CreateProjects < ActiveRecord::Migration[7.1]
|
||||||
t.string :path, null: false
|
t.string :path, null: false
|
||||||
t.timestamps
|
t.timestamps
|
||||||
end
|
end
|
||||||
|
add_index :projects, [:name, :path], unique: true
|
||||||
end
|
end
|
||||||
|
|
||||||
def down
|
def down
|
||||||
|
|
|
@ -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
|
|
Loading…
Reference in a new issue