drizzle-kit 0.19.10 → 0.19.11-6427e88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +14 -6
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -12060,7 +12060,7 @@ var init_pgSerializer = __esm({
|
|
|
12060
12060
|
indexName2 = (tableName, columns) => {
|
|
12061
12061
|
return `${tableName}_${columns.join("_")}_index`;
|
|
12062
12062
|
};
|
|
12063
|
-
generatePgSnapshot = (tables, enums, schemas, schemaFilter
|
|
12063
|
+
generatePgSnapshot = (tables, enums, schemas, schemaFilter) => {
|
|
12064
12064
|
const result = {};
|
|
12065
12065
|
for (const table4 of tables) {
|
|
12066
12066
|
const {
|
|
@@ -12073,7 +12073,7 @@ var init_pgSerializer = __esm({
|
|
|
12073
12073
|
primaryKeys,
|
|
12074
12074
|
uniqueConstraints
|
|
12075
12075
|
} = (0, import_pg_core3.getTableConfig)(table4);
|
|
12076
|
-
if (!schemaFilter.includes(schema4 ?? "public")) {
|
|
12076
|
+
if (schemaFilter && !schemaFilter.includes(schema4 ?? "public")) {
|
|
12077
12077
|
continue;
|
|
12078
12078
|
}
|
|
12079
12079
|
const columnsObject = {};
|
|
@@ -12240,7 +12240,15 @@ ${withStyle.errorWarning(`We've found duplicated unique constraint names in ${so
|
|
|
12240
12240
|
}, {});
|
|
12241
12241
|
const schemasObject = Object.fromEntries(
|
|
12242
12242
|
schemas.filter(
|
|
12243
|
-
(it) =>
|
|
12243
|
+
(it) => {
|
|
12244
|
+
if (it.schemaName !== "public")
|
|
12245
|
+
return true;
|
|
12246
|
+
if (schemaFilter) {
|
|
12247
|
+
return schemaFilter.includes(it.schemaName);
|
|
12248
|
+
} else {
|
|
12249
|
+
return true;
|
|
12250
|
+
}
|
|
12251
|
+
}
|
|
12244
12252
|
).map((it) => [it.schemaName, it.schemaName])
|
|
12245
12253
|
);
|
|
12246
12254
|
return {
|
|
@@ -13091,7 +13099,7 @@ ${filenames.join("\n")}
|
|
|
13091
13099
|
const { tables, enums, schemas } = await prepareFromMySqlImports2(filenames);
|
|
13092
13100
|
return generateMySqlSnapshot2(tables, enums, schemas);
|
|
13093
13101
|
};
|
|
13094
|
-
serializePg = async (path3, schemaFilter
|
|
13102
|
+
serializePg = async (path3, schemaFilter) => {
|
|
13095
13103
|
const filenames = prepareFilenames(path3);
|
|
13096
13104
|
const { prepareFromPgImports: prepareFromPgImports2 } = await Promise.resolve().then(() => (init_pgImports(), pgImports_exports));
|
|
13097
13105
|
const { generatePgSnapshot: generatePgSnapshot2 } = await Promise.resolve().then(() => (init_pgSerializer(), pgSerializer_exports));
|
|
@@ -13149,7 +13157,7 @@ var init_migrationPreparator = __esm({
|
|
|
13149
13157
|
const result = { version: version2, dialect: dialect6, id, prevId: idPrev, ...rest };
|
|
13150
13158
|
return { prev, cur: result };
|
|
13151
13159
|
};
|
|
13152
|
-
preparePgDbPushSnapshot = async (prev, schemaPath, schemaFilter) => {
|
|
13160
|
+
preparePgDbPushSnapshot = async (prev, schemaPath, schemaFilter = ["public"]) => {
|
|
13153
13161
|
const serialized = await serializePg(schemaPath, schemaFilter);
|
|
13154
13162
|
const id = (0, import_crypto.randomUUID)();
|
|
13155
13163
|
const idPrev = prev.id;
|
|
@@ -52110,7 +52118,7 @@ init_source();
|
|
|
52110
52118
|
// package.json
|
|
52111
52119
|
var package_default = {
|
|
52112
52120
|
name: "drizzle-kit",
|
|
52113
|
-
version: "0.19.
|
|
52121
|
+
version: "0.19.11",
|
|
52114
52122
|
repository: "https://github.com/drizzle-team/drizzle-kit-mirror",
|
|
52115
52123
|
author: "Drizzle Team",
|
|
52116
52124
|
license: "MIT",
|