mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 21:54:48 +02:00
13 lines
332 B
Ruby
13 lines
332 B
Ruby
class AddAuctionsRegistrationCodeUniqConstraint < ActiveRecord::Migration[6.0]
|
|
def up
|
|
execute <<-SQL
|
|
ALTER TABLE auctions ADD CONSTRAINT unique_registration_code UNIQUE (registration_code)
|
|
SQL
|
|
end
|
|
|
|
def down
|
|
execute <<-SQL
|
|
ALTER TABLE auctions DROP CONSTRAINT unique_registration_code
|
|
SQL
|
|
end
|
|
end
|