mirror of
https://github.com/umami-software/umami.git
synced 2026-02-20 04:25:39 +01:00
edit migrations
This commit is contained in:
parent
843f1a36ec
commit
ddeafe4ba8
6 changed files with 132 additions and 65 deletions
|
|
@ -1,35 +1,59 @@
|
|||
-- DropForeignKey
|
||||
ALTER TABLE `event` DROP FOREIGN KEY `event_ibfk_2`;
|
||||
ALTER TABLE
|
||||
`event` DROP FOREIGN KEY `event_ibfk_2`;
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `event` DROP FOREIGN KEY `event_ibfk_1`;
|
||||
ALTER TABLE
|
||||
`event` DROP FOREIGN KEY `event_ibfk_1`;
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `pageview` DROP FOREIGN KEY `pageview_ibfk_2`;
|
||||
ALTER TABLE
|
||||
`pageview` DROP FOREIGN KEY `pageview_ibfk_2`;
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `pageview` DROP FOREIGN KEY `pageview_ibfk_1`;
|
||||
ALTER TABLE
|
||||
`pageview` DROP FOREIGN KEY `pageview_ibfk_1`;
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `session` DROP FOREIGN KEY `session_ibfk_1`;
|
||||
ALTER TABLE
|
||||
`session` DROP FOREIGN KEY `session_ibfk_1`;
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `website` DROP FOREIGN KEY `website_ibfk_1`;
|
||||
ALTER TABLE
|
||||
`website` DROP FOREIGN KEY `website_ibfk_1`;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `event` ADD CONSTRAINT `event_session_id_fkey` FOREIGN KEY (`session_id`) REFERENCES `session`(`session_id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
ALTER TABLE
|
||||
`event`
|
||||
ADD
|
||||
CONSTRAINT `event_session_id_fkey` FOREIGN KEY (`session_id`) REFERENCES `session`(`session_id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `event` ADD CONSTRAINT `event_website_id_fkey` FOREIGN KEY (`website_id`) REFERENCES `website`(`website_id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
ALTER TABLE
|
||||
`event`
|
||||
ADD
|
||||
CONSTRAINT `event_website_id_fkey` FOREIGN KEY (`website_id`) REFERENCES `website`(`website_id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `pageview` ADD CONSTRAINT `pageview_session_id_fkey` FOREIGN KEY (`session_id`) REFERENCES `session`(`session_id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
ALTER TABLE
|
||||
`pageview`
|
||||
ADD
|
||||
CONSTRAINT `pageview_session_id_fkey` FOREIGN KEY (`session_id`) REFERENCES `session`(`session_id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `pageview` ADD CONSTRAINT `pageview_website_id_fkey` FOREIGN KEY (`website_id`) REFERENCES `website`(`website_id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
ALTER TABLE
|
||||
`pageview`
|
||||
ADD
|
||||
CONSTRAINT `pageview_website_id_fkey` FOREIGN KEY (`website_id`) REFERENCES `website`(`website_id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `session` ADD CONSTRAINT `session_website_id_fkey` FOREIGN KEY (`website_id`) REFERENCES `website`(`website_id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
ALTER TABLE
|
||||
`session`
|
||||
ADD
|
||||
CONSTRAINT `session_website_id_fkey` FOREIGN KEY (`website_id`) REFERENCES `website`(`website_id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `website` ADD CONSTRAINT `website_user_id_fkey` FOREIGN KEY (`user_id`) REFERENCES `account`(`user_id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
ALTER TABLE
|
||||
`website`
|
||||
ADD
|
||||
CONSTRAINT `website_user_id_fkey` FOREIGN KEY (`user_id`) REFERENCES `account`(`user_id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
Loading…
Add table
Add a link
Reference in a new issue