@sphereon/ssi-sdk.data-store 0.33.0 → 0.33.1-feature.vcdm2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/contact/AbstractContactStore.js +1 -5
- package/dist/contact/AbstractContactStore.js.map +1 -1
- package/dist/contact/ContactStore.js +544 -545
- package/dist/contact/ContactStore.js.map +1 -1
- package/dist/digitalCredential/AbstractDigitalCredentialStore.js +1 -5
- package/dist/digitalCredential/AbstractDigitalCredentialStore.js.map +1 -1
- package/dist/digitalCredential/DigitalCredentialStore.js +131 -142
- package/dist/digitalCredential/DigitalCredentialStore.js.map +1 -1
- package/dist/entities/contact/BaseConfigEntity.js +13 -14
- package/dist/entities/contact/BaseConfigEntity.js.map +1 -1
- package/dist/entities/contact/BaseContactEntity.js +24 -22
- package/dist/entities/contact/BaseContactEntity.js.map +1 -1
- package/dist/entities/contact/ConnectionEntity.js +23 -20
- package/dist/entities/contact/ConnectionEntity.js.map +1 -1
- package/dist/entities/contact/ContactMetadataItemEntity.js +38 -44
- package/dist/entities/contact/ContactMetadataItemEntity.js.map +1 -1
- package/dist/entities/contact/CorrelationIdentifierEntity.js +34 -42
- package/dist/entities/contact/CorrelationIdentifierEntity.js.map +1 -1
- package/dist/entities/contact/DidAuthConfigEntity.js +16 -14
- package/dist/entities/contact/DidAuthConfigEntity.js.map +1 -1
- package/dist/entities/contact/ElectronicAddressEntity.js +42 -47
- package/dist/entities/contact/ElectronicAddressEntity.js.map +1 -1
- package/dist/entities/contact/IdentityEntity.js +56 -57
- package/dist/entities/contact/IdentityEntity.js.map +1 -1
- package/dist/entities/contact/IdentityMetadataItemEntity.js +38 -44
- package/dist/entities/contact/IdentityMetadataItemEntity.js.map +1 -1
- package/dist/entities/contact/NaturalPersonEntity.js +35 -43
- package/dist/entities/contact/NaturalPersonEntity.js.map +1 -1
- package/dist/entities/contact/OpenIdConfigEntity.js +24 -18
- package/dist/entities/contact/OpenIdConfigEntity.js.map +1 -1
- package/dist/entities/contact/OrganizationEntity.js +28 -38
- package/dist/entities/contact/OrganizationEntity.js.map +1 -1
- package/dist/entities/contact/PartyEntity.js +57 -59
- package/dist/entities/contact/PartyEntity.js.map +1 -1
- package/dist/entities/contact/PartyRelationshipEntity.js +37 -43
- package/dist/entities/contact/PartyRelationshipEntity.js.map +1 -1
- package/dist/entities/contact/PartyTypeEntity.js +44 -49
- package/dist/entities/contact/PartyTypeEntity.js.map +1 -1
- package/dist/entities/contact/PhysicalAddressEntity.js +61 -60
- package/dist/entities/contact/PhysicalAddressEntity.js.map +1 -1
- package/dist/entities/digitalCredential/DigitalCredentialEntity.js +63 -38
- package/dist/entities/digitalCredential/DigitalCredentialEntity.js.map +1 -1
- package/dist/entities/eventLogger/AuditEventEntity.js +60 -37
- package/dist/entities/eventLogger/AuditEventEntity.js.map +1 -1
- package/dist/entities/issuanceBranding/BackgroundAttributesEntity.js +25 -36
- package/dist/entities/issuanceBranding/BackgroundAttributesEntity.js.map +1 -1
- package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.js +48 -53
- package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.js.map +1 -1
- package/dist/entities/issuanceBranding/CredentialBrandingEntity.js +35 -43
- package/dist/entities/issuanceBranding/CredentialBrandingEntity.js.map +1 -1
- package/dist/entities/issuanceBranding/CredentialClaimsEntity.js +28 -38
- package/dist/entities/issuanceBranding/CredentialClaimsEntity.js.map +1 -1
- package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.js +18 -18
- package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.js.map +1 -1
- package/dist/entities/issuanceBranding/ImageAttributesEntity.js +34 -42
- package/dist/entities/issuanceBranding/ImageAttributesEntity.js.map +1 -1
- package/dist/entities/issuanceBranding/ImageDimensionsEntity.js +11 -11
- package/dist/entities/issuanceBranding/ImageDimensionsEntity.js.map +1 -1
- package/dist/entities/issuanceBranding/IssuerBrandingEntity.js +31 -40
- package/dist/entities/issuanceBranding/IssuerBrandingEntity.js.map +1 -1
- package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.js +27 -24
- package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.js.map +1 -1
- package/dist/entities/issuanceBranding/TextAttributesEntity.js +20 -32
- package/dist/entities/issuanceBranding/TextAttributesEntity.js.map +1 -1
- package/dist/entities/machineState/MachineStateInfoEntity.js +31 -21
- package/dist/entities/machineState/MachineStateInfoEntity.js.map +1 -1
- package/dist/entities/oid4vcState/Oid4vcStateEntity.js +24 -18
- package/dist/entities/oid4vcState/Oid4vcStateEntity.js.map +1 -1
- package/dist/entities/presentationDefinition/PresentationDefinitionItemEntity.js +34 -27
- package/dist/entities/presentationDefinition/PresentationDefinitionItemEntity.js.map +1 -1
- package/dist/entities/statusList/StatusList2021EntryEntity.js +26 -22
- package/dist/entities/statusList/StatusList2021EntryEntity.js.map +1 -1
- package/dist/entities/statusList/StatusListEntities.js +48 -39
- package/dist/entities/statusList/StatusListEntities.js.map +1 -1
- package/dist/entities/validators/index.js +6 -10
- package/dist/entities/validators/index.js.map +1 -1
- package/dist/eventLogger/AbstractEventLoggerStore.js +1 -5
- package/dist/eventLogger/AbstractEventLoggerStore.js.map +1 -1
- package/dist/eventLogger/EventLoggerStore.js +50 -65
- package/dist/eventLogger/EventLoggerStore.js.map +1 -1
- package/dist/index.js +96 -163
- package/dist/index.js.map +1 -1
- package/dist/issuanceBranding/AbstractIssuanceBrandingStore.js +1 -5
- package/dist/issuanceBranding/AbstractIssuanceBrandingStore.js.map +1 -1
- package/dist/issuanceBranding/IssuanceBrandingStore.js +331 -333
- package/dist/issuanceBranding/IssuanceBrandingStore.js.map +1 -1
- package/dist/machineState/IAbstractMachineStateStore.js +1 -5
- package/dist/machineState/IAbstractMachineStateStore.js.map +1 -1
- package/dist/machineState/MachineStateStore.js +102 -122
- package/dist/machineState/MachineStateStore.js.map +1 -1
- package/dist/migrations/generic/1-CreateContacts.js +50 -72
- package/dist/migrations/generic/1-CreateContacts.js.map +1 -1
- package/dist/migrations/generic/10-CreatePresentationDefinitions.js +50 -72
- package/dist/migrations/generic/10-CreatePresentationDefinitions.js.map +1 -1
- package/dist/migrations/generic/11-FixCredentialClaimsReferenceUuid.js +52 -74
- package/dist/migrations/generic/11-FixCredentialClaimsReferenceUuid.js.map +1 -1
- package/dist/migrations/generic/2-CreateIssuanceBranding.js +50 -72
- package/dist/migrations/generic/2-CreateIssuanceBranding.js.map +1 -1
- package/dist/migrations/generic/3-CreateContacts.js +50 -72
- package/dist/migrations/generic/3-CreateContacts.js.map +1 -1
- package/dist/migrations/generic/4-CreateStatusList.js +56 -78
- package/dist/migrations/generic/4-CreateStatusList.js.map +1 -1
- package/dist/migrations/generic/5-CreateAuditEvents.js +50 -72
- package/dist/migrations/generic/5-CreateAuditEvents.js.map +1 -1
- package/dist/migrations/generic/6-CreateDigitalCredential.js +50 -72
- package/dist/migrations/generic/6-CreateDigitalCredential.js.map +1 -1
- package/dist/migrations/generic/7-CreateMachineStateStore.js +50 -72
- package/dist/migrations/generic/7-CreateMachineStateStore.js.map +1 -1
- package/dist/migrations/generic/8-CreateContacts.js +50 -72
- package/dist/migrations/generic/8-CreateContacts.js.map +1 -1
- package/dist/migrations/generic/9-CreateContacts.js +50 -72
- package/dist/migrations/generic/9-CreateContacts.js.map +1 -1
- package/dist/migrations/generic/index.js +30 -33
- package/dist/migrations/generic/index.js.map +1 -1
- package/dist/migrations/index.js +1 -12
- package/dist/migrations/index.js.map +1 -1
- package/dist/migrations/internal-migrations-ormconfig.js +6 -8
- package/dist/migrations/internal-migrations-ormconfig.js.map +1 -1
- package/dist/migrations/postgres/1659463079428-CreateContacts.js +34 -53
- package/dist/migrations/postgres/1659463079428-CreateContacts.js.map +1 -1
- package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.js +50 -69
- package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.js.map +1 -1
- package/dist/migrations/postgres/1690925872592-CreateContacts.js +87 -106
- package/dist/migrations/postgres/1690925872592-CreateContacts.js.map +1 -1
- package/dist/migrations/postgres/1693866470001-CreateStatusList.js +16 -35
- package/dist/migrations/postgres/1693866470001-CreateStatusList.js.map +1 -1
- package/dist/migrations/postgres/1701634812183-CreateAuditEvents.js +22 -41
- package/dist/migrations/postgres/1701634812183-CreateAuditEvents.js.map +1 -1
- package/dist/migrations/postgres/1708525189001-CreateDigitalCredential.js +19 -38
- package/dist/migrations/postgres/1708525189001-CreateDigitalCredential.js.map +1 -1
- package/dist/migrations/postgres/1708797018115-CreateMachineStateStore.js +6 -25
- package/dist/migrations/postgres/1708797018115-CreateMachineStateStore.js.map +1 -1
- package/dist/migrations/postgres/1710438363001-CreateContacts.js +40 -59
- package/dist/migrations/postgres/1710438363001-CreateContacts.js.map +1 -1
- package/dist/migrations/postgres/1715761125001-CreateContacts.js +18 -37
- package/dist/migrations/postgres/1715761125001-CreateContacts.js.map +1 -1
- package/dist/migrations/postgres/1716475165345-CreatePresentationDefinitions.js +6 -25
- package/dist/migrations/postgres/1716475165345-CreatePresentationDefinitions.js.map +1 -1
- package/dist/migrations/postgres/1737110469001-UpdateStatusList.js +16 -35
- package/dist/migrations/postgres/1737110469001-UpdateStatusList.js.map +1 -1
- package/dist/migrations/postgres/1741895822987-FixCredentialClaimsReferencesUuid.js +8 -27
- package/dist/migrations/postgres/1741895822987-FixCredentialClaimsReferencesUuid.js.map +1 -1
- package/dist/migrations/sqlite/1659463069549-CreateContacts.js +56 -75
- package/dist/migrations/sqlite/1659463069549-CreateContacts.js.map +1 -1
- package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.js +70 -89
- package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.js.map +1 -1
- package/dist/migrations/sqlite/1690925872693-CreateContacts.js +120 -139
- package/dist/migrations/sqlite/1690925872693-CreateContacts.js.map +1 -1
- package/dist/migrations/sqlite/1693866470000-CreateStatusList.js +12 -31
- package/dist/migrations/sqlite/1693866470000-CreateStatusList.js.map +1 -1
- package/dist/migrations/sqlite/1701634819487-CreateAuditEvents.js +6 -25
- package/dist/migrations/sqlite/1701634819487-CreateAuditEvents.js.map +1 -1
- package/dist/migrations/sqlite/1708525189002-CreateDigitalCredential.js +7 -26
- package/dist/migrations/sqlite/1708525189002-CreateDigitalCredential.js.map +1 -1
- package/dist/migrations/sqlite/1708796002272-CreateMachineStateStore.js +6 -25
- package/dist/migrations/sqlite/1708796002272-CreateMachineStateStore.js.map +1 -1
- package/dist/migrations/sqlite/1710438363002-CreateContacts.js +43 -62
- package/dist/migrations/sqlite/1710438363002-CreateContacts.js.map +1 -1
- package/dist/migrations/sqlite/1715761125002-CreateContacts.js +18 -37
- package/dist/migrations/sqlite/1715761125002-CreateContacts.js.map +1 -1
- package/dist/migrations/sqlite/1716475165344-CreatePresentationDefinitions.js +6 -25
- package/dist/migrations/sqlite/1716475165344-CreatePresentationDefinitions.js.map +1 -1
- package/dist/migrations/sqlite/1737110469000-UpdateStatusList.js +20 -39
- package/dist/migrations/sqlite/1737110469000-UpdateStatusList.js.map +1 -1
- package/dist/migrations/sqlite/1741895822987-FixCredentialClaimsReferencesUuid.js +25 -44
- package/dist/migrations/sqlite/1741895822987-FixCredentialClaimsReferencesUuid.js.map +1 -1
- package/dist/presentationDefinition/AbstractPDStore.js +1 -5
- package/dist/presentationDefinition/AbstractPDStore.js.map +1 -1
- package/dist/presentationDefinition/PDStore.js +114 -123
- package/dist/presentationDefinition/PDStore.js.map +1 -1
- package/dist/statusList/IStatusListStore.js +1 -2
- package/dist/statusList/StatusListStore.js +196 -225
- package/dist/statusList/StatusListStore.js.map +1 -1
- package/dist/types/contact/IAbstractContactStore.js +1 -2
- package/dist/types/contact/contact.js +10 -13
- package/dist/types/contact/contact.js.map +1 -1
- package/dist/types/digitalCredential/IAbstractDigitalCredentialStore.js +1 -2
- package/dist/types/digitalCredential/digitalCredential.js +13 -16
- package/dist/types/digitalCredential/digitalCredential.js.map +1 -1
- package/dist/types/eventLogger/IAbstractEventLoggerStore.js +1 -2
- package/dist/types/eventLogger/eventLogger.js +1 -2
- package/dist/types/index.js +14 -30
- package/dist/types/index.js.map +1 -1
- package/dist/types/issuanceBranding/IAbstractIssuanceBrandingStore.js +1 -2
- package/dist/types/issuanceBranding/issuanceBranding.js +1 -2
- package/dist/types/machineState/IAbstractMachineStateStore.js +1 -2
- package/dist/types/presentationDefinition/IAbstractPDStore.js +1 -2
- package/dist/types/presentationDefinition/presentationDefinition.js +1 -2
- package/dist/types/statusList/IAbstractStatusListStore.js +1 -2
- package/dist/types/statusList/statusList.js +1 -2
- package/dist/types/validation/validation.js +1 -2
- package/dist/utils/FormattingUtils.js +3 -7
- package/dist/utils/FormattingUtils.js.map +1 -1
- package/dist/utils/SortingUtils.js +1 -5
- package/dist/utils/SortingUtils.js.map +1 -1
- package/dist/utils/ValidatorUtils.js +2 -6
- package/dist/utils/ValidatorUtils.js.map +1 -1
- package/dist/utils/contact/MappingUtils.js +124 -150
- package/dist/utils/contact/MappingUtils.js.map +1 -1
- package/dist/utils/digitalCredential/MappingUtils.js +50 -47
- package/dist/utils/digitalCredential/MappingUtils.js.map +1 -1
- package/dist/utils/eventLogger/MappingUtils.js +60 -22
- package/dist/utils/eventLogger/MappingUtils.js.map +1 -1
- package/dist/utils/issuanceBranding/MappingUtils.js +71 -77
- package/dist/utils/issuanceBranding/MappingUtils.js.map +1 -1
- package/dist/utils/presentationDefinition/MappingUtils.js +9 -15
- package/dist/utils/presentationDefinition/MappingUtils.js.map +1 -1
- package/dist/utils/statusList/MappingUtils.js +27 -22
- package/dist/utils/statusList/MappingUtils.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,78 +1,56 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
debug('migration: updating contact tables');
|
|
27
|
-
const dbType = queryRunner.connection.driver.options.type;
|
|
28
|
-
switch (dbType) {
|
|
29
|
-
case 'postgres': {
|
|
30
|
-
debug('using postgres migration file');
|
|
31
|
-
const mig = new _1710438363001_CreateContacts_1.CreateContacts1710438363001();
|
|
32
|
-
yield mig.up(queryRunner);
|
|
33
|
-
debug('Migration statements executed');
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
case 'sqlite':
|
|
37
|
-
case 'expo':
|
|
38
|
-
case 'react-native': {
|
|
39
|
-
debug('using sqlite/react-native migration file');
|
|
40
|
-
const mig = new _1710438363002_CreateContacts_1.CreateContacts1710438363002();
|
|
41
|
-
yield mig.up(queryRunner);
|
|
42
|
-
debug('Migration statements executed');
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
default:
|
|
46
|
-
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
1
|
+
import Debug from 'debug';
|
|
2
|
+
import { CreateContacts1710438363001 } from '../postgres/1710438363001-CreateContacts';
|
|
3
|
+
import { CreateContacts1710438363002 } from '../sqlite/1710438363002-CreateContacts';
|
|
4
|
+
const debug = Debug('sphereon:ssi-sdk:migrations');
|
|
5
|
+
export class CreateContacts1708525189000 {
|
|
6
|
+
name = 'CreateContacts1708525189000';
|
|
7
|
+
async up(queryRunner) {
|
|
8
|
+
debug('migration: updating contact tables');
|
|
9
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
10
|
+
switch (dbType) {
|
|
11
|
+
case 'postgres': {
|
|
12
|
+
debug('using postgres migration file');
|
|
13
|
+
const mig = new CreateContacts1710438363001();
|
|
14
|
+
await mig.up(queryRunner);
|
|
15
|
+
debug('Migration statements executed');
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
case 'sqlite':
|
|
19
|
+
case 'expo':
|
|
20
|
+
case 'react-native': {
|
|
21
|
+
debug('using sqlite/react-native migration file');
|
|
22
|
+
const mig = new CreateContacts1710438363002();
|
|
23
|
+
await mig.up(queryRunner);
|
|
24
|
+
debug('Migration statements executed');
|
|
25
|
+
return;
|
|
47
26
|
}
|
|
48
|
-
|
|
27
|
+
default:
|
|
28
|
+
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
29
|
+
}
|
|
49
30
|
}
|
|
50
|
-
down(queryRunner) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
default:
|
|
72
|
-
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
31
|
+
async down(queryRunner) {
|
|
32
|
+
debug('migration: reverting machine state tables');
|
|
33
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
34
|
+
switch (dbType) {
|
|
35
|
+
case 'postgres': {
|
|
36
|
+
debug('using postgres migration file');
|
|
37
|
+
const mig = new CreateContacts1710438363001();
|
|
38
|
+
await mig.down(queryRunner);
|
|
39
|
+
debug('Migration statements executed');
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
case 'sqlite':
|
|
43
|
+
case 'expo':
|
|
44
|
+
case 'react-native': {
|
|
45
|
+
debug('using sqlite/react-native migration file');
|
|
46
|
+
const mig = new CreateContacts1710438363002();
|
|
47
|
+
await mig.down(queryRunner);
|
|
48
|
+
debug('Migration statements executed');
|
|
49
|
+
return;
|
|
73
50
|
}
|
|
74
|
-
|
|
51
|
+
default:
|
|
52
|
+
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
53
|
+
}
|
|
75
54
|
}
|
|
76
55
|
}
|
|
77
|
-
exports.CreateContacts1708525189000 = CreateContacts1708525189000;
|
|
78
56
|
//# sourceMappingURL=8-CreateContacts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"8-CreateContacts.js","sourceRoot":"","sources":["../../../src/migrations/generic/8-CreateContacts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"8-CreateContacts.js","sourceRoot":"","sources":["../../../src/migrations/generic/8-CreateContacts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAA;AACtF,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAA;AAEpF,MAAM,KAAK,GAAmB,KAAK,CAAC,6BAA6B,CAAC,CAAA;AAElE,MAAM,OAAO,2BAA2B;IACtC,IAAI,GAAG,6BAA6B,CAAA;IAE7B,KAAK,CAAC,EAAE,CAAC,WAAwB;QACtC,KAAK,CAAC,oCAAoC,CAAC,CAAA;QAC3C,MAAM,MAAM,GAAiB,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAA;QAEvE,QAAQ,MAAM,EAAE,CAAC;YACf,KAAK,UAAU,CAAC,CAAC,CAAC;gBAChB,KAAK,CAAC,+BAA+B,CAAC,CAAA;gBACtC,MAAM,GAAG,GAAgC,IAAI,2BAA2B,EAAE,CAAA;gBAC1E,MAAM,GAAG,CAAC,EAAE,CAAC,WAAW,CAAC,CAAA;gBACzB,KAAK,CAAC,+BAA+B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G,CAClN,CAAA;QACL,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,78 +1,56 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
debug('migration: updating contact tables');
|
|
27
|
-
const dbType = queryRunner.connection.driver.options.type;
|
|
28
|
-
switch (dbType) {
|
|
29
|
-
case 'postgres': {
|
|
30
|
-
debug('using postgres migration file');
|
|
31
|
-
const mig = new _1715761125001_CreateContacts_1.CreateContacts1715761125001();
|
|
32
|
-
yield mig.up(queryRunner);
|
|
33
|
-
debug('Migration statements executed');
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
case 'sqlite':
|
|
37
|
-
case 'expo':
|
|
38
|
-
case 'react-native': {
|
|
39
|
-
debug('using sqlite/react-native migration file');
|
|
40
|
-
const mig = new _1715761125002_CreateContacts_1.CreateContacts1715761125002();
|
|
41
|
-
yield mig.up(queryRunner);
|
|
42
|
-
debug('Migration statements executed');
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
default:
|
|
46
|
-
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
1
|
+
import Debug from 'debug';
|
|
2
|
+
import { CreateContacts1715761125001 } from '../postgres/1715761125001-CreateContacts';
|
|
3
|
+
import { CreateContacts1715761125002 } from '../sqlite/1715761125002-CreateContacts';
|
|
4
|
+
const debug = Debug('sphereon:ssi-sdk:migrations');
|
|
5
|
+
export class CreateContacts1715761125000 {
|
|
6
|
+
name = 'CreateContacts1715761125000';
|
|
7
|
+
async up(queryRunner) {
|
|
8
|
+
debug('migration: updating contact tables');
|
|
9
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
10
|
+
switch (dbType) {
|
|
11
|
+
case 'postgres': {
|
|
12
|
+
debug('using postgres migration file');
|
|
13
|
+
const mig = new CreateContacts1715761125001();
|
|
14
|
+
await mig.up(queryRunner);
|
|
15
|
+
debug('Migration statements executed');
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
case 'sqlite':
|
|
19
|
+
case 'expo':
|
|
20
|
+
case 'react-native': {
|
|
21
|
+
debug('using sqlite/react-native migration file');
|
|
22
|
+
const mig = new CreateContacts1715761125002();
|
|
23
|
+
await mig.up(queryRunner);
|
|
24
|
+
debug('Migration statements executed');
|
|
25
|
+
return;
|
|
47
26
|
}
|
|
48
|
-
|
|
27
|
+
default:
|
|
28
|
+
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
29
|
+
}
|
|
49
30
|
}
|
|
50
|
-
down(queryRunner) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
default:
|
|
72
|
-
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
31
|
+
async down(queryRunner) {
|
|
32
|
+
debug('migration: reverting machine state tables');
|
|
33
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
34
|
+
switch (dbType) {
|
|
35
|
+
case 'postgres': {
|
|
36
|
+
debug('using postgres migration file');
|
|
37
|
+
const mig = new CreateContacts1715761125001();
|
|
38
|
+
await mig.down(queryRunner);
|
|
39
|
+
debug('Migration statements executed');
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
case 'sqlite':
|
|
43
|
+
case 'expo':
|
|
44
|
+
case 'react-native': {
|
|
45
|
+
debug('using sqlite/react-native migration file');
|
|
46
|
+
const mig = new CreateContacts1715761125002();
|
|
47
|
+
await mig.down(queryRunner);
|
|
48
|
+
debug('Migration statements executed');
|
|
49
|
+
return;
|
|
73
50
|
}
|
|
74
|
-
|
|
51
|
+
default:
|
|
52
|
+
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
53
|
+
}
|
|
75
54
|
}
|
|
76
55
|
}
|
|
77
|
-
exports.CreateContacts1715761125000 = CreateContacts1715761125000;
|
|
78
56
|
//# sourceMappingURL=9-CreateContacts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"9-CreateContacts.js","sourceRoot":"","sources":["../../../src/migrations/generic/9-CreateContacts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"9-CreateContacts.js","sourceRoot":"","sources":["../../../src/migrations/generic/9-CreateContacts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAA;AACtF,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAA;AAEpF,MAAM,KAAK,GAAmB,KAAK,CAAC,6BAA6B,CAAC,CAAA;AAElE,MAAM,OAAO,2BAA2B;IACtC,IAAI,GAAG,6BAA6B,CAAA;IAE7B,KAAK,CAAC,EAAE,CAAC,WAAwB;QACtC,KAAK,CAAC,oCAAoC,CAAC,CAAA;QAC3C,MAAM,MAAM,GAAiB,WAAW,CAAC,UAAU,CAAC,MAA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gBACpB,KAAK,CAAC,0CAA0C,CAAC,CAAA;gBACjD,MAAM,GAAG,GAAgC,IAAI,2BAA2B,EAAE,CAAA;gBAC1E,MAAM,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;gBAC3B,KAAK,CAAC,+BAA+B,CAAC,CAAA;gBACtC,OAAM;YACR,CAAC;YACD;gBACE,OAAO,OAAO,CAAC,MAAM,CACnB,4FAA4F,MAAM,+GAA+G,CAClN,CAAA;QACL,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const _9_CreateContacts_1 = require("./9-CreateContacts");
|
|
13
|
-
const _10_CreatePresentationDefinitions_1 = require("./10-CreatePresentationDefinitions");
|
|
14
|
-
const _11_FixCredentialClaimsReferenceUuid_1 = require("./11-FixCredentialClaimsReferenceUuid");
|
|
1
|
+
import { CreateContacts1659463079429 } from './1-CreateContacts';
|
|
2
|
+
import { CreateIssuanceBranding1659463079429 } from './2-CreateIssuanceBranding';
|
|
3
|
+
import { CreateContacts1690925872318 } from './3-CreateContacts';
|
|
4
|
+
import { CreateStatusList1693866470000 } from './4-CreateStatusList';
|
|
5
|
+
import { CreateAuditEvents1701635835330 } from './5-CreateAuditEvents';
|
|
6
|
+
import { CreateDigitalCredential1708525189000 } from './6-CreateDigitalCredential';
|
|
7
|
+
import { CreateMachineStateStore1708098041262 } from './7-CreateMachineStateStore';
|
|
8
|
+
import { CreateContacts1708525189000 } from './8-CreateContacts';
|
|
9
|
+
import { CreateContacts1715761125000 } from './9-CreateContacts';
|
|
10
|
+
import { CreatePresentationDefinitions1716533767523 } from './10-CreatePresentationDefinitions';
|
|
11
|
+
import { FixCredentialClaimsReferencesUuid1741895822987 } from './11-FixCredentialClaimsReferenceUuid';
|
|
15
12
|
/**
|
|
16
13
|
* The migrations array that SHOULD be used when initializing a TypeORM database connection.
|
|
17
14
|
*
|
|
@@ -20,26 +17,26 @@ const _11_FixCredentialClaimsReferenceUuid_1 = require("./11-FixCredentialClaims
|
|
|
20
17
|
* @public
|
|
21
18
|
*/
|
|
22
19
|
// Individual migrations per purpose. Allows parties to not run migrations and thus create/update tables if they are not using a particular feature (yet)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
export const DataStoreContactMigrations = [
|
|
21
|
+
CreateContacts1659463079429,
|
|
22
|
+
CreateContacts1690925872318,
|
|
23
|
+
CreateContacts1708525189000,
|
|
24
|
+
CreateContacts1715761125000,
|
|
28
25
|
];
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
export const DataStoreIssuanceBrandingMigrations = [CreateIssuanceBranding1659463079429, FixCredentialClaimsReferencesUuid1741895822987];
|
|
27
|
+
export const DataStoreStatusListMigrations = [CreateStatusList1693866470000];
|
|
28
|
+
export const DataStoreEventLoggerMigrations = [CreateAuditEvents1701635835330];
|
|
29
|
+
export const DataStoreDigitalCredentialMigrations = [CreateDigitalCredential1708525189000];
|
|
30
|
+
export const DataStoreMachineStateMigrations = [CreateMachineStateStore1708098041262];
|
|
31
|
+
export const DataStorePresentationDefinitionMigrations = [CreatePresentationDefinitions1716533767523];
|
|
35
32
|
// All migrations together
|
|
36
|
-
|
|
37
|
-
...
|
|
38
|
-
...
|
|
39
|
-
...
|
|
40
|
-
...
|
|
41
|
-
...
|
|
42
|
-
...
|
|
43
|
-
...
|
|
33
|
+
export const DataStoreMigrations = [
|
|
34
|
+
...DataStoreContactMigrations,
|
|
35
|
+
...DataStoreIssuanceBrandingMigrations,
|
|
36
|
+
...DataStoreStatusListMigrations,
|
|
37
|
+
...DataStoreEventLoggerMigrations,
|
|
38
|
+
...DataStoreDigitalCredentialMigrations,
|
|
39
|
+
...DataStoreMachineStateMigrations,
|
|
40
|
+
...DataStorePresentationDefinitionMigrations,
|
|
44
41
|
];
|
|
45
42
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/migrations/generic/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/migrations/generic/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAA;AAChE,OAAO,EAAE,mCAAmC,EAAE,MAAM,4BAA4B,CAAA;AAChF,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAA;AAChE,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAA;AACpE,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAA;AACtE,OAAO,EAAE,oCAAoC,EAAE,MAAM,6BAA6B,CAAA;AAClF,OAAO,EAAE,oCAAoC,EAAE,MAAM,6BAA6B,CAAA;AAClF,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAA;AAChE,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAA;AAChE,OAAO,EAAE,0CAA0C,EAAE,MAAM,oCAAoC,CAAA;AAC/F,OAAO,EAAE,8CAA8C,EAAE,MAAM,uCAAuC,CAAA;AAEtG;;;;;;GAMG;AAEH,yJAAyJ;AACzJ,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,2BAA2B;IAC3B,2BAA2B;IAC3B,2BAA2B;IAC3B,2BAA2B;CAC5B,CAAA;AACD,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,mCAAmC,EAAE,8CAA8C,CAAC,CAAA;AACxI,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,6BAA6B,CAAC,CAAA;AAC5E,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,8BAA8B,CAAC,CAAA;AAC9E,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,oCAAoC,CAAC,CAAA;AAC1F,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,oCAAoC,CAAC,CAAA;AACrF,MAAM,CAAC,MAAM,yCAAyC,GAAG,CAAC,0CAA0C,CAAC,CAAA;AAErG,0BAA0B;AAC1B,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,GAAG,0BAA0B;IAC7B,GAAG,mCAAmC;IACtC,GAAG,6BAA6B;IAChC,GAAG,8BAA8B;IACjC,GAAG,oCAAoC;IACvC,GAAG,+BAA+B;IAClC,GAAG,yCAAyC;CAC7C,CAAA"}
|
package/dist/migrations/index.js
CHANGED
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DataStorePresentationDefinitionMigrations = exports.DataStoreMachineStateMigrations = exports.DataStoreDigitalCredentialMigrations = exports.DataStoreStatusListMigrations = exports.DataStoreIssuanceBrandingMigrations = exports.DataStoreContactMigrations = exports.DataStoreEventLoggerMigrations = exports.DataStoreMigrations = void 0;
|
|
4
|
-
var generic_1 = require("./generic");
|
|
5
|
-
Object.defineProperty(exports, "DataStoreMigrations", { enumerable: true, get: function () { return generic_1.DataStoreMigrations; } });
|
|
6
|
-
Object.defineProperty(exports, "DataStoreEventLoggerMigrations", { enumerable: true, get: function () { return generic_1.DataStoreEventLoggerMigrations; } });
|
|
7
|
-
Object.defineProperty(exports, "DataStoreContactMigrations", { enumerable: true, get: function () { return generic_1.DataStoreContactMigrations; } });
|
|
8
|
-
Object.defineProperty(exports, "DataStoreIssuanceBrandingMigrations", { enumerable: true, get: function () { return generic_1.DataStoreIssuanceBrandingMigrations; } });
|
|
9
|
-
Object.defineProperty(exports, "DataStoreStatusListMigrations", { enumerable: true, get: function () { return generic_1.DataStoreStatusListMigrations; } });
|
|
10
|
-
Object.defineProperty(exports, "DataStoreDigitalCredentialMigrations", { enumerable: true, get: function () { return generic_1.DataStoreDigitalCredentialMigrations; } });
|
|
11
|
-
Object.defineProperty(exports, "DataStoreMachineStateMigrations", { enumerable: true, get: function () { return generic_1.DataStoreMachineStateMigrations; } });
|
|
12
|
-
Object.defineProperty(exports, "DataStorePresentationDefinitionMigrations", { enumerable: true, get: function () { return generic_1.DataStorePresentationDefinitionMigrations; } });
|
|
1
|
+
export { DataStoreMigrations, DataStoreEventLoggerMigrations, DataStoreContactMigrations, DataStoreIssuanceBrandingMigrations, DataStoreStatusListMigrations, DataStoreDigitalCredentialMigrations, DataStoreMachineStateMigrations, DataStorePresentationDefinitionMigrations, } from './generic';
|
|
13
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,8BAA8B,EAC9B,0BAA0B,EAC1B,mCAAmC,EACnC,6BAA6B,EAC7B,oCAAoC,EACpC,+BAA+B,EAC/B,yCAAyC,GAC1C,MAAM,WAAW,CAAA"}
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const index_1 = require("../index");
|
|
1
|
+
import { DataStoreContactEntities, DataStoreMigrations } from '../index';
|
|
4
2
|
/**
|
|
5
3
|
* Do Not use these connections in production!. They are only here to create/test migration files!
|
|
6
4
|
*/
|
|
7
|
-
|
|
5
|
+
export default [
|
|
8
6
|
{
|
|
9
7
|
type: 'sqlite',
|
|
10
8
|
database: 'migration.sqlite',
|
|
11
9
|
migrationsRun: false,
|
|
12
10
|
synchronize: false,
|
|
13
11
|
logging: ['error', 'info', 'warn', 'log'],
|
|
14
|
-
entities: [...
|
|
15
|
-
migrations: [...
|
|
12
|
+
entities: [...DataStoreContactEntities],
|
|
13
|
+
migrations: [...DataStoreMigrations],
|
|
16
14
|
},
|
|
17
15
|
{
|
|
18
16
|
type: 'postgres',
|
|
@@ -20,8 +18,8 @@ exports.default = [
|
|
|
20
18
|
migrationsRun: false,
|
|
21
19
|
synchronize: false,
|
|
22
20
|
logging: ['error', 'info', 'warn', 'log'],
|
|
23
|
-
entities: [...
|
|
24
|
-
migrations: [...
|
|
21
|
+
entities: [...DataStoreContactEntities],
|
|
22
|
+
migrations: [...DataStoreMigrations],
|
|
25
23
|
},
|
|
26
24
|
];
|
|
27
25
|
//# sourceMappingURL=internal-migrations-ormconfig.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-migrations-ormconfig.js","sourceRoot":"","sources":["../../src/migrations/internal-migrations-ormconfig.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"internal-migrations-ormconfig.js","sourceRoot":"","sources":["../../src/migrations/internal-migrations-ormconfig.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAExE;;GAEG;AACH,eAAe;IACb;QACE,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,kBAAkB;QAC5B,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC;QACzC,QAAQ,EAAE,CAAC,GAAG,wBAAwB,CAAC;QACvC,UAAU,EAAE,CAAC,GAAG,mBAAmB,CAAC;KACrC;IACD;QACE,IAAI,EAAE,UAAU;QAChB,QAAQ,EAAE,oBAAoB;QAC9B,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC;QACzC,QAAQ,EAAE,CAAC,GAAG,wBAAwB,CAAC;QACvC,UAAU,EAAE,CAAC,GAAG,mBAAmB,CAAC;KACrC;CACqB,CAAA"}
|
|
@@ -1,57 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { enablePostgresUuidExtension } from '@sphereon/ssi-sdk.core';
|
|
2
|
+
export class CreateContacts1659463079428 {
|
|
3
|
+
name = 'CreateContacts1659463079428';
|
|
4
|
+
async up(queryRunner) {
|
|
5
|
+
await enablePostgresUuidExtension(queryRunner);
|
|
6
|
+
await queryRunner.query(`CREATE TABLE "BaseConfigEntity" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "client_id" character varying(255), "client_secret" character varying(255), "scopes" text, "issuer" character varying(255), "redirect_url" text, "dangerously_allow_insecure_http_requests" boolean, "client_auth_method" text, "identifier" character varying(255), "session_id" character varying(255), "type" character varying NOT NULL, "connectionId" uuid, CONSTRAINT "REL_BaseConfig_connectionId" UNIQUE ("connectionId"), CONSTRAINT "PK_BaseConfigEntity_id" PRIMARY KEY ("id"))`);
|
|
7
|
+
await queryRunner.query(`CREATE INDEX "IDX_BaseConfigEntity_type" ON "BaseConfigEntity" ("type")`);
|
|
8
|
+
await queryRunner.query(`CREATE TYPE "public"."CorrelationIdentifier_type_enum" AS ENUM('did', 'url')`);
|
|
9
|
+
await queryRunner.query(`CREATE TABLE "CorrelationIdentifier" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "type" "public"."CorrelationIdentifier_type_enum" NOT NULL, "correlation_id" text NOT NULL, "identityId" uuid, CONSTRAINT "UQ_Correlation_id" UNIQUE ("correlation_id"), CONSTRAINT "REL_CorrelationIdentifier_identityId" UNIQUE ("identityId"), CONSTRAINT "PK_CorrelationIdentifier_id" PRIMARY KEY ("id"))`);
|
|
10
|
+
await queryRunner.query(`CREATE TABLE "Contact" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "name" character varying(255) NOT NULL, "alias" character varying(255) NOT NULL, "uri" character varying(255) NOT NULL, "created_at" TIMESTAMP NOT NULL DEFAULT now(), "last_updated_at" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "UQ_Name" UNIQUE ("name"), CONSTRAINT "UQ_Contact_Alias" UNIQUE ("alias"), CONSTRAINT "PK_Contact_id" PRIMARY KEY ("id"))`);
|
|
11
|
+
await queryRunner.query(`CREATE TABLE "IdentityMetadata" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "label" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "identityId" uuid, CONSTRAINT "PK_IdentityMetadata_id" PRIMARY KEY ("id"))`);
|
|
12
|
+
await queryRunner.query(`CREATE TABLE "Identity" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "alias" character varying(255) NOT NULL, "roles" text, "created_at" TIMESTAMP NOT NULL DEFAULT now(), "last_updated_at" TIMESTAMP NOT NULL DEFAULT now(), "contactId" uuid, CONSTRAINT "UQ_Identity_Alias" UNIQUE ("alias"), CONSTRAINT "PK_Identity_id" PRIMARY KEY ("id"))`);
|
|
13
|
+
await queryRunner.query(`CREATE TYPE "public"."Connection_type_enum" AS ENUM('OIDC', 'SIOPv2', 'SIOPv2+OpenID4VP')`);
|
|
14
|
+
await queryRunner.query(`CREATE TABLE "Connection" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "type" "public"."Connection_type_enum" NOT NULL, "identityId" uuid, CONSTRAINT "REL_Connection_identityId" UNIQUE ("identityId"), CONSTRAINT "PK_Connection_id" PRIMARY KEY ("id"))`);
|
|
15
|
+
await queryRunner.query(`ALTER TABLE "BaseConfigEntity" ADD CONSTRAINT "FK_BaseConfig_connectionId" FOREIGN KEY ("connectionId") REFERENCES "Connection"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE "CorrelationIdentifier" ADD CONSTRAINT "FK_CorrelationIdentifier_identityId" FOREIGN KEY ("identityId") REFERENCES "Identity"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
17
|
+
await queryRunner.query(`ALTER TABLE "IdentityMetadata" ADD CONSTRAINT "FK_IdentityMetadata_identityId" FOREIGN KEY ("identityId") REFERENCES "Identity"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
18
|
+
await queryRunner.query(`ALTER TABLE "Identity" ADD CONSTRAINT "FK_Identity_contactId" FOREIGN KEY ("contactId") REFERENCES "Contact"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
19
|
+
await queryRunner.query(`ALTER TABLE "Connection" ADD CONSTRAINT "FK_Connection_identityId" FOREIGN KEY ("identityId") REFERENCES "Identity"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
17
20
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
yield queryRunner.query(`ALTER TABLE "Identity" ADD CONSTRAINT "FK_Identity_contactId" FOREIGN KEY ("contactId") REFERENCES "Contact"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
34
|
-
yield queryRunner.query(`ALTER TABLE "Connection" ADD CONSTRAINT "FK_Connection_identityId" FOREIGN KEY ("identityId") REFERENCES "Identity"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
down(queryRunner) {
|
|
38
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
yield queryRunner.query(`ALTER TABLE "Connection" DROP CONSTRAINT "FK_Connection_identityId"`);
|
|
40
|
-
yield queryRunner.query(`ALTER TABLE "Identity" DROP CONSTRAINT "FK_Identity_contactId"`);
|
|
41
|
-
yield queryRunner.query(`ALTER TABLE "IdentityMetadata" DROP CONSTRAINT "FK_IdentityMetadata_identityId"`);
|
|
42
|
-
yield queryRunner.query(`ALTER TABLE "CorrelationIdentifier" DROP CONSTRAINT "FK_CorrelationIdentifier_identityId"`);
|
|
43
|
-
yield queryRunner.query(`ALTER TABLE "BaseConfigEntity" DROP CONSTRAINT "FK_BaseConfig_connectionId"`);
|
|
44
|
-
yield queryRunner.query(`DROP TABLE "Connection"`);
|
|
45
|
-
yield queryRunner.query(`DROP TYPE "public"."Connection_type_enum"`);
|
|
46
|
-
yield queryRunner.query(`DROP TABLE "Identity"`);
|
|
47
|
-
yield queryRunner.query(`DROP TABLE "IdentityMetadata"`);
|
|
48
|
-
yield queryRunner.query(`DROP TABLE "Contact"`);
|
|
49
|
-
yield queryRunner.query(`DROP TABLE "CorrelationIdentifier"`);
|
|
50
|
-
yield queryRunner.query(`DROP TYPE "public"."CorrelationIdentifier_type_enum"`);
|
|
51
|
-
yield queryRunner.query(`DROP INDEX "public"."IDX_BaseConfigEntity_type"`);
|
|
52
|
-
yield queryRunner.query(`DROP TABLE "BaseConfigEntity"`);
|
|
53
|
-
});
|
|
21
|
+
async down(queryRunner) {
|
|
22
|
+
await queryRunner.query(`ALTER TABLE "Connection" DROP CONSTRAINT "FK_Connection_identityId"`);
|
|
23
|
+
await queryRunner.query(`ALTER TABLE "Identity" DROP CONSTRAINT "FK_Identity_contactId"`);
|
|
24
|
+
await queryRunner.query(`ALTER TABLE "IdentityMetadata" DROP CONSTRAINT "FK_IdentityMetadata_identityId"`);
|
|
25
|
+
await queryRunner.query(`ALTER TABLE "CorrelationIdentifier" DROP CONSTRAINT "FK_CorrelationIdentifier_identityId"`);
|
|
26
|
+
await queryRunner.query(`ALTER TABLE "BaseConfigEntity" DROP CONSTRAINT "FK_BaseConfig_connectionId"`);
|
|
27
|
+
await queryRunner.query(`DROP TABLE "Connection"`);
|
|
28
|
+
await queryRunner.query(`DROP TYPE "public"."Connection_type_enum"`);
|
|
29
|
+
await queryRunner.query(`DROP TABLE "Identity"`);
|
|
30
|
+
await queryRunner.query(`DROP TABLE "IdentityMetadata"`);
|
|
31
|
+
await queryRunner.query(`DROP TABLE "Contact"`);
|
|
32
|
+
await queryRunner.query(`DROP TABLE "CorrelationIdentifier"`);
|
|
33
|
+
await queryRunner.query(`DROP TYPE "public"."CorrelationIdentifier_type_enum"`);
|
|
34
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_BaseConfigEntity_type"`);
|
|
35
|
+
await queryRunner.query(`DROP TABLE "BaseConfigEntity"`);
|
|
54
36
|
}
|
|
55
37
|
}
|
|
56
|
-
exports.CreateContacts1659463079428 = CreateContacts1659463079428;
|
|
57
38
|
//# sourceMappingURL=1659463079428-CreateContacts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1659463079428-CreateContacts.js","sourceRoot":"","sources":["../../../src/migrations/postgres/1659463079428-CreateContacts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"1659463079428-CreateContacts.js","sourceRoot":"","sources":["../../../src/migrations/postgres/1659463079428-CreateContacts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAA;AAEpE,MAAM,OAAO,2BAA2B;IACtC,IAAI,GAAG,6BAA6B,CAAA;IAE7B,KAAK,CAAC,EAAE,CAAC,WAAwB;QACtC,MAAM,2BAA2B,CAAC,WAAW,CAAC,CAAA;QAC9C,MAAM,WAAW,CAAC,KAAK,CACrB,6iBAA6iB,CAC9iB,CAAA;QACD,MAAM,WAAW,CAAC,KAAK,CAAC,yEAAyE,CAAC,CAAA;QAClG,MAAM,WAAW,CAAC,KAAK,CAAC,8EAA8E,CAAC,CAAA;QACvG,MAAM,WAAW,CAAC,KAAK,CACrB,qYAAqY,CACtY,CAAA;QACD,MAAM,WAAW,CAAC,KAAK,CACrB,waAAwa,CACza,CAAA;QACD,MAAM,WAAW,CAAC,KAAK,CACrB,8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