Skip to content

Commit

Permalink
fix: add default empty array value for null policy profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
ndr-brt committed Dec 4, 2024
1 parent b334a25 commit c8bfaa4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/migration/Version_0.7.x_0.8.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ For those who are not using either the Helm Charts or the provided [`migration`
- [federated catalog - init schema](../../edc-extensions/migrations/control-plane-migration/src/main/resources/org/eclipse/tractusx/edc/postgresql/migration/federatedcatalog/V0_0_1__Init_FederatedCatalogCache_Database_Schema.sql)
- [policy monitor - create state index](../../edc-extensions/migrations/control-plane-migration/src/main/resources/org/eclipse/tractusx/edc/postgresql/migration/policy-monitor/V0_0_2__Alter_PolicyMonitor_CreateStateIndex.sql)
- [policy definition - add profiles column](../../edc-extensions/migrations/control-plane-migration/src/main/resources/org/eclipse/tractusx/edc/postgresql/migration/policy/V0_0_5__Add_Profiles.sql)
- **WARNING**: in version 0.8.0 this could give runtime errors, eventually you can manually run the query contained in the
[subsequent migration](../../edc-extensions/migrations/control-plane-migration/src/main/resources/org/eclipse/tractusx/edc/postgresql/migration/policy/V0_0_6__Avoid_null_profiles.sql).
The migration fix will be available from 0.8.1 on.
- [transfer process - create state index](../../edc-extensions/migrations/control-plane-migration/src/main/resources/org/eclipse/tractusx/edc/postgresql/migration/transferprocess/V0_0_16__Alter_TransferProcess_CreateStateIndex.sql)

### 2.2. Data plane:
Expand Down Expand Up @@ -99,4 +102,4 @@ of the helm charts in error.
-java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
-java.util.logging.ConsoleHandler.level=ALL
-java.util.logging.SimpleFormatter.format=[%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS] [%4$-7s] %5$s%6$s%n
```
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--
-- Copyright (c) 2024 Contributors to the Eclipse Foundation
--
-- This program and the accompanying materials are made available under the
-- terms of the Apache License, Version 2.0 which is available at
-- https://www.apache.org/licenses/LICENSE-2.0
--
-- SPDX-License-Identifier: Apache-2.0
--
-- Contributors:
-- Contributors to the Eclipse Foundation - initial API and implementation
--

UPDATE edc_policydefinitions SET profiles='[]'::json where profiles is NULL;

0 comments on commit c8bfaa4

Please sign in to comment.