drizzle-kit 0.20.14-1f2c838 → 0.20.14-441b049
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +3 -2
- package/package.json +4 -3
- package/utils-studio.js +11 -10
- package/utils-studio.mjs +7 -6
package/bin.cjs
CHANGED
@@ -61875,7 +61875,7 @@ var package_default = {
|
|
61875
61875
|
scripts: {
|
61876
61876
|
"test:pg:push": "drizzle-kit push:pg",
|
61877
61877
|
payload: "tsx ./dev/payload.ts",
|
61878
|
-
"migrate:old": "drizzle-kit generate:
|
61878
|
+
"migrate:old": "drizzle-kit generate:mysql",
|
61879
61879
|
push: "node -r esbuild-register ./src/cli/index.ts push:mysql",
|
61880
61880
|
"push:sqlite": "node -r ./src/loader.mjs ./src/cli/index.ts push:sqlite",
|
61881
61881
|
try1: "tsx ./src/t.ts",
|
@@ -61952,7 +61952,8 @@ var package_default = {
|
|
61952
61952
|
"better-sqlite3": "^8.4.0",
|
61953
61953
|
dockerode: "^3.3.4",
|
61954
61954
|
dotenv: "^16.0.3",
|
61955
|
-
"drizzle-
|
61955
|
+
"drizzle-kit": "0.19.13",
|
61956
|
+
"drizzle-orm": "0.29.3",
|
61956
61957
|
"esbuild-node-externals": "^1.9.0",
|
61957
61958
|
eslint: "^8.29.0",
|
61958
61959
|
"eslint-config-prettier": "^8.5.0",
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "drizzle-kit",
|
3
|
-
"version": "0.20.14-
|
3
|
+
"version": "0.20.14-441b049",
|
4
4
|
"repository": "https://github.com/drizzle-team/drizzle-kit-mirror",
|
5
5
|
"author": "Drizzle Team",
|
6
6
|
"license": "MIT",
|
@@ -10,7 +10,7 @@
|
|
10
10
|
"scripts": {
|
11
11
|
"test:pg:push": "drizzle-kit push:pg",
|
12
12
|
"payload": "tsx ./dev/payload.ts",
|
13
|
-
"migrate:old": "drizzle-kit generate:
|
13
|
+
"migrate:old": "drizzle-kit generate:mysql",
|
14
14
|
"push": "node -r esbuild-register ./src/cli/index.ts push:mysql",
|
15
15
|
"push:sqlite": "node -r ./src/loader.mjs ./src/cli/index.ts push:sqlite",
|
16
16
|
"try1": "tsx ./src/t.ts",
|
@@ -87,7 +87,8 @@
|
|
87
87
|
"better-sqlite3": "^8.4.0",
|
88
88
|
"dockerode": "^3.3.4",
|
89
89
|
"dotenv": "^16.0.3",
|
90
|
-
"drizzle-
|
90
|
+
"drizzle-kit": "0.19.13",
|
91
|
+
"drizzle-orm": "0.29.3",
|
91
92
|
"esbuild-node-externals": "^1.9.0",
|
92
93
|
"eslint": "^8.29.0",
|
93
94
|
"eslint-config-prettier": "^8.5.0",
|
package/utils-studio.js
CHANGED
@@ -1134,10 +1134,10 @@ function mapSqlToSqliteType(sqlType) {
|
|
1134
1134
|
return "numeric";
|
1135
1135
|
}
|
1136
1136
|
}
|
1137
|
-
var
|
1137
|
+
var import_drizzle_orm2, import_sqlite_core2, dialect, fromDatabase;
|
1138
1138
|
var init_sqliteSerializer = __esm({
|
1139
1139
|
"src/serializer/sqliteSerializer.ts"() {
|
1140
|
-
|
1140
|
+
import_drizzle_orm2 = require("drizzle-orm");
|
1141
1141
|
import_sqlite_core2 = require("drizzle-orm/sqlite-core");
|
1142
1142
|
init_serializer();
|
1143
1143
|
init_outputs();
|
@@ -1552,12 +1552,12 @@ var require_brace_expansion = __commonJS({
|
|
1552
1552
|
});
|
1553
1553
|
|
1554
1554
|
// src/serializer/pgSerializer.ts
|
1555
|
-
var import_pg_core2, import_pg_core3,
|
1555
|
+
var import_pg_core2, import_pg_core3, import_drizzle_orm3, dialect2, trimChar, fromDatabase2, columnToDefault, defaultForColumn;
|
1556
1556
|
var init_pgSerializer = __esm({
|
1557
1557
|
"src/serializer/pgSerializer.ts"() {
|
1558
1558
|
import_pg_core2 = require("drizzle-orm/pg-core");
|
1559
1559
|
import_pg_core3 = require("drizzle-orm/pg-core");
|
1560
|
-
|
1560
|
+
import_drizzle_orm3 = require("drizzle-orm");
|
1561
1561
|
init_serializer();
|
1562
1562
|
init_source();
|
1563
1563
|
init_outputs();
|
@@ -1971,10 +1971,10 @@ var init_pgSerializer = __esm({
|
|
1971
1971
|
});
|
1972
1972
|
|
1973
1973
|
// src/drivers/index.ts
|
1974
|
-
var
|
1974
|
+
var import_drizzle_orm5, DrizzleDbClient, DrizzleORMPgClient, TursoSqlite;
|
1975
1975
|
var init_drivers = __esm({
|
1976
1976
|
"src/drivers/index.ts"() {
|
1977
|
-
|
1977
|
+
import_drizzle_orm5 = require("drizzle-orm");
|
1978
1978
|
DrizzleDbClient = class {
|
1979
1979
|
constructor(db) {
|
1980
1980
|
this.db = db;
|
@@ -1982,11 +1982,11 @@ var init_drivers = __esm({
|
|
1982
1982
|
};
|
1983
1983
|
DrizzleORMPgClient = class extends DrizzleDbClient {
|
1984
1984
|
async query(query, values) {
|
1985
|
-
const res = await this.db.execute(
|
1985
|
+
const res = await this.db.execute(import_drizzle_orm5.sql.raw(query));
|
1986
1986
|
return res.rows;
|
1987
1987
|
}
|
1988
1988
|
async run(query) {
|
1989
|
-
const res = await this.db.execute(
|
1989
|
+
const res = await this.db.execute(import_drizzle_orm5.sql.raw(query));
|
1990
1990
|
return res.rows;
|
1991
1991
|
}
|
1992
1992
|
};
|
@@ -2015,6 +2015,7 @@ __export(utils_studio_exports, {
|
|
2015
2015
|
module.exports = __toCommonJS(utils_studio_exports);
|
2016
2016
|
|
2017
2017
|
// src/serializer/schemaToDrizzle.ts
|
2018
|
+
var import_drizzle_orm = require("drizzle-orm");
|
2018
2019
|
var import_pg_core = require("drizzle-orm/pg-core");
|
2019
2020
|
var import_sqlite_core = require("drizzle-orm/sqlite-core");
|
2020
2021
|
var pgSchemaToDrizzle = (schema, schemaName) => {
|
@@ -2142,7 +2143,7 @@ var sqliteSchemaToDrizzle = (schema) => {
|
|
2142
2143
|
columnBuilder = columnBuilder.notNull();
|
2143
2144
|
}
|
2144
2145
|
if (c.default) {
|
2145
|
-
columnBuilder = columnBuilder.default(c.default);
|
2146
|
+
columnBuilder = columnBuilder.default(import_drizzle_orm.sql`${c.default}`);
|
2146
2147
|
}
|
2147
2148
|
if (c.primaryKey) {
|
2148
2149
|
columnBuilder = columnBuilder.primaryKey();
|
@@ -3351,7 +3352,7 @@ init_views();
|
|
3351
3352
|
init_pgSerializer();
|
3352
3353
|
|
3353
3354
|
// src/introspect-pg.ts
|
3354
|
-
var
|
3355
|
+
var import_drizzle_orm4 = require("drizzle-orm");
|
3355
3356
|
var import_relations = require("drizzle-orm/relations");
|
3356
3357
|
init_pgSerializer();
|
3357
3358
|
|
package/utils-studio.mjs
CHANGED
@@ -1100,7 +1100,7 @@ var init_outputs = __esm({
|
|
1100
1100
|
});
|
1101
1101
|
|
1102
1102
|
// src/serializer/sqliteSerializer.ts
|
1103
|
-
import { getTableName, is, SQL } from "drizzle-orm";
|
1103
|
+
import { getTableName, is, SQL as SQL2 } from "drizzle-orm";
|
1104
1104
|
import {
|
1105
1105
|
getTableConfig,
|
1106
1106
|
SQLiteBaseInteger,
|
@@ -1563,7 +1563,7 @@ import {
|
|
1563
1563
|
uniqueKeyName as uniqueKeyName2
|
1564
1564
|
} from "drizzle-orm/pg-core";
|
1565
1565
|
import { getTableConfig as getTableConfig2 } from "drizzle-orm/pg-core";
|
1566
|
-
import { is as is2, SQL as
|
1566
|
+
import { is as is2, SQL as SQL3, getTableName as getTableName2 } from "drizzle-orm";
|
1567
1567
|
var dialect2, trimChar, fromDatabase2, columnToDefault, defaultForColumn;
|
1568
1568
|
var init_pgSerializer = __esm({
|
1569
1569
|
"src/serializer/pgSerializer.ts"() {
|
@@ -1980,7 +1980,7 @@ var init_pgSerializer = __esm({
|
|
1980
1980
|
});
|
1981
1981
|
|
1982
1982
|
// src/drivers/index.ts
|
1983
|
-
import { sql } from "drizzle-orm";
|
1983
|
+
import { sql as sql2 } from "drizzle-orm";
|
1984
1984
|
var DrizzleDbClient, DrizzleORMPgClient, TursoSqlite;
|
1985
1985
|
var init_drivers = __esm({
|
1986
1986
|
"src/drivers/index.ts"() {
|
@@ -1991,11 +1991,11 @@ var init_drivers = __esm({
|
|
1991
1991
|
};
|
1992
1992
|
DrizzleORMPgClient = class extends DrizzleDbClient {
|
1993
1993
|
async query(query, values) {
|
1994
|
-
const res = await this.db.execute(
|
1994
|
+
const res = await this.db.execute(sql2.raw(query));
|
1995
1995
|
return res.rows;
|
1996
1996
|
}
|
1997
1997
|
async run(query) {
|
1998
|
-
const res = await this.db.execute(
|
1998
|
+
const res = await this.db.execute(sql2.raw(query));
|
1999
1999
|
return res.rows;
|
2000
2000
|
}
|
2001
2001
|
};
|
@@ -2012,6 +2012,7 @@ var init_drivers = __esm({
|
|
2012
2012
|
});
|
2013
2013
|
|
2014
2014
|
// src/serializer/schemaToDrizzle.ts
|
2015
|
+
import { sql } from "drizzle-orm";
|
2015
2016
|
import {
|
2016
2017
|
customType,
|
2017
2018
|
PgBigInt53Builder,
|
@@ -2176,7 +2177,7 @@ var sqliteSchemaToDrizzle = (schema) => {
|
|
2176
2177
|
columnBuilder = columnBuilder.notNull();
|
2177
2178
|
}
|
2178
2179
|
if (c.default) {
|
2179
|
-
columnBuilder = columnBuilder.default(c.default);
|
2180
|
+
columnBuilder = columnBuilder.default(sql`${c.default}`);
|
2180
2181
|
}
|
2181
2182
|
if (c.primaryKey) {
|
2182
2183
|
columnBuilder = columnBuilder.primaryKey();
|