@prisma-next/target-postgres 0.3.0-dev.5 → 0.3.0-dev.52
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/README.md +7 -1
- package/dist/control.d.mts +16 -0
- package/dist/control.d.mts.map +1 -0
- package/dist/control.mjs +2590 -0
- package/dist/control.mjs.map +1 -0
- package/dist/descriptor-meta-DxB8oZzB.mjs +13 -0
- package/dist/descriptor-meta-DxB8oZzB.mjs.map +1 -0
- package/dist/pack.d.mts +7 -0
- package/dist/pack.d.mts.map +1 -0
- package/dist/pack.mjs +9 -0
- package/dist/pack.mjs.map +1 -0
- package/dist/runtime.d.mts +9 -0
- package/dist/runtime.d.mts.map +1 -0
- package/dist/runtime.mjs +21 -0
- package/dist/runtime.mjs.map +1 -0
- package/package.json +33 -33
- package/src/core/migrations/planner.ts +329 -31
- package/src/core/migrations/runner.ts +27 -20
- package/src/core/migrations/statement-builders.ts +9 -7
- package/src/core/types.ts +5 -0
- package/src/exports/control.ts +1 -3
- package/src/exports/runtime.ts +7 -12
- package/dist/chunk-RKEXRSSI.js +0 -14
- package/dist/chunk-RKEXRSSI.js.map +0 -1
- package/dist/core/descriptor-meta.d.ts +0 -9
- package/dist/core/descriptor-meta.d.ts.map +0 -1
- package/dist/core/migrations/planner.d.ts +0 -14
- package/dist/core/migrations/planner.d.ts.map +0 -1
- package/dist/core/migrations/runner.d.ts +0 -8
- package/dist/core/migrations/runner.d.ts.map +0 -1
- package/dist/core/migrations/statement-builders.d.ts +0 -30
- package/dist/core/migrations/statement-builders.d.ts.map +0 -1
- package/dist/exports/control.d.ts +0 -8
- package/dist/exports/control.d.ts.map +0 -1
- package/dist/exports/control.js +0 -1255
- package/dist/exports/control.js.map +0 -1
- package/dist/exports/pack.d.ts +0 -4
- package/dist/exports/pack.d.ts.map +0 -1
- package/dist/exports/pack.js +0 -11
- package/dist/exports/pack.js.map +0 -1
- package/dist/exports/runtime.d.ts +0 -12
- package/dist/exports/runtime.d.ts.map +0 -1
- package/dist/exports/runtime.js +0 -19
- package/dist/exports/runtime.js.map +0 -1
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
normalizeSchemaNativeType,
|
|
3
|
+
parsePostgresDefault,
|
|
4
|
+
} from '@prisma-next/adapter-postgres/control';
|
|
1
5
|
import type { ContractMarkerRecord } from '@prisma-next/contract/types';
|
|
2
6
|
import type {
|
|
3
7
|
MigrationOperationPolicy,
|
|
@@ -14,6 +18,7 @@ import { runnerFailure, runnerSuccess } from '@prisma-next/family-sql/control';
|
|
|
14
18
|
import { verifySqlSchema } from '@prisma-next/family-sql/schema-verify';
|
|
15
19
|
import { readMarker } from '@prisma-next/family-sql/verify';
|
|
16
20
|
import { SqlQueryError } from '@prisma-next/sql-errors';
|
|
21
|
+
import { ifDefined } from '@prisma-next/utils/defined';
|
|
17
22
|
import type { Result } from '@prisma-next/utils/result';
|
|
18
23
|
import { ok, okVoid } from '@prisma-next/utils/result';
|
|
19
24
|
import type { PostgresPlanTargetDetails } from './planner';
|
|
@@ -141,6 +146,8 @@ class PostgresMigrationRunner implements SqlMigrationRunner<PostgresPlanTargetDe
|
|
|
141
146
|
context: options.context ?? {},
|
|
142
147
|
typeMetadataRegistry: this.family.typeMetadataRegistry,
|
|
143
148
|
frameworkComponents: options.frameworkComponents,
|
|
149
|
+
normalizeDefault: parsePostgresDefault,
|
|
150
|
+
normalizeNativeType: normalizeSchemaNativeType,
|
|
144
151
|
});
|
|
145
152
|
if (!schemaVerifyResult.ok) {
|
|
146
153
|
return runnerFailure('SCHEMA_VERIFY_FAILED', schemaVerifyResult.summary, {
|
|
@@ -371,13 +378,13 @@ class PostgresMigrationRunner implements SqlMigrationRunner<PostgresPlanTargetDe
|
|
|
371
378
|
return Object.freeze({
|
|
372
379
|
id: operation.id,
|
|
373
380
|
label: operation.label,
|
|
374
|
-
...(
|
|
381
|
+
...ifDefined('summary', operation.summary),
|
|
375
382
|
operationClass: operation.operationClass,
|
|
376
383
|
target: operation.target, // Already frozen from plan creation
|
|
377
384
|
precheck: Object.freeze([]),
|
|
378
385
|
execute: Object.freeze([]),
|
|
379
386
|
postcheck: frozenPostcheck,
|
|
380
|
-
...(operation.meta || mergedMeta ?
|
|
387
|
+
...ifDefined('meta', operation.meta || mergedMeta ? mergedMeta : undefined),
|
|
381
388
|
});
|
|
382
389
|
}
|
|
383
390
|
|
|
@@ -388,7 +395,7 @@ class PostgresMigrationRunner implements SqlMigrationRunner<PostgresPlanTargetDe
|
|
|
388
395
|
if (!marker) {
|
|
389
396
|
return false;
|
|
390
397
|
}
|
|
391
|
-
if (marker.
|
|
398
|
+
if (marker.storageHash !== plan.destination.storageHash) {
|
|
392
399
|
return false;
|
|
393
400
|
}
|
|
394
401
|
if (plan.destination.profileHash && marker.profileHash !== plan.destination.profileHash) {
|
|
@@ -435,10 +442,10 @@ class PostgresMigrationRunner implements SqlMigrationRunner<PostgresPlanTargetDe
|
|
|
435
442
|
}
|
|
436
443
|
return runnerFailure(
|
|
437
444
|
'MARKER_ORIGIN_MISMATCH',
|
|
438
|
-
`Existing contract marker (${marker.
|
|
445
|
+
`Existing contract marker (${marker.storageHash}) does not match plan origin (no marker expected).`,
|
|
439
446
|
{
|
|
440
447
|
meta: {
|
|
441
|
-
|
|
448
|
+
markerStorageHash: marker.storageHash,
|
|
442
449
|
expectedOrigin: null,
|
|
443
450
|
},
|
|
444
451
|
},
|
|
@@ -448,22 +455,22 @@ class PostgresMigrationRunner implements SqlMigrationRunner<PostgresPlanTargetDe
|
|
|
448
455
|
if (!marker) {
|
|
449
456
|
return runnerFailure(
|
|
450
457
|
'MARKER_ORIGIN_MISMATCH',
|
|
451
|
-
`Missing contract marker: expected origin
|
|
458
|
+
`Missing contract marker: expected origin storage hash ${origin.storageHash}.`,
|
|
452
459
|
{
|
|
453
460
|
meta: {
|
|
454
|
-
|
|
461
|
+
expectedOriginStorageHash: origin.storageHash,
|
|
455
462
|
},
|
|
456
463
|
},
|
|
457
464
|
);
|
|
458
465
|
}
|
|
459
|
-
if (marker.
|
|
466
|
+
if (marker.storageHash !== origin.storageHash) {
|
|
460
467
|
return runnerFailure(
|
|
461
468
|
'MARKER_ORIGIN_MISMATCH',
|
|
462
|
-
`Existing contract marker (${marker.
|
|
469
|
+
`Existing contract marker (${marker.storageHash}) does not match plan origin (${origin.storageHash}).`,
|
|
463
470
|
{
|
|
464
471
|
meta: {
|
|
465
|
-
|
|
466
|
-
|
|
472
|
+
markerStorageHash: marker.storageHash,
|
|
473
|
+
expectedOriginStorageHash: origin.storageHash,
|
|
467
474
|
},
|
|
468
475
|
},
|
|
469
476
|
);
|
|
@@ -487,14 +494,14 @@ class PostgresMigrationRunner implements SqlMigrationRunner<PostgresPlanTargetDe
|
|
|
487
494
|
destination: SqlMigrationPlanContractInfo,
|
|
488
495
|
contract: SqlMigrationRunnerExecuteOptions<PostgresPlanTargetDetails>['destinationContract'],
|
|
489
496
|
): Result<void, SqlMigrationRunnerFailure> {
|
|
490
|
-
if (destination.
|
|
497
|
+
if (destination.storageHash !== contract.storageHash) {
|
|
491
498
|
return runnerFailure(
|
|
492
499
|
'DESTINATION_CONTRACT_MISMATCH',
|
|
493
|
-
`Plan destination
|
|
500
|
+
`Plan destination storage hash (${destination.storageHash}) does not match provided contract storage hash (${contract.storageHash}).`,
|
|
494
501
|
{
|
|
495
502
|
meta: {
|
|
496
|
-
|
|
497
|
-
|
|
503
|
+
planStorageHash: destination.storageHash,
|
|
504
|
+
contractStorageHash: contract.storageHash,
|
|
498
505
|
},
|
|
499
506
|
},
|
|
500
507
|
);
|
|
@@ -524,11 +531,11 @@ class PostgresMigrationRunner implements SqlMigrationRunner<PostgresPlanTargetDe
|
|
|
524
531
|
existingMarker: ContractMarkerRecord | null,
|
|
525
532
|
): Promise<void> {
|
|
526
533
|
const writeStatements = buildWriteMarkerStatements({
|
|
527
|
-
|
|
534
|
+
storageHash: options.plan.destination.storageHash,
|
|
528
535
|
profileHash:
|
|
529
536
|
options.plan.destination.profileHash ??
|
|
530
537
|
options.destinationContract.profileHash ??
|
|
531
|
-
options.plan.destination.
|
|
538
|
+
options.plan.destination.storageHash,
|
|
532
539
|
contractJson: options.destinationContract,
|
|
533
540
|
canonicalVersion: null,
|
|
534
541
|
meta: {},
|
|
@@ -544,13 +551,13 @@ class PostgresMigrationRunner implements SqlMigrationRunner<PostgresPlanTargetDe
|
|
|
544
551
|
executedOperations: readonly SqlMigrationPlanOperation<PostgresPlanTargetDetails>[],
|
|
545
552
|
): Promise<void> {
|
|
546
553
|
const ledgerStatement = buildLedgerInsertStatement({
|
|
547
|
-
|
|
554
|
+
originStorageHash: existingMarker?.storageHash ?? null,
|
|
548
555
|
originProfileHash: existingMarker?.profileHash ?? null,
|
|
549
|
-
|
|
556
|
+
destinationStorageHash: options.plan.destination.storageHash,
|
|
550
557
|
destinationProfileHash:
|
|
551
558
|
options.plan.destination.profileHash ??
|
|
552
559
|
options.destinationContract.profileHash ??
|
|
553
|
-
options.plan.destination.
|
|
560
|
+
options.plan.destination.storageHash,
|
|
554
561
|
contractJsonBefore: existingMarker?.contractJson ?? null,
|
|
555
562
|
contractJsonAfter: options.destinationContract,
|
|
556
563
|
operations: executedOperations,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { bigintJsonReplacer } from '@prisma-next/contract/types';
|
|
2
|
+
|
|
1
3
|
export interface SqlStatement {
|
|
2
4
|
readonly sql: string;
|
|
3
5
|
readonly params: readonly unknown[];
|
|
@@ -38,7 +40,7 @@ export const ensureLedgerTableStatement: SqlStatement = {
|
|
|
38
40
|
};
|
|
39
41
|
|
|
40
42
|
export interface WriteMarkerInput {
|
|
41
|
-
readonly
|
|
43
|
+
readonly storageHash: string;
|
|
42
44
|
readonly profileHash: string;
|
|
43
45
|
readonly contractJson?: unknown;
|
|
44
46
|
readonly canonicalVersion?: number | null;
|
|
@@ -52,7 +54,7 @@ export function buildWriteMarkerStatements(input: WriteMarkerInput): {
|
|
|
52
54
|
} {
|
|
53
55
|
const params: readonly unknown[] = [
|
|
54
56
|
1,
|
|
55
|
-
input.
|
|
57
|
+
input.storageHash,
|
|
56
58
|
input.profileHash,
|
|
57
59
|
jsonParam(input.contractJson),
|
|
58
60
|
input.canonicalVersion ?? null,
|
|
@@ -99,9 +101,9 @@ export function buildWriteMarkerStatements(input: WriteMarkerInput): {
|
|
|
99
101
|
}
|
|
100
102
|
|
|
101
103
|
export interface LedgerInsertInput {
|
|
102
|
-
readonly
|
|
104
|
+
readonly originStorageHash?: string | null;
|
|
103
105
|
readonly originProfileHash?: string | null;
|
|
104
|
-
readonly
|
|
106
|
+
readonly destinationStorageHash: string;
|
|
105
107
|
readonly destinationProfileHash?: string | null;
|
|
106
108
|
readonly contractJsonBefore?: unknown;
|
|
107
109
|
readonly contractJsonAfter?: unknown;
|
|
@@ -128,9 +130,9 @@ export function buildLedgerInsertStatement(input: LedgerInsertInput): SqlStateme
|
|
|
128
130
|
$7::jsonb
|
|
129
131
|
)`,
|
|
130
132
|
params: [
|
|
131
|
-
input.
|
|
133
|
+
input.originStorageHash ?? null,
|
|
132
134
|
input.originProfileHash ?? null,
|
|
133
|
-
input.
|
|
135
|
+
input.destinationStorageHash,
|
|
134
136
|
input.destinationProfileHash ?? null,
|
|
135
137
|
jsonParam(input.contractJsonBefore),
|
|
136
138
|
jsonParam(input.contractJsonAfter),
|
|
@@ -140,5 +142,5 @@ export function buildLedgerInsertStatement(input: LedgerInsertInput): SqlStateme
|
|
|
140
142
|
}
|
|
141
143
|
|
|
142
144
|
function jsonParam(value: unknown): string {
|
|
143
|
-
return JSON.stringify(value ?? null);
|
|
145
|
+
return JSON.stringify(value ?? null, bigintJsonReplacer);
|
|
144
146
|
}
|
package/src/exports/control.ts
CHANGED
|
@@ -12,12 +12,10 @@ import type { PostgresPlanTargetDetails } from '../core/migrations/planner';
|
|
|
12
12
|
import { createPostgresMigrationPlanner } from '../core/migrations/planner';
|
|
13
13
|
import { createPostgresMigrationRunner } from '../core/migrations/runner';
|
|
14
14
|
|
|
15
|
-
/**
|
|
16
|
-
* Postgres target descriptor for CLI config.
|
|
17
|
-
*/
|
|
18
15
|
const postgresTargetDescriptor: SqlControlTargetDescriptor<'postgres', PostgresPlanTargetDetails> =
|
|
19
16
|
{
|
|
20
17
|
...postgresTargetDescriptorMeta,
|
|
18
|
+
operationSignatures: () => [],
|
|
21
19
|
/**
|
|
22
20
|
* Migrations capability for CLI to access planner/runner via core types.
|
|
23
21
|
* The SQL-specific planner/runner types are compatible with the generic
|
package/src/exports/runtime.ts
CHANGED
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from '@prisma-next/core-execution-plane/types';
|
|
1
|
+
import type { RuntimeTargetInstance } from '@prisma-next/core-execution-plane/types';
|
|
2
|
+
import { createCodecRegistry } from '@prisma-next/sql-relational-core/ast';
|
|
3
|
+
import type { SqlRuntimeTargetDescriptor } from '@prisma-next/sql-runtime';
|
|
5
4
|
import { postgresTargetDescriptorMeta } from '../core/descriptor-meta';
|
|
6
5
|
|
|
7
|
-
/**
|
|
8
|
-
* Postgres runtime target instance interface.
|
|
9
|
-
*/
|
|
10
6
|
export interface PostgresRuntimeTargetInstance extends RuntimeTargetInstance<'sql', 'postgres'> {}
|
|
11
7
|
|
|
12
|
-
|
|
13
|
-
* Postgres target descriptor for runtime plane.
|
|
14
|
-
*/
|
|
15
|
-
const postgresRuntimeTargetDescriptor: RuntimeTargetDescriptor<
|
|
16
|
-
'sql',
|
|
8
|
+
const postgresRuntimeTargetDescriptor: SqlRuntimeTargetDescriptor<
|
|
17
9
|
'postgres',
|
|
18
10
|
PostgresRuntimeTargetInstance
|
|
19
11
|
> = {
|
|
20
12
|
...postgresTargetDescriptorMeta,
|
|
13
|
+
codecs: () => createCodecRegistry(),
|
|
14
|
+
operationSignatures: () => [],
|
|
15
|
+
parameterizedCodecs: () => [],
|
|
21
16
|
create(): PostgresRuntimeTargetInstance {
|
|
22
17
|
return {
|
|
23
18
|
familyId: 'sql',
|
package/dist/chunk-RKEXRSSI.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// src/core/descriptor-meta.ts
|
|
2
|
-
var postgresTargetDescriptorMeta = {
|
|
3
|
-
kind: "target",
|
|
4
|
-
familyId: "sql",
|
|
5
|
-
targetId: "postgres",
|
|
6
|
-
id: "postgres",
|
|
7
|
-
version: "0.0.1",
|
|
8
|
-
capabilities: {}
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export {
|
|
12
|
-
postgresTargetDescriptorMeta
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=chunk-RKEXRSSI.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/core/descriptor-meta.ts"],"sourcesContent":["export const postgresTargetDescriptorMeta = {\n kind: 'target',\n familyId: 'sql',\n targetId: 'postgres',\n id: 'postgres',\n version: '0.0.1',\n capabilities: {},\n} as const;\n"],"mappings":";AAAO,IAAM,+BAA+B;AAAA,EAC1C,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AAAA,EACV,IAAI;AAAA,EACJ,SAAS;AAAA,EACT,cAAc,CAAC;AACjB;","names":[]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const postgresTargetDescriptorMeta: {
|
|
2
|
-
readonly kind: "target";
|
|
3
|
-
readonly familyId: "sql";
|
|
4
|
-
readonly targetId: "postgres";
|
|
5
|
-
readonly id: "postgres";
|
|
6
|
-
readonly version: "0.0.1";
|
|
7
|
-
readonly capabilities: {};
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=descriptor-meta.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"descriptor-meta.d.ts","sourceRoot":"","sources":["../../src/core/descriptor-meta.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B;;;;;;;CAO/B,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { SqlMigrationPlanner } from '@prisma-next/family-sql/control';
|
|
2
|
-
type OperationClass = 'extension' | 'table' | 'unique' | 'index' | 'foreignKey';
|
|
3
|
-
export interface PostgresPlanTargetDetails {
|
|
4
|
-
readonly schema: string;
|
|
5
|
-
readonly objectType: OperationClass;
|
|
6
|
-
readonly name: string;
|
|
7
|
-
readonly table?: string;
|
|
8
|
-
}
|
|
9
|
-
interface PlannerConfig {
|
|
10
|
-
readonly defaultSchema: string;
|
|
11
|
-
}
|
|
12
|
-
export declare function createPostgresMigrationPlanner(config?: Partial<PlannerConfig>): SqlMigrationPlanner<PostgresPlanTargetDetails>;
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=planner.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"planner.d.ts","sourceRoot":"","sources":["../../../src/core/migrations/planner.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,mBAAmB,EAIpB,MAAM,iCAAiC,CAAC;AAgBzC,KAAK,cAAc,GAAG,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,CAAC;AAuBhF,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAC;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,UAAU,aAAa;IACrB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAMD,wBAAgB,8BAA8B,CAC5C,MAAM,GAAE,OAAO,CAAC,aAAa,CAAM,GAClC,mBAAmB,CAAC,yBAAyB,CAAC,CAKhD"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { SqlControlFamilyInstance, SqlMigrationRunner } from '@prisma-next/family-sql/control';
|
|
2
|
-
import type { PostgresPlanTargetDetails } from './planner';
|
|
3
|
-
interface RunnerConfig {
|
|
4
|
-
readonly defaultSchema: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function createPostgresMigrationRunner(family: SqlControlFamilyInstance, config?: Partial<RunnerConfig>): SqlMigrationRunner<PostgresPlanTargetDetails>;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=runner.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../../src/core/migrations/runner.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,wBAAwB,EAIxB,kBAAkB,EAInB,MAAM,iCAAiC,CAAC;AAOzC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAU3D,UAAU,YAAY;IACpB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAoCD,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,wBAAwB,EAChC,MAAM,GAAE,OAAO,CAAC,YAAY,CAAM,GACjC,kBAAkB,CAAC,yBAAyB,CAAC,CAE/C"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export interface SqlStatement {
|
|
2
|
-
readonly sql: string;
|
|
3
|
-
readonly params: readonly unknown[];
|
|
4
|
-
}
|
|
5
|
-
export declare const ensurePrismaContractSchemaStatement: SqlStatement;
|
|
6
|
-
export declare const ensureMarkerTableStatement: SqlStatement;
|
|
7
|
-
export declare const ensureLedgerTableStatement: SqlStatement;
|
|
8
|
-
export interface WriteMarkerInput {
|
|
9
|
-
readonly coreHash: string;
|
|
10
|
-
readonly profileHash: string;
|
|
11
|
-
readonly contractJson?: unknown;
|
|
12
|
-
readonly canonicalVersion?: number | null;
|
|
13
|
-
readonly appTag?: string | null;
|
|
14
|
-
readonly meta?: Record<string, unknown>;
|
|
15
|
-
}
|
|
16
|
-
export declare function buildWriteMarkerStatements(input: WriteMarkerInput): {
|
|
17
|
-
readonly insert: SqlStatement;
|
|
18
|
-
readonly update: SqlStatement;
|
|
19
|
-
};
|
|
20
|
-
export interface LedgerInsertInput {
|
|
21
|
-
readonly originCoreHash?: string | null;
|
|
22
|
-
readonly originProfileHash?: string | null;
|
|
23
|
-
readonly destinationCoreHash: string;
|
|
24
|
-
readonly destinationProfileHash?: string | null;
|
|
25
|
-
readonly contractJsonBefore?: unknown;
|
|
26
|
-
readonly contractJsonAfter?: unknown;
|
|
27
|
-
readonly operations: unknown;
|
|
28
|
-
}
|
|
29
|
-
export declare function buildLedgerInsertStatement(input: LedgerInsertInput): SqlStatement;
|
|
30
|
-
//# sourceMappingURL=statement-builders.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"statement-builders.d.ts","sourceRoot":"","sources":["../../../src/core/migrations/statement-builders.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,SAAS,OAAO,EAAE,CAAC;CACrC;AAED,eAAO,MAAM,mCAAmC,EAAE,YAGjD,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,YAYxC,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,YAaxC,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,gBAAgB,GAAG;IACnE,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;CAC/B,CA+CA;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3C,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChD,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IACtC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IACrC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC9B;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,iBAAiB,GAAG,YAAY,CA6BjF"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { SqlControlTargetDescriptor } from '@prisma-next/family-sql/control';
|
|
2
|
-
import type { PostgresPlanTargetDetails } from '../core/migrations/planner';
|
|
3
|
-
/**
|
|
4
|
-
* Postgres target descriptor for CLI config.
|
|
5
|
-
*/
|
|
6
|
-
declare const postgresTargetDescriptor: SqlControlTargetDescriptor<'postgres', PostgresPlanTargetDetails>;
|
|
7
|
-
export default postgresTargetDescriptor;
|
|
8
|
-
//# sourceMappingURL=control.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"control.d.ts","sourceRoot":"","sources":["../../src/exports/control.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAEV,0BAA0B,EAC3B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAI5E;;GAEG;AACH,QAAA,MAAM,wBAAwB,EAAE,0BAA0B,CAAC,UAAU,EAAE,yBAAyB,CAoC7F,CAAC;AAEJ,eAAe,wBAAwB,CAAC"}
|