drizzle-kit 0.20.17-5938f5d → 0.20.17-679add7
Sign up to get free protection for your applications and to get access to all the features.
- package/@types/utils.d.ts +1 -0
- package/bin.cjs +62912 -34549
- package/cli/commands/migrate.d.ts +4 -4
- package/cli/commands/mysqlIntrospect.d.ts +1 -6
- package/cli/commands/pgIntrospect.d.ts +1 -1
- package/cli/commands/sqliteIntrospect.d.ts +0 -1
- package/cli/commands/sqlitePushUtils.d.ts +2 -2
- package/cli/commands/utils.d.ts +125 -3
- package/cli/connections.d.ts +18 -0
- package/cli/validations/cli.d.ts +65 -65
- package/cli/validations/common.d.ts +17 -17
- package/cli/validations/mysql.d.ts +3 -9
- package/cli/validations/outputs.d.ts +2 -2
- package/cli/validations/pg.d.ts +18 -3
- package/cli/validations/sqlite.d.ts +0 -12
- package/cli/validations/studio.d.ts +92 -0
- package/cli/views.d.ts +7 -0
- package/index.d.mts +12 -56
- package/index.d.ts +12 -56
- package/package.json +5 -2
- package/payload.js +1338 -19692
- package/payload.mjs +1335 -19689
- package/schemaValidator.d.ts +13 -13
- package/serializer/mysqlSchema.d.ts +19 -333
- package/serializer/pgSchema.d.ts +14 -14
- package/serializer/studio.d.ts +53 -0
- package/snapshotsDiffer.d.ts +1 -2
- package/utils-studio.js +191 -2641
- package/utils-studio.mjs +191 -2641
- package/utils.d.ts +6 -0
- package/utils.js +8 -18
- package/utils.mjs +8 -18
package/utils.d.ts
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
import type { Dialect } from "./schemaValidator";
|
2
2
|
import type { NamedWithSchema } from "./cli/commands/migrate";
|
3
|
+
import type { ProxyParams } from "./serializer/studio";
|
4
|
+
import type { RunResult } from "better-sqlite3";
|
5
|
+
export type Proxy = (params: ProxyParams) => Promise<any[]>;
|
6
|
+
export type SqliteProxy = {
|
7
|
+
proxy: (params: ProxyParams) => Promise<any[] | RunResult>;
|
8
|
+
};
|
3
9
|
export type DB = {
|
4
10
|
query: <T extends any = any>(sql: string, params?: any[]) => Promise<T[]>;
|
5
11
|
};
|
package/utils.js
CHANGED
@@ -4937,18 +4937,8 @@ var schemaInternalV5 = objectType({
|
|
4937
4937
|
}),
|
4938
4938
|
internal: kitInternals
|
4939
4939
|
}).strict();
|
4940
|
-
var schemaInternalV6 = objectType({
|
4941
|
-
version: literalType("6"),
|
4942
|
-
dialect,
|
4943
|
-
tables: recordType(stringType(), table),
|
4944
|
-
_meta: objectType({
|
4945
|
-
tables: recordType(stringType(), stringType()),
|
4946
|
-
columns: recordType(stringType(), stringType())
|
4947
|
-
}),
|
4948
|
-
internal: kitInternals
|
4949
|
-
}).strict();
|
4950
4940
|
var schemaInternal = objectType({
|
4951
|
-
version: literalType("
|
4941
|
+
version: literalType("5"),
|
4952
4942
|
dialect,
|
4953
4943
|
tables: recordType(stringType(), table),
|
4954
4944
|
_meta: objectType({
|
@@ -4977,7 +4967,7 @@ var tableSquashed = objectType({
|
|
4977
4967
|
uniqueConstraints: recordType(stringType(), stringType()).default({})
|
4978
4968
|
}).strict();
|
4979
4969
|
var schemaSquashed = objectType({
|
4980
|
-
version: literalType("
|
4970
|
+
version: literalType("5"),
|
4981
4971
|
dialect,
|
4982
4972
|
tables: recordType(stringType(), tableSquashed)
|
4983
4973
|
}).strict();
|
@@ -4991,7 +4981,7 @@ var mysqlSchema = schema;
|
|
4991
4981
|
var mysqlSchemaV5 = schemaV5;
|
4992
4982
|
var backwardCompatibleMysqlSchema = unionType([mysqlSchemaV5, schema]);
|
4993
4983
|
var dryMySql = mysqlSchema.parse({
|
4994
|
-
version:
|
4984
|
+
version: "5",
|
4995
4985
|
dialect: "mysql",
|
4996
4986
|
id: originUUID,
|
4997
4987
|
prevId: "",
|
@@ -5183,7 +5173,7 @@ var pgSchemaExternal = objectType({
|
|
5183
5173
|
}).strict();
|
5184
5174
|
var pgSchemaInternal = objectType({
|
5185
5175
|
version: literalType("6"),
|
5186
|
-
dialect: literalType("
|
5176
|
+
dialect: literalType("postgresql"),
|
5187
5177
|
tables: recordType(stringType(), table2),
|
5188
5178
|
enums: recordType(stringType(), enumSchema),
|
5189
5179
|
schemas: recordType(stringType(), stringType()),
|
@@ -5212,14 +5202,14 @@ var tableSquashedV42 = objectType({
|
|
5212
5202
|
}).strict();
|
5213
5203
|
var pgSchemaSquashedV4 = objectType({
|
5214
5204
|
version: literalType("4"),
|
5215
|
-
dialect:
|
5205
|
+
dialect: literalType("pg"),
|
5216
5206
|
tables: recordType(stringType(), tableSquashedV42),
|
5217
5207
|
enums: recordType(stringType(), enumSchemaV1),
|
5218
5208
|
schemas: recordType(stringType(), stringType())
|
5219
5209
|
}).strict();
|
5220
5210
|
var pgSchemaSquashed = objectType({
|
5221
5211
|
version: literalType("6"),
|
5222
|
-
dialect:
|
5212
|
+
dialect: literalType("postgresql"),
|
5223
5213
|
tables: recordType(stringType(), tableSquashed2),
|
5224
5214
|
enums: recordType(stringType(), enumSchema),
|
5225
5215
|
schemas: recordType(stringType(), stringType())
|
@@ -5231,7 +5221,7 @@ var pgSchema = pgSchemaInternal.merge(schemaHash2);
|
|
5231
5221
|
var backwardCompatiblePgSchema = unionType([pgSchemaV5, pgSchema]);
|
5232
5222
|
var dryPg = pgSchema.parse({
|
5233
5223
|
version: snapshotVersion,
|
5234
|
-
dialect: "
|
5224
|
+
dialect: "postgresql",
|
5235
5225
|
id: originUUID,
|
5236
5226
|
prevId: "",
|
5237
5227
|
tables: {},
|
@@ -5393,7 +5383,7 @@ var prepareOutFolder = (out, dialect3) => {
|
|
5393
5383
|
};
|
5394
5384
|
var validatorForDialect = (dialect3) => {
|
5395
5385
|
switch (dialect3) {
|
5396
|
-
case "
|
5386
|
+
case "postgresql":
|
5397
5387
|
return { validator: backwardCompatiblePgSchema, version: 6 };
|
5398
5388
|
case "sqlite":
|
5399
5389
|
return { validator: backwardCompatibleSqliteSchema, version: 5 };
|
package/utils.mjs
CHANGED
@@ -4928,18 +4928,8 @@ var schemaInternalV5 = objectType({
|
|
4928
4928
|
}),
|
4929
4929
|
internal: kitInternals
|
4930
4930
|
}).strict();
|
4931
|
-
var schemaInternalV6 = objectType({
|
4932
|
-
version: literalType("6"),
|
4933
|
-
dialect,
|
4934
|
-
tables: recordType(stringType(), table),
|
4935
|
-
_meta: objectType({
|
4936
|
-
tables: recordType(stringType(), stringType()),
|
4937
|
-
columns: recordType(stringType(), stringType())
|
4938
|
-
}),
|
4939
|
-
internal: kitInternals
|
4940
|
-
}).strict();
|
4941
4931
|
var schemaInternal = objectType({
|
4942
|
-
version: literalType("
|
4932
|
+
version: literalType("5"),
|
4943
4933
|
dialect,
|
4944
4934
|
tables: recordType(stringType(), table),
|
4945
4935
|
_meta: objectType({
|
@@ -4968,7 +4958,7 @@ var tableSquashed = objectType({
|
|
4968
4958
|
uniqueConstraints: recordType(stringType(), stringType()).default({})
|
4969
4959
|
}).strict();
|
4970
4960
|
var schemaSquashed = objectType({
|
4971
|
-
version: literalType("
|
4961
|
+
version: literalType("5"),
|
4972
4962
|
dialect,
|
4973
4963
|
tables: recordType(stringType(), tableSquashed)
|
4974
4964
|
}).strict();
|
@@ -4982,7 +4972,7 @@ var mysqlSchema = schema;
|
|
4982
4972
|
var mysqlSchemaV5 = schemaV5;
|
4983
4973
|
var backwardCompatibleMysqlSchema = unionType([mysqlSchemaV5, schema]);
|
4984
4974
|
var dryMySql = mysqlSchema.parse({
|
4985
|
-
version:
|
4975
|
+
version: "5",
|
4986
4976
|
dialect: "mysql",
|
4987
4977
|
id: originUUID,
|
4988
4978
|
prevId: "",
|
@@ -5174,7 +5164,7 @@ var pgSchemaExternal = objectType({
|
|
5174
5164
|
}).strict();
|
5175
5165
|
var pgSchemaInternal = objectType({
|
5176
5166
|
version: literalType("6"),
|
5177
|
-
dialect: literalType("
|
5167
|
+
dialect: literalType("postgresql"),
|
5178
5168
|
tables: recordType(stringType(), table2),
|
5179
5169
|
enums: recordType(stringType(), enumSchema),
|
5180
5170
|
schemas: recordType(stringType(), stringType()),
|
@@ -5203,14 +5193,14 @@ var tableSquashedV42 = objectType({
|
|
5203
5193
|
}).strict();
|
5204
5194
|
var pgSchemaSquashedV4 = objectType({
|
5205
5195
|
version: literalType("4"),
|
5206
|
-
dialect:
|
5196
|
+
dialect: literalType("pg"),
|
5207
5197
|
tables: recordType(stringType(), tableSquashedV42),
|
5208
5198
|
enums: recordType(stringType(), enumSchemaV1),
|
5209
5199
|
schemas: recordType(stringType(), stringType())
|
5210
5200
|
}).strict();
|
5211
5201
|
var pgSchemaSquashed = objectType({
|
5212
5202
|
version: literalType("6"),
|
5213
|
-
dialect:
|
5203
|
+
dialect: literalType("postgresql"),
|
5214
5204
|
tables: recordType(stringType(), tableSquashed2),
|
5215
5205
|
enums: recordType(stringType(), enumSchema),
|
5216
5206
|
schemas: recordType(stringType(), stringType())
|
@@ -5222,7 +5212,7 @@ var pgSchema = pgSchemaInternal.merge(schemaHash2);
|
|
5222
5212
|
var backwardCompatiblePgSchema = unionType([pgSchemaV5, pgSchema]);
|
5223
5213
|
var dryPg = pgSchema.parse({
|
5224
5214
|
version: snapshotVersion,
|
5225
|
-
dialect: "
|
5215
|
+
dialect: "postgresql",
|
5226
5216
|
id: originUUID,
|
5227
5217
|
prevId: "",
|
5228
5218
|
tables: {},
|
@@ -5384,7 +5374,7 @@ var prepareOutFolder = (out, dialect3) => {
|
|
5384
5374
|
};
|
5385
5375
|
var validatorForDialect = (dialect3) => {
|
5386
5376
|
switch (dialect3) {
|
5387
|
-
case "
|
5377
|
+
case "postgresql":
|
5388
5378
|
return { validator: backwardCompatiblePgSchema, version: 6 };
|
5389
5379
|
case "sqlite":
|
5390
5380
|
return { validator: backwardCompatibleSqliteSchema, version: 5 };
|