11 lines
636 B
MySQL
11 lines
636 B
MySQL
|
CREATE OR REPLACE TABLE `util`.`notificationSubscription` (
|
||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||
|
`notificationFk` int(11) NOT NULL,
|
||
|
`userFk` int(10) unsigned NOT NULL,
|
||
|
PRIMARY KEY (`id`),
|
||
|
KEY `notificationSubscription_ibfk_1` (`notificationFk`),
|
||
|
KEY `notificationSubscription_ibfk_2` (`userFk`),
|
||
|
CONSTRAINT `notificationSubscription_ibfk_1` FOREIGN KEY (`notificationFk`) REFERENCES `notification` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||
|
CONSTRAINT `notificationSubscription_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|