-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
397 additions
and
2 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,4 +22,7 @@ eu.datacellar.wallet.url=http://host.docker.internal:7001 | |
eu.datacellar.wallet.email[email protected] | ||
eu.datacellar.wallet.password=consumer | ||
eu.datacellar.trust.did=did:web:gaiax.cticpoc.com:anchor | ||
eu.datacellar.uniresolver.url=https://uniresolver.test.ctic.es/1.0/identifiers | ||
eu.datacellar.uniresolver.url=https://uniresolver.test.ctic.es/1.0/identifiers | ||
edc.datasource.default.url=jdbc:postgresql://host.docker.internal:25432/connector | ||
edc.datasource.default.user=postgres | ||
edc.datasource.default.password=postgres |
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 |
---|---|---|
|
@@ -23,4 +23,7 @@ eu.datacellar.wallet.url=http://host.docker.internal:7061 | |
eu.datacellar.wallet.email[email protected] | ||
eu.datacellar.wallet.password=provider | ||
eu.datacellar.trust.did=did:web:gaiax.cticpoc.com:anchor | ||
eu.datacellar.uniresolver.url=https://uniresolver.test.ctic.es/1.0/identifiers | ||
eu.datacellar.uniresolver.url=https://uniresolver.test.ctic.es/1.0/identifiers | ||
edc.datasource.default.url=jdbc:postgresql://host.docker.internal:15432/connector | ||
edc.datasource.default.user=postgres | ||
edc.datasource.default.password=postgres |
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,3 @@ | ||
# Connector SQL store schemas | ||
|
||
SQL store schemas downloaded from the [eclipse-edc/Connector repository](https://github.com/eclipse-edc/Connector/tree/v0.4.1/extensions/control-plane/store/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,30 @@ | ||
-- | ||
-- Copyright (c) 2022 - 2023 Daimler TSS GmbH | ||
-- | ||
-- 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: | ||
-- Daimler TSS GmbH - Initial SQL Query | ||
-- Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - improvements | ||
-- | ||
|
||
-- THIS SCHEMA HAS BEEN WRITTEN AND TESTED ONLY FOR POSTGRES | ||
|
||
-- table: edc_asset | ||
CREATE TABLE IF NOT EXISTS edc_asset | ||
( | ||
asset_id VARCHAR NOT NULL, | ||
created_at BIGINT NOT NULL, | ||
properties JSON DEFAULT '{}', | ||
private_properties JSON DEFAULT '{}', | ||
data_address JSON DEFAULT '{}', | ||
PRIMARY KEY (asset_id) | ||
); | ||
|
||
COMMENT ON COLUMN edc_asset.properties IS 'Asset properties serialized as JSON'; | ||
COMMENT ON COLUMN edc_asset.private_properties IS 'Asset private properties serialized as JSON'; | ||
COMMENT ON COLUMN edc_asset.data_address IS 'Asset DataAddress serialized as JSON'; |
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,27 @@ | ||
-- | ||
-- Copyright (c) 2022 Daimler TSS GmbH | ||
-- | ||
-- 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: | ||
-- Daimler TSS GmbH - Initial SQL Query | ||
-- Microsoft Corporation - refactoring | ||
-- SAP SE - add private properties to contract definition | ||
-- | ||
|
||
-- table: edc_contract_definitions | ||
-- only intended for and tested with H2 and Postgres! | ||
CREATE TABLE IF NOT EXISTS edc_contract_definitions | ||
( | ||
created_at BIGINT NOT NULL, | ||
contract_definition_id VARCHAR NOT NULL, | ||
access_policy_id VARCHAR NOT NULL, | ||
contract_policy_id VARCHAR NOT NULL, | ||
assets_selector JSON NOT NULL, | ||
private_properties JSON, | ||
PRIMARY KEY (contract_definition_id) | ||
); |
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,82 @@ | ||
-- Statements are designed for and tested with Postgres only! | ||
|
||
CREATE TABLE IF NOT EXISTS edc_lease | ||
( | ||
leased_by VARCHAR NOT NULL, | ||
leased_at BIGINT, | ||
lease_duration INTEGER DEFAULT 60000 NOT NULL, | ||
lease_id VARCHAR NOT NULL | ||
CONSTRAINT lease_pk | ||
PRIMARY KEY | ||
); | ||
|
||
COMMENT ON COLUMN edc_lease.leased_at IS 'posix timestamp of lease'; | ||
|
||
COMMENT ON COLUMN edc_lease.lease_duration IS 'duration of lease in milliseconds'; | ||
|
||
|
||
CREATE UNIQUE INDEX IF NOT EXISTS lease_lease_id_uindex | ||
ON edc_lease (lease_id); | ||
|
||
|
||
|
||
CREATE TABLE IF NOT EXISTS edc_contract_agreement | ||
( | ||
agr_id VARCHAR NOT NULL | ||
CONSTRAINT contract_agreement_pk | ||
PRIMARY KEY, | ||
provider_agent_id VARCHAR, | ||
consumer_agent_id VARCHAR, | ||
signing_date BIGINT, | ||
start_date BIGINT, | ||
end_date INTEGER, | ||
asset_id VARCHAR NOT NULL, | ||
policy JSON | ||
); | ||
|
||
|
||
CREATE TABLE IF NOT EXISTS edc_contract_negotiation | ||
( | ||
id VARCHAR NOT NULL | ||
CONSTRAINT contract_negotiation_pk | ||
PRIMARY KEY, | ||
created_at BIGINT NOT NULL, | ||
updated_at BIGINT NOT NULL, | ||
correlation_id VARCHAR, | ||
counterparty_id VARCHAR NOT NULL, | ||
counterparty_address VARCHAR NOT NULL, | ||
protocol VARCHAR NOT NULL, | ||
type VARCHAR NOT NULL, | ||
state INTEGER DEFAULT 0 NOT NULL, | ||
state_count INTEGER DEFAULT 0, | ||
state_timestamp BIGINT, | ||
error_detail VARCHAR, | ||
agreement_id VARCHAR | ||
CONSTRAINT contract_negotiation_contract_agreement_id_fk | ||
REFERENCES edc_contract_agreement, | ||
contract_offers JSON, | ||
callback_addresses JSON, | ||
trace_context JSON, | ||
pending BOOLEAN DEFAULT FALSE, | ||
lease_id VARCHAR | ||
CONSTRAINT contract_negotiation_lease_lease_id_fk | ||
REFERENCES edc_lease | ||
ON DELETE SET NULL, | ||
CONSTRAINT provider_correlation_id CHECK (type = '0' OR correlation_id IS NOT NULL) | ||
); | ||
|
||
COMMENT ON COLUMN edc_contract_negotiation.agreement_id IS 'ContractAgreement serialized as JSON'; | ||
|
||
COMMENT ON COLUMN edc_contract_negotiation.contract_offers IS 'List<ContractOffer> serialized as JSON'; | ||
|
||
COMMENT ON COLUMN edc_contract_negotiation.trace_context IS 'Map<String,String> serialized as JSON'; | ||
|
||
|
||
CREATE INDEX IF NOT EXISTS contract_negotiation_correlationid_index | ||
ON edc_contract_negotiation (correlation_id); | ||
|
||
CREATE UNIQUE INDEX IF NOT EXISTS contract_negotiation_id_uindex | ||
ON edc_contract_negotiation (id); | ||
|
||
CREATE UNIQUE INDEX IF NOT EXISTS contract_agreement_id_uindex | ||
ON edc_contract_agreement (agr_id); |
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,40 @@ | ||
-- | ||
-- Copyright (c) 2022 ZF Friedrichshafen AG | ||
-- | ||
-- 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: | ||
-- ZF Friedrichshafen AG - Initial SQL Query | ||
-- | ||
|
||
-- Statements are designed for and tested with Postgres only! | ||
|
||
-- table: edc_policydefinitions | ||
CREATE TABLE IF NOT EXISTS edc_policydefinitions | ||
( | ||
policy_id VARCHAR NOT NULL, | ||
created_at BIGINT NOT NULL, | ||
permissions JSON, | ||
prohibitions JSON, | ||
duties JSON, | ||
extensible_properties JSON, | ||
inherits_from VARCHAR, | ||
assigner VARCHAR, | ||
assignee VARCHAR, | ||
target VARCHAR, | ||
policy_type VARCHAR NOT NULL, | ||
PRIMARY KEY (policy_id) | ||
); | ||
|
||
COMMENT ON COLUMN edc_policydefinitions.permissions IS 'Java List<Permission> serialized as JSON'; | ||
COMMENT ON COLUMN edc_policydefinitions.prohibitions IS 'Java List<Prohibition> serialized as JSON'; | ||
COMMENT ON COLUMN edc_policydefinitions.duties IS 'Java List<Duty> serialized as JSON'; | ||
COMMENT ON COLUMN edc_policydefinitions.extensible_properties IS 'Java Map<String, Object> serialized as JSON'; | ||
COMMENT ON COLUMN edc_policydefinitions.policy_type IS 'Java PolicyType serialized as JSON'; | ||
|
||
CREATE UNIQUE INDEX IF NOT EXISTS edc_policydefinitions_id_uindex | ||
ON edc_policydefinitions (policy_id); |
Oops, something went wrong.