name no estaba indexado!
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
d9faecf1bd
commit
3ff7e4aa41
1 changed files with 0 additions and 4 deletions
|
@ -4,15 +4,11 @@
|
||||||
class AddSerialNumberToRaspberry < ActiveRecord::Migration[6.1]
|
class AddSerialNumberToRaspberry < ActiveRecord::Migration[6.1]
|
||||||
def up
|
def up
|
||||||
add_column :raspberries, :serial_number, :string
|
add_column :raspberries, :serial_number, :string
|
||||||
|
|
||||||
remove_index :raspberries, :name
|
|
||||||
add_index :raspberries, :serial_number, unique: true
|
add_index :raspberries, :serial_number, unique: true
|
||||||
end
|
end
|
||||||
|
|
||||||
def down
|
def down
|
||||||
remove_index :raspberries, :serial_number
|
remove_index :raspberries, :serial_number
|
||||||
add_index :raspberries, :name, unique: true
|
|
||||||
|
|
||||||
remove_column :raspberries, :serial_number
|
remove_column :raspberries, :serial_number
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue