<?xml version="1.0"?>

<data>
	<tables-sql><![CDATA[create table GestionVieScolaire_Absence (
	absenceId LONG not null primary key,
	etabId LONG,
	startDate DATE null,
	endDate DATE null,
	teacherId LONG,
	groupId LONG,
	subClassId LONG,
	cause VARCHAR(250) null
);

create table GestionVieScolaire_AbsencesBlogEntryMapping (
	absencesBlogEntryMappingId LONG not null primary key,
	absenceId LONG,
	blogEntryInfosId LONG
);

create table GestionVieScolaire_EDTSynchroInstance (
	synchroInstanceId LONG not null primary key,
	etabId LONG,
	version LONG,
	uploadDate DATE null,
	synchroStartDate DATE null,
	synchroEndDate DATE null,
	content VARCHAR(75) null,
	status LONG
);

create table GestionVieScolaire_Importer (
	importerId LONG not null primary key,
	etabId LONG,
	version LONG,
	saveDate DATE null,
	validImportDate DATE null,
	importStartDate DATE null,
	importEndDate DATE null,
	importMembership BOOLEAN,
	importSessions BOOLEAN,
	importRoomsInAgenda BOOLEAN,
	startFilterDate DATE null,
	endFilterDate DATE null,
	teacherFilter LONG,
	groupFilter LONG,
	content VARCHAR(75) null,
	status LONG
);

create table GestionVieScolaire_SynchroConfig (
	etabId LONG not null primary key,
	etabName VARCHAR(75) null,
	dataSource VARCHAR(75) null,
	configDone BOOLEAN,
	syncMembership BOOLEAN,
	syncCDT BOOLEAN,
	syncAgenda BOOLEAN
);

create table GestionVieScolaire_SynchroInstance (
	synchroInstanceId LONG not null primary key,
	etabId LONG,
	UAI VARCHAR(75) null,
	version VARCHAR(75) null,
	dataSource VARCHAR(75) null,
	isEDTAdmin BOOLEAN,
	uploadDate DATE null,
	synchroStartDate DATE null,
	synchroEndDate DATE null,
	syncMembership BOOLEAN,
	syncCDT BOOLEAN,
	syncAgenda BOOLEAN,
	startFilterDate DATE null,
	endFilterDate DATE null,
	teacherFilter LONG,
	groupFilter LONG,
	EDTContent STRING null,
	UDTFileName VARCHAR(75) null,
	status LONG
);

create table GestionVieScolaire_UDTSynchroInstance (
	synchroInstanceId LONG not null primary key,
	etabId LONG,
	version LONG,
	synchroStartDate DATE null,
	synchroEndDate DATE null,
	syncMembership BOOLEAN,
	syncCDT BOOLEAN,
	syncAgenda BOOLEAN,
	startFilterDate DATE null,
	endFilterDate DATE null,
	teacherFilter LONG,
	groupFilter LONG,
	UDTFileName VARCHAR(75) null,
	status LONG
);

create table GestionVieScolaire_UserMapping (
	userId LONG not null,
	etabId LONG not null,
	nationalNumber VARCHAR(75) null,
	pronoteId VARCHAR(75) null,
	userEtabId VARCHAR(75) null,
	sconetId VARCHAR(75) null,
	stsId VARCHAR(75) null,
	casId VARCHAR(75) null,
	partnerId VARCHAR(75) null,
	primary key (userId, etabId)
);]]></tables-sql>
	<sequences-sql><![CDATA[]]></sequences-sql>
	<indexes-sql><![CDATA[create index IX_46790E94 on GestionVieScolaire_Absence (etabId);
create index IX_3000971C on GestionVieScolaire_Absence (startDate, endDate, groupId);
create index IX_465E6055 on GestionVieScolaire_Absence (startDate, endDate, subClassId);
create index IX_79F0A6FF on GestionVieScolaire_Absence (startDate, endDate, teacherId);
create index IX_40241158 on GestionVieScolaire_Absence (teacherId);

create index IX_38F29F00 on GestionVieScolaire_AbsencesBlogEntryMapping (absenceId);
create index IX_A182964C on GestionVieScolaire_AbsencesBlogEntryMapping (blogEntryInfosId);

create index IX_63C3FB9D on GestionVieScolaire_EDTSynchroInstance (etabId);
create index IX_13264F84 on GestionVieScolaire_EDTSynchroInstance (status);

create index IX_F0CA56BA on GestionVieScolaire_ImportConfig (etabId);

create index IX_1D4D9B8D on GestionVieScolaire_ImportInstance (etabId);
create index IX_CCAFEF74 on GestionVieScolaire_ImportInstance (status);

create index IX_F1B793C5 on GestionVieScolaire_Importer (etabId);

create index IX_649A96B6 on GestionVieScolaire_SynchroInstance (etabId);
create index IX_13FCEA9D on GestionVieScolaire_SynchroInstance (status);

create index IX_70D4718D on GestionVieScolaire_UDTSynchroInstance (etabId);
create index IX_2036C574 on GestionVieScolaire_UDTSynchroInstance (status);

create index IX_CF6285C4 on GestionVieScolaire_UserMapping (casId, etabId);
create index IX_17455EAA on GestionVieScolaire_UserMapping (nationalNumber);
create index IX_7154FFA9 on GestionVieScolaire_UserMapping (nationalNumber, etabId);
create index IX_FD1574B7 on GestionVieScolaire_UserMapping (partnerId, etabId);
create index IX_4FEEA58F on GestionVieScolaire_UserMapping (pronoteId);
create index IX_488F918E on GestionVieScolaire_UserMapping (pronoteId, etabId);
create index IX_56A7A327 on GestionVieScolaire_UserMapping (sconetId, etabId);
create index IX_F84BF7A2 on GestionVieScolaire_UserMapping (stsId);
create index IX_308F20A1 on GestionVieScolaire_UserMapping (stsId, etabId);
create index IX_895FC2C4 on GestionVieScolaire_UserMapping (userEtabId, etabId);]]></indexes-sql>
</data>