drizzle-kit 0.20.17-8b4d89e → 0.20.17-92ad3af
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +43435 -3844
- package/cli/commands/migrate.d.ts +2 -2
- package/cli/commands/mysqlIntrospect.d.ts +1 -6
- package/cli/commands/sqliteIntrospect.d.ts +0 -1
- package/cli/commands/sqlitePushUtils.d.ts +2 -2
- package/cli/connections.d.ts +13 -0
- package/cli/utils.d.ts +1 -0
- package/cli/validations/cli.d.ts +21 -21
- package/cli/validations/common.d.ts +4 -4
- package/cli/validations/mysql.d.ts +3 -9
- package/cli/validations/outputs.d.ts +1 -0
- package/cli/validations/pg.d.ts +18 -9
- package/cli/validations/sqlite.d.ts +0 -12
- package/index.d.mts +17 -11
- package/index.d.ts +17 -11
- package/package.json +12 -6
- package/payload.js +1191 -19612
- package/payload.mjs +1198 -19619
- package/schemaValidator.d.ts +6 -6
- package/serializer/mysqlSchema.d.ts +19 -333
- package/serializer/studio.d.ts +51 -0
- package/utils-studio.js +180 -2635
- package/utils-studio.mjs +180 -2635
- package/utils.d.ts +6 -0
- package/utils.js +4 -14
- package/utils.mjs +4 -14
package/schemaValidator.d.ts
CHANGED
@@ -150,7 +150,7 @@ declare const commonSquashedSchema: import("zod").ZodUnion<[import("zod").ZodObj
|
|
150
150
|
schema: string;
|
151
151
|
}>;
|
152
152
|
}>, import("zod").ZodObject<{
|
153
|
-
version: import("zod").ZodLiteral<"
|
153
|
+
version: import("zod").ZodLiteral<"5">;
|
154
154
|
dialect: import("zod").ZodLiteral<"mysql">;
|
155
155
|
tables: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
|
156
156
|
name: import("zod").ZodString;
|
@@ -231,7 +231,7 @@ declare const commonSquashedSchema: import("zod").ZodUnion<[import("zod").ZodObj
|
|
231
231
|
compositePrimaryKeys: Record<string, string>;
|
232
232
|
uniqueConstraints: Record<string, string>;
|
233
233
|
}>;
|
234
|
-
version: "
|
234
|
+
version: "5";
|
235
235
|
dialect: "mysql";
|
236
236
|
}, {
|
237
237
|
tables: Record<string, {
|
@@ -250,7 +250,7 @@ declare const commonSquashedSchema: import("zod").ZodUnion<[import("zod").ZodObj
|
|
250
250
|
compositePrimaryKeys: Record<string, string>;
|
251
251
|
uniqueConstraints?: Record<string, string> | undefined;
|
252
252
|
}>;
|
253
|
-
version: "
|
253
|
+
version: "5";
|
254
254
|
dialect: "mysql";
|
255
255
|
}>, import("zod").ZodObject<{
|
256
256
|
version: import("zod").ZodLiteral<"5">;
|
@@ -734,7 +734,7 @@ declare const commonSchema: import("zod").ZodUnion<[import("zod").ZodObject<impo
|
|
734
734
|
} | undefined>;
|
735
735
|
} | undefined;
|
736
736
|
}>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
737
|
-
version: import("zod").ZodLiteral<"
|
737
|
+
version: import("zod").ZodLiteral<"5">;
|
738
738
|
dialect: import("zod").ZodLiteral<"mysql">;
|
739
739
|
tables: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
|
740
740
|
name: import("zod").ZodString;
|
@@ -987,7 +987,7 @@ declare const commonSchema: import("zod").ZodUnion<[import("zod").ZodObject<impo
|
|
987
987
|
}>;
|
988
988
|
id: string;
|
989
989
|
prevId: string;
|
990
|
-
version: "
|
990
|
+
version: "5";
|
991
991
|
dialect: "mysql";
|
992
992
|
_meta: {
|
993
993
|
columns: Record<string, string>;
|
@@ -1040,7 +1040,7 @@ declare const commonSchema: import("zod").ZodUnion<[import("zod").ZodObject<impo
|
|
1040
1040
|
}>;
|
1041
1041
|
id: string;
|
1042
1042
|
prevId: string;
|
1043
|
-
version: "
|
1043
|
+
version: "5";
|
1044
1044
|
dialect: "mysql";
|
1045
1045
|
_meta: {
|
1046
1046
|
columns: Record<string, string>;
|
@@ -1152,322 +1152,8 @@ export declare const schemaInternalV5: import("zod").ZodObject<{
|
|
1152
1152
|
} | undefined>;
|
1153
1153
|
} | undefined;
|
1154
1154
|
}>;
|
1155
|
-
export declare const schemaInternalV6: import("zod").ZodObject<{
|
1156
|
-
version: import("zod").ZodLiteral<"6">;
|
1157
|
-
dialect: import("zod").ZodLiteral<"mysql">;
|
1158
|
-
tables: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
|
1159
|
-
name: import("zod").ZodString;
|
1160
|
-
columns: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
|
1161
|
-
name: import("zod").ZodString;
|
1162
|
-
type: import("zod").ZodString;
|
1163
|
-
primaryKey: import("zod").ZodBoolean;
|
1164
|
-
notNull: import("zod").ZodBoolean;
|
1165
|
-
autoincrement: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
1166
|
-
default: import("zod").ZodOptional<import("zod").ZodAny>;
|
1167
|
-
onUpdate: import("zod").ZodOptional<import("zod").ZodAny>;
|
1168
|
-
}, "strict", import("zod").ZodTypeAny, {
|
1169
|
-
name: string;
|
1170
|
-
type: string;
|
1171
|
-
primaryKey: boolean;
|
1172
|
-
notNull: boolean;
|
1173
|
-
default?: any;
|
1174
|
-
onUpdate?: any;
|
1175
|
-
autoincrement?: boolean | undefined;
|
1176
|
-
}, {
|
1177
|
-
name: string;
|
1178
|
-
type: string;
|
1179
|
-
primaryKey: boolean;
|
1180
|
-
notNull: boolean;
|
1181
|
-
default?: any;
|
1182
|
-
onUpdate?: any;
|
1183
|
-
autoincrement?: boolean | undefined;
|
1184
|
-
}>>;
|
1185
|
-
indexes: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
|
1186
|
-
name: import("zod").ZodString;
|
1187
|
-
columns: import("zod").ZodArray<import("zod").ZodString, "many">;
|
1188
|
-
isUnique: import("zod").ZodBoolean;
|
1189
|
-
using: import("zod").ZodOptional<import("zod").ZodEnum<["btree", "hash"]>>;
|
1190
|
-
algorithm: import("zod").ZodOptional<import("zod").ZodEnum<["default", "inplace", "copy"]>>;
|
1191
|
-
lock: import("zod").ZodOptional<import("zod").ZodEnum<["default", "none", "shared", "exclusive"]>>;
|
1192
|
-
}, "strict", import("zod").ZodTypeAny, {
|
1193
|
-
name: string;
|
1194
|
-
columns: string[];
|
1195
|
-
isUnique: boolean;
|
1196
|
-
using?: "btree" | "hash" | undefined;
|
1197
|
-
algorithm?: "default" | "inplace" | "copy" | undefined;
|
1198
|
-
lock?: "default" | "none" | "shared" | "exclusive" | undefined;
|
1199
|
-
}, {
|
1200
|
-
name: string;
|
1201
|
-
columns: string[];
|
1202
|
-
isUnique: boolean;
|
1203
|
-
using?: "btree" | "hash" | undefined;
|
1204
|
-
algorithm?: "default" | "inplace" | "copy" | undefined;
|
1205
|
-
lock?: "default" | "none" | "shared" | "exclusive" | undefined;
|
1206
|
-
}>>;
|
1207
|
-
foreignKeys: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
|
1208
|
-
name: import("zod").ZodString;
|
1209
|
-
tableFrom: import("zod").ZodString;
|
1210
|
-
columnsFrom: import("zod").ZodArray<import("zod").ZodString, "many">;
|
1211
|
-
tableTo: import("zod").ZodString;
|
1212
|
-
columnsTo: import("zod").ZodArray<import("zod").ZodString, "many">;
|
1213
|
-
onUpdate: import("zod").ZodOptional<import("zod").ZodString>;
|
1214
|
-
onDelete: import("zod").ZodOptional<import("zod").ZodString>;
|
1215
|
-
}, "strict", import("zod").ZodTypeAny, {
|
1216
|
-
name: string;
|
1217
|
-
tableFrom: string;
|
1218
|
-
columnsFrom: string[];
|
1219
|
-
tableTo: string;
|
1220
|
-
columnsTo: string[];
|
1221
|
-
onUpdate?: string | undefined;
|
1222
|
-
onDelete?: string | undefined;
|
1223
|
-
}, {
|
1224
|
-
name: string;
|
1225
|
-
tableFrom: string;
|
1226
|
-
columnsFrom: string[];
|
1227
|
-
tableTo: string;
|
1228
|
-
columnsTo: string[];
|
1229
|
-
onUpdate?: string | undefined;
|
1230
|
-
onDelete?: string | undefined;
|
1231
|
-
}>>;
|
1232
|
-
compositePrimaryKeys: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
|
1233
|
-
name: import("zod").ZodString;
|
1234
|
-
columns: import("zod").ZodArray<import("zod").ZodString, "many">;
|
1235
|
-
}, "strict", import("zod").ZodTypeAny, {
|
1236
|
-
name: string;
|
1237
|
-
columns: string[];
|
1238
|
-
}, {
|
1239
|
-
name: string;
|
1240
|
-
columns: string[];
|
1241
|
-
}>>;
|
1242
|
-
uniqueConstraints: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
|
1243
|
-
name: import("zod").ZodString;
|
1244
|
-
columns: import("zod").ZodArray<import("zod").ZodString, "many">;
|
1245
|
-
}, "strict", import("zod").ZodTypeAny, {
|
1246
|
-
name: string;
|
1247
|
-
columns: string[];
|
1248
|
-
}, {
|
1249
|
-
name: string;
|
1250
|
-
columns: string[];
|
1251
|
-
}>>>;
|
1252
|
-
}, "strict", import("zod").ZodTypeAny, {
|
1253
|
-
name: string;
|
1254
|
-
columns: Record<string, {
|
1255
|
-
name: string;
|
1256
|
-
type: string;
|
1257
|
-
primaryKey: boolean;
|
1258
|
-
notNull: boolean;
|
1259
|
-
default?: any;
|
1260
|
-
onUpdate?: any;
|
1261
|
-
autoincrement?: boolean | undefined;
|
1262
|
-
}>;
|
1263
|
-
indexes: Record<string, {
|
1264
|
-
name: string;
|
1265
|
-
columns: string[];
|
1266
|
-
isUnique: boolean;
|
1267
|
-
using?: "btree" | "hash" | undefined;
|
1268
|
-
algorithm?: "default" | "inplace" | "copy" | undefined;
|
1269
|
-
lock?: "default" | "none" | "shared" | "exclusive" | undefined;
|
1270
|
-
}>;
|
1271
|
-
foreignKeys: Record<string, {
|
1272
|
-
name: string;
|
1273
|
-
tableFrom: string;
|
1274
|
-
columnsFrom: string[];
|
1275
|
-
tableTo: string;
|
1276
|
-
columnsTo: string[];
|
1277
|
-
onUpdate?: string | undefined;
|
1278
|
-
onDelete?: string | undefined;
|
1279
|
-
}>;
|
1280
|
-
compositePrimaryKeys: Record<string, {
|
1281
|
-
name: string;
|
1282
|
-
columns: string[];
|
1283
|
-
}>;
|
1284
|
-
uniqueConstraints: Record<string, {
|
1285
|
-
name: string;
|
1286
|
-
columns: string[];
|
1287
|
-
}>;
|
1288
|
-
}, {
|
1289
|
-
name: string;
|
1290
|
-
columns: Record<string, {
|
1291
|
-
name: string;
|
1292
|
-
type: string;
|
1293
|
-
primaryKey: boolean;
|
1294
|
-
notNull: boolean;
|
1295
|
-
default?: any;
|
1296
|
-
onUpdate?: any;
|
1297
|
-
autoincrement?: boolean | undefined;
|
1298
|
-
}>;
|
1299
|
-
indexes: Record<string, {
|
1300
|
-
name: string;
|
1301
|
-
columns: string[];
|
1302
|
-
isUnique: boolean;
|
1303
|
-
using?: "btree" | "hash" | undefined;
|
1304
|
-
algorithm?: "default" | "inplace" | "copy" | undefined;
|
1305
|
-
lock?: "default" | "none" | "shared" | "exclusive" | undefined;
|
1306
|
-
}>;
|
1307
|
-
foreignKeys: Record<string, {
|
1308
|
-
name: string;
|
1309
|
-
tableFrom: string;
|
1310
|
-
columnsFrom: string[];
|
1311
|
-
tableTo: string;
|
1312
|
-
columnsTo: string[];
|
1313
|
-
onUpdate?: string | undefined;
|
1314
|
-
onDelete?: string | undefined;
|
1315
|
-
}>;
|
1316
|
-
compositePrimaryKeys: Record<string, {
|
1317
|
-
name: string;
|
1318
|
-
columns: string[];
|
1319
|
-
}>;
|
1320
|
-
uniqueConstraints?: Record<string, {
|
1321
|
-
name: string;
|
1322
|
-
columns: string[];
|
1323
|
-
}> | undefined;
|
1324
|
-
}>>;
|
1325
|
-
_meta: import("zod").ZodObject<{
|
1326
|
-
tables: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>;
|
1327
|
-
columns: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>;
|
1328
|
-
}, "strip", import("zod").ZodTypeAny, {
|
1329
|
-
columns: Record<string, string>;
|
1330
|
-
tables: Record<string, string>;
|
1331
|
-
}, {
|
1332
|
-
columns: Record<string, string>;
|
1333
|
-
tables: Record<string, string>;
|
1334
|
-
}>;
|
1335
|
-
internal: import("zod").ZodOptional<import("zod").ZodObject<{
|
1336
|
-
tables: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodOptional<import("zod").ZodObject<{
|
1337
|
-
columns: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodOptional<import("zod").ZodObject<{
|
1338
|
-
isDefaultAnExpression: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
1339
|
-
}, "strip", import("zod").ZodTypeAny, {
|
1340
|
-
isDefaultAnExpression?: boolean | undefined;
|
1341
|
-
}, {
|
1342
|
-
isDefaultAnExpression?: boolean | undefined;
|
1343
|
-
}>>>;
|
1344
|
-
}, "strip", import("zod").ZodTypeAny, {
|
1345
|
-
columns: Record<string, {
|
1346
|
-
isDefaultAnExpression?: boolean | undefined;
|
1347
|
-
} | undefined>;
|
1348
|
-
}, {
|
1349
|
-
columns: Record<string, {
|
1350
|
-
isDefaultAnExpression?: boolean | undefined;
|
1351
|
-
} | undefined>;
|
1352
|
-
}>>>;
|
1353
|
-
}, "strip", import("zod").ZodTypeAny, {
|
1354
|
-
tables: Record<string, {
|
1355
|
-
columns: Record<string, {
|
1356
|
-
isDefaultAnExpression?: boolean | undefined;
|
1357
|
-
} | undefined>;
|
1358
|
-
} | undefined>;
|
1359
|
-
}, {
|
1360
|
-
tables: Record<string, {
|
1361
|
-
columns: Record<string, {
|
1362
|
-
isDefaultAnExpression?: boolean | undefined;
|
1363
|
-
} | undefined>;
|
1364
|
-
} | undefined>;
|
1365
|
-
}>>;
|
1366
|
-
}, "strict", import("zod").ZodTypeAny, {
|
1367
|
-
tables: Record<string, {
|
1368
|
-
name: string;
|
1369
|
-
columns: Record<string, {
|
1370
|
-
name: string;
|
1371
|
-
type: string;
|
1372
|
-
primaryKey: boolean;
|
1373
|
-
notNull: boolean;
|
1374
|
-
default?: any;
|
1375
|
-
onUpdate?: any;
|
1376
|
-
autoincrement?: boolean | undefined;
|
1377
|
-
}>;
|
1378
|
-
indexes: Record<string, {
|
1379
|
-
name: string;
|
1380
|
-
columns: string[];
|
1381
|
-
isUnique: boolean;
|
1382
|
-
using?: "btree" | "hash" | undefined;
|
1383
|
-
algorithm?: "default" | "inplace" | "copy" | undefined;
|
1384
|
-
lock?: "default" | "none" | "shared" | "exclusive" | undefined;
|
1385
|
-
}>;
|
1386
|
-
foreignKeys: Record<string, {
|
1387
|
-
name: string;
|
1388
|
-
tableFrom: string;
|
1389
|
-
columnsFrom: string[];
|
1390
|
-
tableTo: string;
|
1391
|
-
columnsTo: string[];
|
1392
|
-
onUpdate?: string | undefined;
|
1393
|
-
onDelete?: string | undefined;
|
1394
|
-
}>;
|
1395
|
-
compositePrimaryKeys: Record<string, {
|
1396
|
-
name: string;
|
1397
|
-
columns: string[];
|
1398
|
-
}>;
|
1399
|
-
uniqueConstraints: Record<string, {
|
1400
|
-
name: string;
|
1401
|
-
columns: string[];
|
1402
|
-
}>;
|
1403
|
-
}>;
|
1404
|
-
version: "6";
|
1405
|
-
dialect: "mysql";
|
1406
|
-
_meta: {
|
1407
|
-
columns: Record<string, string>;
|
1408
|
-
tables: Record<string, string>;
|
1409
|
-
};
|
1410
|
-
internal?: {
|
1411
|
-
tables: Record<string, {
|
1412
|
-
columns: Record<string, {
|
1413
|
-
isDefaultAnExpression?: boolean | undefined;
|
1414
|
-
} | undefined>;
|
1415
|
-
} | undefined>;
|
1416
|
-
} | undefined;
|
1417
|
-
}, {
|
1418
|
-
tables: Record<string, {
|
1419
|
-
name: string;
|
1420
|
-
columns: Record<string, {
|
1421
|
-
name: string;
|
1422
|
-
type: string;
|
1423
|
-
primaryKey: boolean;
|
1424
|
-
notNull: boolean;
|
1425
|
-
default?: any;
|
1426
|
-
onUpdate?: any;
|
1427
|
-
autoincrement?: boolean | undefined;
|
1428
|
-
}>;
|
1429
|
-
indexes: Record<string, {
|
1430
|
-
name: string;
|
1431
|
-
columns: string[];
|
1432
|
-
isUnique: boolean;
|
1433
|
-
using?: "btree" | "hash" | undefined;
|
1434
|
-
algorithm?: "default" | "inplace" | "copy" | undefined;
|
1435
|
-
lock?: "default" | "none" | "shared" | "exclusive" | undefined;
|
1436
|
-
}>;
|
1437
|
-
foreignKeys: Record<string, {
|
1438
|
-
name: string;
|
1439
|
-
tableFrom: string;
|
1440
|
-
columnsFrom: string[];
|
1441
|
-
tableTo: string;
|
1442
|
-
columnsTo: string[];
|
1443
|
-
onUpdate?: string | undefined;
|
1444
|
-
onDelete?: string | undefined;
|
1445
|
-
}>;
|
1446
|
-
compositePrimaryKeys: Record<string, {
|
1447
|
-
name: string;
|
1448
|
-
columns: string[];
|
1449
|
-
}>;
|
1450
|
-
uniqueConstraints?: Record<string, {
|
1451
|
-
name: string;
|
1452
|
-
columns: string[];
|
1453
|
-
}> | undefined;
|
1454
|
-
}>;
|
1455
|
-
version: "6";
|
1456
|
-
dialect: "mysql";
|
1457
|
-
_meta: {
|
1458
|
-
columns: Record<string, string>;
|
1459
|
-
tables: Record<string, string>;
|
1460
|
-
};
|
1461
|
-
internal?: {
|
1462
|
-
tables: Record<string, {
|
1463
|
-
columns: Record<string, {
|
1464
|
-
isDefaultAnExpression?: boolean | undefined;
|
1465
|
-
} | undefined>;
|
1466
|
-
} | undefined>;
|
1467
|
-
} | undefined;
|
1468
|
-
}>;
|
1469
1155
|
export declare const schemaInternal: import("zod").ZodObject<{
|
1470
|
-
version: import("zod").ZodLiteral<"
|
1156
|
+
version: import("zod").ZodLiteral<"5">;
|
1471
1157
|
dialect: import("zod").ZodLiteral<"mysql">;
|
1472
1158
|
tables: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
|
1473
1159
|
name: import("zod").ZodString;
|
@@ -1715,7 +1401,7 @@ export declare const schemaInternal: import("zod").ZodObject<{
|
|
1715
1401
|
columns: string[];
|
1716
1402
|
}>;
|
1717
1403
|
}>;
|
1718
|
-
version: "
|
1404
|
+
version: "5";
|
1719
1405
|
dialect: "mysql";
|
1720
1406
|
_meta: {
|
1721
1407
|
columns: Record<string, string>;
|
@@ -1766,7 +1452,7 @@ export declare const schemaInternal: import("zod").ZodObject<{
|
|
1766
1452
|
columns: string[];
|
1767
1453
|
}> | undefined;
|
1768
1454
|
}>;
|
1769
|
-
version: "
|
1455
|
+
version: "5";
|
1770
1456
|
dialect: "mysql";
|
1771
1457
|
_meta: {
|
1772
1458
|
columns: Record<string, string>;
|
@@ -2530,7 +2216,7 @@ export declare const schemaV5: import("zod").ZodObject<import("zod").objectUtil.
|
|
2530
2216
|
} | undefined;
|
2531
2217
|
}>;
|
2532
2218
|
export declare const schema: import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
2533
|
-
version: import("zod").ZodLiteral<"
|
2219
|
+
version: import("zod").ZodLiteral<"5">;
|
2534
2220
|
dialect: import("zod").ZodLiteral<"mysql">;
|
2535
2221
|
tables: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
|
2536
2222
|
name: import("zod").ZodString;
|
@@ -2783,7 +2469,7 @@ export declare const schema: import("zod").ZodObject<import("zod").objectUtil.ex
|
|
2783
2469
|
}>;
|
2784
2470
|
id: string;
|
2785
2471
|
prevId: string;
|
2786
|
-
version: "
|
2472
|
+
version: "5";
|
2787
2473
|
dialect: "mysql";
|
2788
2474
|
_meta: {
|
2789
2475
|
columns: Record<string, string>;
|
@@ -2836,7 +2522,7 @@ export declare const schema: import("zod").ZodObject<import("zod").objectUtil.ex
|
|
2836
2522
|
}>;
|
2837
2523
|
id: string;
|
2838
2524
|
prevId: string;
|
2839
|
-
version: "
|
2525
|
+
version: "5";
|
2840
2526
|
dialect: "mysql";
|
2841
2527
|
_meta: {
|
2842
2528
|
columns: Record<string, string>;
|
@@ -2851,7 +2537,7 @@ export declare const schema: import("zod").ZodObject<import("zod").objectUtil.ex
|
|
2851
2537
|
} | undefined;
|
2852
2538
|
}>;
|
2853
2539
|
export declare const schemaSquashed: import("zod").ZodObject<{
|
2854
|
-
version: import("zod").ZodLiteral<"
|
2540
|
+
version: import("zod").ZodLiteral<"5">;
|
2855
2541
|
dialect: import("zod").ZodLiteral<"mysql">;
|
2856
2542
|
tables: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
|
2857
2543
|
name: import("zod").ZodString;
|
@@ -2932,7 +2618,7 @@ export declare const schemaSquashed: import("zod").ZodObject<{
|
|
2932
2618
|
compositePrimaryKeys: Record<string, string>;
|
2933
2619
|
uniqueConstraints: Record<string, string>;
|
2934
2620
|
}>;
|
2935
|
-
version: "
|
2621
|
+
version: "5";
|
2936
2622
|
dialect: "mysql";
|
2937
2623
|
}, {
|
2938
2624
|
tables: Record<string, {
|
@@ -2951,7 +2637,7 @@ export declare const schemaSquashed: import("zod").ZodObject<{
|
|
2951
2637
|
compositePrimaryKeys: Record<string, string>;
|
2952
2638
|
uniqueConstraints?: Record<string, string> | undefined;
|
2953
2639
|
}>;
|
2954
|
-
version: "
|
2640
|
+
version: "5";
|
2955
2641
|
dialect: "mysql";
|
2956
2642
|
}>;
|
2957
2643
|
export declare const schemaSquashedV4: import("zod").ZodObject<{
|
@@ -3085,7 +2771,7 @@ export declare const MySqlSquasher: {
|
|
3085
2771
|
export declare const squashMysqlSchemeV4: (json: MySqlSchemaV4) => MySqlSchemaSquashedV4;
|
3086
2772
|
export declare const squashMysqlScheme: (json: MySqlSchema) => MySqlSchemaSquashed;
|
3087
2773
|
export declare const mysqlSchema: import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
3088
|
-
version: import("zod").ZodLiteral<"
|
2774
|
+
version: import("zod").ZodLiteral<"5">;
|
3089
2775
|
dialect: import("zod").ZodLiteral<"mysql">;
|
3090
2776
|
tables: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
|
3091
2777
|
name: import("zod").ZodString;
|
@@ -3338,7 +3024,7 @@ export declare const mysqlSchema: import("zod").ZodObject<import("zod").objectUt
|
|
3338
3024
|
}>;
|
3339
3025
|
id: string;
|
3340
3026
|
prevId: string;
|
3341
|
-
version: "
|
3027
|
+
version: "5";
|
3342
3028
|
dialect: "mysql";
|
3343
3029
|
_meta: {
|
3344
3030
|
columns: Record<string, string>;
|
@@ -3391,7 +3077,7 @@ export declare const mysqlSchema: import("zod").ZodObject<import("zod").objectUt
|
|
3391
3077
|
}>;
|
3392
3078
|
id: string;
|
3393
3079
|
prevId: string;
|
3394
|
-
version: "
|
3080
|
+
version: "5";
|
3395
3081
|
dialect: "mysql";
|
3396
3082
|
_meta: {
|
3397
3083
|
columns: Record<string, string>;
|
@@ -4155,7 +3841,7 @@ export declare const mysqlSchemaV5: import("zod").ZodObject<import("zod").object
|
|
4155
3841
|
} | undefined;
|
4156
3842
|
}>;
|
4157
3843
|
export declare const mysqlSchemaSquashed: import("zod").ZodObject<{
|
4158
|
-
version: import("zod").ZodLiteral<"
|
3844
|
+
version: import("zod").ZodLiteral<"5">;
|
4159
3845
|
dialect: import("zod").ZodLiteral<"mysql">;
|
4160
3846
|
tables: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
|
4161
3847
|
name: import("zod").ZodString;
|
@@ -4236,7 +3922,7 @@ export declare const mysqlSchemaSquashed: import("zod").ZodObject<{
|
|
4236
3922
|
compositePrimaryKeys: Record<string, string>;
|
4237
3923
|
uniqueConstraints: Record<string, string>;
|
4238
3924
|
}>;
|
4239
|
-
version: "
|
3925
|
+
version: "5";
|
4240
3926
|
dialect: "mysql";
|
4241
3927
|
}, {
|
4242
3928
|
tables: Record<string, {
|
@@ -4255,7 +3941,7 @@ export declare const mysqlSchemaSquashed: import("zod").ZodObject<{
|
|
4255
3941
|
compositePrimaryKeys: Record<string, string>;
|
4256
3942
|
uniqueConstraints?: Record<string, string> | undefined;
|
4257
3943
|
}>;
|
4258
|
-
version: "
|
3944
|
+
version: "5";
|
4259
3945
|
dialect: "mysql";
|
4260
3946
|
}>;
|
4261
3947
|
export declare const backwardCompatibleMysqlSchema: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
@@ -4587,7 +4273,7 @@ export declare const backwardCompatibleMysqlSchema: import("zod").ZodUnion<[impo
|
|
4587
4273
|
} | undefined>;
|
4588
4274
|
} | undefined;
|
4589
4275
|
}>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
4590
|
-
version: import("zod").ZodLiteral<"
|
4276
|
+
version: import("zod").ZodLiteral<"5">;
|
4591
4277
|
dialect: import("zod").ZodLiteral<"mysql">;
|
4592
4278
|
tables: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
|
4593
4279
|
name: import("zod").ZodString;
|
@@ -4840,7 +4526,7 @@ export declare const backwardCompatibleMysqlSchema: import("zod").ZodUnion<[impo
|
|
4840
4526
|
}>;
|
4841
4527
|
id: string;
|
4842
4528
|
prevId: string;
|
4843
|
-
version: "
|
4529
|
+
version: "5";
|
4844
4530
|
dialect: "mysql";
|
4845
4531
|
_meta: {
|
4846
4532
|
columns: Record<string, string>;
|
@@ -4893,7 +4579,7 @@ export declare const backwardCompatibleMysqlSchema: import("zod").ZodUnion<[impo
|
|
4893
4579
|
}>;
|
4894
4580
|
id: string;
|
4895
4581
|
prevId: string;
|
4896
|
-
version: "
|
4582
|
+
version: "5";
|
4897
4583
|
dialect: "mysql";
|
4898
4584
|
_meta: {
|
4899
4585
|
columns: Record<string, string>;
|
@@ -4947,7 +4633,7 @@ export declare const dryMySql: {
|
|
4947
4633
|
}>;
|
4948
4634
|
id: string;
|
4949
4635
|
prevId: string;
|
4950
|
-
version: "
|
4636
|
+
version: "5";
|
4951
4637
|
dialect: "mysql";
|
4952
4638
|
_meta: {
|
4953
4639
|
columns: Record<string, string>;
|
@@ -0,0 +1,51 @@
|
|
1
|
+
import { Hono } from "hono";
|
2
|
+
import type { PostgresCredentials } from "../cli/validations/pg";
|
3
|
+
import type { MysqlCredentials } from "../cli/validations/mysql";
|
4
|
+
import type { SqliteCredentials } from "../cli/validations/sqlite";
|
5
|
+
import { AnyPgTable } from "drizzle-orm/pg-core";
|
6
|
+
import { Relations } from "drizzle-orm";
|
7
|
+
import { AnyMySqlTable } from "drizzle-orm/mysql-core";
|
8
|
+
import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
|
9
|
+
type CustomDefault = {
|
10
|
+
schema: string;
|
11
|
+
table: string;
|
12
|
+
column: string;
|
13
|
+
func: () => unknown;
|
14
|
+
};
|
15
|
+
export type Setup = {
|
16
|
+
dialect: "pg" | "mysql" | "sqlite";
|
17
|
+
proxy: (params: ProxyParams) => Promise<any[] | any>;
|
18
|
+
customDefaults: CustomDefault[];
|
19
|
+
};
|
20
|
+
export type ProxyParams = {
|
21
|
+
sql: string;
|
22
|
+
params: any[];
|
23
|
+
mode: "array" | "object";
|
24
|
+
method: "values" | "get" | "all" | "run" | "execute";
|
25
|
+
};
|
26
|
+
export declare const preparePgSchema: (path: string | string[]) => Promise<{
|
27
|
+
schema: Record<string, Record<string, AnyPgTable>>;
|
28
|
+
relations: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
|
29
|
+
}>;
|
30
|
+
export declare const prepareMySqlSchema: (path: string | string[]) => Promise<{
|
31
|
+
schema: Record<string, Record<string, AnyMySqlTable>>;
|
32
|
+
relations: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
|
33
|
+
}>;
|
34
|
+
export declare const prepareSQLiteSchema: (path: string | string[]) => Promise<{
|
35
|
+
schema: Record<string, Record<string, AnySQLiteTable>>;
|
36
|
+
relations: Record<string, Relations<string, Record<string, import("drizzle-orm").Relation<string>>>>;
|
37
|
+
}>;
|
38
|
+
export declare const drizzleForPostgres: (credentials: PostgresCredentials, pgSchema: Record<string, Record<string, AnyPgTable>>, relations: Record<string, Relations>) => Promise<Setup>;
|
39
|
+
export declare const drizzleForMySQL: (credentials: MysqlCredentials, mysqlSchema: Record<string, Record<string, AnyMySqlTable>>, relations: Record<string, Relations>) => Promise<Setup>;
|
40
|
+
export declare const drizzleForSQLite: (credentials: SqliteCredentials, sqliteSchema: Record<string, Record<string, AnySQLiteTable>>, relations: Record<string, Relations>) => Promise<Setup>;
|
41
|
+
export type Server = {
|
42
|
+
start: (params: {
|
43
|
+
host: string;
|
44
|
+
port: number;
|
45
|
+
key?: string;
|
46
|
+
cert?: string;
|
47
|
+
cb: (err: Error | null, address: string) => void;
|
48
|
+
}) => void;
|
49
|
+
};
|
50
|
+
export declare const prepareServer: ({ dialect, proxy, customDefaults }: Setup, app?: Hono) => Promise<Server>;
|
51
|
+
export {};
|