<?xml version="1.0"?>

<data>
	<tables-sql><![CDATA[create table MDRAction (
	uuid_ VARCHAR(75) null,
	actionId LONG not null primary key,
	groupId LONG,
	companyId LONG,
	userId LONG,
	userName VARCHAR(75) null,
	createDate DATE null,
	modifiedDate DATE null,
	classNameId LONG,
	classPK LONG,
	ruleGroupInstanceId LONG,
	name STRING null,
	description STRING null,
	type_ VARCHAR(255) null,
	typeSettings TEXT null,
	lastPublishDate DATE null
);

create table MDRRule (
	uuid_ VARCHAR(75) null,
	ruleId LONG not null primary key,
	groupId LONG,
	companyId LONG,
	userId LONG,
	userName VARCHAR(75) null,
	createDate DATE null,
	modifiedDate DATE null,
	ruleGroupId LONG,
	name STRING null,
	description STRING null,
	type_ VARCHAR(255) null,
	typeSettings TEXT null,
	lastPublishDate DATE null
);

create table MDRRuleGroup (
	uuid_ VARCHAR(75) null,
	ruleGroupId LONG not null primary key,
	groupId LONG,
	companyId LONG,
	userId LONG,
	userName VARCHAR(75) null,
	createDate DATE null,
	modifiedDate DATE null,
	name STRING null,
	description STRING null,
	lastPublishDate DATE null
);

create table MDRRuleGroupInstance (
	uuid_ VARCHAR(75) null,
	ruleGroupInstanceId LONG not null primary key,
	groupId LONG,
	companyId LONG,
	userId LONG,
	userName VARCHAR(75) null,
	createDate DATE null,
	modifiedDate DATE null,
	classNameId LONG,
	classPK LONG,
	ruleGroupId LONG,
	priority INTEGER,
	lastPublishDate DATE null
);]]></tables-sql>
	<sequences-sql><![CDATA[]]></sequences-sql>
	<indexes-sql><![CDATA[create index IX_FD90786C on MDRAction (ruleGroupInstanceId);
create index IX_C58A516B on MDRAction (uuid_[$COLUMN_LENGTH:75$], companyId);
create unique index IX_75BE36AD on MDRAction (uuid_[$COLUMN_LENGTH:75$], groupId);

create index IX_4F4293F1 on MDRRule (ruleGroupId);
create index IX_7DEA8DF1 on MDRRule (uuid_[$COLUMN_LENGTH:75$], companyId);
create unique index IX_F3EFDCB3 on MDRRule (uuid_[$COLUMN_LENGTH:75$], groupId);

create index IX_5849891C on MDRRuleGroup (groupId);
create index IX_CC14DC2 on MDRRuleGroup (uuid_[$COLUMN_LENGTH:75$], companyId);
create unique index IX_46665CC4 on MDRRuleGroup (uuid_[$COLUMN_LENGTH:75$], groupId);

create unique index IX_808A0036 on MDRRuleGroupInstance (classNameId, classPK, ruleGroupId);
create index IX_22DAB85C on MDRRuleGroupInstance (groupId, classNameId, classPK);
create index IX_BF3E642B on MDRRuleGroupInstance (ruleGroupId);
create index IX_25C9D1F7 on MDRRuleGroupInstance (uuid_[$COLUMN_LENGTH:75$], companyId);
create unique index IX_9CBC6A39 on MDRRuleGroupInstance (uuid_[$COLUMN_LENGTH:75$], groupId);]]></indexes-sql>
</data>