Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save epintos/f3ff937c1f680e6227d0 to your computer and use it in GitHub Desktop.
Save epintos/f3ff937c1f680e6227d0 to your computer and use it in GitHub Desktop.
AddNameDescriptionDateUniqueIndexToDocument
class AddNameDescriptionDateUniqueIndexToDocument < ActiveRecord::Migration
def change
add_index :document, [:name, :description, :date], unique: true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment