salix/db/changes/230401/00-alter_notSubs.sql

11 lines
636 B
MySQL
Raw Normal View History

2023-01-24 09:11:16 +00:00
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;