mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 16:01:41 +00:00
Agregar índices únicos que pensábamos que teníamos
`unique: true` es un parámetro de `add_index` no de `add_column`.
This commit is contained in:
parent
c1a9aaa037
commit
5c2e5fd62e
1 changed files with 10 additions and 0 deletions
10
db/migrate/20210926205448_add_uniqueness.rb
Normal file
10
db/migrate/20210926205448_add_uniqueness.rb
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
# Agrega índices únicos que pensábamos que ya existían.
|
||||||
|
class AddUniqueness < ActiveRecord::Migration[6.1]
|
||||||
|
def change
|
||||||
|
add_index :designs, :name, unique: true
|
||||||
|
add_index :designs, :gem, unique: true
|
||||||
|
add_index :licencias, :name, unique: true
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue