Skip to content

Commit

Permalink
chore: sync ap migrations (#1021)
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilczaja authored Aug 8, 2024
1 parent 4f0ae71 commit da4b99d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 8 deletions.
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;

alter table connector
rename column mds_id to organization_id;

alter table connector
rename column provider_mds_id to provider_organization_id;

alter table component
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

0 comments on commit da4b99d

Please sign in to comment.