drizzle-kit 0.20.17-14a4eaa → 0.20.17-2132ef8
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/bin.cjs +148 -59
- package/cli/validations/cli.d.ts +1 -1
- package/package.json +1 -1
- package/payload.js +2 -10
- package/payload.mjs +2 -10
package/bin.cjs
CHANGED
@@ -8700,7 +8700,7 @@ var init_cli = __esm({
|
|
8700
8700
|
authToken: stringType().optional(),
|
8701
8701
|
introspectCasing: casing,
|
8702
8702
|
breakpoints: booleanType().optional().default(true)
|
8703
|
-
})
|
8703
|
+
});
|
8704
8704
|
configCheck = objectType({
|
8705
8705
|
dialect: dialect3.optional(),
|
8706
8706
|
out: stringType().optional()
|
@@ -20046,13 +20046,6 @@ var init_snapshotsDiffer = __esm({
|
|
20046
20046
|
...prepareDropIndexesJson(it.name, it.schema, droppedIndexes || {})
|
20047
20047
|
);
|
20048
20048
|
});
|
20049
|
-
const jsonCreateReferencesForCreatedTables = createdTables.map((it) => {
|
20050
|
-
return prepareCreateReferencesJson(
|
20051
|
-
it.name,
|
20052
|
-
it.schema,
|
20053
|
-
it.foreignKeys
|
20054
|
-
);
|
20055
|
-
}).flat();
|
20056
20049
|
const jsonReferencesForAllAlteredTables = alteredTables.map((it) => {
|
20057
20050
|
const forAdded = prepareCreateReferencesJson(
|
20058
20051
|
it.name,
|
@@ -20093,10 +20086,9 @@ var init_snapshotsDiffer = __esm({
|
|
20093
20086
|
jsonStatements.push(...jsonAddedUniqueConstraints);
|
20094
20087
|
jsonStatements.push(...jsonDeletedUniqueConstraints);
|
20095
20088
|
jsonStatements.push(...jsonAddColumnsStatemets);
|
20096
|
-
jsonStatements.push(...jsonCreateReferencesForCreatedTables);
|
20097
20089
|
jsonStatements.push(...jsonCreateIndexesForCreatedTables);
|
20098
|
-
jsonStatements.push(...jsonCreatedReferencesForAlteredTables);
|
20099
20090
|
jsonStatements.push(...jsonCreateIndexesForAllAlteredTables);
|
20091
|
+
jsonStatements.push(...jsonCreatedReferencesForAlteredTables);
|
20100
20092
|
jsonStatements.push(...jsonDropColumnsStatemets);
|
20101
20093
|
jsonStatements.push(...jsonAlteredCompositePKs);
|
20102
20094
|
jsonStatements.push(...jsonAddedUniqueConstraints);
|
@@ -99674,7 +99666,7 @@ __export(connections_exports, {
|
|
99674
99666
|
connectToSQLite: () => connectToSQLite,
|
99675
99667
|
preparePostgresDB: () => preparePostgresDB
|
99676
99668
|
});
|
99677
|
-
var
|
99669
|
+
var preparePostgresDB, parseMysqlCredentials, connectToMySQL, prepareSqliteParams, connectToSQLite;
|
99678
99670
|
var init_connections = __esm({
|
99679
99671
|
"src/cli/connections.ts"() {
|
99680
99672
|
"use strict";
|
@@ -99682,37 +99674,143 @@ var init_connections = __esm({
|
|
99682
99674
|
init_utils2();
|
99683
99675
|
init_global();
|
99684
99676
|
init_outputs();
|
99685
|
-
import_pg_core4 = require("drizzle-orm/pg-core");
|
99686
99677
|
preparePostgresDB = async (credentials2) => {
|
99687
99678
|
if ("driver" in credentials2) {
|
99688
99679
|
if (credentials2.driver === "aws-data-api") {
|
99680
|
+
let getValueFromDataApi2 = function(field) {
|
99681
|
+
if (field.stringValue !== void 0) {
|
99682
|
+
return field.stringValue;
|
99683
|
+
} else if (field.booleanValue !== void 0) {
|
99684
|
+
return field.booleanValue;
|
99685
|
+
} else if (field.doubleValue !== void 0) {
|
99686
|
+
return field.doubleValue;
|
99687
|
+
} else if (field.isNull !== void 0) {
|
99688
|
+
return null;
|
99689
|
+
} else if (field.longValue !== void 0) {
|
99690
|
+
return field.longValue;
|
99691
|
+
} else if (field.blobValue !== void 0) {
|
99692
|
+
return field.blobValue;
|
99693
|
+
} else if (field.arrayValue !== void 0) {
|
99694
|
+
if (field.arrayValue.stringValues !== void 0) {
|
99695
|
+
return field.arrayValue.stringValues;
|
99696
|
+
}
|
99697
|
+
if (field.arrayValue.longValues !== void 0) {
|
99698
|
+
return field.arrayValue.longValues;
|
99699
|
+
}
|
99700
|
+
if (field.arrayValue.doubleValues !== void 0) {
|
99701
|
+
return field.arrayValue.doubleValues;
|
99702
|
+
}
|
99703
|
+
if (field.arrayValue.booleanValues !== void 0) {
|
99704
|
+
return field.arrayValue.booleanValues;
|
99705
|
+
}
|
99706
|
+
if (field.arrayValue.arrayValues !== void 0) {
|
99707
|
+
return field.arrayValue.arrayValues;
|
99708
|
+
}
|
99709
|
+
throw new Error("Unknown array type");
|
99710
|
+
} else {
|
99711
|
+
throw new Error("Unknown type");
|
99712
|
+
}
|
99713
|
+
}, typingsToAwsTypeHint2 = function(typings) {
|
99714
|
+
if (typings === "date") {
|
99715
|
+
return TypeHint.DATE;
|
99716
|
+
} else if (typings === "decimal") {
|
99717
|
+
return TypeHint.DECIMAL;
|
99718
|
+
} else if (typings === "json") {
|
99719
|
+
return TypeHint.JSON;
|
99720
|
+
} else if (typings === "time") {
|
99721
|
+
return TypeHint.TIME;
|
99722
|
+
} else if (typings === "timestamp") {
|
99723
|
+
return TypeHint.TIMESTAMP;
|
99724
|
+
} else if (typings === "uuid") {
|
99725
|
+
return TypeHint.UUID;
|
99726
|
+
} else {
|
99727
|
+
return void 0;
|
99728
|
+
}
|
99729
|
+
}, toValueParam2 = function(value, typings) {
|
99730
|
+
const response = {
|
99731
|
+
value: {},
|
99732
|
+
typeHint: typingsToAwsTypeHint2(typings)
|
99733
|
+
};
|
99734
|
+
if (value === null) {
|
99735
|
+
response.value = { isNull: true };
|
99736
|
+
} else if (typeof value === "string") {
|
99737
|
+
switch (response.typeHint) {
|
99738
|
+
case TypeHint.DATE: {
|
99739
|
+
response.value = { stringValue: value.split("T")[0] };
|
99740
|
+
break;
|
99741
|
+
}
|
99742
|
+
case TypeHint.TIMESTAMP: {
|
99743
|
+
response.value = {
|
99744
|
+
stringValue: value.replace("T", " ").replace("Z", "")
|
99745
|
+
};
|
99746
|
+
break;
|
99747
|
+
}
|
99748
|
+
default: {
|
99749
|
+
response.value = { stringValue: value };
|
99750
|
+
break;
|
99751
|
+
}
|
99752
|
+
}
|
99753
|
+
} else if (typeof value === "number" && Number.isInteger(value)) {
|
99754
|
+
response.value = { longValue: value };
|
99755
|
+
} else if (typeof value === "number" && !Number.isInteger(value)) {
|
99756
|
+
response.value = { doubleValue: value };
|
99757
|
+
} else if (typeof value === "boolean") {
|
99758
|
+
response.value = { booleanValue: value };
|
99759
|
+
} else if (value instanceof Date) {
|
99760
|
+
response.value = {
|
99761
|
+
stringValue: value.toISOString().replace("T", " ").replace("Z", "")
|
99762
|
+
};
|
99763
|
+
} else {
|
99764
|
+
throw new Error(`Unknown type for ${value}`);
|
99765
|
+
}
|
99766
|
+
return response;
|
99767
|
+
};
|
99768
|
+
var getValueFromDataApi = getValueFromDataApi2, typingsToAwsTypeHint = typingsToAwsTypeHint2, toValueParam = toValueParam2;
|
99689
99769
|
assertPackages("@aws-sdk/client-rds-data");
|
99690
99770
|
const { RDSDataClient, ExecuteStatementCommand, TypeHint } = await Promise.resolve().then(() => __toESM(require_dist_cjs54()));
|
99691
|
-
const { AwsDataApiSession } = await import("drizzle-orm/aws-data-api/pg");
|
99692
99771
|
const rdsClient = new RDSDataClient();
|
99693
|
-
const
|
99694
|
-
|
99695
|
-
|
99696
|
-
|
99697
|
-
|
99698
|
-
|
99699
|
-
|
99700
|
-
|
99701
|
-
|
99702
|
-
|
99703
|
-
|
99704
|
-
|
99705
|
-
|
99706
|
-
|
99707
|
-
|
99708
|
-
return
|
99709
|
-
}
|
99710
|
-
|
99711
|
-
|
99712
|
-
|
99713
|
-
|
99772
|
+
const query = async (sql2, params = []) => {
|
99773
|
+
var _a;
|
99774
|
+
const result = await rdsClient.send(
|
99775
|
+
new ExecuteStatementCommand({
|
99776
|
+
sql: sql2,
|
99777
|
+
parameters: params.map((param, index4) => ({
|
99778
|
+
name: `${index4 + 1}`,
|
99779
|
+
...toValueParam2(param, void 0)
|
99780
|
+
})),
|
99781
|
+
secretArn: credentials2.secretArn,
|
99782
|
+
resourceArn: credentials2.resourceArn,
|
99783
|
+
database: credentials2.database
|
99784
|
+
})
|
99785
|
+
);
|
99786
|
+
const rows = ((_a = result.records) == null ? void 0 : _a.map((row) => {
|
99787
|
+
return row.map((field) => getValueFromDataApi2(field));
|
99788
|
+
})) ?? [];
|
99789
|
+
return rows;
|
99790
|
+
};
|
99791
|
+
const proxy = async (params) => {
|
99792
|
+
var _a;
|
99793
|
+
const result = await rdsClient.send(
|
99794
|
+
new ExecuteStatementCommand({
|
99795
|
+
sql: params.sql,
|
99796
|
+
parameters: params.params.map((param, index4) => ({
|
99797
|
+
name: `${index4 + 1}`,
|
99798
|
+
...toValueParam2(param, void 0)
|
99799
|
+
})),
|
99800
|
+
secretArn: credentials2.secretArn,
|
99801
|
+
resourceArn: credentials2.resourceArn,
|
99802
|
+
database: credentials2.database
|
99803
|
+
})
|
99804
|
+
);
|
99805
|
+
if (params.mode === "array") {
|
99806
|
+
const rows = ((_a = result.records) == null ? void 0 : _a.map((row) => {
|
99807
|
+
return row.map((field) => getValueFromDataApi2(field));
|
99808
|
+
})) ?? [];
|
99809
|
+
return rows;
|
99714
99810
|
}
|
99811
|
+
return result.records;
|
99715
99812
|
};
|
99813
|
+
return { query, proxy };
|
99716
99814
|
}
|
99717
99815
|
assertUnreachable(credentials2.driver);
|
99718
99816
|
}
|
@@ -99994,7 +100092,7 @@ __export(studio_exports, {
|
|
99994
100092
|
prepareSQLiteSchema: () => prepareSQLiteSchema,
|
99995
100093
|
prepareServer: () => prepareServer
|
99996
100094
|
});
|
99997
|
-
var import_node_https,
|
100095
|
+
var import_node_https, import_pg_core4, import_drizzle_orm8, import_mysql_core4, import_sqlite_core3, preparePgSchema, prepareMySqlSchema, prepareSQLiteSchema, getCustomDefaults, drizzleForPostgres, drizzleForMySQL, drizzleForSQLite, init, proxySchema, defaultsSchema, schema4, jsonStringify, prepareServer;
|
99998
100096
|
var init_studio = __esm({
|
99999
100097
|
"src/serializer/studio.ts"() {
|
100000
100098
|
"use strict";
|
@@ -100006,7 +100104,7 @@ var init_studio = __esm({
|
|
100006
100104
|
init_dist5();
|
100007
100105
|
init_lib();
|
100008
100106
|
init_serializer();
|
100009
|
-
|
100107
|
+
import_pg_core4 = require("drizzle-orm/pg-core");
|
100010
100108
|
import_drizzle_orm8 = require("drizzle-orm");
|
100011
100109
|
init_utils4();
|
100012
100110
|
import_mysql_core4 = require("drizzle-orm/mysql-core");
|
@@ -100021,8 +100119,8 @@ var init_studio = __esm({
|
|
100021
100119
|
const i0 = require(`${it}`);
|
100022
100120
|
const i0values = Object.entries(i0);
|
100023
100121
|
i0values.forEach(([k2, t]) => {
|
100024
|
-
if ((0, import_drizzle_orm8.is)(t,
|
100025
|
-
const schema5 = (0,
|
100122
|
+
if ((0, import_drizzle_orm8.is)(t, import_pg_core4.PgTable)) {
|
100123
|
+
const schema5 = (0, import_pg_core4.getTableConfig)(t).schema || "public";
|
100026
100124
|
pgSchema2[schema5] = pgSchema2[schema5] || {};
|
100027
100125
|
pgSchema2[schema5][k2] = t;
|
100028
100126
|
}
|
@@ -100087,8 +100185,8 @@ var init_studio = __esm({
|
|
100087
100185
|
Object.entries(schema5).map(([schema6, tables]) => {
|
100088
100186
|
Object.entries(tables).map(([, table4]) => {
|
100089
100187
|
let tableConfig;
|
100090
|
-
if ((0, import_drizzle_orm8.is)(table4,
|
100091
|
-
tableConfig = (0,
|
100188
|
+
if ((0, import_drizzle_orm8.is)(table4, import_pg_core4.PgTable)) {
|
100189
|
+
tableConfig = (0, import_pg_core4.getTableConfig)(table4);
|
100092
100190
|
} else if ((0, import_drizzle_orm8.is)(table4, import_mysql_core4.MySqlTable)) {
|
100093
100191
|
tableConfig = (0, import_mysql_core4.getTableConfig)(table4);
|
100094
100192
|
} else {
|
@@ -103643,7 +103741,7 @@ import { sql } from "drizzle-orm"
|
|
103643
103741
|
});
|
103644
103742
|
|
103645
103743
|
// src/introspect-pg.ts
|
103646
|
-
var import_drizzle_orm9, import_relations, pgImportsList, objToStatement23, timeConfig2, possibleIntervals, intervalStrToObj, intervalConfig, importsPatch2, relations3, withCasing2,
|
103744
|
+
var import_drizzle_orm9, import_relations, pgImportsList, objToStatement23, timeConfig2, possibleIntervals, intervalStrToObj, intervalConfig, importsPatch2, relations3, withCasing2, schemaToTypeScript3, isCyclic3, isSelf3, column6, dimensionsInArray, createTableColumns3, createTableIndexes3, createTablePKs3, createTableUniques3, createTableFKs3;
|
103647
103745
|
var init_introspect_pg = __esm({
|
103648
103746
|
"src/introspect-pg.ts"() {
|
103649
103747
|
"use strict";
|
@@ -103768,10 +103866,6 @@ var init_introspect_pg = __esm({
|
|
103768
103866
|
}
|
103769
103867
|
assertUnreachable(casing2);
|
103770
103868
|
};
|
103771
|
-
paramNameFor = (name, schema5) => {
|
103772
|
-
const schemaSuffix = schema5 && schema5 !== "public" ? `In${schema5}` : "";
|
103773
|
-
return `${name}${schemaSuffix}`;
|
103774
|
-
};
|
103775
103869
|
schemaToTypeScript3 = (schema5, casing2) => {
|
103776
103870
|
Object.values(schema5.tables).forEach((table4) => {
|
103777
103871
|
Object.values(table4.foreignKeys).forEach((fk4) => {
|
@@ -103828,7 +103922,7 @@ var init_introspect_pg = __esm({
|
|
103828
103922
|
);
|
103829
103923
|
const enumStatements = Object.values(schema5.enums).map((it) => {
|
103830
103924
|
const enumSchema3 = schemas[it.schema];
|
103831
|
-
const paramName =
|
103925
|
+
const paramName = !enumSchema3 || enumSchema3 === "public" ? it.name : `${it.name}In${enumSchema3}`;
|
103832
103926
|
const func = enumSchema3 ? `${enumSchema3}.enum` : "pgEnum";
|
103833
103927
|
const values2 = Object.values(it.values).map((it2) => `'${it2}'`).join(", ");
|
103834
103928
|
return `export const ${withCasing2(paramName, casing2)} = ${func}("${it.name}", [${values2}])
|
@@ -103840,7 +103934,7 @@ var init_introspect_pg = __esm({
|
|
103840
103934
|
}).join("");
|
103841
103935
|
const tableStatements = Object.values(schema5.tables).map((table4) => {
|
103842
103936
|
const tableSchema = schemas[table4.schema];
|
103843
|
-
const paramName =
|
103937
|
+
const paramName = !tableSchema || tableSchema === "public" ? table4.name : `${table4.name}In${tableSchema}`;
|
103844
103938
|
const func = tableSchema ? `${tableSchema}.table` : "pgTable";
|
103845
103939
|
let statement = `export const ${withCasing2(paramName, casing2)} = ${func}("${table4.name}", {
|
103846
103940
|
`;
|
@@ -103849,7 +103943,6 @@ var init_introspect_pg = __esm({
|
|
103849
103943
|
Object.values(table4.columns),
|
103850
103944
|
Object.values(table4.foreignKeys),
|
103851
103945
|
enumTypes,
|
103852
|
-
schemas,
|
103853
103946
|
casing2,
|
103854
103947
|
schema5.internal
|
103855
103948
|
);
|
@@ -103866,7 +103959,7 @@ var init_introspect_pg = __esm({
|
|
103866
103959
|
Object.values(table4.indexes),
|
103867
103960
|
casing2
|
103868
103961
|
);
|
103869
|
-
statement += createTableFKs3(Object.values(filteredFKs),
|
103962
|
+
statement += createTableFKs3(Object.values(filteredFKs), casing2);
|
103870
103963
|
statement += createTablePKs3(
|
103871
103964
|
Object.values(table4.compositePrimaryKeys),
|
103872
103965
|
casing2
|
@@ -104116,7 +104209,7 @@ var init_introspect_pg = __esm({
|
|
104116
104209
|
}
|
104117
104210
|
return res;
|
104118
104211
|
};
|
104119
|
-
createTableColumns3 = (tableName, columns, fks, enumTypes,
|
104212
|
+
createTableColumns3 = (tableName, columns, fks, enumTypes, casing2, internals) => {
|
104120
104213
|
let statement = "";
|
104121
104214
|
const oneColumnsFKs = Object.values(fks).filter((it) => {
|
104122
104215
|
return !isSelf3(it);
|
@@ -104155,16 +104248,14 @@ var init_introspect_pg = __esm({
|
|
104155
104248
|
const params = { onDelete, onUpdate };
|
104156
104249
|
const typeSuffix = isCyclic3(it2) ? ": AnyPgColumn" : "";
|
104157
104250
|
const paramsStr = objToStatement23(params);
|
104158
|
-
const tableSchema = schemas[it2.schemaTo || ""];
|
104159
|
-
const paramName = paramNameFor(it2.tableTo, tableSchema);
|
104160
104251
|
if (paramsStr) {
|
104161
104252
|
return `.references(()${typeSuffix} => ${withCasing2(
|
104162
|
-
|
104253
|
+
it2.tableTo,
|
104163
104254
|
casing2
|
104164
104255
|
)}.${withCasing2(it2.columnsTo[0], casing2)}, ${paramsStr} )`;
|
104165
104256
|
}
|
104166
104257
|
return `.references(()${typeSuffix} => ${withCasing2(
|
104167
|
-
|
104258
|
+
it2.tableTo,
|
104168
104259
|
casing2
|
104169
104260
|
)}.${withCasing2(it2.columnsTo[0], casing2)})`;
|
104170
104261
|
}).join("");
|
@@ -104220,13 +104311,11 @@ var init_introspect_pg = __esm({
|
|
104220
104311
|
});
|
104221
104312
|
return statement;
|
104222
104313
|
};
|
104223
|
-
createTableFKs3 = (fks,
|
104314
|
+
createTableFKs3 = (fks, casing2) => {
|
104224
104315
|
let statement = "";
|
104225
104316
|
fks.forEach((it) => {
|
104226
|
-
const tableSchema = schemas[it.schemaTo || ""];
|
104227
|
-
const paramName = paramNameFor(it.tableTo, tableSchema);
|
104228
104317
|
const isSelf4 = it.tableTo === it.tableFrom;
|
104229
|
-
const tableTo = isSelf4 ? "table" : `${withCasing2(
|
104318
|
+
const tableTo = isSelf4 ? "table" : `${withCasing2(it.tableTo, casing2)}`;
|
104230
104319
|
statement += ` ${withCasing2(it.name, casing2)}: foreignKey({
|
104231
104320
|
`;
|
104232
104321
|
statement += ` columns: [${it.columnsFrom.map((i) => `table.${withCasing2(i, casing2)}`).join(", ")}],
|
@@ -106536,8 +106625,8 @@ Drizzle Studio is up and running on ${source_default.blue(
|
|
106536
106625
|
});
|
106537
106626
|
} catch (e) {
|
106538
106627
|
console.error(e);
|
106539
|
-
process.exit(0);
|
106540
106628
|
}
|
106629
|
+
process.exit(0);
|
106541
106630
|
});
|
106542
106631
|
var main = async () => {
|
106543
106632
|
const version2 = await versions();
|
package/cli/validations/cli.d.ts
CHANGED
@@ -100,7 +100,7 @@ export declare const pullParams: import("zod").ZodObject<{
|
|
100
100
|
authToken: import("zod").ZodOptional<import("zod").ZodString>;
|
101
101
|
introspectCasing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
|
102
102
|
breakpoints: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodBoolean>>;
|
103
|
-
}, "
|
103
|
+
}, "strip", import("zod").ZodTypeAny, {
|
104
104
|
dialect?: "mysql" | "postgresql" | "sqlite" | undefined;
|
105
105
|
url?: string | undefined;
|
106
106
|
host?: string | undefined;
|
package/package.json
CHANGED
package/payload.js
CHANGED
@@ -5550,7 +5550,7 @@ var init_cli = __esm({
|
|
5550
5550
|
authToken: stringType().optional(),
|
5551
5551
|
introspectCasing: casing,
|
5552
5552
|
breakpoints: booleanType().optional().default(true)
|
5553
|
-
})
|
5553
|
+
});
|
5554
5554
|
configCheck = objectType({
|
5555
5555
|
dialect: dialect3.optional(),
|
5556
5556
|
out: stringType().optional()
|
@@ -15461,13 +15461,6 @@ var init_snapshotsDiffer = __esm({
|
|
15461
15461
|
...prepareDropIndexesJson(it.name, it.schema, droppedIndexes || {})
|
15462
15462
|
);
|
15463
15463
|
});
|
15464
|
-
const jsonCreateReferencesForCreatedTables = createdTables.map((it) => {
|
15465
|
-
return prepareCreateReferencesJson(
|
15466
|
-
it.name,
|
15467
|
-
it.schema,
|
15468
|
-
it.foreignKeys
|
15469
|
-
);
|
15470
|
-
}).flat();
|
15471
15464
|
const jsonReferencesForAllAlteredTables = alteredTables.map((it) => {
|
15472
15465
|
const forAdded = prepareCreateReferencesJson(
|
15473
15466
|
it.name,
|
@@ -15508,10 +15501,9 @@ var init_snapshotsDiffer = __esm({
|
|
15508
15501
|
jsonStatements.push(...jsonAddedUniqueConstraints);
|
15509
15502
|
jsonStatements.push(...jsonDeletedUniqueConstraints);
|
15510
15503
|
jsonStatements.push(...jsonAddColumnsStatemets);
|
15511
|
-
jsonStatements.push(...jsonCreateReferencesForCreatedTables);
|
15512
15504
|
jsonStatements.push(...jsonCreateIndexesForCreatedTables);
|
15513
|
-
jsonStatements.push(...jsonCreatedReferencesForAlteredTables);
|
15514
15505
|
jsonStatements.push(...jsonCreateIndexesForAllAlteredTables);
|
15506
|
+
jsonStatements.push(...jsonCreatedReferencesForAlteredTables);
|
15515
15507
|
jsonStatements.push(...jsonDropColumnsStatemets);
|
15516
15508
|
jsonStatements.push(...jsonAlteredCompositePKs);
|
15517
15509
|
jsonStatements.push(...jsonAddedUniqueConstraints);
|
package/payload.mjs
CHANGED
@@ -5556,7 +5556,7 @@ var init_cli = __esm({
|
|
5556
5556
|
authToken: stringType().optional(),
|
5557
5557
|
introspectCasing: casing,
|
5558
5558
|
breakpoints: booleanType().optional().default(true)
|
5559
|
-
})
|
5559
|
+
});
|
5560
5560
|
configCheck = objectType({
|
5561
5561
|
dialect: dialect3.optional(),
|
5562
5562
|
out: stringType().optional()
|
@@ -15475,13 +15475,6 @@ var init_snapshotsDiffer = __esm({
|
|
15475
15475
|
...prepareDropIndexesJson(it.name, it.schema, droppedIndexes || {})
|
15476
15476
|
);
|
15477
15477
|
});
|
15478
|
-
const jsonCreateReferencesForCreatedTables = createdTables.map((it) => {
|
15479
|
-
return prepareCreateReferencesJson(
|
15480
|
-
it.name,
|
15481
|
-
it.schema,
|
15482
|
-
it.foreignKeys
|
15483
|
-
);
|
15484
|
-
}).flat();
|
15485
15478
|
const jsonReferencesForAllAlteredTables = alteredTables.map((it) => {
|
15486
15479
|
const forAdded = prepareCreateReferencesJson(
|
15487
15480
|
it.name,
|
@@ -15522,10 +15515,9 @@ var init_snapshotsDiffer = __esm({
|
|
15522
15515
|
jsonStatements.push(...jsonAddedUniqueConstraints);
|
15523
15516
|
jsonStatements.push(...jsonDeletedUniqueConstraints);
|
15524
15517
|
jsonStatements.push(...jsonAddColumnsStatemets);
|
15525
|
-
jsonStatements.push(...jsonCreateReferencesForCreatedTables);
|
15526
15518
|
jsonStatements.push(...jsonCreateIndexesForCreatedTables);
|
15527
|
-
jsonStatements.push(...jsonCreatedReferencesForAlteredTables);
|
15528
15519
|
jsonStatements.push(...jsonCreateIndexesForAllAlteredTables);
|
15520
|
+
jsonStatements.push(...jsonCreatedReferencesForAlteredTables);
|
15529
15521
|
jsonStatements.push(...jsonDropColumnsStatemets);
|
15530
15522
|
jsonStatements.push(...jsonAlteredCompositePKs);
|
15531
15523
|
jsonStatements.push(...jsonAddedUniqueConstraints);
|