@prisma-next/target-sqlite 0.5.0-dev.8 → 0.5.0-dev.80
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-CYwMu3-4.d.mts +13 -0
- package/dist/codec-ids-CYwMu3-4.d.mts.map +1 -0
- package/dist/codec-ids-CuUxYcd0.mjs +13 -0
- package/dist/codec-ids-CuUxYcd0.mjs.map +1 -0
- package/dist/codec-ids.d.mts +2 -0
- package/dist/codec-ids.mjs +2 -0
- package/dist/codec-types-DNauB5UT.d.mts +23 -0
- package/dist/codec-types-DNauB5UT.d.mts.map +1 -0
- package/dist/codec-types.d.mts +3 -0
- package/dist/codec-types.mjs +2 -0
- package/dist/codecs-BAlEiSeP.d.mts +126 -0
- package/dist/codecs-BAlEiSeP.d.mts.map +1 -0
- package/dist/codecs-DVnHtVWW.mjs +220 -0
- package/dist/codecs-DVnHtVWW.mjs.map +1 -0
- package/dist/codecs.d.mts +2 -0
- package/dist/codecs.mjs +13 -0
- package/dist/codecs.mjs.map +1 -0
- package/dist/control.d.mts +4 -3
- package/dist/control.d.mts.map +1 -1
- package/dist/control.mjs +428 -5
- package/dist/control.mjs.map +1 -1
- package/dist/default-normalizer-3Fccw7yw.mjs +69 -0
- package/dist/default-normalizer-3Fccw7yw.mjs.map +1 -0
- package/dist/default-normalizer.d.mts +7 -0
- package/dist/default-normalizer.d.mts.map +1 -0
- package/dist/default-normalizer.mjs +2 -0
- package/dist/descriptor-meta-CE2Kbn9b.mjs +17 -0
- package/dist/descriptor-meta-CE2Kbn9b.mjs.map +1 -0
- package/dist/migration.d.mts +85 -0
- package/dist/migration.d.mts.map +1 -0
- package/dist/migration.mjs +49 -0
- package/dist/migration.mjs.map +1 -0
- package/dist/native-type-normalizer-BlN5XfD-.mjs +14 -0
- package/dist/native-type-normalizer-BlN5XfD-.mjs.map +1 -0
- package/dist/native-type-normalizer.d.mts +11 -0
- package/dist/native-type-normalizer.d.mts.map +1 -0
- package/dist/native-type-normalizer.mjs +2 -0
- package/dist/op-factory-call-DRKKURAO.mjs +279 -0
- package/dist/op-factory-call-DRKKURAO.mjs.map +1 -0
- package/dist/op-factory-call.d.mts +151 -0
- package/dist/op-factory-call.d.mts.map +1 -0
- package/dist/op-factory-call.mjs +2 -0
- package/dist/pack.d.mts +35 -1
- package/dist/pack.d.mts.map +1 -1
- package/dist/pack.mjs +2 -3
- package/dist/planner-CdCU0v1B.mjs +525 -0
- package/dist/planner-CdCU0v1B.mjs.map +1 -0
- package/dist/planner-produced-sqlite-migration-CI9LdXPr.d.mts +29 -0
- package/dist/planner-produced-sqlite-migration-CI9LdXPr.d.mts.map +1 -0
- package/dist/planner-produced-sqlite-migration-C_TzWbT0.mjs +110 -0
- package/dist/planner-produced-sqlite-migration-C_TzWbT0.mjs.map +1 -0
- package/dist/planner-produced-sqlite-migration.d.mts +2 -0
- package/dist/planner-produced-sqlite-migration.mjs +2 -0
- package/dist/planner-target-details-Bm71XPKb.mjs +15 -0
- package/dist/planner-target-details-Bm71XPKb.mjs.map +1 -0
- package/dist/planner-target-details-vhvZDWK1.d.mts +12 -0
- package/dist/planner-target-details-vhvZDWK1.d.mts.map +1 -0
- package/dist/planner-target-details.d.mts +2 -0
- package/dist/planner-target-details.mjs +2 -0
- package/dist/planner.d.mts +59 -0
- package/dist/planner.d.mts.map +1 -0
- package/dist/planner.mjs +2 -0
- package/dist/render-ops-CSRDT4YL.mjs +8 -0
- package/dist/render-ops-CSRDT4YL.mjs.map +1 -0
- package/dist/render-ops.d.mts +10 -0
- package/dist/render-ops.d.mts.map +1 -0
- package/dist/render-ops.mjs +2 -0
- package/dist/runtime.d.mts.map +1 -1
- package/dist/runtime.mjs +4 -8
- package/dist/runtime.mjs.map +1 -1
- package/dist/shared-qLsgTOZs.d.mts +69 -0
- package/dist/shared-qLsgTOZs.d.mts.map +1 -0
- package/dist/sql-utils-DhevMgef.mjs +35 -0
- package/dist/sql-utils-DhevMgef.mjs.map +1 -0
- package/dist/sql-utils.d.mts +22 -0
- package/dist/sql-utils.d.mts.map +1 -0
- package/dist/sql-utils.mjs +2 -0
- package/dist/sqlite-migration-BBJktVVw.mjs +16 -0
- package/dist/sqlite-migration-BBJktVVw.mjs.map +1 -0
- package/dist/sqlite-migration-DAb2NEX6.d.mts +17 -0
- package/dist/sqlite-migration-DAb2NEX6.d.mts.map +1 -0
- package/dist/statement-builders-Dne-LkAV.mjs +158 -0
- package/dist/statement-builders-Dne-LkAV.mjs.map +1 -0
- package/dist/statement-builders.d.mts +68 -0
- package/dist/statement-builders.d.mts.map +1 -0
- package/dist/statement-builders.mjs +2 -0
- package/dist/tables-D84zfPZI.mjs +403 -0
- package/dist/tables-D84zfPZI.mjs.map +1 -0
- package/package.json +32 -10
- package/src/core/authoring.ts +9 -0
- package/src/core/codec-helpers.ts +11 -0
- package/src/core/codec-ids.ts +13 -0
- package/src/core/codecs.ts +337 -0
- package/src/core/control-target.ts +54 -11
- package/src/core/default-normalizer.ts +92 -0
- package/src/core/descriptor-meta.ts +5 -1
- package/src/core/migrations/issue-planner.ts +586 -0
- package/src/core/migrations/op-factory-call.ts +369 -0
- package/src/core/migrations/operations/columns.ts +62 -0
- package/src/core/migrations/operations/data-transform.ts +51 -0
- package/src/core/migrations/operations/indexes.ts +52 -0
- package/src/core/migrations/operations/raw.ts +12 -0
- package/src/core/migrations/operations/shared.ts +120 -0
- package/src/core/migrations/operations/tables.ts +388 -0
- package/src/core/migrations/planner-ddl-builders.ts +142 -0
- package/src/core/migrations/planner-produced-sqlite-migration.ts +70 -0
- package/src/core/migrations/planner-strategies.ts +231 -0
- package/src/core/migrations/planner-target-details.ts +33 -0
- package/src/core/migrations/planner.ts +183 -0
- package/src/core/migrations/render-ops.ts +15 -0
- package/src/core/migrations/render-typescript.ts +91 -0
- package/src/core/migrations/runner.ts +724 -0
- package/src/core/migrations/sqlite-migration.ts +13 -0
- package/src/core/migrations/statement-builders.ts +212 -0
- package/src/core/native-type-normalizer.ts +9 -0
- package/src/core/registry.ts +11 -0
- package/src/core/runtime-target.ts +1 -3
- package/src/core/sql-utils.ts +47 -0
- package/src/exports/codec-ids.ts +13 -0
- package/src/exports/codec-types.ts +43 -0
- package/src/exports/codecs.ts +20 -0
- package/src/exports/control.ts +1 -0
- package/src/exports/default-normalizer.ts +1 -0
- package/src/exports/migration.ts +24 -0
- package/src/exports/native-type-normalizer.ts +1 -0
- package/src/exports/op-factory-call.ts +12 -0
- package/src/exports/planner-produced-sqlite-migration.ts +4 -0
- package/src/exports/planner-target-details.ts +2 -0
- package/src/exports/planner.ts +2 -0
- package/src/exports/render-ops.ts +1 -0
- package/src/exports/sql-utils.ts +1 -0
- package/src/exports/statement-builders.ts +12 -0
- package/dist/descriptor-meta-DbuuziYA.mjs +0 -14
- package/dist/descriptor-meta-DbuuziYA.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descriptor-meta-CE2Kbn9b.mjs","names":[],"sources":["../src/core/authoring.ts","../src/core/descriptor-meta.ts"],"sourcesContent":["import { temporalAuthoringPresets } from '@prisma-next/family-sql/control';\nimport type { AuthoringFieldNamespace } from '@prisma-next/framework-components/authoring';\n\nexport const sqliteAuthoringFieldPresets = {\n temporal: temporalAuthoringPresets({\n codecId: 'sqlite/datetime@1',\n nativeType: 'text',\n }),\n} as const satisfies AuthoringFieldNamespace;\n","import type { CodecTypes } from '../exports/codec-types';\nimport { sqliteAuthoringFieldPresets } from './authoring';\n\nconst sqliteTargetDescriptorMetaBase = {\n kind: 'target',\n familyId: 'sql',\n targetId: 'sqlite',\n id: 'sqlite',\n version: '0.0.1',\n capabilities: {},\n authoring: {\n field: sqliteAuthoringFieldPresets,\n },\n} as const;\n\nexport const sqliteTargetDescriptorMeta: typeof sqliteTargetDescriptorMetaBase & {\n readonly __codecTypes?: CodecTypes;\n} = sqliteTargetDescriptorMetaBase;\n"],"mappings":";ACeA,MAAa,6BAET;CAbF,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,SAAS;CACT,cAAc,EAAE;CAChB,WAAW,EACT,OAAO,EDPT,UAAU,yBAAyB;EACjC,SAAS;EACT,YAAY;EACb,CAAC,ECIO,EACR;CAKC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { i as SqliteTableSpec, n as SqliteColumnSpec, r as SqliteIndexSpec, t as Op } from "./shared-qLsgTOZs.mjs";
|
|
2
|
+
import { t as SqliteMigration } from "./sqlite-migration-DAb2NEX6.mjs";
|
|
3
|
+
import { MigrationOperationClass } from "@prisma-next/family-sql/control";
|
|
4
|
+
import { placeholder } from "@prisma-next/errors/migration";
|
|
5
|
+
import { MigrationCLI } from "@prisma-next/cli/migration-cli";
|
|
6
|
+
|
|
7
|
+
//#region src/core/migrations/operations/columns.d.ts
|
|
8
|
+
declare function addColumn(tableName: string, column: SqliteColumnSpec): Op;
|
|
9
|
+
declare function dropColumn(tableName: string, columnName: string): Op;
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/core/migrations/operations/data-transform.d.ts
|
|
12
|
+
interface DataTransformOptions {
|
|
13
|
+
/** Stable id used in the ledger / for runner idempotency tracking. */
|
|
14
|
+
readonly id: string;
|
|
15
|
+
/** Human-readable label surfaced in CLI output. */
|
|
16
|
+
readonly label: string;
|
|
17
|
+
/** Table the backfill targets; informs `target.details`. */
|
|
18
|
+
readonly table: string;
|
|
19
|
+
/**
|
|
20
|
+
* Short description of the step (shown by the runner on execute). The
|
|
21
|
+
* planner leaves this as `placeholder(...)` for users to replace.
|
|
22
|
+
*/
|
|
23
|
+
readonly description: string;
|
|
24
|
+
/**
|
|
25
|
+
* Producer of the SQL string to execute. Invoked eagerly by
|
|
26
|
+
* `dataTransform(...)`, mirroring the Postgres factory — by the time the
|
|
27
|
+
* user calls this factory in `migration.ts`, the SQL is expected to be
|
|
28
|
+
* ready. Planner-emitted stubs that need to defer until the user fills
|
|
29
|
+
* in the SQL go through `DataTransformCall.renderTypeScript()` instead;
|
|
30
|
+
* this factory is only for the post-fill, runnable form.
|
|
31
|
+
*/
|
|
32
|
+
readonly run: () => string;
|
|
33
|
+
}
|
|
34
|
+
declare function dataTransform(opts: DataTransformOptions): Op;
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/core/migrations/operations/indexes.d.ts
|
|
37
|
+
declare function createIndex(tableName: string, indexName: string, columns: readonly string[]): Op;
|
|
38
|
+
declare function dropIndex(tableName: string, indexName: string): Op;
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/core/migrations/operations/raw.d.ts
|
|
41
|
+
/**
|
|
42
|
+
* Identity factory for an already-materialized
|
|
43
|
+
* `SqlMigrationPlanOperation<SqlitePlanTargetDetails>`. Mirrors the Postgres
|
|
44
|
+
* `rawSql` factory: the planner uses this to carry ops produced by SQL-family
|
|
45
|
+
* paths (codec lifecycle hooks, raw-SQL escape hatches) alongside structured
|
|
46
|
+
* call IR without reverse-engineering their shape.
|
|
47
|
+
*/
|
|
48
|
+
declare function rawSql(op: Op): Op;
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/core/migrations/operations/tables.d.ts
|
|
51
|
+
declare function createTable(tableName: string, spec: SqliteTableSpec): Op;
|
|
52
|
+
declare function dropTable(tableName: string): Op;
|
|
53
|
+
interface RecreateTableArgs {
|
|
54
|
+
readonly tableName: string;
|
|
55
|
+
/** New (post-recreate) shape of the table. Same flat spec as `createTable`. */
|
|
56
|
+
readonly contractTable: SqliteTableSpec;
|
|
57
|
+
/**
|
|
58
|
+
* Names of columns that exist in the live (pre-recreate) schema. Used to
|
|
59
|
+
* compute the `INSERT INTO temp ... SELECT ... FROM old` column list — only
|
|
60
|
+
* shared columns are copied, so dropped columns are left behind and added
|
|
61
|
+
* columns come from defaults.
|
|
62
|
+
*/
|
|
63
|
+
readonly schemaColumnNames: readonly string[];
|
|
64
|
+
/**
|
|
65
|
+
* Indexes (declared + FK-backing, deduped by column-set) to recreate after
|
|
66
|
+
* the table has been replaced. The planner pre-merges these.
|
|
67
|
+
*/
|
|
68
|
+
readonly indexes: readonly SqliteIndexSpec[];
|
|
69
|
+
/** Human-readable summary of the change, built by the planner from issues. */
|
|
70
|
+
readonly summary: string;
|
|
71
|
+
/**
|
|
72
|
+
* Per-issue postcheck steps appended after the structural postchecks. The
|
|
73
|
+
* planner pre-builds these via `buildRecreatePostchecks` so the call IR
|
|
74
|
+
* carries flat, serializable data only — no `SchemaIssue` references.
|
|
75
|
+
*/
|
|
76
|
+
readonly postchecks: readonly {
|
|
77
|
+
readonly description: string;
|
|
78
|
+
readonly sql: string;
|
|
79
|
+
}[];
|
|
80
|
+
readonly operationClass: MigrationOperationClass;
|
|
81
|
+
}
|
|
82
|
+
declare function recreateTable(args: RecreateTableArgs): Op;
|
|
83
|
+
//#endregion
|
|
84
|
+
export { type DataTransformOptions, SqliteMigration as Migration, MigrationCLI, addColumn, createIndex, createTable, dataTransform, dropColumn, dropIndex, dropTable, placeholder, rawSql, recreateTable };
|
|
85
|
+
//# sourceMappingURL=migration.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migration.d.mts","names":[],"sources":["../src/core/migrations/operations/columns.ts","../src/core/migrations/operations/data-transform.ts","../src/core/migrations/operations/indexes.ts","../src/core/migrations/operations/raw.ts","../src/core/migrations/operations/tables.ts"],"mappings":";;;;;;;iBAIgB,SAAA,CAAU,SAAA,UAAmB,MAAA,EAAQ,gBAAA,GAAmB,EAAA;AAAA,iBA+BxD,UAAA,CAAW,SAAA,UAAmB,UAAA,WAAqB,EAAA;;;UCnBlD,oBAAA;EDZ4B;EAAA,SCclC,EAAA;EDd+D;EAAA,SCgB/D,KAAA;EDeK;EAAA,SCbL,KAAA;;;;;WAKA,WAAA;EDQ0D;;;;;ACnBrE;;;EDmBqE,SCC1D,GAAA;AAAA;AAAA,iBAGK,aAAA,CAAc,IAAA,EAAM,oBAAA,GAAuB,EAAA;;;iBClC3C,WAAA,CAAY,SAAA,UAAmB,SAAA,UAAmB,OAAA,sBAA6B,EAAA;AAAA,iBAyB/E,SAAA,CAAU,SAAA,UAAmB,SAAA,WAAoB,EAAA;;;;;;;;;;iBCrBjD,MAAA,CAAO,EAAA,EAAI,EAAA,GAAK,EAAA;;;iBCmChB,WAAA,CAAY,SAAA,UAAmB,IAAA,EAAM,eAAA,GAAkB,EAAA;AAAA,iBAuBvD,SAAA,CAAU,SAAA,WAAoB,EAAA;AAAA,UAuB7B,iBAAA;EAAA,SACN,SAAA;;WAEA,aAAA,EAAe,eAAA;EJzFD;;;;;;EAAA,SIgGd,iBAAA;EJhG+D;;AA+B1E;;EA/B0E,SIqG/D,OAAA,WAAkB,eAAA;EJtEwC;EAAA,SIwE1D,OAAA;EJxEmC;;;;;EAAA,SI8EnC,UAAA;IAAA,SAAgC,WAAA;IAAA,SAA8B,GAAA;EAAA;EAAA,SAC9D,cAAA,EAAgB,uBAAA;AAAA;AAAA,iBAGX,aAAA,CAAc,IAAA,EAAM,iBAAA,GAAoB,EAAA"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { t as buildTargetDetails } from "./planner-target-details-Bm71XPKb.mjs";
|
|
2
|
+
import { a as recreateTable, f as addColumn, i as dropTable, m as step, o as createIndex, p as dropColumn, r as createTable, s as dropIndex } from "./tables-D84zfPZI.mjs";
|
|
3
|
+
import { t as SqliteMigration } from "./sqlite-migration-BBJktVVw.mjs";
|
|
4
|
+
import { placeholder } from "@prisma-next/errors/migration";
|
|
5
|
+
import { MigrationCLI } from "@prisma-next/cli/migration-cli";
|
|
6
|
+
//#region src/core/migrations/operations/data-transform.ts
|
|
7
|
+
/**
|
|
8
|
+
* User-facing `dataTransform` factory for the SQLite migration authoring
|
|
9
|
+
* surface. Invoked directly inside a `migration.ts` file to supply a
|
|
10
|
+
* user-authored SQL statement that runs with operation class `'data'`.
|
|
11
|
+
*
|
|
12
|
+
* Typical use: the planner emits a `DataTransformCall` stub when a NOT NULL
|
|
13
|
+
* tightening requires a backfill. The rendered `migration.ts` exposes the
|
|
14
|
+
* backfill as a `placeholder("…")` slot the user fills in with an
|
|
15
|
+
* `UPDATE … WHERE col IS NULL` statement. The filled-in `dataTransform(...)`
|
|
16
|
+
* invocation returns a runnable operation the runner executes before the
|
|
17
|
+
* subsequent recreate-table op copies data into the tightened schema.
|
|
18
|
+
*/
|
|
19
|
+
function dataTransform(opts) {
|
|
20
|
+
return {
|
|
21
|
+
id: opts.id,
|
|
22
|
+
label: opts.label,
|
|
23
|
+
summary: opts.description,
|
|
24
|
+
operationClass: "data",
|
|
25
|
+
target: {
|
|
26
|
+
id: "sqlite",
|
|
27
|
+
details: buildTargetDetails("table", opts.table)
|
|
28
|
+
},
|
|
29
|
+
precheck: [],
|
|
30
|
+
execute: [step(opts.description, opts.run())],
|
|
31
|
+
postcheck: []
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/core/migrations/operations/raw.ts
|
|
36
|
+
/**
|
|
37
|
+
* Identity factory for an already-materialized
|
|
38
|
+
* `SqlMigrationPlanOperation<SqlitePlanTargetDetails>`. Mirrors the Postgres
|
|
39
|
+
* `rawSql` factory: the planner uses this to carry ops produced by SQL-family
|
|
40
|
+
* paths (codec lifecycle hooks, raw-SQL escape hatches) alongside structured
|
|
41
|
+
* call IR without reverse-engineering their shape.
|
|
42
|
+
*/
|
|
43
|
+
function rawSql(op) {
|
|
44
|
+
return op;
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { SqliteMigration as Migration, MigrationCLI, addColumn, createIndex, createTable, dataTransform, dropColumn, dropIndex, dropTable, placeholder, rawSql, recreateTable };
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=migration.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migration.mjs","names":[],"sources":["../src/core/migrations/operations/data-transform.ts","../src/core/migrations/operations/raw.ts"],"sourcesContent":["/**\n * User-facing `dataTransform` factory for the SQLite migration authoring\n * surface. Invoked directly inside a `migration.ts` file to supply a\n * user-authored SQL statement that runs with operation class `'data'`.\n *\n * Typical use: the planner emits a `DataTransformCall` stub when a NOT NULL\n * tightening requires a backfill. The rendered `migration.ts` exposes the\n * backfill as a `placeholder(\"…\")` slot the user fills in with an\n * `UPDATE … WHERE col IS NULL` statement. The filled-in `dataTransform(...)`\n * invocation returns a runnable operation the runner executes before the\n * subsequent recreate-table op copies data into the tightened schema.\n */\n\nimport { buildTargetDetails } from '../planner-target-details';\nimport { type Op, step } from './shared';\n\nexport interface DataTransformOptions {\n /** Stable id used in the ledger / for runner idempotency tracking. */\n readonly id: string;\n /** Human-readable label surfaced in CLI output. */\n readonly label: string;\n /** Table the backfill targets; informs `target.details`. */\n readonly table: string;\n /**\n * Short description of the step (shown by the runner on execute). The\n * planner leaves this as `placeholder(...)` for users to replace.\n */\n readonly description: string;\n /**\n * Producer of the SQL string to execute. Invoked eagerly by\n * `dataTransform(...)`, mirroring the Postgres factory — by the time the\n * user calls this factory in `migration.ts`, the SQL is expected to be\n * ready. Planner-emitted stubs that need to defer until the user fills\n * in the SQL go through `DataTransformCall.renderTypeScript()` instead;\n * this factory is only for the post-fill, runnable form.\n */\n readonly run: () => string;\n}\n\nexport function dataTransform(opts: DataTransformOptions): Op {\n return {\n id: opts.id,\n label: opts.label,\n summary: opts.description,\n operationClass: 'data',\n target: { id: 'sqlite', details: buildTargetDetails('table', opts.table) },\n precheck: [],\n execute: [step(opts.description, opts.run())],\n postcheck: [],\n };\n}\n","import type { Op } from './shared';\n\n/**\n * Identity factory for an already-materialized\n * `SqlMigrationPlanOperation<SqlitePlanTargetDetails>`. Mirrors the Postgres\n * `rawSql` factory: the planner uses this to carry ops produced by SQL-family\n * paths (codec lifecycle hooks, raw-SQL escape hatches) alongside structured\n * call IR without reverse-engineering their shape.\n */\nexport function rawSql(op: Op): Op {\n return op;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAuCA,SAAgB,cAAc,MAAgC;CAC5D,OAAO;EACL,IAAI,KAAK;EACT,OAAO,KAAK;EACZ,SAAS,KAAK;EACd,gBAAgB;EAChB,QAAQ;GAAE,IAAI;GAAU,SAAS,mBAAmB,SAAS,KAAK,MAAM;GAAE;EAC1E,UAAU,EAAE;EACZ,SAAS,CAAC,KAAK,KAAK,aAAa,KAAK,KAAK,CAAC,CAAC;EAC7C,WAAW,EAAE;EACd;;;;;;;;;;;ACxCH,SAAgB,OAAO,IAAY;CACjC,OAAO"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/core/native-type-normalizer.ts
|
|
2
|
+
/**
|
|
3
|
+
* Canonicalizes SQLite native-type tokens for verifier comparison.
|
|
4
|
+
* Lives target-side so the planner / runner / adapter all share the same
|
|
5
|
+
* normalization without crossing the `target-sqlite` ↔ `adapter-sqlite`
|
|
6
|
+
* boundary.
|
|
7
|
+
*/
|
|
8
|
+
function normalizeSqliteNativeType(nativeType) {
|
|
9
|
+
return nativeType.trim().toLowerCase();
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { normalizeSqliteNativeType as t };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=native-type-normalizer-BlN5XfD-.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-type-normalizer-BlN5XfD-.mjs","names":[],"sources":["../src/core/native-type-normalizer.ts"],"sourcesContent":["/**\n * Canonicalizes SQLite native-type tokens for verifier comparison.\n * Lives target-side so the planner / runner / adapter all share the same\n * normalization without crossing the `target-sqlite` ↔ `adapter-sqlite`\n * boundary.\n */\nexport function normalizeSqliteNativeType(nativeType: string): string {\n return nativeType.trim().toLowerCase();\n}\n"],"mappings":";;;;;;;AAMA,SAAgB,0BAA0B,YAA4B;CACpE,OAAO,WAAW,MAAM,CAAC,aAAa"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/core/native-type-normalizer.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Canonicalizes SQLite native-type tokens for verifier comparison.
|
|
4
|
+
* Lives target-side so the planner / runner / adapter all share the same
|
|
5
|
+
* normalization without crossing the `target-sqlite` ↔ `adapter-sqlite`
|
|
6
|
+
* boundary.
|
|
7
|
+
*/
|
|
8
|
+
declare function normalizeSqliteNativeType(nativeType: string): string;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { normalizeSqliteNativeType };
|
|
11
|
+
//# sourceMappingURL=native-type-normalizer.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-type-normalizer.d.mts","names":[],"sources":["../src/core/native-type-normalizer.ts"],"mappings":";;AAMA;;;;;iBAAgB,yBAAA,CAA0B,UAAA"}
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { a as recreateTable, f as addColumn, i as dropTable, o as createIndex, p as dropColumn, r as createTable, s as dropIndex } from "./tables-D84zfPZI.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
|
+
* SQLite migration IR: one concrete `*Call` class per pure factory under
|
|
7
|
+
* `operations/`, plus a shared `SqliteOpFactoryCallNode` abstract base.
|
|
8
|
+
*
|
|
9
|
+
* Each call class carries fully-resolved literal arguments (flat
|
|
10
|
+
* `SqliteColumnSpec` / `SqliteTableSpec` etc.) — codec / `typeRef` / default
|
|
11
|
+
* expansion happens upstream in the issue-planner / strategies, mirroring
|
|
12
|
+
* the Postgres `ColumnSpec` pattern. As a result, `toOp()` and
|
|
13
|
+
* `renderTypeScript()` both pass the same flat data through; the rendered
|
|
14
|
+
* TypeScript scaffold is fully self-contained and does not need access to a
|
|
15
|
+
* `storageTypes` map at runtime.
|
|
16
|
+
*/
|
|
17
|
+
const TARGET_MIGRATION_MODULE = "@prisma-next/target-sqlite/migration";
|
|
18
|
+
var SqliteOpFactoryCallNode = class extends TsExpression {
|
|
19
|
+
importRequirements() {
|
|
20
|
+
return [{
|
|
21
|
+
moduleSpecifier: TARGET_MIGRATION_MODULE,
|
|
22
|
+
symbol: this.factoryName
|
|
23
|
+
}];
|
|
24
|
+
}
|
|
25
|
+
freeze() {
|
|
26
|
+
Object.freeze(this);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var CreateTableCall = class extends SqliteOpFactoryCallNode {
|
|
30
|
+
factoryName = "createTable";
|
|
31
|
+
operationClass = "additive";
|
|
32
|
+
tableName;
|
|
33
|
+
spec;
|
|
34
|
+
label;
|
|
35
|
+
constructor(tableName, spec) {
|
|
36
|
+
super();
|
|
37
|
+
this.tableName = tableName;
|
|
38
|
+
this.spec = spec;
|
|
39
|
+
this.label = `Create table ${tableName}`;
|
|
40
|
+
this.freeze();
|
|
41
|
+
}
|
|
42
|
+
toOp() {
|
|
43
|
+
return createTable(this.tableName, this.spec);
|
|
44
|
+
}
|
|
45
|
+
renderTypeScript() {
|
|
46
|
+
return `createTable(${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.spec)})`;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var DropTableCall = class extends SqliteOpFactoryCallNode {
|
|
50
|
+
factoryName = "dropTable";
|
|
51
|
+
operationClass = "destructive";
|
|
52
|
+
tableName;
|
|
53
|
+
label;
|
|
54
|
+
constructor(tableName) {
|
|
55
|
+
super();
|
|
56
|
+
this.tableName = tableName;
|
|
57
|
+
this.label = `Drop table ${tableName}`;
|
|
58
|
+
this.freeze();
|
|
59
|
+
}
|
|
60
|
+
toOp() {
|
|
61
|
+
return dropTable(this.tableName);
|
|
62
|
+
}
|
|
63
|
+
renderTypeScript() {
|
|
64
|
+
return `dropTable(${jsonToTsSource(this.tableName)})`;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
var RecreateTableCall = class extends SqliteOpFactoryCallNode {
|
|
68
|
+
factoryName = "recreateTable";
|
|
69
|
+
operationClass;
|
|
70
|
+
tableName;
|
|
71
|
+
contractTable;
|
|
72
|
+
schemaColumnNames;
|
|
73
|
+
indexes;
|
|
74
|
+
summary;
|
|
75
|
+
postchecks;
|
|
76
|
+
label;
|
|
77
|
+
constructor(args) {
|
|
78
|
+
super();
|
|
79
|
+
this.tableName = args.tableName;
|
|
80
|
+
this.contractTable = args.contractTable;
|
|
81
|
+
this.schemaColumnNames = args.schemaColumnNames;
|
|
82
|
+
this.indexes = args.indexes;
|
|
83
|
+
this.summary = args.summary;
|
|
84
|
+
this.postchecks = args.postchecks;
|
|
85
|
+
this.operationClass = args.operationClass;
|
|
86
|
+
this.label = `Recreate table ${args.tableName}`;
|
|
87
|
+
this.freeze();
|
|
88
|
+
}
|
|
89
|
+
toOp() {
|
|
90
|
+
return recreateTable({
|
|
91
|
+
tableName: this.tableName,
|
|
92
|
+
contractTable: this.contractTable,
|
|
93
|
+
schemaColumnNames: this.schemaColumnNames,
|
|
94
|
+
indexes: this.indexes,
|
|
95
|
+
summary: this.summary,
|
|
96
|
+
postchecks: this.postchecks,
|
|
97
|
+
operationClass: this.operationClass
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
renderTypeScript() {
|
|
101
|
+
return `recreateTable(${jsonToTsSource({
|
|
102
|
+
tableName: this.tableName,
|
|
103
|
+
contractTable: this.contractTable,
|
|
104
|
+
schemaColumnNames: this.schemaColumnNames,
|
|
105
|
+
indexes: this.indexes,
|
|
106
|
+
summary: this.summary,
|
|
107
|
+
postchecks: this.postchecks,
|
|
108
|
+
operationClass: this.operationClass
|
|
109
|
+
})})`;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
var AddColumnCall = class extends SqliteOpFactoryCallNode {
|
|
113
|
+
factoryName = "addColumn";
|
|
114
|
+
operationClass = "additive";
|
|
115
|
+
tableName;
|
|
116
|
+
columnName;
|
|
117
|
+
column;
|
|
118
|
+
label;
|
|
119
|
+
constructor(tableName, column) {
|
|
120
|
+
super();
|
|
121
|
+
this.tableName = tableName;
|
|
122
|
+
this.columnName = column.name;
|
|
123
|
+
this.column = column;
|
|
124
|
+
this.label = `Add column ${column.name} on ${tableName}`;
|
|
125
|
+
this.freeze();
|
|
126
|
+
}
|
|
127
|
+
toOp() {
|
|
128
|
+
return addColumn(this.tableName, this.column);
|
|
129
|
+
}
|
|
130
|
+
renderTypeScript() {
|
|
131
|
+
return `addColumn(${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.column)})`;
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
var DropColumnCall = class extends SqliteOpFactoryCallNode {
|
|
135
|
+
factoryName = "dropColumn";
|
|
136
|
+
operationClass = "destructive";
|
|
137
|
+
tableName;
|
|
138
|
+
columnName;
|
|
139
|
+
label;
|
|
140
|
+
constructor(tableName, columnName) {
|
|
141
|
+
super();
|
|
142
|
+
this.tableName = tableName;
|
|
143
|
+
this.columnName = columnName;
|
|
144
|
+
this.label = `Drop column ${columnName} on ${tableName}`;
|
|
145
|
+
this.freeze();
|
|
146
|
+
}
|
|
147
|
+
toOp() {
|
|
148
|
+
return dropColumn(this.tableName, this.columnName);
|
|
149
|
+
}
|
|
150
|
+
renderTypeScript() {
|
|
151
|
+
return `dropColumn(${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.columnName)})`;
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
var CreateIndexCall = class extends SqliteOpFactoryCallNode {
|
|
155
|
+
factoryName = "createIndex";
|
|
156
|
+
operationClass = "additive";
|
|
157
|
+
tableName;
|
|
158
|
+
indexName;
|
|
159
|
+
columns;
|
|
160
|
+
label;
|
|
161
|
+
constructor(tableName, indexName, columns) {
|
|
162
|
+
super();
|
|
163
|
+
this.tableName = tableName;
|
|
164
|
+
this.indexName = indexName;
|
|
165
|
+
this.columns = columns;
|
|
166
|
+
this.label = `Create index ${indexName} on ${tableName}`;
|
|
167
|
+
this.freeze();
|
|
168
|
+
}
|
|
169
|
+
toOp() {
|
|
170
|
+
return createIndex(this.tableName, this.indexName, this.columns);
|
|
171
|
+
}
|
|
172
|
+
renderTypeScript() {
|
|
173
|
+
return `createIndex(${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.indexName)}, ${jsonToTsSource(this.columns)})`;
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
var DropIndexCall = class extends SqliteOpFactoryCallNode {
|
|
177
|
+
factoryName = "dropIndex";
|
|
178
|
+
operationClass = "destructive";
|
|
179
|
+
tableName;
|
|
180
|
+
indexName;
|
|
181
|
+
label;
|
|
182
|
+
constructor(tableName, indexName) {
|
|
183
|
+
super();
|
|
184
|
+
this.tableName = tableName;
|
|
185
|
+
this.indexName = indexName;
|
|
186
|
+
this.label = `Drop index ${indexName} on ${tableName}`;
|
|
187
|
+
this.freeze();
|
|
188
|
+
}
|
|
189
|
+
toOp() {
|
|
190
|
+
return dropIndex(this.tableName, this.indexName);
|
|
191
|
+
}
|
|
192
|
+
renderTypeScript() {
|
|
193
|
+
return `dropIndex(${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.indexName)})`;
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
/**
|
|
197
|
+
* A planner-generated data-transform stub. The current default strategy
|
|
198
|
+
* (`nullabilityTighteningBackfillStrategy`) emits one of these with a
|
|
199
|
+
* backfill-flavored `id`/`label` when the policy allows `'data'` and the
|
|
200
|
+
* contract tightens a column's nullability, but the op itself is generic —
|
|
201
|
+
* any future strategy that needs a placeholder data step can construct one
|
|
202
|
+
* with its own id/label.
|
|
203
|
+
*
|
|
204
|
+
* `toOp()` always throws `PN-MIG-2001`: the planner cannot lower a stubbed
|
|
205
|
+
* transform to a runtime op — the user must edit the rendered
|
|
206
|
+
* `migration.ts` and re-emit.
|
|
207
|
+
*/
|
|
208
|
+
var DataTransformCall = class extends SqliteOpFactoryCallNode {
|
|
209
|
+
factoryName = "dataTransform";
|
|
210
|
+
operationClass = "data";
|
|
211
|
+
id;
|
|
212
|
+
label;
|
|
213
|
+
tableName;
|
|
214
|
+
columnName;
|
|
215
|
+
constructor(id, label, tableName, columnName) {
|
|
216
|
+
super();
|
|
217
|
+
this.id = id;
|
|
218
|
+
this.label = label;
|
|
219
|
+
this.tableName = tableName;
|
|
220
|
+
this.columnName = columnName;
|
|
221
|
+
this.freeze();
|
|
222
|
+
}
|
|
223
|
+
toOp() {
|
|
224
|
+
throw errorUnfilledPlaceholder(this.label);
|
|
225
|
+
}
|
|
226
|
+
renderTypeScript() {
|
|
227
|
+
const slot = `${this.tableName}-${this.columnName}-backfill-sql`;
|
|
228
|
+
return [
|
|
229
|
+
"dataTransform({",
|
|
230
|
+
` id: ${jsonToTsSource(this.id)},`,
|
|
231
|
+
` label: ${jsonToTsSource(this.label)},`,
|
|
232
|
+
` table: ${jsonToTsSource(this.tableName)},`,
|
|
233
|
+
` description: ${jsonToTsSource(`Backfill NULL ${this.columnName} values in ${this.tableName}`)},`,
|
|
234
|
+
` run: () => placeholder(${jsonToTsSource(slot)}),`,
|
|
235
|
+
"})"
|
|
236
|
+
].join("\n");
|
|
237
|
+
}
|
|
238
|
+
importRequirements() {
|
|
239
|
+
return [{
|
|
240
|
+
moduleSpecifier: TARGET_MIGRATION_MODULE,
|
|
241
|
+
symbol: this.factoryName
|
|
242
|
+
}, {
|
|
243
|
+
moduleSpecifier: TARGET_MIGRATION_MODULE,
|
|
244
|
+
symbol: "placeholder"
|
|
245
|
+
}];
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
/**
|
|
249
|
+
* Laundered pre-built operation. Mirrors Postgres's `RawSqlCall`: wraps an
|
|
250
|
+
* already-materialized `SqlMigrationPlanOperation` (typically produced by a
|
|
251
|
+
* SQL-family helper or a codec lifecycle hook) so the planner can carry it
|
|
252
|
+
* alongside structured call IR. `toOp()` returns the stored op unchanged;
|
|
253
|
+
* `renderTypeScript()` emits `rawSql({...})` with the op serialized as a
|
|
254
|
+
* JSON literal — round-tripping requires every field on the op to be
|
|
255
|
+
* JSON-serializable (no closures).
|
|
256
|
+
*/
|
|
257
|
+
var RawSqlCall = class extends SqliteOpFactoryCallNode {
|
|
258
|
+
factoryName = "rawSql";
|
|
259
|
+
operationClass;
|
|
260
|
+
label;
|
|
261
|
+
op;
|
|
262
|
+
constructor(op) {
|
|
263
|
+
super();
|
|
264
|
+
this.op = op;
|
|
265
|
+
this.label = op.label;
|
|
266
|
+
this.operationClass = op.operationClass;
|
|
267
|
+
this.freeze();
|
|
268
|
+
}
|
|
269
|
+
toOp() {
|
|
270
|
+
return this.op;
|
|
271
|
+
}
|
|
272
|
+
renderTypeScript() {
|
|
273
|
+
return `rawSql(${jsonToTsSource(this.op)})`;
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
//#endregion
|
|
277
|
+
export { DropColumnCall as a, RawSqlCall as c, DataTransformCall as i, RecreateTableCall as l, CreateIndexCall as n, DropIndexCall as o, CreateTableCall as r, DropTableCall as s, AddColumnCall as t };
|
|
278
|
+
|
|
279
|
+
//# sourceMappingURL=op-factory-call-DRKKURAO.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"op-factory-call-DRKKURAO.mjs","names":[],"sources":["../src/core/migrations/op-factory-call.ts"],"sourcesContent":["/**\n * SQLite migration IR: one concrete `*Call` class per pure factory under\n * `operations/`, plus a shared `SqliteOpFactoryCallNode` abstract base.\n *\n * Each call class carries fully-resolved literal arguments (flat\n * `SqliteColumnSpec` / `SqliteTableSpec` etc.) — codec / `typeRef` / default\n * expansion happens upstream in the issue-planner / strategies, mirroring\n * the Postgres `ColumnSpec` pattern. As a result, `toOp()` and\n * `renderTypeScript()` both pass the same flat data through; the rendered\n * TypeScript scaffold is fully self-contained and does not need access to a\n * `storageTypes` map at runtime.\n */\n\nimport { errorUnfilledPlaceholder } from '@prisma-next/errors/migration';\nimport type {\n MigrationOperationClass,\n SqlMigrationPlanOperation,\n} from '@prisma-next/family-sql/control';\nimport type { OpFactoryCall as FrameworkOpFactoryCall } from '@prisma-next/framework-components/control';\nimport { type ImportRequirement, jsonToTsSource, TsExpression } from '@prisma-next/ts-render';\nimport { addColumn, dropColumn } from './operations/columns';\nimport { createIndex, dropIndex } from './operations/indexes';\nimport type { SqliteColumnSpec, SqliteIndexSpec, SqliteTableSpec } from './operations/shared';\nimport { createTable, dropTable, recreateTable } from './operations/tables';\nimport type { SqlitePlanTargetDetails } from './planner-target-details';\n\ntype Op = SqlMigrationPlanOperation<SqlitePlanTargetDetails>;\n\nconst TARGET_MIGRATION_MODULE = '@prisma-next/target-sqlite/migration';\n\nabstract class SqliteOpFactoryCallNode extends TsExpression implements FrameworkOpFactoryCall {\n abstract readonly factoryName: string;\n abstract readonly operationClass: MigrationOperationClass;\n abstract readonly label: string;\n abstract toOp(): Op;\n\n importRequirements(): readonly ImportRequirement[] {\n return [{ moduleSpecifier: TARGET_MIGRATION_MODULE, symbol: this.factoryName }];\n }\n\n protected freeze(): void {\n Object.freeze(this);\n }\n}\n\n// ============================================================================\n// Table\n// ============================================================================\n\nexport class CreateTableCall extends SqliteOpFactoryCallNode {\n readonly factoryName = 'createTable' as const;\n readonly operationClass = 'additive' as const;\n readonly tableName: string;\n readonly spec: SqliteTableSpec;\n readonly label: string;\n\n constructor(tableName: string, spec: SqliteTableSpec) {\n super();\n this.tableName = tableName;\n this.spec = spec;\n this.label = `Create table ${tableName}`;\n this.freeze();\n }\n\n toOp(): Op {\n return createTable(this.tableName, this.spec);\n }\n\n renderTypeScript(): string {\n return `createTable(${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.spec)})`;\n }\n}\n\nexport class DropTableCall extends SqliteOpFactoryCallNode {\n readonly factoryName = 'dropTable' as const;\n readonly operationClass = 'destructive' as const;\n readonly tableName: string;\n readonly label: string;\n\n constructor(tableName: string) {\n super();\n this.tableName = tableName;\n this.label = `Drop table ${tableName}`;\n this.freeze();\n }\n\n toOp(): Op {\n return dropTable(this.tableName);\n }\n\n renderTypeScript(): string {\n return `dropTable(${jsonToTsSource(this.tableName)})`;\n }\n}\n\nexport class RecreateTableCall extends SqliteOpFactoryCallNode {\n readonly factoryName = 'recreateTable' as const;\n readonly operationClass: MigrationOperationClass;\n readonly tableName: string;\n readonly contractTable: SqliteTableSpec;\n readonly schemaColumnNames: readonly string[];\n readonly indexes: readonly SqliteIndexSpec[];\n readonly summary: string;\n readonly postchecks: readonly { readonly description: string; readonly sql: string }[];\n readonly label: string;\n\n constructor(args: {\n tableName: string;\n contractTable: SqliteTableSpec;\n schemaColumnNames: readonly string[];\n indexes: readonly SqliteIndexSpec[];\n summary: string;\n postchecks: readonly { readonly description: string; readonly sql: string }[];\n operationClass: MigrationOperationClass;\n }) {\n super();\n this.tableName = args.tableName;\n this.contractTable = args.contractTable;\n this.schemaColumnNames = args.schemaColumnNames;\n this.indexes = args.indexes;\n this.summary = args.summary;\n this.postchecks = args.postchecks;\n this.operationClass = args.operationClass;\n this.label = `Recreate table ${args.tableName}`;\n this.freeze();\n }\n\n toOp(): Op {\n return recreateTable({\n tableName: this.tableName,\n contractTable: this.contractTable,\n schemaColumnNames: this.schemaColumnNames,\n indexes: this.indexes,\n summary: this.summary,\n postchecks: this.postchecks,\n operationClass: this.operationClass,\n });\n }\n\n renderTypeScript(): string {\n const args = {\n tableName: this.tableName,\n contractTable: this.contractTable,\n schemaColumnNames: this.schemaColumnNames,\n indexes: this.indexes,\n summary: this.summary,\n postchecks: this.postchecks,\n operationClass: this.operationClass,\n };\n return `recreateTable(${jsonToTsSource(args)})`;\n }\n}\n\n// ============================================================================\n// Column\n// ============================================================================\n\nexport class AddColumnCall extends SqliteOpFactoryCallNode {\n readonly factoryName = 'addColumn' as const;\n readonly operationClass = 'additive' as const;\n readonly tableName: string;\n readonly columnName: string;\n readonly column: SqliteColumnSpec;\n readonly label: string;\n\n constructor(tableName: string, column: SqliteColumnSpec) {\n super();\n this.tableName = tableName;\n this.columnName = column.name;\n this.column = column;\n this.label = `Add column ${column.name} on ${tableName}`;\n this.freeze();\n }\n\n toOp(): Op {\n return addColumn(this.tableName, this.column);\n }\n\n renderTypeScript(): string {\n return `addColumn(${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.column)})`;\n }\n}\n\nexport class DropColumnCall extends SqliteOpFactoryCallNode {\n readonly factoryName = 'dropColumn' as const;\n readonly operationClass = 'destructive' as const;\n readonly tableName: string;\n readonly columnName: string;\n readonly label: string;\n\n constructor(tableName: string, columnName: string) {\n super();\n this.tableName = tableName;\n this.columnName = columnName;\n this.label = `Drop column ${columnName} on ${tableName}`;\n this.freeze();\n }\n\n toOp(): Op {\n return dropColumn(this.tableName, this.columnName);\n }\n\n renderTypeScript(): string {\n return `dropColumn(${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.columnName)})`;\n }\n}\n\n// ============================================================================\n// Index\n// ============================================================================\n\nexport class CreateIndexCall extends SqliteOpFactoryCallNode {\n readonly factoryName = 'createIndex' as const;\n readonly operationClass = 'additive' as const;\n readonly tableName: string;\n readonly indexName: string;\n readonly columns: readonly string[];\n readonly label: string;\n\n constructor(tableName: string, indexName: string, columns: readonly string[]) {\n super();\n this.tableName = tableName;\n this.indexName = indexName;\n this.columns = columns;\n this.label = `Create index ${indexName} on ${tableName}`;\n this.freeze();\n }\n\n toOp(): Op {\n return createIndex(this.tableName, this.indexName, this.columns);\n }\n\n renderTypeScript(): string {\n return `createIndex(${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.indexName)}, ${jsonToTsSource(this.columns)})`;\n }\n}\n\nexport class DropIndexCall extends SqliteOpFactoryCallNode {\n readonly factoryName = 'dropIndex' as const;\n readonly operationClass = 'destructive' as const;\n readonly tableName: string;\n readonly indexName: string;\n readonly label: string;\n\n constructor(tableName: string, indexName: string) {\n super();\n this.tableName = tableName;\n this.indexName = indexName;\n this.label = `Drop index ${indexName} on ${tableName}`;\n this.freeze();\n }\n\n toOp(): Op {\n return dropIndex(this.tableName, this.indexName);\n }\n\n renderTypeScript(): string {\n return `dropIndex(${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.indexName)})`;\n }\n}\n\n// ============================================================================\n// Data transform\n// ============================================================================\n\n/**\n * A planner-generated data-transform stub. The current default strategy\n * (`nullabilityTighteningBackfillStrategy`) emits one of these with a\n * backfill-flavored `id`/`label` when the policy allows `'data'` and the\n * contract tightens a column's nullability, but the op itself is generic —\n * any future strategy that needs a placeholder data step can construct one\n * with its own id/label.\n *\n * `toOp()` always throws `PN-MIG-2001`: the planner cannot lower a stubbed\n * transform to a runtime op — the user must edit the rendered\n * `migration.ts` and re-emit.\n */\nexport class DataTransformCall extends SqliteOpFactoryCallNode {\n readonly factoryName = 'dataTransform' as const;\n readonly operationClass = 'data' as const;\n readonly id: string;\n readonly label: string;\n readonly tableName: string;\n readonly columnName: string;\n\n constructor(id: string, label: string, tableName: string, columnName: string) {\n super();\n this.id = id;\n this.label = label;\n this.tableName = tableName;\n this.columnName = columnName;\n this.freeze();\n }\n\n toOp(): Op {\n throw errorUnfilledPlaceholder(this.label);\n }\n\n renderTypeScript(): string {\n const slot = `${this.tableName}-${this.columnName}-backfill-sql`;\n return [\n 'dataTransform({',\n ` id: ${jsonToTsSource(this.id)},`,\n ` label: ${jsonToTsSource(this.label)},`,\n ` table: ${jsonToTsSource(this.tableName)},`,\n ` description: ${jsonToTsSource(`Backfill NULL ${this.columnName} values in ${this.tableName}`)},`,\n ` run: () => placeholder(${jsonToTsSource(slot)}),`,\n '})',\n ].join('\\n');\n }\n\n override importRequirements(): readonly ImportRequirement[] {\n return [\n { moduleSpecifier: TARGET_MIGRATION_MODULE, symbol: this.factoryName },\n { moduleSpecifier: TARGET_MIGRATION_MODULE, symbol: 'placeholder' },\n ];\n }\n}\n\n// ============================================================================\n// Raw SQL\n// ============================================================================\n\n/**\n * Laundered pre-built operation. Mirrors Postgres's `RawSqlCall`: wraps an\n * already-materialized `SqlMigrationPlanOperation` (typically produced by a\n * SQL-family helper or a codec lifecycle hook) so the planner can carry it\n * alongside structured call IR. `toOp()` returns the stored op unchanged;\n * `renderTypeScript()` emits `rawSql({...})` with the op serialized as a\n * JSON literal — round-tripping requires every field on the op to be\n * JSON-serializable (no closures).\n */\nexport class RawSqlCall extends SqliteOpFactoryCallNode {\n readonly factoryName = 'rawSql' as const;\n readonly operationClass: MigrationOperationClass;\n readonly label: string;\n readonly op: Op;\n\n constructor(op: Op) {\n super();\n this.op = op;\n this.label = op.label;\n this.operationClass = op.operationClass;\n this.freeze();\n }\n\n toOp(): Op {\n return this.op;\n }\n\n renderTypeScript(): string {\n return `rawSql(${jsonToTsSource(this.op)})`;\n }\n}\n\n// ============================================================================\n// Union\n// ============================================================================\n\nexport type SqliteOpFactoryCall =\n | CreateTableCall\n | DropTableCall\n | RecreateTableCall\n | AddColumnCall\n | DropColumnCall\n | CreateIndexCall\n | DropIndexCall\n | DataTransformCall\n | RawSqlCall;\n"],"mappings":";;;;;;;;;;;;;;;;AA4BA,MAAM,0BAA0B;AAEhC,IAAe,0BAAf,cAA+C,aAA+C;CAM5F,qBAAmD;EACjD,OAAO,CAAC;GAAE,iBAAiB;GAAyB,QAAQ,KAAK;GAAa,CAAC;;CAGjF,SAAyB;EACvB,OAAO,OAAO,KAAK;;;AAQvB,IAAa,kBAAb,cAAqC,wBAAwB;CAC3D,cAAuB;CACvB,iBAA0B;CAC1B;CACA;CACA;CAEA,YAAY,WAAmB,MAAuB;EACpD,OAAO;EACP,KAAK,YAAY;EACjB,KAAK,OAAO;EACZ,KAAK,QAAQ,gBAAgB;EAC7B,KAAK,QAAQ;;CAGf,OAAW;EACT,OAAO,YAAY,KAAK,WAAW,KAAK,KAAK;;CAG/C,mBAA2B;EACzB,OAAO,eAAe,eAAe,KAAK,UAAU,CAAC,IAAI,eAAe,KAAK,KAAK,CAAC;;;AAIvF,IAAa,gBAAb,cAAmC,wBAAwB;CACzD,cAAuB;CACvB,iBAA0B;CAC1B;CACA;CAEA,YAAY,WAAmB;EAC7B,OAAO;EACP,KAAK,YAAY;EACjB,KAAK,QAAQ,cAAc;EAC3B,KAAK,QAAQ;;CAGf,OAAW;EACT,OAAO,UAAU,KAAK,UAAU;;CAG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OAAO;EACP,KAAK,KAAK;EACV,KAAK,QAAQ;EACb,KAAK,YAAY;EACjB,KAAK,aAAa;EAClB,KAAK,QAAQ;;CAGf,OAAW;EACT,MAAM,yBAAyB,KAAK,MAAM;;CAG5C,mBAA2B;EACzB,MAAM,OAAO,GAAG,KAAK,UAAU,GAAG,KAAK,WAAW;EAClD,OAAO;GACL;GACA,SAAS,eAAe,KAAK,GAAG,CAAC;GACjC,YAAY,eAAe,KAAK,MAAM,CAAC;GACvC,YAAY,eAAe,KAAK,UAAU,CAAC;GAC3C,kBAAkB,eAAe,iBAAiB,KAAK,WAAW,aAAa,KAAK,YAAY,CAAC;GACjG,4BAA4B,eAAe,KAAK,CAAC;GACjD;GACD,CAAC,KAAK,KAAK;;CAGd,qBAA4D;EAC1D,OAAO,CACL;GAAE,iBAAiB;GAAyB,QAAQ,KAAK;GAAa,EACtE;GAAE,iBAAiB;GAAyB,QAAQ;GAAe,CACpE;;;;;;;;;;;;AAiBL,IAAa,aAAb,cAAgC,wBAAwB;CACtD,cAAuB;CACvB;CACA;CACA;CAEA,YAAY,IAAQ;EAClB,OAAO;EACP,KAAK,KAAK;EACV,KAAK,QAAQ,GAAG;EAChB,KAAK,iBAAiB,GAAG;EACzB,KAAK,QAAQ;;CAGf,OAAW;EACT,OAAO,KAAK;;CAGd,mBAA2B;EACzB,OAAO,UAAU,eAAe,KAAK,GAAG,CAAC"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { t as SqlitePlanTargetDetails } from "./planner-target-details-vhvZDWK1.mjs";
|
|
2
|
+
import { i as SqliteTableSpec, n as SqliteColumnSpec, r as SqliteIndexSpec } from "./shared-qLsgTOZs.mjs";
|
|
3
|
+
import { MigrationOperationClass, SqlMigrationPlanOperation } from "@prisma-next/family-sql/control";
|
|
4
|
+
import { ImportRequirement, TsExpression } from "@prisma-next/ts-render";
|
|
5
|
+
import { OpFactoryCall } from "@prisma-next/framework-components/control";
|
|
6
|
+
|
|
7
|
+
//#region src/core/migrations/op-factory-call.d.ts
|
|
8
|
+
type Op = SqlMigrationPlanOperation<SqlitePlanTargetDetails>;
|
|
9
|
+
declare abstract class SqliteOpFactoryCallNode extends TsExpression implements OpFactoryCall {
|
|
10
|
+
abstract readonly factoryName: string;
|
|
11
|
+
abstract readonly operationClass: MigrationOperationClass;
|
|
12
|
+
abstract readonly label: string;
|
|
13
|
+
abstract toOp(): Op;
|
|
14
|
+
importRequirements(): readonly ImportRequirement[];
|
|
15
|
+
protected freeze(): void;
|
|
16
|
+
}
|
|
17
|
+
declare class CreateTableCall extends SqliteOpFactoryCallNode {
|
|
18
|
+
readonly factoryName: "createTable";
|
|
19
|
+
readonly operationClass: "additive";
|
|
20
|
+
readonly tableName: string;
|
|
21
|
+
readonly spec: SqliteTableSpec;
|
|
22
|
+
readonly label: string;
|
|
23
|
+
constructor(tableName: string, spec: SqliteTableSpec);
|
|
24
|
+
toOp(): Op;
|
|
25
|
+
renderTypeScript(): string;
|
|
26
|
+
}
|
|
27
|
+
declare class DropTableCall extends SqliteOpFactoryCallNode {
|
|
28
|
+
readonly factoryName: "dropTable";
|
|
29
|
+
readonly operationClass: "destructive";
|
|
30
|
+
readonly tableName: string;
|
|
31
|
+
readonly label: string;
|
|
32
|
+
constructor(tableName: string);
|
|
33
|
+
toOp(): Op;
|
|
34
|
+
renderTypeScript(): string;
|
|
35
|
+
}
|
|
36
|
+
declare class RecreateTableCall extends SqliteOpFactoryCallNode {
|
|
37
|
+
readonly factoryName: "recreateTable";
|
|
38
|
+
readonly operationClass: MigrationOperationClass;
|
|
39
|
+
readonly tableName: string;
|
|
40
|
+
readonly contractTable: SqliteTableSpec;
|
|
41
|
+
readonly schemaColumnNames: readonly string[];
|
|
42
|
+
readonly indexes: readonly SqliteIndexSpec[];
|
|
43
|
+
readonly summary: string;
|
|
44
|
+
readonly postchecks: readonly {
|
|
45
|
+
readonly description: string;
|
|
46
|
+
readonly sql: string;
|
|
47
|
+
}[];
|
|
48
|
+
readonly label: string;
|
|
49
|
+
constructor(args: {
|
|
50
|
+
tableName: string;
|
|
51
|
+
contractTable: SqliteTableSpec;
|
|
52
|
+
schemaColumnNames: readonly string[];
|
|
53
|
+
indexes: readonly SqliteIndexSpec[];
|
|
54
|
+
summary: string;
|
|
55
|
+
postchecks: readonly {
|
|
56
|
+
readonly description: string;
|
|
57
|
+
readonly sql: string;
|
|
58
|
+
}[];
|
|
59
|
+
operationClass: MigrationOperationClass;
|
|
60
|
+
});
|
|
61
|
+
toOp(): Op;
|
|
62
|
+
renderTypeScript(): string;
|
|
63
|
+
}
|
|
64
|
+
declare class AddColumnCall extends SqliteOpFactoryCallNode {
|
|
65
|
+
readonly factoryName: "addColumn";
|
|
66
|
+
readonly operationClass: "additive";
|
|
67
|
+
readonly tableName: string;
|
|
68
|
+
readonly columnName: string;
|
|
69
|
+
readonly column: SqliteColumnSpec;
|
|
70
|
+
readonly label: string;
|
|
71
|
+
constructor(tableName: string, column: SqliteColumnSpec);
|
|
72
|
+
toOp(): Op;
|
|
73
|
+
renderTypeScript(): string;
|
|
74
|
+
}
|
|
75
|
+
declare class DropColumnCall extends SqliteOpFactoryCallNode {
|
|
76
|
+
readonly factoryName: "dropColumn";
|
|
77
|
+
readonly operationClass: "destructive";
|
|
78
|
+
readonly tableName: string;
|
|
79
|
+
readonly columnName: string;
|
|
80
|
+
readonly label: string;
|
|
81
|
+
constructor(tableName: string, columnName: string);
|
|
82
|
+
toOp(): Op;
|
|
83
|
+
renderTypeScript(): string;
|
|
84
|
+
}
|
|
85
|
+
declare class CreateIndexCall extends SqliteOpFactoryCallNode {
|
|
86
|
+
readonly factoryName: "createIndex";
|
|
87
|
+
readonly operationClass: "additive";
|
|
88
|
+
readonly tableName: string;
|
|
89
|
+
readonly indexName: string;
|
|
90
|
+
readonly columns: readonly string[];
|
|
91
|
+
readonly label: string;
|
|
92
|
+
constructor(tableName: string, indexName: string, columns: readonly string[]);
|
|
93
|
+
toOp(): Op;
|
|
94
|
+
renderTypeScript(): string;
|
|
95
|
+
}
|
|
96
|
+
declare class DropIndexCall extends SqliteOpFactoryCallNode {
|
|
97
|
+
readonly factoryName: "dropIndex";
|
|
98
|
+
readonly operationClass: "destructive";
|
|
99
|
+
readonly tableName: string;
|
|
100
|
+
readonly indexName: string;
|
|
101
|
+
readonly label: string;
|
|
102
|
+
constructor(tableName: string, indexName: string);
|
|
103
|
+
toOp(): Op;
|
|
104
|
+
renderTypeScript(): string;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* A planner-generated data-transform stub. The current default strategy
|
|
108
|
+
* (`nullabilityTighteningBackfillStrategy`) emits one of these with a
|
|
109
|
+
* backfill-flavored `id`/`label` when the policy allows `'data'` and the
|
|
110
|
+
* contract tightens a column's nullability, but the op itself is generic —
|
|
111
|
+
* any future strategy that needs a placeholder data step can construct one
|
|
112
|
+
* with its own id/label.
|
|
113
|
+
*
|
|
114
|
+
* `toOp()` always throws `PN-MIG-2001`: the planner cannot lower a stubbed
|
|
115
|
+
* transform to a runtime op — the user must edit the rendered
|
|
116
|
+
* `migration.ts` and re-emit.
|
|
117
|
+
*/
|
|
118
|
+
declare class DataTransformCall extends SqliteOpFactoryCallNode {
|
|
119
|
+
readonly factoryName: "dataTransform";
|
|
120
|
+
readonly operationClass: "data";
|
|
121
|
+
readonly id: string;
|
|
122
|
+
readonly label: string;
|
|
123
|
+
readonly tableName: string;
|
|
124
|
+
readonly columnName: string;
|
|
125
|
+
constructor(id: string, label: string, tableName: string, columnName: string);
|
|
126
|
+
toOp(): Op;
|
|
127
|
+
renderTypeScript(): string;
|
|
128
|
+
importRequirements(): readonly ImportRequirement[];
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Laundered pre-built operation. Mirrors Postgres's `RawSqlCall`: wraps an
|
|
132
|
+
* already-materialized `SqlMigrationPlanOperation` (typically produced by a
|
|
133
|
+
* SQL-family helper or a codec lifecycle hook) so the planner can carry it
|
|
134
|
+
* alongside structured call IR. `toOp()` returns the stored op unchanged;
|
|
135
|
+
* `renderTypeScript()` emits `rawSql({...})` with the op serialized as a
|
|
136
|
+
* JSON literal — round-tripping requires every field on the op to be
|
|
137
|
+
* JSON-serializable (no closures).
|
|
138
|
+
*/
|
|
139
|
+
declare class RawSqlCall extends SqliteOpFactoryCallNode {
|
|
140
|
+
readonly factoryName: "rawSql";
|
|
141
|
+
readonly operationClass: MigrationOperationClass;
|
|
142
|
+
readonly label: string;
|
|
143
|
+
readonly op: Op;
|
|
144
|
+
constructor(op: Op);
|
|
145
|
+
toOp(): Op;
|
|
146
|
+
renderTypeScript(): string;
|
|
147
|
+
}
|
|
148
|
+
type SqliteOpFactoryCall = CreateTableCall | DropTableCall | RecreateTableCall | AddColumnCall | DropColumnCall | CreateIndexCall | DropIndexCall | DataTransformCall | RawSqlCall;
|
|
149
|
+
//#endregion
|
|
150
|
+
export { AddColumnCall, CreateIndexCall, CreateTableCall, DataTransformCall, DropColumnCall, DropIndexCall, DropTableCall, RawSqlCall, RecreateTableCall, type SqliteOpFactoryCall };
|
|
151
|
+
//# sourceMappingURL=op-factory-call.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"op-factory-call.d.mts","names":[],"sources":["../src/core/migrations/op-factory-call.ts"],"mappings":";;;;;;;KA0BK,EAAA,GAAK,yBAAA,CAA0B,uBAAA;AAAA,uBAIrB,uBAAA,SAAgC,YAAA,YAAwB,aAAA;EAAA,kBACnD,WAAA;EAAA,kBACA,cAAA,EAAgB,uBAAA;EAAA,kBAChB,KAAA;EAAA,SACT,IAAA,CAAA,GAAQ,EAAA;EAEjB,kBAAA,CAAA,YAA+B,iBAAA;EAAA,UAIrB,MAAA,CAAA;AAAA;AAAA,cASC,eAAA,SAAwB,uBAAA;EAAA,SAC1B,WAAA;EAAA,SACA,cAAA;EAAA,SACA,SAAA;EAAA,SACA,IAAA,EAAM,eAAA;EAAA,SACN,KAAA;cAEG,SAAA,UAAmB,IAAA,EAAM,eAAA;EAQrC,IAAA,C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