<?xml version="1.0"?>

<data>
	<tables-sql><![CDATA[create table Agenda_EventAgenda (
	evtId LONG not null primary key,
	companyId LONG,
	startEvt DATE null,
	endEvt DATE null,
	calId LONG,
	title VARCHAR(75) null,
	location VARCHAR(75) null,
	notes VARCHAR(75) null,
	url VARCHAR(75) null,
	isAllDay BOOLEAN,
	isVisible BOOLEAN,
	remind VARCHAR(75) null,
	creatorId LONG,
	repeatEvtId LONG,
	repeatEvtRRule VARCHAR(75) null,
	modifiedDate DATE null,
	uid VARCHAR(75) null
);

create table Agenda_Ressource (
	idRessource LONG not null primary key,
	idcreator LONG,
	name VARCHAR(75) null,
	description VARCHAR(75) null,
	ressourceType INTEGER,
	scope INTEGER,
	color VARCHAR(75) null,
	etabId LONG,
	kind INTEGER,
	forcePubli BOOLEAN,
	cdtUserId LONG,
	ressource BOOLEAN,
	ecriture BOOLEAN,
	filtreCours INTEGER,
	classe LONG,
	matiere VARCHAR(75) null,
	onlyMyClass BOOLEAN
);

create table Agenda_RessourceRole (
	idRessourceRole LONG not null primary key,
	idRessource LONG,
	idRole LONG
);

create table Agenda_RessourceUser (
	idRessourceUser LONG not null primary key,
	idRessource LONG,
	idUser LONG,
	redacteur BOOLEAN
);]]></tables-sql>
	<sequences-sql><![CDATA[]]></sequences-sql>
	<indexes-sql><![CDATA[create index IX_BADD0140 on Agenda_EventAgenda (calId);
create index IX_B428E3EF on Agenda_EventAgenda (companyId);
create index IX_F2E26E44 on Agenda_EventAgenda (endEvt, calId);
create index IX_380086FA on Agenda_EventAgenda (repeatEvtId);
create index IX_58AC074F on Agenda_EventAgenda (repeatEvtId, startEvt);
create index IX_1B2CBA0B on Agenda_EventAgenda (startEvt, calId);
create index IX_563E2C0F on Agenda_EventAgenda (startEvt, endEvt, calId);
create index IX_182F2092 on Agenda_EventAgenda (uid, calId);

create index IX_733F2B6F on Agenda_Ressource (etabId, ressourceType, scope, forcePubli);
create index IX_8020F7 on Agenda_Ressource (etabId, ressourceType, scope, kind, forcePubli);
create index IX_832F6B9B on Agenda_Ressource (idcreator, kind);
create index IX_2332E30 on Agenda_Ressource (ressourceType, scope, forcePubli);
create index IX_367D4EF8 on Agenda_Ressource (ressourceType, scope, kind, forcePubli);

create index IX_8023F36C on Agenda_RessourceRole (idRessource);
create index IX_408B1ED1 on Agenda_RessourceRole (idRessource, idRole);
create index IX_39B6CC89 on Agenda_RessourceRole (idRole);

create index IX_3B2DD377 on Agenda_RessourceUser (idRessource);
create index IX_27F9ADF1 on Agenda_RessourceUser (idRessource, idUser);
create index IX_F871BBB3 on Agenda_RessourceUser (idUser);]]></indexes-sql>
</data>