CREATE TABLE `final_seminar_thesis_review` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `dateCreated` datetime NOT NULL, `lastModified` datetime NOT NULL, `version` int(11) NOT NULL, `finalSeminar_id` bigint(20) NOT NULL, `thesisReview_id` bigint(20) NOT NULL, `uploader_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `thesisReview_id` (`thesisReview_id`), KEY `FKE045D554F583C69F` (`finalSeminar_id`), KEY `FKE045D5541AAF75F1` (`thesisReview_id`), KEY `FKE045D554D1E6703C` (`uploader_id`), CONSTRAINT `FKE045D5541AAF75F1` FOREIGN KEY (`thesisReview_id`) REFERENCES `file_description` (`id`), CONSTRAINT `FKE045D554D1E6703C` FOREIGN KEY (`uploader_id`) REFERENCES `user` (`id`), CONSTRAINT `FKE045D554F583C69F` FOREIGN KEY (`finalSeminar_id`) REFERENCES `final_seminar` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; ALTER TABLE `general_system_settings` ADD `thesisReviewsEnabled` tinyint(1) NOT NULL; ALTER TABLE Notification DROP FOREIGN KEY FK2D45DD0B599425F6; ALTER TABLE Notification DROP INDEX FK2D45DD0B599425F6; ALTER TABLE `Notification` ADD CONSTRAINT `FK2D45DD0B599425F6` FOREIGN KEY (`notificationData_id`) REFERENCES `NotificationData` (`id`) ON DELETE CASCADE; ALTER TABLE NotificationData DROP FOREIGN KEY FK2DCAC355FCDADF61; ALTER TABLE NotificationData DROP INDEX FK2DCAC355FCDADF61; ALTER TABLE `NotificationData` ADD CONSTRAINT `FK2DCAC355FCDADF61` FOREIGN KEY (`idea_id`) REFERENCES `newidea` (`id`) ON DELETE CASCADE; CREATE TABLE `user_profile` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `dateCreated` datetime NOT NULL, `lastModified` datetime NOT NULL, `version` int(11) NOT NULL, `otherInfo` varchar(255) DEFAULT NULL, `phoneNumber` varchar(255) DEFAULT NULL, `skypeId` varchar(255) DEFAULT NULL, `user_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `user_id` (`user_id`), KEY `FK487E2135895349BF` (`user_id`), CONSTRAINT `FK487E2135895349BF` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; ALTER TABLE `user_profile` ADD `mailCompilation` tinyint(1) NOT NULL; DROP TABLE `NotificationSettings_mailType`; DROP TABLE `NotificationSettings`;