summaryrefslogtreecommitdiffstats
path: root/packages/base/src/files/data/mysql
diff options
context:
space:
mode:
Diffstat (limited to 'packages/base/src/files/data/mysql')
-rw-r--r--packages/base/src/files/data/mysql/160400_droolspdp_downgrade_script.sql23
-rw-r--r--packages/base/src/files/data/mysql/160400_droolspdp_upgrade_script.sql57
-rw-r--r--packages/base/src/files/data/mysql/160401_droolspdp_downgrade_script.sql30
-rw-r--r--packages/base/src/files/data/mysql/160401_droolspdp_upgrade_script.sql30
-rw-r--r--packages/base/src/files/data/mysql/160700_droolspdp_downgrade_script.sql25
-rw-r--r--packages/base/src/files/data/mysql/160700_droolspdp_upgrade_script.sql68
-rw-r--r--packages/base/src/files/data/mysql/161000_droolspdp_downgrade_script.sql47
-rw-r--r--packages/base/src/files/data/mysql/161000_droolspdp_upgrade_script.sql54
-rw-r--r--packages/base/src/files/data/mysql/161001_droolspdp_downgrade_script.sql56
-rw-r--r--packages/base/src/files/data/mysql/161001_droolspdp_upgrade_script.sql52
-rw-r--r--packages/base/src/files/data/mysql/161002_droolspdp_downgrade_script.sql21
-rw-r--r--packages/base/src/files/data/mysql/161002_droolspdp_upgrade_script.sql41
-rw-r--r--packages/base/src/files/data/mysql/161003_droolspdp_downgrade_script.sql22
-rw-r--r--packages/base/src/files/data/mysql/161003_droolspdp_upgrade_script.sql29
-rw-r--r--packages/base/src/files/data/mysql/161004_droolspdp_downgrade_script.sql2
-rw-r--r--packages/base/src/files/data/mysql/161004_droolspdp_upgrade_script.sql5
-rw-r--r--packages/base/src/files/data/mysql/170200_droolspdp_downgrade_script.sql21
-rw-r--r--packages/base/src/files/data/mysql/170200_droolspdp_upgrade_script.sql21
18 files changed, 604 insertions, 0 deletions
diff --git a/packages/base/src/files/data/mysql/160400_droolspdp_downgrade_script.sql b/packages/base/src/files/data/mysql/160400_droolspdp_downgrade_script.sql
new file mode 100644
index 00000000..44f49198
--- /dev/null
+++ b/packages/base/src/files/data/mysql/160400_droolspdp_downgrade_script.sql
@@ -0,0 +1,23 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Base Package
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+drop table if exists drools.sessioninfo;
+drop table if exists drools.WORKITEMINFO;
+drop table if exists drools.droolspdpentity;
diff --git a/packages/base/src/files/data/mysql/160400_droolspdp_upgrade_script.sql b/packages/base/src/files/data/mysql/160400_droolspdp_upgrade_script.sql
new file mode 100644
index 00000000..03e96521
--- /dev/null
+++ b/packages/base/src/files/data/mysql/160400_droolspdp_upgrade_script.sql
@@ -0,0 +1,57 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Base Package
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+-- use BLOB instead of LONGVARBINARY
+drop table if exists drools.sessioninfo;
+CREATE TABLE drools.SESSIONINFO
+(
+ID BIGINT NOT NULL,
+LASTMODIFICATIONDATE TIMESTAMP,
+RULESBYTEARRAY BLOB,
+STARTDATE TIMESTAMP default current_timestamp,
+OPTLOCK INTEGER,
+PRIMARY KEY (ID)
+);
+
+drop table if exists drools.WORKITEMINFO;
+CREATE TABLE drools.WORKITEMINFO
+(
+WORKITEMID BIGINT NOT NULL,
+CREATIONDATE TIMESTAMP default current_timestamp,
+`NAME` VARCHAR(500),
+PROCESSINSTANCEID BIGINT,
+STATE BIGINT,
+OPTLOCK INTEGER,
+WORKITEMBYTEARRAY BLOB,
+PRIMARY KEY (WORKITEMID)
+);
+
+drop table if exists drools.droolspdpentity;
+CREATE TABLE drools.DROOLSPDPENTITY
+(
+ PDPID VARCHAR(100) NOT NULL,
+ DESIGNATED BOOLEAN NOT NULL DEFAULT FALSE,
+ PRIORITY INT NOT NULL DEFAULT 0,
+ UPDATEDDATE DATE NOT NULL,
+ GROUPID VARCHAR(100) NOT NULL,
+ SESSIONID BIGINT NOT NULL
+);
+
+
diff --git a/packages/base/src/files/data/mysql/160401_droolspdp_downgrade_script.sql b/packages/base/src/files/data/mysql/160401_droolspdp_downgrade_script.sql
new file mode 100644
index 00000000..c8bbe035
--- /dev/null
+++ b/packages/base/src/files/data/mysql/160401_droolspdp_downgrade_script.sql
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Base Package
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+drop table if exists drools.droolspdpentity;
+CREATE TABLE drools.DROOLSPDPENTITY
+(
+ PDPID VARCHAR(100) NOT NULL,
+ DESIGNATED BOOLEAN NOT NULL DEFAULT FALSE,
+ PRIORITY INT NOT NULL DEFAULT 0,
+ UPDATEDDATE DATE NOT NULL,
+ GROUPID VARCHAR(100) NOT NULL,
+ SESSIONID BIGINT NOT NULL
+);
diff --git a/packages/base/src/files/data/mysql/160401_droolspdp_upgrade_script.sql b/packages/base/src/files/data/mysql/160401_droolspdp_upgrade_script.sql
new file mode 100644
index 00000000..e7d92216
--- /dev/null
+++ b/packages/base/src/files/data/mysql/160401_droolspdp_upgrade_script.sql
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Base Package
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+drop table if exists drools.droolspdpentity;
+CREATE TABLE drools.DROOLSPDPENTITY
+(
+ PDPID VARCHAR(100) NOT NULL,
+ DESIGNATED BOOLEAN NOT NULL DEFAULT FALSE,
+ PRIORITY INT NOT NULL DEFAULT 0,
+ UPDATEDDATE TIMESTAMP NOT NULL,
+ GROUPID VARCHAR(100) NOT NULL,
+ SESSIONID BIGINT NOT NULL
+);
diff --git a/packages/base/src/files/data/mysql/160700_droolspdp_downgrade_script.sql b/packages/base/src/files/data/mysql/160700_droolspdp_downgrade_script.sql
new file mode 100644
index 00000000..c8613bb7
--- /dev/null
+++ b/packages/base/src/files/data/mysql/160700_droolspdp_downgrade_script.sql
@@ -0,0 +1,25 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Base Package
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+drop table if exists drools.droolssessionentity;
+drop table if exists drools.droolspdpentity;
+drop table if exists drools.sessioninfo;
+drop table if exists drools.WORKITEMINFO;
+
diff --git a/packages/base/src/files/data/mysql/160700_droolspdp_upgrade_script.sql b/packages/base/src/files/data/mysql/160700_droolspdp_upgrade_script.sql
new file mode 100644
index 00000000..3350859e
--- /dev/null
+++ b/packages/base/src/files/data/mysql/160700_droolspdp_upgrade_script.sql
@@ -0,0 +1,68 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Base Package
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+drop table if exists drools.droolssessionentity;
+drop table if exists drools.droolspdpentity;
+
+CREATE TABLE drools.DROOLSPDPENTITY
+(
+ PDPID VARCHAR(100) NOT NULL,
+ DESIGNATED BOOLEAN NOT NULL DEFAULT FALSE,
+ PRIORITY INT NOT NULL DEFAULT 0,
+ UPDATEDDATE TIMESTAMP NOT NULL,
+ GROUPID VARCHAR(100) NOT NULL,
+ SESSIONID BIGINT NOT NULL,
+ PRIMARY KEY(PDPID)
+);
+
+CREATE TABLE drools.DROOLSSESSIONENTITY
+(
+ PDPID VARCHAR(100) NOT NULL,
+ SESSIONNAME VARCHAR(100) NOT NULL,
+ SESSIONID BIGINT NOT NULL,
+ PDPENTITY_pdpId BIGINT NOT NULL,
+ PRIMARY KEY(PDPID,SESSIONNAME)
+);
+ALTER TABLE drools.DROOLSSESSIONENTITY ADD CONSTRAINT FK_DROOLSSESSIONENTITY_DROOLSPDPENTITY_PDPID
+FOREIGN KEY (PDPID) REFERENCES drools.DROOLSPDPENTITY (PDPID);
+
+drop table if exists drools.sessioninfo;
+CREATE TABLE drools.SESSIONINFO
+(
+ID BIGINT NOT NULL,
+LASTMODIFICATIONDATE TIMESTAMP,
+RULESBYTEARRAY BLOB,
+STARTDATE TIMESTAMP default current_timestamp,
+OPTLOCK INTEGER,
+PRIMARY KEY (ID)
+);
+
+drop table if exists drools.WORKITEMINFO;
+CREATE TABLE drools.WORKITEMINFO
+(
+WORKITEMID BIGINT NOT NULL,
+CREATIONDATE TIMESTAMP default current_timestamp,
+`NAME` VARCHAR(500),
+PROCESSINSTANCEID BIGINT,
+STATE BIGINT,
+OPTLOCK INTEGER,
+WORKITEMBYTEARRAY BLOB,
+PRIMARY KEY (WORKITEMID)
+);
diff --git a/packages/base/src/files/data/mysql/161000_droolspdp_downgrade_script.sql b/packages/base/src/files/data/mysql/161000_droolspdp_downgrade_script.sql
new file mode 100644
index 00000000..b1ab793c
--- /dev/null
+++ b/packages/base/src/files/data/mysql/161000_droolspdp_downgrade_script.sql
@@ -0,0 +1,47 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Base Package
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+drop table if exists drools.droolssessionentity;
+drop table if exists drools.droolspdpentity;
+
+CREATE TABLE drools.DROOLSPDPENTITY
+(
+ PDPID VARCHAR(100) NOT NULL,
+ DESIGNATED BOOLEAN NOT NULL DEFAULT FALSE,
+ PRIORITY INT NOT NULL DEFAULT 0,
+ UPDATEDDATE TIMESTAMP NOT NULL,
+ GROUPID VARCHAR(100) NOT NULL,
+ SESSIONID BIGINT NOT NULL,
+ PRIMARY KEY(PDPID)
+);
+
+CREATE TABLE drools.DROOLSSESSIONENTITY
+(
+ PDPID VARCHAR(100) NOT NULL,
+ SESSIONNAME VARCHAR(100) NOT NULL,
+ SESSIONID BIGINT NOT NULL,
+ PDPENTITY_pdpId BIGINT NOT NULL,
+ PRIMARY KEY(PDPID,SESSIONNAME)
+);
+ALTER TABLE drools.DROOLSSESSIONENTITY ADD CONSTRAINT FK_DROOLSSESSIONENTITY_DROOLSPDPENTITY_PDPID
+FOREIGN KEY (PDPID) REFERENCES drools.DROOLSPDPENTITY (PDPID);
+
+drop table if exists drools.LastSiteEntity;
+
diff --git a/packages/base/src/files/data/mysql/161000_droolspdp_upgrade_script.sql b/packages/base/src/files/data/mysql/161000_droolspdp_upgrade_script.sql
new file mode 100644
index 00000000..9ef24426
--- /dev/null
+++ b/packages/base/src/files/data/mysql/161000_droolspdp_upgrade_script.sql
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Base Package
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE if exists drools.DROOLSSESSIONENTITY;
+DROP TABLE if exists drools.DROOLSPDPENTITY;
+
+CREATE TABLE if not exists drools.DROOLSPDPENTITY
+(
+pdpId VARCHAR(255) NOT NULL,
+designated TINYINT(1) default 0 NOT NULL,
+priority INTEGER NOT NULL,
+site VARCHAR(50),
+updatedDate DATETIME NOT NULL,
+PRIMARY KEY (pdpId)
+);
+
+CREATE TABLE if not exists drools.DROOLSSESSIONENTITY
+(
+sessionName VARCHAR(255) NOT NULL,
+pdpId VARCHAR(255) NOT NULL,
+sessionId BIGINT NOT NULL,
+PDPENTITY_pdpId VARCHAR(255),
+PRIMARY KEY (sessionName, pdpId)
+);
+
+ALTER TABLE drools.DROOLSSESSIONENTITY ADD CONSTRAINT FK_DROOLSSESSIONENTITY_PDPENTITY_pdpId
+FOREIGN KEY (PDPENTITY_pdpId)
+REFERENCES drools.DROOLSPDPENTITY (pdpId);
+
+drop table if exists drools.LastSiteEntity;
+
+CREATE TABLE `drools`.`LastSiteEntity`
+( `id` INT NOT NULL ,
+`siteName` VARCHAR(50) NOT NULL
+);
+
+
diff --git a/packages/base/src/files/data/mysql/161001_droolspdp_downgrade_script.sql b/packages/base/src/files/data/mysql/161001_droolspdp_downgrade_script.sql
new file mode 100644
index 00000000..983a9f3c
--- /dev/null
+++ b/packages/base/src/files/data/mysql/161001_droolspdp_downgrade_script.sql
@@ -0,0 +1,56 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Base Package
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+set foreign_key_checks=0;
+
+drop table if exists drools.LastSiteEntity;
+
+CREATE TABLE `drools`.`LastSiteEntity`
+( `id` INT NOT NULL ,
+`siteName` VARCHAR(50) NOT NULL
+);
+
+drop table if exists drools.DROOLSPDPENTITY;
+
+CREATE TABLE if not exists drools.DROOLSPDPENTITY
+(
+pdpId VARCHAR(255) NOT NULL,
+designated TINYINT(1) default 0 NOT NULL,
+priority INTEGER NOT NULL,
+site VARCHAR(50),
+updatedDate DATETIME NOT NULL,
+PRIMARY KEY (pdpId)
+);
+
+drop table if exists drools.DROOLSSESSIONENTITY;
+CREATE TABLE if not exists drools.DROOLSSESSIONENTITY
+(
+sessionName VARCHAR(255) NOT NULL,
+pdpId VARCHAR(255) NOT NULL,
+sessionId BIGINT NOT NULL,
+PDPENTITY_pdpId VARCHAR(255),
+PRIMARY KEY (sessionName, pdpId)
+);
+
+ALTER TABLE drools.DROOLSSESSIONENTITY ADD CONSTRAINT FK_DROOLSSESSIONENTITY_PDPENTITY_pdpId
+FOREIGN KEY (PDPENTITY_pdpId)
+REFERENCES drools.DROOLSPDPENTITY (pdpId);
+
+set foreign_key_checks=1;
diff --git a/packages/base/src/files/data/mysql/161001_droolspdp_upgrade_script.sql b/packages/base/src/files/data/mysql/161001_droolspdp_upgrade_script.sql
new file mode 100644
index 00000000..2731e1bd
--- /dev/null
+++ b/packages/base/src/files/data/mysql/161001_droolspdp_upgrade_script.sql
@@ -0,0 +1,52 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Base Package
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+set foreign_key_checks=0;
+
+drop table if exists drools.LastSiteEntity;
+
+drop table if exists drools.DROOLSPDPENTITY;
+
+CREATE TABLE if not exists drools.DROOLSPDPENTITY
+(
+pdpId VARCHAR(255) NOT NULL,
+designated TINYINT(1) default 0 NOT NULL,
+priority INTEGER NOT NULL,
+site VARCHAR(50),
+updatedDate DATETIME NOT NULL,
+designatedDate DATETIME NOT NULL,
+PRIMARY KEY (pdpId)
+);
+
+drop table if exists drools.DROOLSSESSIONENTITY;
+CREATE TABLE if not exists drools.DROOLSSESSIONENTITY
+(
+sessionName VARCHAR(255) NOT NULL,
+pdpId VARCHAR(255) NOT NULL,
+sessionId BIGINT NOT NULL,
+PDPENTITY_pdpId VARCHAR(255),
+PRIMARY KEY (sessionName, pdpId)
+);
+
+ALTER TABLE drools.DROOLSSESSIONENTITY ADD CONSTRAINT FK_DROOLSSESSIONENTITY_PDPENTITY_pdpId
+FOREIGN KEY (PDPENTITY_pdpId)
+REFERENCES drools.DROOLSPDPENTITY (pdpId);
+
+set foreign_key_checks=1;
diff --git a/packages/base/src/files/data/mysql/161002_droolspdp_downgrade_script.sql b/packages/base/src/files/data/mysql/161002_droolspdp_downgrade_script.sql
new file mode 100644
index 00000000..90ed6457
--- /dev/null
+++ b/packages/base/src/files/data/mysql/161002_droolspdp_downgrade_script.sql
@@ -0,0 +1,21 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Base Package
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+drop table if exists drools.IntegrityAuditEntity;
diff --git a/packages/base/src/files/data/mysql/161002_droolspdp_upgrade_script.sql b/packages/base/src/files/data/mysql/161002_droolspdp_upgrade_script.sql
new file mode 100644
index 00000000..ff99d36a
--- /dev/null
+++ b/packages/base/src/files/data/mysql/161002_droolspdp_upgrade_script.sql
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Base Package
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+drop table if exists drools.IntegrityAuditEntity;
+create table if not exists drools.IntegrityAuditEntity
+(
+ id int not null auto_increment,
+ persistenceUnit varchar(100) not null,
+ site varchar(100),
+ nodeType varchar(100),
+ resourceName varchar(100) not null,
+ designated boolean default false,
+ jdbcDriver varchar(100) not null,
+ jdbcUrl varchar(100) not null,
+ jdbcUser varchar(30) not null,
+ jdbcPassword varchar(30) not null,
+ createdDate TIMESTAMP NOT NULL default current_timestamp,
+ lastUpdated TIMESTAMP NOT NULL,
+ primary key(id)
+);
+
+alter table drools.IntegrityAuditEntity add constraint resourceName_uniq unique(resourceName);
+
+
diff --git a/packages/base/src/files/data/mysql/161003_droolspdp_downgrade_script.sql b/packages/base/src/files/data/mysql/161003_droolspdp_downgrade_script.sql
new file mode 100644
index 00000000..ba9ac573
--- /dev/null
+++ b/packages/base/src/files/data/mysql/161003_droolspdp_downgrade_script.sql
@@ -0,0 +1,22 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Base Package
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+drop table if exists drools.SEQUENCE;
+
diff --git a/packages/base/src/files/data/mysql/161003_droolspdp_upgrade_script.sql b/packages/base/src/files/data/mysql/161003_droolspdp_upgrade_script.sql
new file mode 100644
index 00000000..7f8c17ca
--- /dev/null
+++ b/packages/base/src/files/data/mysql/161003_droolspdp_upgrade_script.sql
@@ -0,0 +1,29 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Base Package
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+drop table if exists drools.SEQUENCE;
+CREATE TABLE drools.SEQUENCE
+(
+SEQ_NAME VARCHAR(50) NOT NULL,
+SEQ_COUNT NUMERIC(38),
+PRIMARY KEY (SEQ_NAME)
+);
+
+INSERT INTO drools.SEQUENCE (SEQ_NAME,SEQ_COUNT) VALUES ('SEQ_GEN',3050);
diff --git a/packages/base/src/files/data/mysql/161004_droolspdp_downgrade_script.sql b/packages/base/src/files/data/mysql/161004_droolspdp_downgrade_script.sql
new file mode 100644
index 00000000..0f756585
--- /dev/null
+++ b/packages/base/src/files/data/mysql/161004_droolspdp_downgrade_script.sql
@@ -0,0 +1,2 @@
+alter table drools.droolsPdpEntity modify updatedDate datetime not null;
+alter table drools.droolsPdpEntity modify designatedDate datetime not null;
diff --git a/packages/base/src/files/data/mysql/161004_droolspdp_upgrade_script.sql b/packages/base/src/files/data/mysql/161004_droolspdp_upgrade_script.sql
new file mode 100644
index 00000000..f3a6cdda
--- /dev/null
+++ b/packages/base/src/files/data/mysql/161004_droolspdp_upgrade_script.sql
@@ -0,0 +1,5 @@
+alter table drools.droolsPdpEntity modify updatedDate timestamp not null;
+alter table drools.droolsPdpEntity modify designatedDate timestamp not null;
+
+
+ \ No newline at end of file
diff --git a/packages/base/src/files/data/mysql/170200_droolspdp_downgrade_script.sql b/packages/base/src/files/data/mysql/170200_droolspdp_downgrade_script.sql
new file mode 100644
index 00000000..928a584e
--- /dev/null
+++ b/packages/base/src/files/data/mysql/170200_droolspdp_downgrade_script.sql
@@ -0,0 +1,21 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Base Package
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+alter table drools.IntegrityAuditEntity modify jdbcUrl varchar(100) not null;
diff --git a/packages/base/src/files/data/mysql/170200_droolspdp_upgrade_script.sql b/packages/base/src/files/data/mysql/170200_droolspdp_upgrade_script.sql
new file mode 100644
index 00000000..93bb69e3
--- /dev/null
+++ b/packages/base/src/files/data/mysql/170200_droolspdp_upgrade_script.sql
@@ -0,0 +1,21 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Base Package
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+alter table drools.IntegrityAuditEntity modify jdbcUrl varchar(200) not null;