Migration: Index and make Procedure.path nonnull

This commit is contained in:
Nicolas Bouilleaud 2019-09-17 15:55:35 +02:00
parent 703c436c61
commit e9c6ed80e4
4 changed files with 11 additions and 3 deletions

View file

@ -0,0 +1,6 @@
class MakePathNonnull < ActiveRecord::Migration[5.2]
def change
change_column_null :procedures, :path, false
add_index :procedures, [:path, :archived_at, :hidden_at], unique: true
end
end