-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
11,256 additions
and
5,608 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
CREATE TABLE `flag_editors` ( | ||
`userID` int(10) unsigned NOT NULL default '0', | ||
`CommentID` VARCHAR(255) NOT NULL default '', | ||
PRIMARY KEY (`userID`,`CommentID`), | ||
KEY `FK_flag_editors_2` (`CommentID`), | ||
CONSTRAINT `FK_flag_editors_2` | ||
FOREIGN KEY (`CommentID`) | ||
REFERENCES `flag` (`CommentID`) | ||
ON DELETE CASCADE | ||
ON UPDATE CASCADE, | ||
CONSTRAINT `FK_flag_editors_1` | ||
FOREIGN KEY (`userID`) | ||
REFERENCES `users` (`ID`) | ||
ON DELETE CASCADE | ||
ON UPDATE CASCADE | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
|
||
INSERT INTO flag_editors (UserID, CommentID) | ||
SELECT users.ID, CommentID from flag JOIN users ON flag.UserID = users.UserID; | ||
|
||
ALTER TABLE flag DROP COLUMN UserID; |
Oops, something went wrong.