Skip to content
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

chore: sync ap migrations #1021

Merged
merged 3 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/api/sovity-edc-api-wrapper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -603,11 +603,11 @@ components:
DataSourceType:
type: string
description: Supported Data Source Types by UiDataSource
default: CUSTOM
enum:
- HTTP_DATA
- ON_REQUEST
- CUSTOM
default: CUSTOM
SecretValue:
type: object
properties:
Expand Down Expand Up @@ -815,14 +815,14 @@ components:
UiDataSourceHttpDataMethod:
type: string
description: Supported HTTP Methods by UiDataSource
default: GET
enum:
- GET
- POST
- PUT
- PATCH
- DELETE
- OPTIONS
default: GET
UiDataSourceOnRequest:
required:
- contactEmail
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
alter table organization
rename column mds_id to id;

alter table "user"
rename column organization_mds_id to organization_id;
kamilczaja marked this conversation as resolved.
Show resolved Hide resolved

alter table connector
rename column mds_id to organization_id;

alter table connector
kamilczaja marked this conversation as resolved.
Show resolved Hide resolved
rename column provider_mds_id to provider_organization_id;

alter table component
kamilczaja marked this conversation as resolved.
Show resolved Hide resolved
rename column mds_id to organization_id;
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ public static void insertConnector(
Consumer<ConnectorRecord> applier
) {
var organization = dsl.newRecord(Tables.ORGANIZATION);
organization.setMdsId(connectorRef.getOrganizationId());
organization.setId(connectorRef.getOrganizationId());
organization.setName(connectorRef.getOrganizationLegalName());
organization.insert();

var connector = dsl.newRecord(Tables.CONNECTOR);
connector.setEnvironment(connectorRef.getEnvironmentId());
connector.setMdsId(connectorRef.getOrganizationId());
connector.setOrganizationId(connectorRef.getOrganizationId());
connector.setConnectorId(connectorRef.getConnectorId());
connector.setName(connectorRef.getConnectorId() + " Name");
connector.setEndpointUrl(connectorRef.getEndpoint());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ private Set<ConnectorRef> queryConnectorRefs(
c.CONNECTOR_ID.as("connectorId"),
c.ENVIRONMENT.as("environmentId"),
o.NAME.as("organizationLegalName"),
o.MDS_ID.as("organizationId"),
o.ID.as("organizationId"),
c.ENDPOINT_URL.as("endpoint")
)
.from(c)
.leftJoin(o).on(c.MDS_ID.eq(o.MDS_ID))
.leftJoin(o).on(c.ORGANIZATION_ID.eq(o.ID))
.where(condition.apply(c, o), c.ENVIRONMENT.eq(crawlerConfig.getEnvironmentId()))
.fetchInto(ConnectorRef.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ public static void insertConnector(
Consumer<ConnectorRecord> applier
) {
var organization = dsl.newRecord(Tables.ORGANIZATION);
organization.setMdsId(connectorRef.getOrganizationId());
organization.setId(connectorRef.getOrganizationId());
organization.setName(connectorRef.getOrganizationLegalName());
organization.insert();

var connector = dsl.newRecord(Tables.CONNECTOR);
connector.setEnvironment(connectorRef.getEnvironmentId());
connector.setMdsId(connectorRef.getOrganizationId());
connector.setOrganizationId(connectorRef.getOrganizationId());
connector.setConnectorId(connectorRef.getConnectorId());
connector.setName(connectorRef.getConnectorId() + " Name");
connector.setEndpointUrl(connectorRef.getEndpoint());
Expand Down
Loading