Skip to content

Commit

Permalink
we do not have foreign keys yet :-(
Browse files Browse the repository at this point in the history
  • Loading branch information
reneeb committed Nov 4, 2013
1 parent 03c2afa commit 98f1ecc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
5 changes: 0 additions & 5 deletions db_upgrades/MySQL/upgrade/2-3/001-auto.sql
Expand Up @@ -14,7 +14,6 @@ CREATE TABLE `opr_notifications` (
`user_id` integer NOT NULL,
INDEX `opr_notifications_idx_user_id` (`user_id`),
PRIMARY KEY (`notification_id`),
CONSTRAINT `opr_notifications_fk_user_id` FOREIGN KEY (`user_id`) REFERENCES `opr_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB;

;
Expand All @@ -26,10 +25,6 @@ DROP TABLE opr_feeds;
;
DROP TABLE opr_group;

;
ALTER TABLE opr_group_user DROP FOREIGN KEY opr_group_user_fk_group_id,
DROP FOREIGN KEY opr_group_user_fk_user_id;

;
DROP TABLE opr_group_user;

Expand Down
3 changes: 1 addition & 2 deletions db_upgrades/MySQL/upgrade/3-4/001-auto.sql
Expand Up @@ -4,8 +4,7 @@
BEGIN;

;
ALTER TABLE opr_package ADD INDEX opr_package_idx_uploaded_by (uploaded_by),
ADD CONSTRAINT opr_package_fk_uploaded_by FOREIGN KEY (uploaded_by) REFERENCES opr_user (user_id) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE opr_package ADD INDEX opr_package_idx_uploaded_by (uploaded_by);

;

Expand Down

0 comments on commit 98f1ecc

Please sign in to comment.