<?xml version="1.0"?>

<data>
	<tables-sql><![CDATA[create table SegmentsEntry (
	mvccVersion LONG default 0 not null,
	ctCollectionId LONG default 0 not null,
	uuid_ VARCHAR(75) null,
	segmentsEntryId LONG not null,
	groupId LONG,
	companyId LONG,
	userId LONG,
	userName VARCHAR(75) null,
	createDate DATE null,
	modifiedDate DATE null,
	segmentsEntryKey VARCHAR(75) null,
	name STRING null,
	description STRING null,
	active_ BOOLEAN,
	criteria TEXT null,
	source VARCHAR(75) null,
	lastPublishDate DATE null,
	primary key (segmentsEntryId, ctCollectionId)
);

create table SegmentsEntryRel (
	mvccVersion LONG default 0 not null,
	ctCollectionId LONG default 0 not null,
	segmentsEntryRelId LONG not null,
	groupId LONG,
	companyId LONG,
	userId LONG,
	userName VARCHAR(75) null,
	createDate DATE null,
	modifiedDate DATE null,
	segmentsEntryId LONG,
	classNameId LONG,
	classPK LONG,
	primary key (segmentsEntryRelId, ctCollectionId)
);

create table SegmentsEntryRole (
	mvccVersion LONG default 0 not null,
	ctCollectionId LONG default 0 not null,
	segmentsEntryRoleId LONG not null,
	companyId LONG,
	userId LONG,
	userName VARCHAR(75) null,
	createDate DATE null,
	modifiedDate DATE null,
	segmentsEntryId LONG,
	roleId LONG,
	primary key (segmentsEntryRoleId, ctCollectionId)
);

create table SegmentsExperience (
	mvccVersion LONG default 0 not null,
	ctCollectionId LONG default 0 not null,
	uuid_ VARCHAR(75) null,
	externalReferenceCode VARCHAR(75) null,
	segmentsExperienceId LONG not null,
	groupId LONG,
	companyId LONG,
	userId LONG,
	userName VARCHAR(75) null,
	createDate DATE null,
	modifiedDate DATE null,
	segmentsEntryId LONG,
	segmentsExperienceKey VARCHAR(75) null,
	plid LONG,
	name STRING null,
	priority INTEGER,
	active_ BOOLEAN,
	typeSettings VARCHAR(75) null,
	lastPublishDate DATE null,
	primary key (segmentsExperienceId, ctCollectionId)
);

create table SegmentsExperiment (
	mvccVersion LONG default 0 not null,
	ctCollectionId LONG default 0 not null,
	uuid_ VARCHAR(75) null,
	segmentsExperimentId LONG not null,
	groupId LONG,
	companyId LONG,
	userId LONG,
	userName VARCHAR(75) null,
	createDate DATE null,
	modifiedDate DATE null,
	segmentsEntryId LONG,
	segmentsExperienceId LONG,
	segmentsExperimentKey VARCHAR(75) null,
	plid LONG,
	name VARCHAR(75) null,
	description STRING null,
	typeSettings TEXT null,
	status INTEGER,
	primary key (segmentsExperimentId, ctCollectionId)
);

create table SegmentsExperimentRel (
	mvccVersion LONG default 0 not null,
	ctCollectionId LONG default 0 not null,
	segmentsExperimentRelId LONG not null,
	groupId LONG,
	companyId LONG,
	userId LONG,
	userName VARCHAR(75) null,
	createDate DATE null,
	modifiedDate DATE null,
	segmentsExperimentId LONG,
	segmentsExperienceId LONG,
	split DOUBLE,
	primary key (segmentsExperimentRelId, ctCollectionId)
);]]></tables-sql>
	<sequences-sql><![CDATA[]]></sequences-sql>
	<indexes-sql><![CDATA[create index IX_F6225631 on SegmentsEntry (active_);
create index IX_175FC150 on SegmentsEntry (companyId);
create index IX_2E0C3F77 on SegmentsEntry (groupId, active_);
create unique index IX_7DDC7831 on SegmentsEntry (groupId, ctCollectionId, segmentsEntryKey[$COLUMN_LENGTH:75$]);
create index IX_1EDBDAA1 on SegmentsEntry (groupId, source[$COLUMN_LENGTH:75$]);
create unique index IX_78D59000 on SegmentsEntry (groupId, uuid_[$COLUMN_LENGTH:75$], ctCollectionId);
create index IX_90AB04A7 on SegmentsEntry (source[$COLUMN_LENGTH:75$]);
create index IX_8046BADC on SegmentsEntry (uuid_[$COLUMN_LENGTH:75$]);

create index IX_64CBABA8 on SegmentsEntryRel (classNameId, classPK, groupId);
create unique index IX_E418FCB9 on SegmentsEntryRel (classNameId, classPK, segmentsEntryId, ctCollectionId);
create index IX_AB286250 on SegmentsEntryRel (segmentsEntryId);

create index IX_65648B53 on SegmentsEntryRole (roleId);
create unique index IX_2876B1F2 on SegmentsEntryRole (segmentsEntryId, roleId, ctCollectionId);

create unique index IX_3C2677C5 on SegmentsExperience (groupId, ctCollectionId, externalReferenceCode[$COLUMN_LENGTH:75$]);
create unique index IX_6C24C43C on SegmentsExperience (groupId, ctCollectionId, uuid_[$COLUMN_LENGTH:75$]);
create index IX_EBCFE1C4 on SegmentsExperience (groupId, plid, active_);
create unique index IX_6E29AF1B on SegmentsExperience (groupId, plid, ctCollectionId, priority);
create unique index IX_1877BBA2 on SegmentsExperience (groupId, plid, ctCollectionId, segmentsExperienceKey[$COLUMN_LENGTH:75$]);
create index IX_4EA4A03D on SegmentsExperience (groupId, plid, priority);
create index IX_3A0FEF1 on SegmentsExperience (groupId, plid, segmentsEntryId, active_);
create index IX_E90B4ACD on SegmentsExperience (segmentsEntryId);
create index IX_42071D24 on SegmentsExperience (uuid_[$COLUMN_LENGTH:75$]);

create unique index IX_4516B4A9 on SegmentsExperiment (groupId, ctCollectionId, segmentsExperienceId, plid);
create unique index IX_243B65ED on SegmentsExperiment (groupId, ctCollectionId, segmentsExperimentKey[$COLUMN_LENGTH:75$]);
create unique index IX_451FEC8B on SegmentsExperiment (groupId, uuid_[$COLUMN_LENGTH:75$], ctCollectionId);
create index IX_127B4FCF on SegmentsExperiment (segmentsExperimentKey[$COLUMN_LENGTH:75$]);
create index IX_2701CFF1 on SegmentsExperiment (uuid_[$COLUMN_LENGTH:75$]);

create index IX_A96BB95B on SegmentsExperimentRel (segmentsExperienceId);
create unique index IX_9EDCFAE5 on SegmentsExperimentRel (segmentsExperimentId, segmentsExperienceId, ctCollectionId);]]></indexes-sql>
</data>