--
-- Table structure for table `applicationperiodexemption`
--

CREATE TABLE IF NOT EXISTS `applicationperiodexemption` (
  `applicationPeriodId` bigint(20) NOT NULL,
  `studentId` bigint(20) NOT NULL,
  `until` datetime DEFAULT NULL,
  PRIMARY KEY (`applicationPeriodId`,`studentId`),
  KEY `FK34182FD8790761A4` (`applicationPeriodId`),
  KEY `FKCB7E71913353DC5C` (`studentId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Constraints for table `applicationperiodexemption`
--
ALTER TABLE `applicationperiodexemption`
  ADD CONSTRAINT `FK34182FD8790761A4` FOREIGN KEY (`applicationPeriodId`) REFERENCES `ApplicationPeriod` (`id`),
  ADD CONSTRAINT `FKCB7E71913353DC5C` FOREIGN KEY (`studentId`) REFERENCES `role` (`id`);

ALTER TABLE `project` ADD COLUMN `externalOrganization` varchar(255) DEFAULT NULL;

ALTER TABLE `NotificationData`
  ADD COLUMN `causedBy_id` bigint(20) DEFAULT NULL,
  ADD CONSTRAINT `FK2DCAC355B2E2AD78` FOREIGN KEY (`causedBy_id`) REFERENCES `user` (`id`);