-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Backport Add Persistence for dataplaneselector.
- Loading branch information
1 parent
28d85af
commit 33e6360
Showing
8 changed files
with
87 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...ipse/tractusx/edc/postgresql/migration/DataPlaneInstancePostgresqlMigrationExtension.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/******************************************************************************** | ||
* Copyright (c) 2024 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* 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. | ||
* | ||
* 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 | ||
********************************************************************************/ | ||
|
||
package org.eclipse.tractusx.edc.postgresql.migration; | ||
|
||
public class DataPlaneInstancePostgresqlMigrationExtension extends AbstractPostgresqlMigrationExtension { | ||
private static final String NAME_SUBSYSTEM = "dataplaneinstance"; | ||
|
||
protected String getSubsystemName() { | ||
return NAME_SUBSYSTEM; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...se/tractusx/edc/postgresql/migration/dataplaneinstance/V0_0_1__Init_Dataplaneinstance.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
-- | ||
-- 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 | ||
-- | ||
|
||
|
||
CREATE TABLE IF NOT EXISTS edc_lease | ||
( | ||
leased_by VARCHAR NOT NULL, | ||
leased_at BIGINT, | ||
lease_duration INTEGER NOT NULL, | ||
lease_id VARCHAR NOT NULL | ||
CONSTRAINT lease_pk | ||
PRIMARY KEY | ||
); | ||
|
||
|
||
CREATE TABLE IF NOT EXISTS edc_data_plane_instance | ||
( | ||
id VARCHAR NOT NULL PRIMARY KEY, | ||
data JSON, | ||
lease_id VARCHAR | ||
CONSTRAINT data_plane_instance_lease_id_fk | ||
REFERENCES edc_lease | ||
ON DELETE SET NULL | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters