mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 13:44:47 +02:00
13 lines
327 B
Ruby
13 lines
327 B
Ruby
class AddAuctionsRegistrationCodeUniqConstraint < ActiveRecord::Migration
|
|
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
|