summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0300-participantreplica.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0400-participant.sql (renamed from policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0300-participant.sql)0
-rw-r--r--policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0500-participant_replica_fk_index.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0600-participant_replica_fk.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0300-participantreplica.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0400-participant.sql (renamed from policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0300-participant.sql)0
-rw-r--r--policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0500-participant_replica_fk_index.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0600-participant_replica_fk.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/clampacm/sql/1500/downgrade/0300-participantreplica.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/clampacm/sql/1500/downgrade/0400-participant.sql (renamed from policy-db-migrator/src/main/docker/config/clampacm/sql/1500/downgrade/0300-participant.sql)0
-rw-r--r--policy-db-migrator/src/main/docker/config/clampacm/sql/1500/downgrade/0500-participant_replica_fk_index.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/clampacm/sql/1500/downgrade/0600-participant_replica_fk.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0300-participantreplica.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0400-participant.sql (renamed from policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0300-participant.sql)0
-rw-r--r--policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0500-participant_replica_fk_index.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0600-participant_replica_fk.sql20
16 files changed, 240 insertions, 0 deletions
diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0300-participantreplica.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0300-participantreplica.sql
new file mode 100644
index 00000000..d5f7871b
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0300-participantreplica.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2024 Nordix Foundation
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE participantreplica;
diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0300-participant.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0400-participant.sql
index 10ddaaf6..10ddaaf6 100644
--- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0300-participant.sql
+++ b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0400-participant.sql
diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0500-participant_replica_fk_index.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0500-participant_replica_fk_index.sql
new file mode 100644
index 00000000..ab9012c5
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0500-participant_replica_fk_index.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2024 Nordix Foundation
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP INDEX IF EXISTS participant_replica_fk;
diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0600-participant_replica_fk.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0600-participant_replica_fk.sql
new file mode 100644
index 00000000..36709b10
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0600-participant_replica_fk.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2024 Nordix Foundation
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE participantreplica DROP CONSTRAINT IF EXISTS participant_replica_fk;
diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0300-participantreplica.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0300-participantreplica.sql
new file mode 100644
index 00000000..4543272b
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0300-participantreplica.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2024 Nordix Foundation
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE participantreplica (replicaId varchar(255) NOT NULL, lastMsg timestamp without time zone DEFAULT Now(), participantId varchar(255) DEFAULT NULL, participantState SMALLINT DEFAULT NULL, CONSTRAINT PK_PARTICIPANT_REPLICA PRIMARY KEY (replicaId));
diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0300-participant.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0400-participant.sql
index 97ae43a3..97ae43a3 100644
--- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0300-participant.sql
+++ b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0400-participant.sql
diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0500-participant_replica_fk_index.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0500-participant_replica_fk_index.sql
new file mode 100644
index 00000000..bc506e99
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0500-participant_replica_fk_index.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2024 Nordix Foundation
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE INDEX participant_replica_fk ON participantreplica(participantId);
diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0600-participant_replica_fk.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0600-participant_replica_fk.sql
new file mode 100644
index 00000000..3341d8e0
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0600-participant_replica_fk.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2024 Nordix Foundation
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE participantreplica ADD CONSTRAINT participant_replica_fk FOREIGN KEY (participantId) REFERENCES participant (participantId) ON UPDATE RESTRICT ON DELETE RESTRICT;
diff --git a/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/downgrade/0300-participantreplica.sql b/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/downgrade/0300-participantreplica.sql
new file mode 100644
index 00000000..d5f7871b
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/downgrade/0300-participantreplica.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2024 Nordix Foundation
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE participantreplica;
diff --git a/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/downgrade/0300-participant.sql b/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/downgrade/0400-participant.sql
index 10ddaaf6..10ddaaf6 100644
--- a/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/downgrade/0300-participant.sql
+++ b/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/downgrade/0400-participant.sql
diff --git a/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/downgrade/0500-participant_replica_fk_index.sql b/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/downgrade/0500-participant_replica_fk_index.sql
new file mode 100644
index 00000000..61a5454c
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/downgrade/0500-participant_replica_fk_index.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2024 Nordix Foundation
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP INDEX participant_replica_fk ON participantreplica;
diff --git a/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/downgrade/0600-participant_replica_fk.sql b/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/downgrade/0600-participant_replica_fk.sql
new file mode 100644
index 00000000..6c5f30ee
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/downgrade/0600-participant_replica_fk.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2024 Nordix Foundation
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE participantreplica DROP FOREIGN KEY participant_replica_fk;
diff --git a/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0300-participantreplica.sql b/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0300-participantreplica.sql
new file mode 100644
index 00000000..cb5969d5
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0300-participantreplica.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2024 Nordix Foundation
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE participantreplica (replicaId varchar(255) NOT NULL, lastMsg datetime(6) DEFAULT NULL, participantId varchar(255) DEFAULT NULL, participantState int(11) DEFAULT NULL, CONSTRAINT PK_PARTICIPANT_REPLICA PRIMARY KEY (replicaId));
diff --git a/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0300-participant.sql b/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0400-participant.sql
index 042c454a..042c454a 100644
--- a/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0300-participant.sql
+++ b/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0400-participant.sql
diff --git a/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0500-participant_replica_fk_index.sql b/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0500-participant_replica_fk_index.sql
new file mode 100644
index 00000000..bc506e99
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0500-participant_replica_fk_index.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2024 Nordix Foundation
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE INDEX participant_replica_fk ON participantreplica(participantId);
diff --git a/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0600-participant_replica_fk.sql b/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0600-participant_replica_fk.sql
new file mode 100644
index 00000000..3341d8e0
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/clampacm/sql/1500/upgrade/0600-participant_replica_fk.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2024 Nordix Foundation
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE participantreplica ADD CONSTRAINT participant_replica_fk FOREIGN KEY (participantId) REFERENCES participant (participantId) ON UPDATE RESTRICT ON DELETE RESTRICT;