drizzle-kit 0.23.0-1e9350a → 0.23.0-41417ce
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +15 -3
- package/package.json +1 -1
package/bin.cjs
CHANGED
@@ -124091,6 +124091,18 @@ var init_push = __esm({
|
|
124091
124091
|
statements.validatedCur
|
124092
124092
|
);
|
124093
124093
|
const filteredSqlStatements = fromJson(filteredStatements, "mysql");
|
124094
|
+
const uniqueSqlStatementsToExecute = [];
|
124095
|
+
statementsToExecute.forEach((ss) => {
|
124096
|
+
if (!uniqueSqlStatementsToExecute.includes(ss)) {
|
124097
|
+
uniqueSqlStatementsToExecute.push(ss);
|
124098
|
+
}
|
124099
|
+
});
|
124100
|
+
const uniqueFilteredSqlStatements = [];
|
124101
|
+
filteredSqlStatements.forEach((ss) => {
|
124102
|
+
if (!uniqueFilteredSqlStatements.includes(ss)) {
|
124103
|
+
uniqueFilteredSqlStatements.push(ss);
|
124104
|
+
}
|
124105
|
+
});
|
124094
124106
|
if (verbose) {
|
124095
124107
|
console.log();
|
124096
124108
|
console.log(
|
@@ -124098,7 +124110,7 @@ var init_push = __esm({
|
|
124098
124110
|
);
|
124099
124111
|
console.log();
|
124100
124112
|
console.log(
|
124101
|
-
[...
|
124113
|
+
[...uniqueSqlStatementsToExecute, ...uniqueFilteredSqlStatements].map((s2) => source_default.blue(s2)).join("\n")
|
124102
124114
|
);
|
124103
124115
|
console.log();
|
124104
124116
|
}
|
@@ -124134,10 +124146,10 @@ var init_push = __esm({
|
|
124134
124146
|
process.exit(0);
|
124135
124147
|
}
|
124136
124148
|
}
|
124137
|
-
for (const dStmnt of
|
124149
|
+
for (const dStmnt of uniqueSqlStatementsToExecute) {
|
124138
124150
|
await db2.query(dStmnt);
|
124139
124151
|
}
|
124140
|
-
for (const statement of
|
124152
|
+
for (const statement of uniqueFilteredSqlStatements) {
|
124141
124153
|
await db2.query(statement);
|
124142
124154
|
}
|
124143
124155
|
if (filteredStatements.length > 0) {
|