-
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
feat: add persistence for data-plane-selector #1475
Conversation
public class DataPlaneInstancePostgresqlMigrationExtension extends AbstractPostgresqlMigrationExtension { | ||
private static final String NAME_SUBSYSTEM = "dataplaneinstance"; | ||
|
||
protected String getSubsystemName() { |
Check notice
Code scanning / CodeQL
Missing Override annotation Note
AbstractPostgresqlMigrationExtension.getSubsystemName
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 | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
what do you mean with "match the old tables"?
in case of upgrade (that AFAIR should be actually possible) edc_lease
won't be created as already existent and edc_data_plane_instance
will be created.
This is a relevant fix for 0.7.3, as that version already ships the dataplane self-registration extension. |
974e55c
to
ca678af
Compare
Quality Gate passedIssues Measures |
WHAT
Add sql persistence for data-plane-selector
WHY
it was missing
FURTHER NOTES
Closes #1474