Skip to content

Commit

Permalink
fix(seeding): set consortia to seeding paths (#96)
Browse files Browse the repository at this point in the history
* add consortia to the seeding paths to seed consortia related data
-----------------
Reviewed-By: Evelyn Gurschler <[email protected]>
Refs: #94 , #45
  • Loading branch information
Phil91 authored May 2, 2024
1 parent 1a2e9b4 commit 8e16f04
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 4 deletions.
2 changes: 2 additions & 0 deletions consortia/environments/values-beta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ issuer:
issuermigrations:
logging:
default: "Debug"
seeding:
testDataEnvironments: "consortia"

processesworker:
logging:
Expand Down
2 changes: 2 additions & 0 deletions consortia/environments/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ issuermigrations:
imagePullPolicy: "Always"
logging:
default: "Debug"
seeding:
testDataEnvironments: "consortia"

processesworker:
image:
Expand Down
2 changes: 2 additions & 0 deletions consortia/environments/values-int.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ issuer:
issuermigrations:
logging:
default: "Debug"
seeding:
testDataEnvironments: "consortia"

processesworker:
logging:
Expand Down
2 changes: 2 additions & 0 deletions consortia/environments/values-pen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ issuer:
issuermigrations:
logging:
default: "Debug"
seeding:
testDataEnvironments: "consortia"

processesworker:
logging:
Expand Down
2 changes: 2 additions & 0 deletions consortia/environments/values-rc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ issuermigrations:
imagePullPolicy: "Always"
logging:
default: "Debug"
seeding:
testDataEnvironments: "consortia"

processesworker:
image:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,13 @@ public async Task ExecuteAsync(CancellationToken cancellationToken)

await SeedTable<VerifiedCredentialExternalTypeDetailVersion>("verified_credential_external_type_detail_versions",
x => x.Id,
x => x.dataEntity.Template != x.dbEntity.Template || x.dataEntity.Expiry != x.dbEntity.Expiry || x.dataEntity.ValidFrom != x.dbEntity.ValidFrom,
x => x.dataEntity.Template != x.dbEntity.Template || x.dataEntity.Expiry != x.dbEntity.Expiry || x.dataEntity.ValidFrom != x.dbEntity.ValidFrom || x.dataEntity.Version != x.dbEntity.Version,
(dbEntry, entry) =>
{
dbEntry.Template = entry.Template;
dbEntry.Expiry = entry.Expiry;
dbEntry.ValidFrom = entry.ValidFrom;
dbEntry.Version = entry.Version;
}, cancellationToken).ConfigureAwait(ConfigureAwaitOptions.None);

await _context.SaveChangesAsync(cancellationToken).ConfigureAwait(ConfigureAwaitOptions.None);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
"id": "1268a76a-ca19-4dd8-b932-01f24071d562",
"verified_credential_external_type_id": 3,
"version": "1.0",
"template": null,
"template": "https://catena-x.net/fileadmin/user_upload/04_Einfuehren_und_umsetzen/Governance_Framework/231016_Catena-X_Use_Case_Framework_BehaviorTwin.pdf",
"valid_from": "2023-06-01 00:00:00.000000 +00:00",
"expiry": "2023-09-30 00:00:00.000000 +00:00"
"expiry": "2024-12-31 00:00:00.000000 +00:00"
},
{
"id": "1268a76a-ca19-4dd8-b932-01f24071d565",
"verified_credential_external_type_id": 5,
"version": "1.0",
"template": " https://catena-x.net/fileadmin/user_upload/04_Einfuehren_und_umsetzen/Governance_Framework/231016_Catena-X_Use_Case_Framework_CircularEconomy.pdf",
"template": "https://catena-x.net/fileadmin/user_upload/04_Einfuehren_und_umsetzen/Governance_Framework/231016_Catena-X_Use_Case_Framework_CircularEconomy.pdf",
"valid_from": "2024-01-01 00:00:00.000000 +00:00",
"expiry": "2024-12-31 00:00:00.000000 +00:00"
}
Expand Down

0 comments on commit 8e16f04

Please sign in to comment.