<?xml version="1.0"?>

<data>
	<tables-sql><![CDATA[create table CahierDeTexte_AnnotationCDT (
	annotationId LONG not null primary key,
	evtId LONG,
	creatorId LONG,
	groupId LONG,
	dateEvt DATE null,
	annotation VARCHAR(75) null,
	done BOOLEAN
);

create table CahierDeTexte_ConfigurationCDT (
	confId LONG not null primary key,
	etabId LONG,
	startDayTime VARCHAR(75) null,
	endDayTime VARCHAR(75) null,
	endCoursesDate DATE null
);

create table CahierDeTexte_EventCDT (
	evtId LONG not null primary key,
	companyId LONG,
	startDay DATE null,
	endDay DATE null,
	startEvtTime VARCHAR(75) null,
	endEvtTime VARCHAR(75) null,
	repeatEvt VARCHAR(75) null,
	alertFlag BOOLEAN,
	broadcast BOOLEAN,
	locked BOOLEAN,
	subject VARCHAR(75) null,
	description VARCHAR(75) null,
	subjectCDT LONG,
	creator LONG,
	repeatEvtModified BOOLEAN,
	repeatEvtGroup LONG,
	typeEvt LONG,
	kindEvt LONG,
	groupId LONG,
	fromEvt LONG,
	toEvt LONG,
	fromDate DATE null,
	wtodo BOOLEAN,
	wgave BOOLEAN,
	estimatedTime INTEGER,
	waitForChange BOOLEAN,
	visa BOOLEAN,
	idCampagne LONG,
	etat INTEGER,
	nameCampagne VARCHAR(75) null
);

create table CahierDeTexte_EventIndexEducation (
	eventIndexEducationId LONG not null primary key,
	userId LONG,
	etabId LONG,
	division VARCHAR(75) null,
	matiereLibelle VARCHAR(75) null,
	dateCours VARCHAR(75) null,
	heureDebut VARCHAR(75) null,
	duree VARCHAR(75) null,
	eventId LONG
);

create table CahierDeTexte_EventSTSRef (
	eventSTSRefId LONG not null primary key,
	userId LONG,
	etabId LONG,
	userCode VARCHAR(75) null,
	divisionCode VARCHAR(75) null,
	matiereCode VARCHAR(75) null,
	codeCours VARCHAR(75) null,
	dateCours VARCHAR(75) null
);

create table CahierDeTexte_EventSTSRefEventCDT (
	eventSTSRefEventCDTId LONG not null primary key,
	eventSTSRefId LONG,
	evtId LONG
);

create table CahierDeTexte_LockCDT (
	lockId LONG not null primary key,
	creatorId LONG,
	startDay DATE null,
	endDay DATE null,
	description VARCHAR(75) null,
	investigator LONG,
	creationDay DATE null,
	publishDay DATE null
);

create table CahierDeTexte_Matiere (
	matiereId LONG not null primary key,
	matiereSTSId VARCHAR(75) null,
	labelCourt VARCHAR(75) null,
	labelLong VARCHAR(75) null,
	code_ VARCHAR(75) null
);

create table CahierDeTexte_MatiereEtab (
	matiereEtabId LONG not null primary key,
	matiereId LONG,
	etabId LONG,
	state_ BOOLEAN,
	color VARCHAR(75) null
);

create table CahierDeTexte_MatiereUser (
	matiereUserId LONG not null primary key,
	matiereId LONG,
	userId LONG
);

create table CahierDeTexte_UserSTS (
	userSTSId LONG not null primary key,
	userId LONG,
	stsCode VARCHAR(75) null,
	type_ VARCHAR(75) null
);

create table CahierDeTexte_ValidationIPRCDT (
	validationId LONG not null primary key,
	evtId LONG,
	accepted BOOLEAN,
	date_ DATE null,
	comment_ VARCHAR(75) null,
	iprId LONG
);]]></tables-sql>
	<sequences-sql><![CDATA[]]></sequences-sql>
	<indexes-sql><![CDATA[create index IX_114AD61 on CahierDeTexte_AnnotationCDT (creatorId);
create index IX_BB327828 on CahierDeTexte_AnnotationCDT (dateEvt, creatorId);
create index IX_F813A982 on CahierDeTexte_AnnotationCDT (dateEvt, creatorId, groupId);
create index IX_46670798 on CahierDeTexte_AnnotationCDT (evtId);
create index IX_E0A2A1BF on CahierDeTexte_AnnotationCDT (evtId, creatorId);

create index IX_E8948C76 on CahierDeTexte_ConfigurationCDT (etabId);

create index IX_B53EBCF5 on CahierDeTexte_EventCDT (companyId);
create index IX_ADE4DC69 on CahierDeTexte_EventCDT (creator);
create index IX_227D6CFF on CahierDeTexte_EventCDT (fromDate);
create index IX_8D9786D6 on CahierDeTexte_EventCDT (fromEvt);
create index IX_31CBFCB7 on CahierDeTexte_EventCDT (groupId);
create index IX_C2B4A9C3 on CahierDeTexte_EventCDT (repeatEvtGroup, repeatEvtModified);
create index IX_EC27879B on CahierDeTexte_EventCDT (startDay, creator);
create index IX_700EA7E9 on CahierDeTexte_EventCDT (startDay, groupId);
create index IX_2A7CDA75 on CahierDeTexte_EventCDT (startDay, repeatEvtGroup, repeatEvtModified);
create index IX_21413165 on CahierDeTexte_EventCDT (toEvt);

create index IX_CBF968C2 on CahierDeTexte_EventIndexEducation (division, etabId);
create index IX_AA55F12A on CahierDeTexte_EventIndexEducation (division, etabId, dateCours);
create index IX_E71EB7E1 on CahierDeTexte_EventIndexEducation (etabId);
create index IX_569C48AB on CahierDeTexte_EventIndexEducation (etabId, dateCours);
create index IX_CEA3647C on CahierDeTexte_EventIndexEducation (userId, division, etabId);
create index IX_58433D30 on CahierDeTexte_EventIndexEducation (userId, division, etabId, dateCours);
create index IX_2C63341B on CahierDeTexte_EventIndexEducation (userId, etabId);
create index IX_A931C431 on CahierDeTexte_EventIndexEducation (userId, etabId, dateCours);
create index IX_89D9BD82 on CahierDeTexte_EventIndexEducation (userId, etabId, division, matiereLibelle, heureDebut, duree);
create index IX_E7C35E01 on CahierDeTexte_EventIndexEducation (userId, etabId, matiereLibelle, dateCours, heureDebut, duree);

create index IX_B9A9C22C on CahierDeTexte_EventSTSRef (etabId);
create index IX_40B27180 on CahierDeTexte_EventSTSRef (etabId, dateCours);
create index IX_7804FCDA on CahierDeTexte_EventSTSRef (etabId, divisionCode);
create index IX_5AD5E12 on CahierDeTexte_EventSTSRef (etabId, divisionCode, dateCours);
create index IX_82482E66 on CahierDeTexte_EventSTSRef (etabId, userId);
create index IX_3957FD06 on CahierDeTexte_EventSTSRef (etabId, userId, dateCours);
create index IX_C0AC7B94 on CahierDeTexte_EventSTSRef (etabId, userId, divisionCode);
create index IX_A51D4718 on CahierDeTexte_EventSTSRef (etabId, userId, divisionCode, dateCours);
create index IX_59EE6AB5 on CahierDeTexte_EventSTSRef (etabId, userId, divisionCode, matiereCode, codeCours);
create index IX_4D0EFD0B on CahierDeTexte_EventSTSRef (etabId, userId, userCode, divisionCode, matiereCode, codeCours, dateCours);

create index IX_47D2F6E0 on CahierDeTexte_EventSTSRefEventCDT (eventSTSRefId);
create index IX_64D7AAAE on CahierDeTexte_EventSTSRefEventCDT (eventSTSRefId, evtId);
create index IX_B777E088 on CahierDeTexte_EventSTSRefEventCDT (evtId);

create index IX_BDC10E5D on CahierDeTexte_LockCDT (creatorId);

create index IX_1CC71081 on CahierDeTexte_Matiere (code_);
create index IX_EFD111FF on CahierDeTexte_Matiere (labelLong);
create index IX_DA971D3 on CahierDeTexte_Matiere (matiereSTSId);

create index IX_E68CF8B1 on CahierDeTexte_MatiereEtab (etabId, state);
create index IX_EB12E632 on CahierDeTexte_MatiereEtab (etabId, state_);
create index IX_459C9F68 on CahierDeTexte_MatiereEtab (matiereId, etabId);

create index IX_2F82728E on CahierDeTexte_MatiereUser (matiereId);
create index IX_6EA35CC8 on CahierDeTexte_MatiereUser (matiereId, userId);
create index IX_B0CE4A86 on CahierDeTexte_MatiereUser (userId);

create index IX_4ECE3B9F on CahierDeTexte_UserSTS (stsCode, type_);
create index IX_8A50F893 on CahierDeTexte_UserSTS (userId);

create index IX_8EA23733 on CahierDeTexte_ValidationIPRCDT (evtId);]]></indexes-sql>
</data>