MIFOSX-244: Added recurring rule to calendar and added calendar to Groups

This commit is contained in:
ashok-conflux
2013-03-18 16:10:35 +05:30
parent c5e40ab744
commit 4caa564c4e
11 changed files with 548 additions and 83 deletions
@@ -0,0 +1,32 @@
DROP TABLE IF EXISTS `m_calendar`;
CREATE TABLE IF NOT EXISTS `m_calendar` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`title` varchar(50) NOT NULL,
`description` varchar(100) DEFAULT NULL,
`location` varchar(50) DEFAULT NULL,
`start_date` date NOT NULL,
`end_date` date DEFAULT NULL,
`duration` smallint(6) DEFAULT NULL,
`calendar_type_enum` smallint(5) NOT NULL,
`repeating` tinyint(1) NOT NULL DEFAULT '0',
`recurrence` varchar(100) DEFAULT NULL,
`remind_by_enum` smallint(5) DEFAULT NULL,
`first_reminder` smallint(11) DEFAULT NULL,
`second_reminder` smallint(11) DEFAULT NULL,
`createdby_id` bigint(20) DEFAULT NULL,
`lastmodifiedby_id` bigint(20) DEFAULT NULL,
`created_date` datetime DEFAULT NULL,
`lastmodified_date` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `m_calendar_instance`;
CREATE TABLE IF NOT EXISTS `m_calendar_instance` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`calendar_id` bigint(20) NOT NULL,
`entity_id` bigint(20) NOT NULL,
`entity_type_enum` smallint(5) NOT NULL,
PRIMARY KEY (`id`),
KEY `FK_m_calendar_m_calendar_instance` (`calendar_id`),
CONSTRAINT `FK_m_calendar_m_calendar_instance` FOREIGN KEY (`calendar_id`) REFERENCES `m_calendar` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;