blob: 51c35ac564faf9b7b1a4364707ea22464e62dedb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
class AddGlsaUserConstraints < ActiveRecord::Migration
def self.up
execute "ALTER TABLE glsas ADD CONSTRAINT glsas_users_requesters FOREIGN KEY (requester) REFERENCES users (id)"
execute "ALTER TABLE glsas ADD CONSTRAINT glsas_users_submitters FOREIGN KEY (submitter) REFERENCES users (id)"
execute "ALTER TABLE glsas ADD CONSTRAINT glsas_users_bugreadymakers FOREIGN KEY (bugreadymaker) REFERENCES users (id)"
end
def self.down
execute "ALTER TABLE glsas DROP FOREIGN KEY glsas_users_requesters"
execute "ALTER TABLE glsas DROP FOREIGN KEY glsas_users_submitters"
execute "ALTER TABLE glsas DROP FOREIGN KEY glsas_users_bugreadymakers"
end
end
|