@prisma-next/target-postgres 0.12.0-dev.7 → 0.12.0-dev.71
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/{codec-ids-DliyCWPY.d.mts → codec-ids-B1vOchLE.d.mts} +3 -2
- package/dist/codec-ids-B1vOchLE.d.mts.map +1 -0
- package/dist/{codec-ids-C5qzBqus.mjs → codec-ids-CTikp1if.mjs} +3 -2
- package/dist/codec-ids-CTikp1if.mjs.map +1 -0
- package/dist/codec-ids.d.mts +2 -2
- package/dist/codec-ids.mjs +2 -2
- package/dist/{codec-types-BF1DXTPs.d.mts → codec-types-CnFiNML4.d.mts} +8 -9
- package/dist/codec-types-CnFiNML4.d.mts.map +1 -0
- package/dist/codec-types.d.mts +2 -2
- package/dist/{codecs-DuP3d9Au.d.mts → codecs-CBpEv4s5.d.mts} +33 -35
- package/dist/codecs-CBpEv4s5.d.mts.map +1 -0
- package/dist/codecs.d.mts +1 -1
- package/dist/codecs.mjs +37 -2
- package/dist/codecs.mjs.map +1 -1
- package/dist/contract-free.d.mts +80 -0
- package/dist/contract-free.d.mts.map +1 -0
- package/dist/contract-free.mjs +117 -0
- package/dist/contract-free.mjs.map +1 -0
- package/dist/control.d.mts +1 -1
- package/dist/control.d.mts.map +1 -1
- package/dist/control.mjs +66 -40
- package/dist/control.mjs.map +1 -1
- package/dist/{data-transform-CRkv2T_U.mjs → data-transform-D25tLeYU.mjs} +1 -1
- package/dist/{data-transform-CRkv2T_U.mjs.map → data-transform-D25tLeYU.mjs.map} +1 -1
- package/dist/{data-transform-CAPmAdxS.d.mts → data-transform-DGOqcLrf.d.mts} +2 -2
- package/dist/{data-transform-CAPmAdxS.d.mts.map → data-transform-DGOqcLrf.d.mts.map} +1 -1
- package/dist/data-transform.d.mts +1 -1
- package/dist/data-transform.mjs +1 -1
- package/dist/ddl-77SyXgFt.mjs +30 -0
- package/dist/ddl-77SyXgFt.mjs.map +1 -0
- package/dist/ddl.d.mts +2 -0
- package/dist/ddl.mjs +2 -0
- package/dist/{default-normalizer-DaAhmzBV.mjs → default-normalizer-DyyCHQWs.mjs} +1 -1
- package/dist/{default-normalizer-DaAhmzBV.mjs.map → default-normalizer-DyyCHQWs.mjs.map} +1 -1
- package/dist/default-normalizer.mjs +1 -1
- package/dist/{descriptor-meta-Uu8QaClr.mjs → descriptor-meta-DKmj-IMN.mjs} +3 -2
- package/dist/descriptor-meta-DKmj-IMN.mjs.map +1 -0
- package/dist/{descriptor-meta-runtime-DMRX39kp.mjs → descriptor-meta-runtime-My8_s4cs.mjs} +2 -2
- package/dist/{descriptor-meta-runtime-DMRX39kp.mjs.map → descriptor-meta-runtime-My8_s4cs.mjs.map} +1 -1
- package/dist/{enum-planning-DRA9LaMU.mjs → enum-planning-BCyvlFHk.mjs} +0 -0
- package/dist/{enum-planning-DRA9LaMU.mjs.map → enum-planning-BCyvlFHk.mjs.map} +1 -1
- package/dist/enum-planning.d.mts +1 -1
- package/dist/enum-planning.mjs +1 -1
- package/dist/{errors-BbnITmAD.mjs → errors-CUk87ByX.mjs} +1 -1
- package/dist/{errors-BbnITmAD.mjs.map → errors-CUk87ByX.mjs.map} +1 -1
- package/dist/errors.d.mts.map +1 -1
- package/dist/errors.mjs +1 -1
- package/dist/{issue-planner-BtaL6OfW.mjs → issue-planner-SHnDHfoQ.mjs} +130 -28
- package/dist/issue-planner-SHnDHfoQ.mjs.map +1 -0
- package/dist/issue-planner.d.mts +1 -1
- package/dist/issue-planner.d.mts.map +1 -1
- package/dist/issue-planner.mjs +1 -1
- package/dist/migration.d.mts +7 -8
- package/dist/migration.d.mts.map +1 -1
- package/dist/migration.mjs +5 -4
- package/dist/migration.mjs.map +1 -1
- package/dist/{native-type-normalizer-BNEQ9VDs.mjs → native-type-normalizer-Bc9XJzWC.mjs} +1 -1
- package/dist/{native-type-normalizer-BNEQ9VDs.mjs.map → native-type-normalizer-Bc9XJzWC.mjs.map} +1 -1
- package/dist/native-type-normalizer.mjs +1 -1
- package/dist/nodes-779hmCfL.d.mts +40 -0
- package/dist/nodes-779hmCfL.d.mts.map +1 -0
- package/dist/nodes-DZk2JZG3.mjs +47 -0
- package/dist/nodes-DZk2JZG3.mjs.map +1 -0
- package/dist/op-factory-call-D2aAUhmS.mjs +1307 -0
- package/dist/op-factory-call-D2aAUhmS.mjs.map +1 -0
- package/dist/{op-factory-call-CDlImOF_.d.mts → op-factory-call-DMA86_2D.d.mts} +39 -14
- package/dist/op-factory-call-DMA86_2D.d.mts.map +1 -0
- package/dist/op-factory-call.d.mts +2 -2
- package/dist/op-factory-call.mjs +2 -2
- package/dist/pack.d.mts +5 -6
- package/dist/pack.d.mts.map +1 -1
- package/dist/pack.mjs +1 -1
- package/dist/planner-Bv5LV2A-.mjs +344 -0
- package/dist/planner-Bv5LV2A-.mjs.map +1 -0
- package/dist/{planner-ddl-builders-BNMfSE9r.mjs → planner-ddl-builders-DDyptTt5.mjs} +4 -28
- package/dist/planner-ddl-builders-DDyptTt5.mjs.map +1 -0
- package/dist/planner-ddl-builders.d.mts +6 -7
- package/dist/planner-ddl-builders.d.mts.map +1 -1
- package/dist/planner-ddl-builders.mjs +2 -2
- package/dist/{planner-identity-values-nhVj0hp-.mjs → planner-identity-values-BIpa5p2I.mjs} +1 -1
- package/dist/{planner-identity-values-nhVj0hp-.mjs.map → planner-identity-values-BIpa5p2I.mjs.map} +1 -1
- package/dist/planner-identity-values.mjs +1 -1
- package/dist/{planner-produced-postgres-migration-D02NOhVQ.d.mts → planner-produced-postgres-migration-B4EDvLdz.d.mts} +5 -4
- package/dist/planner-produced-postgres-migration-B4EDvLdz.d.mts.map +1 -0
- package/dist/{planner-produced-postgres-migration-D_nsXbhl.mjs → planner-produced-postgres-migration-NSEhWL0L.mjs} +8 -6
- package/dist/planner-produced-postgres-migration-NSEhWL0L.mjs.map +1 -0
- package/dist/planner-produced-postgres-migration.d.mts +1 -1
- package/dist/planner-produced-postgres-migration.mjs +1 -1
- package/dist/{planner-schema-lookup-CGxxYfnD.mjs → planner-schema-lookup-CiVaAQP-.mjs} +1 -1
- package/dist/{planner-schema-lookup-CGxxYfnD.mjs.map → planner-schema-lookup-CiVaAQP-.mjs.map} +1 -1
- package/dist/planner-schema-lookup.mjs +1 -1
- package/dist/{planner-sql-checks-CfEiTXoQ.mjs → planner-sql-checks-DAdhnI2c.mjs} +41 -30
- package/dist/planner-sql-checks-DAdhnI2c.mjs.map +1 -0
- package/dist/planner-sql-checks.d.mts.map +1 -1
- package/dist/planner-sql-checks.mjs +1 -1
- package/dist/{planner-target-details-a_wuOiYf.d.mts → planner-target-details-CIY6tLeo.d.mts} +2 -2
- package/dist/planner-target-details-CIY6tLeo.d.mts.map +1 -0
- package/dist/planner-target-details.d.mts +2 -2
- package/dist/planner-type-resolution-836DExFN.mjs +20 -0
- package/dist/planner-type-resolution-836DExFN.mjs.map +1 -0
- package/dist/planner.d.mts +7 -3
- package/dist/planner.d.mts.map +1 -1
- package/dist/planner.mjs +1 -1
- package/dist/{postgres-contract-serializer-BnOboPWs.mjs → postgres-contract-serializer-DYTyXjPf.mjs} +33 -24
- package/dist/postgres-contract-serializer-DYTyXjPf.mjs.map +1 -0
- package/dist/{postgres-enum-type-CSzsvXrO.d.mts → postgres-enum-type-BVn63a89.d.mts} +1 -1
- package/dist/{postgres-enum-type-CSzsvXrO.d.mts.map → postgres-enum-type-BVn63a89.d.mts.map} +1 -1
- package/dist/{postgres-enum-type-BMgyxNyy.mjs → postgres-enum-type-DPKqCBem.mjs} +1 -1
- package/dist/{postgres-enum-type-BMgyxNyy.mjs.map → postgres-enum-type-DPKqCBem.mjs.map} +1 -1
- package/dist/{postgres-migration-BatbEvU6.mjs → postgres-migration-COore9Mz.mjs} +23 -3
- package/dist/postgres-migration-COore9Mz.mjs.map +1 -0
- package/dist/{postgres-migration-DRY8V-bQ.d.mts → postgres-migration-DZ_gLUOW.d.mts} +25 -3
- package/dist/postgres-migration-DZ_gLUOW.d.mts.map +1 -0
- package/dist/{postgres-schema-BxAuNFX0.mjs → postgres-schema-BuxCxbvB.mjs} +29 -14
- package/dist/postgres-schema-BuxCxbvB.mjs.map +1 -0
- package/dist/{render-ops-XhICjX_P.mjs → render-ops-BpjstrKQ.mjs} +4 -3
- package/dist/{render-ops-XhICjX_P.mjs.map → render-ops-BpjstrKQ.mjs.map} +1 -1
- package/dist/render-ops.d.mts +3 -2
- package/dist/render-ops.d.mts.map +1 -1
- package/dist/render-ops.mjs +1 -1
- package/dist/{render-typescript-K125n-RZ.mjs → render-typescript-KMgosran.mjs} +5 -2
- package/dist/render-typescript-KMgosran.mjs.map +1 -0
- package/dist/render-typescript.mjs +1 -1
- package/dist/runtime.d.mts.map +1 -1
- package/dist/runtime.mjs +2 -2
- package/dist/{shared-Do_a5ymU.d.mts → shared-DarONYBZ.d.mts} +5 -5
- package/dist/{shared-Do_a5ymU.d.mts.map → shared-DarONYBZ.d.mts.map} +1 -1
- package/dist/{sql-utils-CggjWNij.mjs → sql-utils-DcfMz4MQ.mjs} +1 -1
- package/dist/{sql-utils-CggjWNij.mjs.map → sql-utils-DcfMz4MQ.mjs.map} +1 -1
- package/dist/sql-utils.mjs +1 -1
- package/dist/{types-O40IcFV9.d.mts → types-BDKkx8MA.d.mts} +1 -1
- package/dist/types-BDKkx8MA.d.mts.map +1 -0
- package/dist/types.d.mts +16 -11
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs +2 -2
- package/package.json +21 -20
- package/src/contract-free/columns.ts +49 -0
- package/src/contract-free/control-bootstrap.ts +55 -0
- package/src/contract-free/ddl.ts +37 -0
- package/src/core/ast/table-source.ts +23 -0
- package/src/core/codec-ids.ts +1 -0
- package/src/core/codecs.ts +44 -0
- package/src/core/ddl/nodes.ts +72 -0
- package/src/core/descriptor-meta.ts +1 -0
- package/src/core/migrations/control-policy.ts +234 -0
- package/src/core/migrations/issue-planner.ts +81 -13
- package/src/core/migrations/op-factory-call.ts +289 -46
- package/src/core/migrations/operations/constraints.ts +79 -10
- package/src/core/migrations/operations/dependencies.ts +0 -17
- package/src/core/migrations/operations/shared.ts +3 -3
- package/src/core/migrations/operations/tables.ts +1 -39
- package/src/core/migrations/planner-ddl-builders.ts +4 -46
- package/src/core/migrations/planner-produced-postgres-migration.ts +11 -6
- package/src/core/migrations/planner-sql-checks.ts +9 -9
- package/src/core/migrations/planner-strategies.ts +149 -11
- package/src/core/migrations/planner-target-details.ts +2 -1
- package/src/core/migrations/planner.ts +66 -8
- package/src/core/migrations/postgres-migration.ts +41 -0
- package/src/core/migrations/render-ops.ts +7 -2
- package/src/core/migrations/render-typescript.ts +5 -1
- package/src/core/migrations/runner.ts +78 -50
- package/src/core/postgres-contract-serializer.ts +52 -46
- package/src/core/postgres-schema.ts +43 -25
- package/src/exports/contract-free.ts +7 -0
- package/src/exports/control.ts +6 -8
- package/src/exports/ddl.ts +7 -0
- package/src/exports/migration.ts +11 -2
- package/src/exports/op-factory-call.ts +2 -0
- package/src/exports/planner-ddl-builders.ts +0 -1
- package/dist/codec-ids-C5qzBqus.mjs.map +0 -1
- package/dist/codec-ids-DliyCWPY.d.mts.map +0 -1
- package/dist/codec-types-BF1DXTPs.d.mts.map +0 -1
- package/dist/codecs-DuP3d9Au.d.mts.map +0 -1
- package/dist/descriptor-meta-Uu8QaClr.mjs.map +0 -1
- package/dist/issue-planner-BtaL6OfW.mjs.map +0 -1
- package/dist/op-factory-call-CDlImOF_.d.mts.map +0 -1
- package/dist/op-factory-call-ewOd5q6L.mjs +0 -625
- package/dist/op-factory-call-ewOd5q6L.mjs.map +0 -1
- package/dist/planner-Bjz5pnLa.mjs +0 -177
- package/dist/planner-Bjz5pnLa.mjs.map +0 -1
- package/dist/planner-ddl-builders-BNMfSE9r.mjs.map +0 -1
- package/dist/planner-produced-postgres-migration-D02NOhVQ.d.mts.map +0 -1
- package/dist/planner-produced-postgres-migration-D_nsXbhl.mjs.map +0 -1
- package/dist/planner-sql-checks-CfEiTXoQ.mjs.map +0 -1
- package/dist/planner-target-details-a_wuOiYf.d.mts.map +0 -1
- package/dist/postgres-contract-serializer-BnOboPWs.mjs.map +0 -1
- package/dist/postgres-migration-BatbEvU6.mjs.map +0 -1
- package/dist/postgres-migration-DRY8V-bQ.d.mts.map +0 -1
- package/dist/postgres-schema-BxAuNFX0.mjs.map +0 -1
- package/dist/render-typescript-K125n-RZ.mjs.map +0 -1
- package/dist/statement-builders-DVI5IVAa.mjs +0 -131
- package/dist/statement-builders-DVI5IVAa.mjs.map +0 -1
- package/dist/statement-builders.d.mts +0 -51
- package/dist/statement-builders.d.mts.map +0 -1
- package/dist/statement-builders.mjs +0 -2
- package/dist/tables-DoA39Yqo.mjs +0 -516
- package/dist/tables-DoA39Yqo.mjs.map +0 -1
- package/dist/types-O40IcFV9.d.mts.map +0 -1
- package/src/core/migrations/statement-builders.ts +0 -183
- package/src/exports/statement-builders.ts +0 -8
|
@@ -1,625 +0,0 @@
|
|
|
1
|
-
import { S as setNotNull, _ as alterColumnType, a as addEnumValues, b as dropNotNull, c as renameType, f as addForeignKey, g as addColumn, h as dropConstraint, i as dropIndex, l as createExtension, m as addUnique, n as dropTable, o as createEnumType, p as addPrimaryKey, r as createIndex, s as dropEnumType, t as createTable, u as createSchema, v as dropColumn, x as setDefault, y as dropDefault } from "./tables-DoA39Yqo.mjs";
|
|
2
|
-
import { errorUnfilledPlaceholder } from "@prisma-next/errors/migration";
|
|
3
|
-
import { TsExpression, jsonToTsSource } from "@prisma-next/ts-render";
|
|
4
|
-
//#region src/core/migrations/op-factory-call.ts
|
|
5
|
-
/**
|
|
6
|
-
* Postgres migration IR: one concrete `*Call` class per pure factory under
|
|
7
|
-
* `operations/`, plus a shared `PostgresOpFactoryCallNode` abstract base.
|
|
8
|
-
*
|
|
9
|
-
* Every call class carries the literal arguments its backing factory would
|
|
10
|
-
* receive, computes a human-readable `label` in its constructor, and
|
|
11
|
-
* implements two polymorphic hooks:
|
|
12
|
-
*
|
|
13
|
-
* - `toOp()` — converts the IR node to a runtime
|
|
14
|
-
* `SqlMigrationPlanOperation` by delegating to the matching pure factory
|
|
15
|
-
* under `operations/`. `DataTransformCall.toOp()` always throws
|
|
16
|
-
* `PN-MIG-2001` because a planner-generated data transform is an
|
|
17
|
-
* unfilled authoring stub by construction.
|
|
18
|
-
* - `renderTypeScript()` / `importRequirements()` — inherited from
|
|
19
|
-
* `TsExpression`. Used by `renderCallsToTypeScript` to emit the call as
|
|
20
|
-
* a TypeScript expression inside the scaffolded `migration.ts`.
|
|
21
|
-
*
|
|
22
|
-
* The abstract base and all concrete classes are package-private. External
|
|
23
|
-
* consumers see only the framework-level `OpFactoryCall` interface and the
|
|
24
|
-
* `PostgresOpFactoryCall` union.
|
|
25
|
-
*/
|
|
26
|
-
const TARGET_MIGRATION_MODULE = "@prisma-next/postgres/migration";
|
|
27
|
-
var PostgresOpFactoryCallNode = class extends TsExpression {
|
|
28
|
-
importRequirements() {
|
|
29
|
-
return [{
|
|
30
|
-
moduleSpecifier: TARGET_MIGRATION_MODULE,
|
|
31
|
-
symbol: this.factoryName
|
|
32
|
-
}];
|
|
33
|
-
}
|
|
34
|
-
freeze() {
|
|
35
|
-
Object.freeze(this);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var CreateTableCall = class extends PostgresOpFactoryCallNode {
|
|
39
|
-
factoryName = "createTable";
|
|
40
|
-
operationClass = "additive";
|
|
41
|
-
schemaName;
|
|
42
|
-
tableName;
|
|
43
|
-
columns;
|
|
44
|
-
primaryKey;
|
|
45
|
-
label;
|
|
46
|
-
constructor(schemaName, tableName, columns, primaryKey) {
|
|
47
|
-
super();
|
|
48
|
-
this.schemaName = schemaName;
|
|
49
|
-
this.tableName = tableName;
|
|
50
|
-
this.columns = columns;
|
|
51
|
-
this.primaryKey = primaryKey;
|
|
52
|
-
this.label = `Create table "${tableName}"`;
|
|
53
|
-
this.freeze();
|
|
54
|
-
}
|
|
55
|
-
toOp() {
|
|
56
|
-
return createTable(this.schemaName, this.tableName, this.columns, this.primaryKey);
|
|
57
|
-
}
|
|
58
|
-
renderTypeScript() {
|
|
59
|
-
const args = [
|
|
60
|
-
jsonToTsSource(this.schemaName),
|
|
61
|
-
jsonToTsSource(this.tableName),
|
|
62
|
-
jsonToTsSource(this.columns)
|
|
63
|
-
];
|
|
64
|
-
if (this.primaryKey) args.push(jsonToTsSource(this.primaryKey));
|
|
65
|
-
return `createTable(${args.join(", ")})`;
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
var DropTableCall = class extends PostgresOpFactoryCallNode {
|
|
69
|
-
factoryName = "dropTable";
|
|
70
|
-
operationClass = "destructive";
|
|
71
|
-
schemaName;
|
|
72
|
-
tableName;
|
|
73
|
-
label;
|
|
74
|
-
constructor(schemaName, tableName) {
|
|
75
|
-
super();
|
|
76
|
-
this.schemaName = schemaName;
|
|
77
|
-
this.tableName = tableName;
|
|
78
|
-
this.label = `Drop table "${tableName}"`;
|
|
79
|
-
this.freeze();
|
|
80
|
-
}
|
|
81
|
-
toOp() {
|
|
82
|
-
return dropTable(this.schemaName, this.tableName);
|
|
83
|
-
}
|
|
84
|
-
renderTypeScript() {
|
|
85
|
-
return `dropTable(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.tableName)})`;
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
var AddColumnCall = class extends PostgresOpFactoryCallNode {
|
|
89
|
-
factoryName = "addColumn";
|
|
90
|
-
operationClass = "additive";
|
|
91
|
-
schemaName;
|
|
92
|
-
tableName;
|
|
93
|
-
column;
|
|
94
|
-
label;
|
|
95
|
-
constructor(schemaName, tableName, column) {
|
|
96
|
-
super();
|
|
97
|
-
this.schemaName = schemaName;
|
|
98
|
-
this.tableName = tableName;
|
|
99
|
-
this.column = column;
|
|
100
|
-
this.label = `Add column "${column.name}" to "${tableName}"`;
|
|
101
|
-
this.freeze();
|
|
102
|
-
}
|
|
103
|
-
toOp() {
|
|
104
|
-
return addColumn(this.schemaName, this.tableName, this.column);
|
|
105
|
-
}
|
|
106
|
-
renderTypeScript() {
|
|
107
|
-
return `addColumn(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.column)})`;
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
var DropColumnCall = class extends PostgresOpFactoryCallNode {
|
|
111
|
-
factoryName = "dropColumn";
|
|
112
|
-
operationClass = "destructive";
|
|
113
|
-
schemaName;
|
|
114
|
-
tableName;
|
|
115
|
-
columnName;
|
|
116
|
-
label;
|
|
117
|
-
constructor(schemaName, tableName, columnName) {
|
|
118
|
-
super();
|
|
119
|
-
this.schemaName = schemaName;
|
|
120
|
-
this.tableName = tableName;
|
|
121
|
-
this.columnName = columnName;
|
|
122
|
-
this.label = `Drop column "${columnName}" from "${tableName}"`;
|
|
123
|
-
this.freeze();
|
|
124
|
-
}
|
|
125
|
-
toOp() {
|
|
126
|
-
return dropColumn(this.schemaName, this.tableName, this.columnName);
|
|
127
|
-
}
|
|
128
|
-
renderTypeScript() {
|
|
129
|
-
return `dropColumn(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.columnName)})`;
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
var AlterColumnTypeCall = class extends PostgresOpFactoryCallNode {
|
|
133
|
-
factoryName = "alterColumnType";
|
|
134
|
-
operationClass = "destructive";
|
|
135
|
-
schemaName;
|
|
136
|
-
tableName;
|
|
137
|
-
columnName;
|
|
138
|
-
options;
|
|
139
|
-
label;
|
|
140
|
-
constructor(schemaName, tableName, columnName, options) {
|
|
141
|
-
super();
|
|
142
|
-
this.schemaName = schemaName;
|
|
143
|
-
this.tableName = tableName;
|
|
144
|
-
this.columnName = columnName;
|
|
145
|
-
this.options = options;
|
|
146
|
-
this.label = `Alter type of "${tableName}"."${columnName}" to ${options.rawTargetTypeForLabel}`;
|
|
147
|
-
this.freeze();
|
|
148
|
-
}
|
|
149
|
-
toOp() {
|
|
150
|
-
return alterColumnType(this.schemaName, this.tableName, this.columnName, this.options);
|
|
151
|
-
}
|
|
152
|
-
renderTypeScript() {
|
|
153
|
-
return `alterColumnType(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.columnName)}, ${jsonToTsSource(this.options)})`;
|
|
154
|
-
}
|
|
155
|
-
};
|
|
156
|
-
var SetNotNullCall = class extends PostgresOpFactoryCallNode {
|
|
157
|
-
factoryName = "setNotNull";
|
|
158
|
-
operationClass = "destructive";
|
|
159
|
-
schemaName;
|
|
160
|
-
tableName;
|
|
161
|
-
columnName;
|
|
162
|
-
label;
|
|
163
|
-
constructor(schemaName, tableName, columnName) {
|
|
164
|
-
super();
|
|
165
|
-
this.schemaName = schemaName;
|
|
166
|
-
this.tableName = tableName;
|
|
167
|
-
this.columnName = columnName;
|
|
168
|
-
this.label = `Set NOT NULL on "${tableName}"."${columnName}"`;
|
|
169
|
-
this.freeze();
|
|
170
|
-
}
|
|
171
|
-
toOp() {
|
|
172
|
-
return setNotNull(this.schemaName, this.tableName, this.columnName);
|
|
173
|
-
}
|
|
174
|
-
renderTypeScript() {
|
|
175
|
-
return `setNotNull(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.columnName)})`;
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
var DropNotNullCall = class extends PostgresOpFactoryCallNode {
|
|
179
|
-
factoryName = "dropNotNull";
|
|
180
|
-
operationClass = "widening";
|
|
181
|
-
schemaName;
|
|
182
|
-
tableName;
|
|
183
|
-
columnName;
|
|
184
|
-
label;
|
|
185
|
-
constructor(schemaName, tableName, columnName) {
|
|
186
|
-
super();
|
|
187
|
-
this.schemaName = schemaName;
|
|
188
|
-
this.tableName = tableName;
|
|
189
|
-
this.columnName = columnName;
|
|
190
|
-
this.label = `Drop NOT NULL on "${tableName}"."${columnName}"`;
|
|
191
|
-
this.freeze();
|
|
192
|
-
}
|
|
193
|
-
toOp() {
|
|
194
|
-
return dropNotNull(this.schemaName, this.tableName, this.columnName);
|
|
195
|
-
}
|
|
196
|
-
renderTypeScript() {
|
|
197
|
-
return `dropNotNull(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.columnName)})`;
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
var SetDefaultCall = class extends PostgresOpFactoryCallNode {
|
|
201
|
-
factoryName = "setDefault";
|
|
202
|
-
operationClass;
|
|
203
|
-
schemaName;
|
|
204
|
-
tableName;
|
|
205
|
-
columnName;
|
|
206
|
-
defaultSql;
|
|
207
|
-
label;
|
|
208
|
-
constructor(schemaName, tableName, columnName, defaultSql, operationClass = "additive") {
|
|
209
|
-
super();
|
|
210
|
-
this.schemaName = schemaName;
|
|
211
|
-
this.tableName = tableName;
|
|
212
|
-
this.columnName = columnName;
|
|
213
|
-
this.defaultSql = defaultSql;
|
|
214
|
-
this.operationClass = operationClass;
|
|
215
|
-
this.label = `Set default on "${tableName}"."${columnName}"`;
|
|
216
|
-
this.freeze();
|
|
217
|
-
}
|
|
218
|
-
toOp() {
|
|
219
|
-
return setDefault(this.schemaName, this.tableName, this.columnName, this.defaultSql, this.operationClass);
|
|
220
|
-
}
|
|
221
|
-
renderTypeScript() {
|
|
222
|
-
const args = [
|
|
223
|
-
jsonToTsSource(this.schemaName),
|
|
224
|
-
jsonToTsSource(this.tableName),
|
|
225
|
-
jsonToTsSource(this.columnName),
|
|
226
|
-
jsonToTsSource(this.defaultSql)
|
|
227
|
-
];
|
|
228
|
-
if (this.operationClass !== "additive") args.push(jsonToTsSource(this.operationClass));
|
|
229
|
-
return `setDefault(${args.join(", ")})`;
|
|
230
|
-
}
|
|
231
|
-
};
|
|
232
|
-
var DropDefaultCall = class extends PostgresOpFactoryCallNode {
|
|
233
|
-
factoryName = "dropDefault";
|
|
234
|
-
operationClass = "destructive";
|
|
235
|
-
schemaName;
|
|
236
|
-
tableName;
|
|
237
|
-
columnName;
|
|
238
|
-
label;
|
|
239
|
-
constructor(schemaName, tableName, columnName) {
|
|
240
|
-
super();
|
|
241
|
-
this.schemaName = schemaName;
|
|
242
|
-
this.tableName = tableName;
|
|
243
|
-
this.columnName = columnName;
|
|
244
|
-
this.label = `Drop default on "${tableName}"."${columnName}"`;
|
|
245
|
-
this.freeze();
|
|
246
|
-
}
|
|
247
|
-
toOp() {
|
|
248
|
-
return dropDefault(this.schemaName, this.tableName, this.columnName);
|
|
249
|
-
}
|
|
250
|
-
renderTypeScript() {
|
|
251
|
-
return `dropDefault(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.columnName)})`;
|
|
252
|
-
}
|
|
253
|
-
};
|
|
254
|
-
var AddPrimaryKeyCall = class extends PostgresOpFactoryCallNode {
|
|
255
|
-
factoryName = "addPrimaryKey";
|
|
256
|
-
operationClass = "additive";
|
|
257
|
-
schemaName;
|
|
258
|
-
tableName;
|
|
259
|
-
constraintName;
|
|
260
|
-
columns;
|
|
261
|
-
label;
|
|
262
|
-
constructor(schemaName, tableName, constraintName, columns) {
|
|
263
|
-
super();
|
|
264
|
-
this.schemaName = schemaName;
|
|
265
|
-
this.tableName = tableName;
|
|
266
|
-
this.constraintName = constraintName;
|
|
267
|
-
this.columns = columns;
|
|
268
|
-
this.label = `Add primary key on "${tableName}"`;
|
|
269
|
-
this.freeze();
|
|
270
|
-
}
|
|
271
|
-
toOp() {
|
|
272
|
-
return addPrimaryKey(this.schemaName, this.tableName, this.constraintName, this.columns);
|
|
273
|
-
}
|
|
274
|
-
renderTypeScript() {
|
|
275
|
-
return `addPrimaryKey(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.constraintName)}, ${jsonToTsSource(this.columns)})`;
|
|
276
|
-
}
|
|
277
|
-
};
|
|
278
|
-
var AddUniqueCall = class extends PostgresOpFactoryCallNode {
|
|
279
|
-
factoryName = "addUnique";
|
|
280
|
-
operationClass = "additive";
|
|
281
|
-
schemaName;
|
|
282
|
-
tableName;
|
|
283
|
-
constraintName;
|
|
284
|
-
columns;
|
|
285
|
-
label;
|
|
286
|
-
constructor(schemaName, tableName, constraintName, columns) {
|
|
287
|
-
super();
|
|
288
|
-
this.schemaName = schemaName;
|
|
289
|
-
this.tableName = tableName;
|
|
290
|
-
this.constraintName = constraintName;
|
|
291
|
-
this.columns = columns;
|
|
292
|
-
this.label = `Add unique constraint on "${tableName}" (${columns.join(", ")})`;
|
|
293
|
-
this.freeze();
|
|
294
|
-
}
|
|
295
|
-
toOp() {
|
|
296
|
-
return addUnique(this.schemaName, this.tableName, this.constraintName, this.columns);
|
|
297
|
-
}
|
|
298
|
-
renderTypeScript() {
|
|
299
|
-
return `addUnique(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.constraintName)}, ${jsonToTsSource(this.columns)})`;
|
|
300
|
-
}
|
|
301
|
-
};
|
|
302
|
-
var AddForeignKeyCall = class extends PostgresOpFactoryCallNode {
|
|
303
|
-
factoryName = "addForeignKey";
|
|
304
|
-
operationClass = "additive";
|
|
305
|
-
schemaName;
|
|
306
|
-
tableName;
|
|
307
|
-
fk;
|
|
308
|
-
label;
|
|
309
|
-
constructor(schemaName, tableName, fk) {
|
|
310
|
-
super();
|
|
311
|
-
this.schemaName = schemaName;
|
|
312
|
-
this.tableName = tableName;
|
|
313
|
-
this.fk = fk;
|
|
314
|
-
this.label = `Add foreign key "${fk.name}" on "${tableName}"`;
|
|
315
|
-
this.freeze();
|
|
316
|
-
}
|
|
317
|
-
toOp() {
|
|
318
|
-
return addForeignKey(this.schemaName, this.tableName, this.fk);
|
|
319
|
-
}
|
|
320
|
-
renderTypeScript() {
|
|
321
|
-
return `addForeignKey(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.fk)})`;
|
|
322
|
-
}
|
|
323
|
-
};
|
|
324
|
-
var DropConstraintCall = class extends PostgresOpFactoryCallNode {
|
|
325
|
-
factoryName = "dropConstraint";
|
|
326
|
-
operationClass = "destructive";
|
|
327
|
-
schemaName;
|
|
328
|
-
tableName;
|
|
329
|
-
constraintName;
|
|
330
|
-
kind;
|
|
331
|
-
label;
|
|
332
|
-
constructor(schemaName, tableName, constraintName, kind = "unique") {
|
|
333
|
-
super();
|
|
334
|
-
this.schemaName = schemaName;
|
|
335
|
-
this.tableName = tableName;
|
|
336
|
-
this.constraintName = constraintName;
|
|
337
|
-
this.kind = kind;
|
|
338
|
-
this.label = `Drop constraint "${constraintName}" on "${tableName}"`;
|
|
339
|
-
this.freeze();
|
|
340
|
-
}
|
|
341
|
-
toOp() {
|
|
342
|
-
return dropConstraint(this.schemaName, this.tableName, this.constraintName, this.kind);
|
|
343
|
-
}
|
|
344
|
-
renderTypeScript() {
|
|
345
|
-
const args = [
|
|
346
|
-
jsonToTsSource(this.schemaName),
|
|
347
|
-
jsonToTsSource(this.tableName),
|
|
348
|
-
jsonToTsSource(this.constraintName)
|
|
349
|
-
];
|
|
350
|
-
if (this.kind !== "unique") args.push(jsonToTsSource(this.kind));
|
|
351
|
-
return `dropConstraint(${args.join(", ")})`;
|
|
352
|
-
}
|
|
353
|
-
};
|
|
354
|
-
var CreateIndexCall = class extends PostgresOpFactoryCallNode {
|
|
355
|
-
factoryName = "createIndex";
|
|
356
|
-
operationClass = "additive";
|
|
357
|
-
schemaName;
|
|
358
|
-
tableName;
|
|
359
|
-
indexName;
|
|
360
|
-
columns;
|
|
361
|
-
indexType;
|
|
362
|
-
options;
|
|
363
|
-
label;
|
|
364
|
-
constructor(schemaName, tableName, indexName, columns, extras) {
|
|
365
|
-
super();
|
|
366
|
-
this.schemaName = schemaName;
|
|
367
|
-
this.tableName = tableName;
|
|
368
|
-
this.indexName = indexName;
|
|
369
|
-
this.columns = columns;
|
|
370
|
-
this.indexType = extras?.type;
|
|
371
|
-
this.options = extras?.options;
|
|
372
|
-
this.label = `Create index "${indexName}" on "${tableName}"`;
|
|
373
|
-
this.freeze();
|
|
374
|
-
}
|
|
375
|
-
toOp() {
|
|
376
|
-
const extras = {};
|
|
377
|
-
if (this.indexType !== void 0) extras.type = this.indexType;
|
|
378
|
-
if (this.options !== void 0) extras.options = this.options;
|
|
379
|
-
return createIndex(this.schemaName, this.tableName, this.indexName, this.columns, extras);
|
|
380
|
-
}
|
|
381
|
-
renderTypeScript() {
|
|
382
|
-
const args = [
|
|
383
|
-
jsonToTsSource(this.schemaName),
|
|
384
|
-
jsonToTsSource(this.tableName),
|
|
385
|
-
jsonToTsSource(this.indexName),
|
|
386
|
-
jsonToTsSource(this.columns)
|
|
387
|
-
];
|
|
388
|
-
if (this.indexType !== void 0 || this.options !== void 0) {
|
|
389
|
-
const extrasParts = [];
|
|
390
|
-
if (this.indexType !== void 0) extrasParts.push(`type: ${jsonToTsSource(this.indexType)}`);
|
|
391
|
-
if (this.options !== void 0) extrasParts.push(`options: ${jsonToTsSource(this.options)}`);
|
|
392
|
-
args.push(`{ ${extrasParts.join(", ")} }`);
|
|
393
|
-
}
|
|
394
|
-
return `createIndex(${args.join(", ")})`;
|
|
395
|
-
}
|
|
396
|
-
};
|
|
397
|
-
var DropIndexCall = class extends PostgresOpFactoryCallNode {
|
|
398
|
-
factoryName = "dropIndex";
|
|
399
|
-
operationClass = "destructive";
|
|
400
|
-
schemaName;
|
|
401
|
-
tableName;
|
|
402
|
-
indexName;
|
|
403
|
-
label;
|
|
404
|
-
constructor(schemaName, tableName, indexName) {
|
|
405
|
-
super();
|
|
406
|
-
this.schemaName = schemaName;
|
|
407
|
-
this.tableName = tableName;
|
|
408
|
-
this.indexName = indexName;
|
|
409
|
-
this.label = `Drop index "${indexName}"`;
|
|
410
|
-
this.freeze();
|
|
411
|
-
}
|
|
412
|
-
toOp() {
|
|
413
|
-
return dropIndex(this.schemaName, this.tableName, this.indexName);
|
|
414
|
-
}
|
|
415
|
-
renderTypeScript() {
|
|
416
|
-
return `dropIndex(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.indexName)})`;
|
|
417
|
-
}
|
|
418
|
-
};
|
|
419
|
-
var CreateEnumTypeCall = class extends PostgresOpFactoryCallNode {
|
|
420
|
-
factoryName = "createEnumType";
|
|
421
|
-
operationClass = "additive";
|
|
422
|
-
schemaName;
|
|
423
|
-
typeName;
|
|
424
|
-
nativeType;
|
|
425
|
-
values;
|
|
426
|
-
label;
|
|
427
|
-
constructor(schemaName, typeName, values, nativeType = typeName) {
|
|
428
|
-
super();
|
|
429
|
-
this.schemaName = schemaName;
|
|
430
|
-
this.typeName = typeName;
|
|
431
|
-
this.nativeType = nativeType;
|
|
432
|
-
this.values = values;
|
|
433
|
-
this.label = `Create enum type "${typeName}"`;
|
|
434
|
-
this.freeze();
|
|
435
|
-
}
|
|
436
|
-
toOp() {
|
|
437
|
-
return createEnumType(this.schemaName, this.typeName, this.values, this.nativeType);
|
|
438
|
-
}
|
|
439
|
-
renderTypeScript() {
|
|
440
|
-
const nativeArg = this.nativeType === this.typeName ? "" : `, ${jsonToTsSource(this.nativeType)}`;
|
|
441
|
-
return `createEnumType(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.typeName)}, ${jsonToTsSource(this.values)}${nativeArg})`;
|
|
442
|
-
}
|
|
443
|
-
};
|
|
444
|
-
var AddEnumValuesCall = class extends PostgresOpFactoryCallNode {
|
|
445
|
-
factoryName = "addEnumValues";
|
|
446
|
-
operationClass = "additive";
|
|
447
|
-
schemaName;
|
|
448
|
-
typeName;
|
|
449
|
-
nativeType;
|
|
450
|
-
values;
|
|
451
|
-
label;
|
|
452
|
-
constructor(schemaName, typeName, nativeType, values) {
|
|
453
|
-
super();
|
|
454
|
-
this.schemaName = schemaName;
|
|
455
|
-
this.typeName = typeName;
|
|
456
|
-
this.nativeType = nativeType;
|
|
457
|
-
this.values = values;
|
|
458
|
-
this.label = `Add values to enum type "${typeName}": ${values.join(", ")}`;
|
|
459
|
-
this.freeze();
|
|
460
|
-
}
|
|
461
|
-
toOp() {
|
|
462
|
-
return addEnumValues(this.schemaName, this.typeName, this.nativeType, this.values);
|
|
463
|
-
}
|
|
464
|
-
renderTypeScript() {
|
|
465
|
-
return `addEnumValues(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.typeName)}, ${jsonToTsSource(this.nativeType)}, ${jsonToTsSource(this.values)})`;
|
|
466
|
-
}
|
|
467
|
-
};
|
|
468
|
-
var DropEnumTypeCall = class extends PostgresOpFactoryCallNode {
|
|
469
|
-
factoryName = "dropEnumType";
|
|
470
|
-
operationClass = "destructive";
|
|
471
|
-
schemaName;
|
|
472
|
-
typeName;
|
|
473
|
-
label;
|
|
474
|
-
constructor(schemaName, typeName) {
|
|
475
|
-
super();
|
|
476
|
-
this.schemaName = schemaName;
|
|
477
|
-
this.typeName = typeName;
|
|
478
|
-
this.label = `Drop enum type "${typeName}"`;
|
|
479
|
-
this.freeze();
|
|
480
|
-
}
|
|
481
|
-
toOp() {
|
|
482
|
-
return dropEnumType(this.schemaName, this.typeName);
|
|
483
|
-
}
|
|
484
|
-
renderTypeScript() {
|
|
485
|
-
return `dropEnumType(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.typeName)})`;
|
|
486
|
-
}
|
|
487
|
-
};
|
|
488
|
-
var RenameTypeCall = class extends PostgresOpFactoryCallNode {
|
|
489
|
-
factoryName = "renameType";
|
|
490
|
-
operationClass = "destructive";
|
|
491
|
-
schemaName;
|
|
492
|
-
fromName;
|
|
493
|
-
toName;
|
|
494
|
-
label;
|
|
495
|
-
constructor(schemaName, fromName, toName) {
|
|
496
|
-
super();
|
|
497
|
-
this.schemaName = schemaName;
|
|
498
|
-
this.fromName = fromName;
|
|
499
|
-
this.toName = toName;
|
|
500
|
-
this.label = `Rename type "${fromName}" to "${toName}"`;
|
|
501
|
-
this.freeze();
|
|
502
|
-
}
|
|
503
|
-
toOp() {
|
|
504
|
-
return renameType(this.schemaName, this.fromName, this.toName);
|
|
505
|
-
}
|
|
506
|
-
renderTypeScript() {
|
|
507
|
-
return `renameType(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.fromName)}, ${jsonToTsSource(this.toName)})`;
|
|
508
|
-
}
|
|
509
|
-
};
|
|
510
|
-
/**
|
|
511
|
-
* Laundered pre-built operation.
|
|
512
|
-
*
|
|
513
|
-
* Wraps an already-materialized `SqlMigrationPlanOperation` — typically one
|
|
514
|
-
* produced by a SQL-family method or a codec control hook — so the planner
|
|
515
|
-
* can carry it alongside IR nodes without reverse-engineering it into a
|
|
516
|
-
* structured call class. Doubles as the user-facing escape hatch for raw
|
|
517
|
-
* migrations: authors can pass a full op shape to `rawSql({...})`.
|
|
518
|
-
*
|
|
519
|
-
* `toOp()` returns the stored op unchanged. `renderTypeScript()` emits
|
|
520
|
-
* `rawSql({...})` with the op serialized as a JSON literal — round-tripping
|
|
521
|
-
* requires every field on the op to be JSON-serializable (no closures).
|
|
522
|
-
*/
|
|
523
|
-
var RawSqlCall = class extends PostgresOpFactoryCallNode {
|
|
524
|
-
factoryName = "rawSql";
|
|
525
|
-
operationClass;
|
|
526
|
-
label;
|
|
527
|
-
op;
|
|
528
|
-
constructor(op) {
|
|
529
|
-
super();
|
|
530
|
-
this.op = op;
|
|
531
|
-
this.label = op.label;
|
|
532
|
-
this.operationClass = op.operationClass;
|
|
533
|
-
this.freeze();
|
|
534
|
-
}
|
|
535
|
-
toOp() {
|
|
536
|
-
return this.op;
|
|
537
|
-
}
|
|
538
|
-
renderTypeScript() {
|
|
539
|
-
return `rawSql(${jsonToTsSource(this.op)})`;
|
|
540
|
-
}
|
|
541
|
-
};
|
|
542
|
-
var CreateExtensionCall = class extends PostgresOpFactoryCallNode {
|
|
543
|
-
factoryName = "createExtension";
|
|
544
|
-
operationClass = "additive";
|
|
545
|
-
extensionName;
|
|
546
|
-
label;
|
|
547
|
-
constructor(extensionName) {
|
|
548
|
-
super();
|
|
549
|
-
this.extensionName = extensionName;
|
|
550
|
-
this.label = `Create extension "${extensionName}"`;
|
|
551
|
-
this.freeze();
|
|
552
|
-
}
|
|
553
|
-
toOp() {
|
|
554
|
-
return createExtension(this.extensionName);
|
|
555
|
-
}
|
|
556
|
-
renderTypeScript() {
|
|
557
|
-
return `createExtension(${jsonToTsSource(this.extensionName)})`;
|
|
558
|
-
}
|
|
559
|
-
};
|
|
560
|
-
var CreateSchemaCall = class extends PostgresOpFactoryCallNode {
|
|
561
|
-
factoryName = "createSchema";
|
|
562
|
-
operationClass = "additive";
|
|
563
|
-
schemaName;
|
|
564
|
-
label;
|
|
565
|
-
constructor(schemaName) {
|
|
566
|
-
super();
|
|
567
|
-
this.schemaName = schemaName;
|
|
568
|
-
this.label = `Create schema "${schemaName}"`;
|
|
569
|
-
this.freeze();
|
|
570
|
-
}
|
|
571
|
-
toOp() {
|
|
572
|
-
return createSchema(this.schemaName);
|
|
573
|
-
}
|
|
574
|
-
renderTypeScript() {
|
|
575
|
-
return `createSchema(${jsonToTsSource(this.schemaName)})`;
|
|
576
|
-
}
|
|
577
|
-
};
|
|
578
|
-
/**
|
|
579
|
-
* A planner-generated data-transform stub. `checkSlot` and `runSlot` name
|
|
580
|
-
* the unfilled authoring slots that the rendered `migration.ts` will expose
|
|
581
|
-
* to the user via `placeholder("…")` calls. `toOp()` always throws
|
|
582
|
-
* `PN-MIG-2001`: the planner cannot lower a stubbed transform to a runtime
|
|
583
|
-
* op — the user must fill the rendered `migration.ts` and re-emit.
|
|
584
|
-
*/
|
|
585
|
-
var DataTransformCall = class extends PostgresOpFactoryCallNode {
|
|
586
|
-
factoryName = "dataTransform";
|
|
587
|
-
operationClass;
|
|
588
|
-
label;
|
|
589
|
-
checkSlot;
|
|
590
|
-
runSlot;
|
|
591
|
-
constructor(label, checkSlot, runSlot, operationClass = "data") {
|
|
592
|
-
super();
|
|
593
|
-
this.label = label;
|
|
594
|
-
this.checkSlot = checkSlot;
|
|
595
|
-
this.runSlot = runSlot;
|
|
596
|
-
this.operationClass = operationClass;
|
|
597
|
-
this.freeze();
|
|
598
|
-
}
|
|
599
|
-
toOp() {
|
|
600
|
-
throw errorUnfilledPlaceholder(this.label);
|
|
601
|
-
}
|
|
602
|
-
renderTypeScript() {
|
|
603
|
-
return [
|
|
604
|
-
`this.dataTransform(endContract, ${jsonToTsSource(this.label)}, {`,
|
|
605
|
-
` check: () => placeholder(${jsonToTsSource(this.checkSlot)}),`,
|
|
606
|
-
` run: () => placeholder(${jsonToTsSource(this.runSlot)}),`,
|
|
607
|
-
"})"
|
|
608
|
-
].join("\n");
|
|
609
|
-
}
|
|
610
|
-
importRequirements() {
|
|
611
|
-
return [{
|
|
612
|
-
moduleSpecifier: TARGET_MIGRATION_MODULE,
|
|
613
|
-
symbol: "placeholder"
|
|
614
|
-
}, {
|
|
615
|
-
moduleSpecifier: "./end-contract.json",
|
|
616
|
-
symbol: "endContract",
|
|
617
|
-
kind: "default",
|
|
618
|
-
attributes: { type: "json" }
|
|
619
|
-
}];
|
|
620
|
-
}
|
|
621
|
-
};
|
|
622
|
-
//#endregion
|
|
623
|
-
export { SetNotNullCall as C, SetDefaultCall as S, DropIndexCall as _, AddUniqueCall as a, RawSqlCall as b, CreateExtensionCall as c, CreateTableCall as d, DataTransformCall as f, DropEnumTypeCall as g, DropDefaultCall as h, AddPrimaryKeyCall as i, CreateIndexCall as l, DropConstraintCall as m, AddEnumValuesCall as n, AlterColumnTypeCall as o, DropColumnCall as p, AddForeignKeyCall as r, CreateEnumTypeCall as s, AddColumnCall as t, CreateSchemaCall as u, DropNotNullCall as v, RenameTypeCall as x, DropTableCall as y };
|
|
624
|
-
|
|
625
|
-
//# sourceMappingURL=op-factory-call-ewOd5q6L.mjs.map
|