drizzle-kit 0.22.0 → 0.22.2
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +9 -7
- package/package.json +1 -1
- package/payload.js +3 -3
- package/payload.mjs +3 -3
package/bin.cjs
CHANGED
@@ -9020,7 +9020,7 @@ var init_pgSchema = __esm({
|
|
9020
9020
|
squashIdx: (idx) => {
|
9021
9021
|
index2.parse(idx);
|
9022
9022
|
return `${idx.name};${idx.columns.map(
|
9023
|
-
(c) => `${c.expression}
|
9023
|
+
(c) => `${c.expression}--${c.isExpression}--${c.asc}--${c.nulls}--${c.opclass}`
|
9024
9024
|
).join(",,")};${idx.isUnique};${idx.concurrently};${idx.method};${idx.where};${JSON.stringify(idx.with)}`;
|
9025
9025
|
},
|
9026
9026
|
unsquashIdx: (input) => {
|
@@ -9036,7 +9036,7 @@ var init_pgSchema = __esm({
|
|
9036
9036
|
const columnString = columnsString.split(",,");
|
9037
9037
|
const columns = [];
|
9038
9038
|
for (const column7 of columnString) {
|
9039
|
-
const [expression, isExpression, asc, nulls, opclass] = column7.split("
|
9039
|
+
const [expression, isExpression, asc, nulls, opclass] = column7.split("--");
|
9040
9040
|
columns.push({
|
9041
9041
|
nulls,
|
9042
9042
|
isExpression: isExpression === "true",
|
@@ -22755,7 +22755,7 @@ var init_sqlgenerator = __esm({
|
|
22755
22755
|
if (pgNativeTypes.has(it))
|
22756
22756
|
return true;
|
22757
22757
|
const toCheck = it.replace(/ /g, "");
|
22758
|
-
return toCheck.startsWith("varchar(") || toCheck.startsWith("char(") || toCheck.startsWith("numeric(") || toCheck.startsWith("timestamp(") || toCheck.startsWith("intervalyear(") || toCheck.startsWith("intervalmonth(") || toCheck.startsWith("intervalday(") || toCheck.startsWith("intervalhour(") || toCheck.startsWith("intervalminute(") || toCheck.startsWith("intervalsecond(") || toCheck.startsWith("intervalyeartomonth(") || toCheck.startsWith("intervaldaytohour(") || toCheck.startsWith("intervaldaytominute(") || toCheck.startsWith("intervaldaytosecond(") || toCheck.startsWith("intervalhourtominute(") || toCheck.startsWith("intervalhourtosecond(") || toCheck.startsWith("intervalminutetosecond(") || toCheck.startsWith("vector(") || /^(\w+)(\[\d*])+$/.test(it);
|
22758
|
+
return toCheck.startsWith("varchar(") || toCheck.startsWith("char(") || toCheck.startsWith("numeric(") || toCheck.startsWith("timestamp(") || toCheck.startsWith("intervalyear(") || toCheck.startsWith("intervalmonth(") || toCheck.startsWith("intervalday(") || toCheck.startsWith("intervalhour(") || toCheck.startsWith("intervalminute(") || toCheck.startsWith("intervalsecond(") || toCheck.startsWith("intervalyeartomonth(") || toCheck.startsWith("intervaldaytohour(") || toCheck.startsWith("intervaldaytominute(") || toCheck.startsWith("intervaldaytosecond(") || toCheck.startsWith("intervalhourtominute(") || toCheck.startsWith("intervalhourtosecond(") || toCheck.startsWith("intervalminutetosecond(") || toCheck.startsWith("vector(") || toCheck.startsWith("geometry(") || /^(\w+)(\[\d*])+$/.test(it);
|
22759
22759
|
};
|
22760
22760
|
Convertor = class {
|
22761
22761
|
};
|
@@ -119877,7 +119877,7 @@ var init_connections = __esm({
|
|
119877
119877
|
const { migrate } = await import("drizzle-orm/sqlite-proxy/migrator");
|
119878
119878
|
const remoteCallback = async (sql2, params, method) => {
|
119879
119879
|
const res = await fetch2(
|
119880
|
-
`https://api.cloudflare.com/client/v4/accounts/${credentials2.accountId}/d1/database/${credentials2.databaseId}
|
119880
|
+
`https://api.cloudflare.com/client/v4/accounts/${credentials2.accountId}/d1/database/${credentials2.databaseId}/${method === "values" ? "raw" : "query"}`,
|
119881
119881
|
{
|
119882
119882
|
method: "POST",
|
119883
119883
|
body: JSON.stringify({ sql: sql2, params }),
|
@@ -119893,9 +119893,10 @@ var init_connections = __esm({
|
|
119893
119893
|
data.errors.map((it) => `${it.code}: ${it.message}`).join("\n")
|
119894
119894
|
);
|
119895
119895
|
}
|
119896
|
-
const
|
119896
|
+
const result = data.result[0].results;
|
119897
|
+
const rows = Array.isArray(result) ? result : result.rows;
|
119897
119898
|
return {
|
119898
|
-
rows
|
119899
|
+
rows
|
119899
119900
|
};
|
119900
119901
|
};
|
119901
119902
|
const drzl = drizzle(remoteCallback);
|
@@ -128039,6 +128040,7 @@ var init_studio2 = __esm({
|
|
128039
128040
|
return {
|
128040
128041
|
dbHash,
|
128041
128042
|
dialect: "sqlite",
|
128043
|
+
driver: "driver" in credentials2 ? credentials2.driver : void 0,
|
128042
128044
|
proxy: sqliteDB.proxy,
|
128043
128045
|
customDefaults,
|
128044
128046
|
schema: sqliteSchema2,
|
@@ -129556,7 +129558,7 @@ var printVersions = async () => {
|
|
129556
129558
|
var versions = async () => {
|
129557
129559
|
const { npmVersion } = await ormCoreVersions();
|
129558
129560
|
const ormVersion = npmVersion ? `drizzle-orm: v${npmVersion}` : "";
|
129559
|
-
const envVersion = "0.22.
|
129561
|
+
const envVersion = "0.22.2";
|
129560
129562
|
const kitVersion = envVersion ? `v${envVersion}` : "--";
|
129561
129563
|
const versions2 = `drizzle-kit: ${kitVersion}
|
129562
129564
|
${ormVersion}`;
|
package/package.json
CHANGED
package/payload.js
CHANGED
@@ -15153,7 +15153,7 @@ var init_pgSchema = __esm({
|
|
15153
15153
|
squashIdx: (idx) => {
|
15154
15154
|
index2.parse(idx);
|
15155
15155
|
return `${idx.name};${idx.columns.map(
|
15156
|
-
(c) => `${c.expression}
|
15156
|
+
(c) => `${c.expression}--${c.isExpression}--${c.asc}--${c.nulls}--${c.opclass}`
|
15157
15157
|
).join(",,")};${idx.isUnique};${idx.concurrently};${idx.method};${idx.where};${JSON.stringify(idx.with)}`;
|
15158
15158
|
},
|
15159
15159
|
unsquashIdx: (input) => {
|
@@ -15169,7 +15169,7 @@ var init_pgSchema = __esm({
|
|
15169
15169
|
const columnString = columnsString.split(",,");
|
15170
15170
|
const columns = [];
|
15171
15171
|
for (const column4 of columnString) {
|
15172
|
-
const [expression, isExpression, asc2, nulls, opclass] = column4.split("
|
15172
|
+
const [expression, isExpression, asc2, nulls, opclass] = column4.split("--");
|
15173
15173
|
columns.push({
|
15174
15174
|
nulls,
|
15175
15175
|
isExpression: isExpression === "true",
|
@@ -23371,7 +23371,7 @@ var init_sqlgenerator = __esm({
|
|
23371
23371
|
if (pgNativeTypes.has(it))
|
23372
23372
|
return true;
|
23373
23373
|
const toCheck = it.replace(/ /g, "");
|
23374
|
-
return toCheck.startsWith("varchar(") || toCheck.startsWith("char(") || toCheck.startsWith("numeric(") || toCheck.startsWith("timestamp(") || toCheck.startsWith("intervalyear(") || toCheck.startsWith("intervalmonth(") || toCheck.startsWith("intervalday(") || toCheck.startsWith("intervalhour(") || toCheck.startsWith("intervalminute(") || toCheck.startsWith("intervalsecond(") || toCheck.startsWith("intervalyeartomonth(") || toCheck.startsWith("intervaldaytohour(") || toCheck.startsWith("intervaldaytominute(") || toCheck.startsWith("intervaldaytosecond(") || toCheck.startsWith("intervalhourtominute(") || toCheck.startsWith("intervalhourtosecond(") || toCheck.startsWith("intervalminutetosecond(") || toCheck.startsWith("vector(") || /^(\w+)(\[\d*])+$/.test(it);
|
23374
|
+
return toCheck.startsWith("varchar(") || toCheck.startsWith("char(") || toCheck.startsWith("numeric(") || toCheck.startsWith("timestamp(") || toCheck.startsWith("intervalyear(") || toCheck.startsWith("intervalmonth(") || toCheck.startsWith("intervalday(") || toCheck.startsWith("intervalhour(") || toCheck.startsWith("intervalminute(") || toCheck.startsWith("intervalsecond(") || toCheck.startsWith("intervalyeartomonth(") || toCheck.startsWith("intervaldaytohour(") || toCheck.startsWith("intervaldaytominute(") || toCheck.startsWith("intervaldaytosecond(") || toCheck.startsWith("intervalhourtominute(") || toCheck.startsWith("intervalhourtosecond(") || toCheck.startsWith("intervalminutetosecond(") || toCheck.startsWith("vector(") || toCheck.startsWith("geometry(") || /^(\w+)(\[\d*])+$/.test(it);
|
23375
23375
|
};
|
23376
23376
|
Convertor = class {
|
23377
23377
|
};
|
package/payload.mjs
CHANGED
@@ -15159,7 +15159,7 @@ var init_pgSchema = __esm({
|
|
15159
15159
|
squashIdx: (idx) => {
|
15160
15160
|
index2.parse(idx);
|
15161
15161
|
return `${idx.name};${idx.columns.map(
|
15162
|
-
(c) => `${c.expression}
|
15162
|
+
(c) => `${c.expression}--${c.isExpression}--${c.asc}--${c.nulls}--${c.opclass}`
|
15163
15163
|
).join(",,")};${idx.isUnique};${idx.concurrently};${idx.method};${idx.where};${JSON.stringify(idx.with)}`;
|
15164
15164
|
},
|
15165
15165
|
unsquashIdx: (input) => {
|
@@ -15175,7 +15175,7 @@ var init_pgSchema = __esm({
|
|
15175
15175
|
const columnString = columnsString.split(",,");
|
15176
15176
|
const columns = [];
|
15177
15177
|
for (const column4 of columnString) {
|
15178
|
-
const [expression, isExpression, asc2, nulls, opclass] = column4.split("
|
15178
|
+
const [expression, isExpression, asc2, nulls, opclass] = column4.split("--");
|
15179
15179
|
columns.push({
|
15180
15180
|
nulls,
|
15181
15181
|
isExpression: isExpression === "true",
|
@@ -23377,7 +23377,7 @@ var init_sqlgenerator = __esm({
|
|
23377
23377
|
if (pgNativeTypes.has(it))
|
23378
23378
|
return true;
|
23379
23379
|
const toCheck = it.replace(/ /g, "");
|
23380
|
-
return toCheck.startsWith("varchar(") || toCheck.startsWith("char(") || toCheck.startsWith("numeric(") || toCheck.startsWith("timestamp(") || toCheck.startsWith("intervalyear(") || toCheck.startsWith("intervalmonth(") || toCheck.startsWith("intervalday(") || toCheck.startsWith("intervalhour(") || toCheck.startsWith("intervalminute(") || toCheck.startsWith("intervalsecond(") || toCheck.startsWith("intervalyeartomonth(") || toCheck.startsWith("intervaldaytohour(") || toCheck.startsWith("intervaldaytominute(") || toCheck.startsWith("intervaldaytosecond(") || toCheck.startsWith("intervalhourtominute(") || toCheck.startsWith("intervalhourtosecond(") || toCheck.startsWith("intervalminutetosecond(") || toCheck.startsWith("vector(") || /^(\w+)(\[\d*])+$/.test(it);
|
23380
|
+
return toCheck.startsWith("varchar(") || toCheck.startsWith("char(") || toCheck.startsWith("numeric(") || toCheck.startsWith("timestamp(") || toCheck.startsWith("intervalyear(") || toCheck.startsWith("intervalmonth(") || toCheck.startsWith("intervalday(") || toCheck.startsWith("intervalhour(") || toCheck.startsWith("intervalminute(") || toCheck.startsWith("intervalsecond(") || toCheck.startsWith("intervalyeartomonth(") || toCheck.startsWith("intervaldaytohour(") || toCheck.startsWith("intervaldaytominute(") || toCheck.startsWith("intervaldaytosecond(") || toCheck.startsWith("intervalhourtominute(") || toCheck.startsWith("intervalhourtosecond(") || toCheck.startsWith("intervalminutetosecond(") || toCheck.startsWith("vector(") || toCheck.startsWith("geometry(") || /^(\w+)(\[\d*])+$/.test(it);
|
23381
23381
|
};
|
23382
23382
|
Convertor = class {
|
23383
23383
|
};
|