-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add persistence for data-plane-selector #1475
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
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; | ||
} | ||
} |
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 | ||
); | ||
Comment on lines
+15
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do the schemas of these tables match the old tables, so that in case of an upgrade of the edc (even if it is not supported) there should be no problems? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what do you mean with "match the old tables"? |
Check notice
Code scanning / CodeQL
Missing Override annotation Note