<?xml version="1.0"?>

<data>
	<tables-sql><![CDATA[create table JournalArticle (
	mvccVersion LONG default 0 not null,
	ctCollectionId LONG default 0 not null,
	uuid_ VARCHAR(75) null,
	id_ LONG not null,
	resourcePrimKey LONG,
	groupId LONG,
	companyId LONG,
	userId LONG,
	userName VARCHAR(75) null,
	createDate DATE null,
	modifiedDate DATE null,
	externalReferenceCode VARCHAR(75) null,
	folderId LONG,
	classNameId LONG,
	classPK LONG,
	treePath STRING null,
	articleId VARCHAR(75) null,
	version DOUBLE,
	urlTitle VARCHAR(255) null,
	DDMStructureId LONG,
	DDMTemplateKey VARCHAR(75) null,
	defaultLanguageId VARCHAR(75) null,
	layoutUuid VARCHAR(75) null,
	displayDate DATE null,
	expirationDate DATE null,
	reviewDate DATE null,
	indexable BOOLEAN,
	smallImage BOOLEAN,
	smallImageId LONG,
	smallImageSource INTEGER,
	smallImageURL STRING null,
	lastPublishDate DATE null,
	status INTEGER,
	statusByUserId LONG,
	statusByUserName VARCHAR(75) null,
	statusDate DATE null,
	primary key (id_, ctCollectionId)
);

create table JournalArticleLocalization (
	mvccVersion LONG default 0 not null,
	ctCollectionId LONG default 0 not null,
	articleLocalizationId LONG not null,
	companyId LONG,
	articlePK LONG,
	title VARCHAR(800) null,
	description STRING null,
	languageId VARCHAR(75) null,
	primary key (articleLocalizationId, ctCollectionId)
);

create table JournalArticleResource (
	mvccVersion LONG default 0 not null,
	ctCollectionId LONG default 0 not null,
	uuid_ VARCHAR(75) null,
	resourcePrimKey LONG not null,
	groupId LONG,
	companyId LONG,
	articleId VARCHAR(75) null,
	primary key (resourcePrimKey, ctCollectionId)
);

create table JournalContentSearch (
	mvccVersion LONG default 0 not null,
	ctCollectionId LONG default 0 not null,
	contentSearchId LONG not null,
	groupId LONG,
	companyId LONG,
	privateLayout BOOLEAN,
	layoutId LONG,
	portletId VARCHAR(200) null,
	articleId VARCHAR(75) null,
	primary key (contentSearchId, ctCollectionId)
);

create table JournalFeed (
	mvccVersion LONG default 0 not null,
	ctCollectionId LONG default 0 not null,
	uuid_ VARCHAR(75) null,
	id_ LONG not null,
	groupId LONG,
	companyId LONG,
	userId LONG,
	userName VARCHAR(75) null,
	createDate DATE null,
	modifiedDate DATE null,
	feedId VARCHAR(75) null,
	name VARCHAR(75) null,
	description STRING null,
	DDMStructureId LONG,
	DDMTemplateKey VARCHAR(75) null,
	DDMRendererTemplateKey VARCHAR(75) null,
	delta INTEGER,
	orderByCol VARCHAR(75) null,
	orderByType VARCHAR(75) null,
	targetLayoutFriendlyUrl VARCHAR(255) null,
	targetPortletId VARCHAR(200) null,
	contentField VARCHAR(75) null,
	feedFormat VARCHAR(75) null,
	feedVersion DOUBLE,
	lastPublishDate DATE null,
	primary key (id_, ctCollectionId)
);

create table JournalFolder (
	mvccVersion LONG default 0 not null,
	ctCollectionId LONG default 0 not null,
	uuid_ VARCHAR(75) null,
	externalReferenceCode VARCHAR(75) null,
	folderId LONG not null,
	groupId LONG,
	companyId LONG,
	userId LONG,
	userName VARCHAR(75) null,
	createDate DATE null,
	modifiedDate DATE null,
	parentFolderId LONG,
	treePath STRING null,
	name VARCHAR(100) null,
	description STRING null,
	restrictionType INTEGER,
	lastPublishDate DATE null,
	status INTEGER,
	statusByUserId LONG,
	statusByUserName VARCHAR(75) null,
	statusDate DATE null,
	primary key (folderId, ctCollectionId)
);]]></tables-sql>
	<sequences-sql><![CDATA[]]></sequences-sql>
	<indexes-sql><![CDATA[create index IX_745E04FA on JournalArticle (DDMStructureId);
create index IX_75CCA4D1 on JournalArticle (DDMTemplateKey[$COLUMN_LENGTH:75$]);
create index IX_3D070845 on JournalArticle (companyId, version);
create index IX_A2D2CDB8 on JournalArticle (externalReferenceCode[$COLUMN_LENGTH:75$]);
create index IX_3048AF7A on JournalArticle (groupId, DDMStructureId);
create index IX_31B74F51 on JournalArticle (groupId, DDMTemplateKey[$COLUMN_LENGTH:75$]);
create unique index IX_D3ACAD4A on JournalArticle (groupId, articleId[$COLUMN_LENGTH:75$], version, ctCollectionId);
create index IX_6D117C1E on JournalArticle (groupId, classNameId, DDMStructureId);
create index IX_6E801BF5 on JournalArticle (groupId, classNameId, DDMTemplateKey[$COLUMN_LENGTH:75$]);
create index IX_9CE6E0FA on JournalArticle (groupId, classNameId, classPK);
create index IX_A2534AC2 on JournalArticle (groupId, classNameId, layoutUuid[$COLUMN_LENGTH:75$]);
create index IX_373DCC43 on JournalArticle (groupId, classNameId, userId);
create index IX_5CD17502 on JournalArticle (groupId, folderId);
create index IX_3C028C1E on JournalArticle (groupId, layoutUuid[$COLUMN_LENGTH:75$]);
create index IX_5CA5E0F6 on JournalArticle (groupId, status, articleId[$COLUMN_LENGTH:75$]);
create index IX_BCAFC000 on JournalArticle (groupId, status, classNameId, folderId);
create index IX_9D8D768 on JournalArticle (groupId, status, folderId);
create index IX_CF8F8F68 on JournalArticle (groupId, status, urlTitle[$COLUMN_LENGTH:255$]);
create index IX_22882D02 on JournalArticle (groupId, urlTitle[$COLUMN_LENGTH:255$]);
create index IX_D19C1B9F on JournalArticle (groupId, userId);
create unique index IX_F73C7E0D on JournalArticle (groupId, uuid_[$COLUMN_LENGTH:75$], ctCollectionId);
create unique index IX_4D29D87C on JournalArticle (groupId, version, ctCollectionId, externalReferenceCode[$COLUMN_LENGTH:75$]);
create index IX_3F1EA19E on JournalArticle (layoutUuid[$COLUMN_LENGTH:75$]);
create index IX_89FF8B06 on JournalArticle (resourcePrimKey, indexable);
create index IX_EF9B7028 on JournalArticle (smallImageId);
create index IX_15ADA32B on JournalArticle (status, companyId, version);
create index IX_2AA511D5 on JournalArticle (status, displayDate);
create index IX_BCE7DFEC on JournalArticle (status, resourcePrimKey, indexable);
create index IX_F029602F on JournalArticle (uuid_[$COLUMN_LENGTH:75$]);

create unique index IX_5593D868 on JournalArticleLocalization (articlePK, languageId[$COLUMN_LENGTH:75$], ctCollectionId);

create unique index IX_42F04A2C on JournalArticleResource (groupId, ctCollectionId, articleId[$COLUMN_LENGTH:75$]);
create unique index IX_37A8A767 on JournalArticleResource (uuid_[$COLUMN_LENGTH:75$], groupId, ctCollectionId);

create index IX_9207CB31 on JournalContentSearch (articleId[$COLUMN_LENGTH:75$]);
create index IX_42F51F38 on JournalContentSearch (companyId);
create index IX_6838E427 on JournalContentSearch (groupId, articleId[$COLUMN_LENGTH:75$]);
create unique index IX_F91BC3CC on JournalContentSearch (groupId, privateLayout, articleId[$COLUMN_LENGTH:75$], layoutId, portletId[$COLUMN_LENGTH:200$], ctCollectionId);
create index IX_7ACC74C9 on JournalContentSearch (groupId, privateLayout, layoutId, portletId[$COLUMN_LENGTH:200$]);
create index IX_8DAF8A35 on JournalContentSearch (portletId[$COLUMN_LENGTH:200$]);

create unique index IX_E5E4C71A on JournalFeed (groupId, ctCollectionId, feedId[$COLUMN_LENGTH:75$]);
create unique index IX_800F33AF on JournalFeed (uuid_[$COLUMN_LENGTH:75$], groupId, ctCollectionId);

create index IX_E6E2725D on JournalFolder (companyId);
create unique index IX_5C538C20 on JournalFolder (groupId, ctCollectionId, externalReferenceCode[$COLUMN_LENGTH:75$]);
create index IX_E988689E on JournalFolder (groupId, name[$COLUMN_LENGTH:100$]);
create unique index IX_266332E3 on JournalFolder (groupId, parentFolderId, ctCollectionId, name[$COLUMN_LENGTH:100$]);
create index IX_EFD9CAC on JournalFolder (groupId, parentFolderId, status);
create unique index IX_1965F913 on JournalFolder (groupId, uuid_[$COLUMN_LENGTH:75$], ctCollectionId);
create index IX_8D6902B7 on JournalFolder (status, companyId);
create index IX_63BDFA69 on JournalFolder (uuid_[$COLUMN_LENGTH:75$]);]]></indexes-sql>
</data>