<?xml version="1.0"?>

<data>
	<tables-sql><![CDATA[create table PollsChoice (
	uuid_ VARCHAR(75) null,
	choiceId LONG not null primary key,
	groupId LONG,
	companyId LONG,
	userId LONG,
	userName VARCHAR(75) null,
	createDate DATE null,
	modifiedDate DATE null,
	questionId LONG,
	name VARCHAR(75) null,
	description STRING null,
	lastPublishDate DATE null
);

create table PollsQuestion (
	uuid_ VARCHAR(75) null,
	questionId LONG not null primary key,
	groupId LONG,
	companyId LONG,
	userId LONG,
	userName VARCHAR(75) null,
	createDate DATE null,
	modifiedDate DATE null,
	title STRING null,
	description STRING null,
	expirationDate DATE null,
	lastPublishDate DATE null,
	lastVoteDate DATE null
);

create table PollsVote (
	uuid_ VARCHAR(75) null,
	voteId LONG not null primary key,
	groupId LONG,
	companyId LONG,
	userId LONG,
	userName VARCHAR(75) null,
	createDate DATE null,
	modifiedDate DATE null,
	questionId LONG,
	choiceId LONG,
	lastPublishDate DATE null,
	voteDate DATE null
);]]></tables-sql>
	<sequences-sql><![CDATA[]]></sequences-sql>
	<indexes-sql><![CDATA[create unique index IX_D76DD2CF on PollsChoice (questionId, name[$COLUMN_LENGTH:75$]);
create index IX_8AE746EF on PollsChoice (uuid_[$COLUMN_LENGTH:75$], companyId);
create unique index IX_C222BD31 on PollsChoice (uuid_[$COLUMN_LENGTH:75$], groupId);

create index IX_9FF342EA on PollsQuestion (groupId);
create index IX_F910BBB4 on PollsQuestion (uuid_[$COLUMN_LENGTH:75$], companyId);
create unique index IX_F3C9F36 on PollsQuestion (uuid_[$COLUMN_LENGTH:75$], groupId);

create index IX_D5DF7B54 on PollsVote (choiceId);
create index IX_1BBFD4D3 on PollsVote (questionId, userId);
create index IX_7D8E92B8 on PollsVote (uuid_[$COLUMN_LENGTH:75$], companyId);
create unique index IX_A88C673A on PollsVote (uuid_[$COLUMN_LENGTH:75$], groupId);]]></indexes-sql>
</data>