prisma-laravel-migrate 0.1.2 → 0.1.3
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/dist/utils/sort.js +2 -3
- package/package.json +1 -1
package/dist/utils/sort.js
CHANGED
|
@@ -7,10 +7,9 @@
|
|
|
7
7
|
* @throws If there’s a cycle in the relationships
|
|
8
8
|
*/
|
|
9
9
|
export function sortMigrations(migrations) {
|
|
10
|
+
migrations = migrations.filter(m => !m.local);
|
|
10
11
|
// 1) Build a map: tableName → Migration
|
|
11
|
-
const migMap = new Map(migrations
|
|
12
|
-
.filter(m => !m.local) // skip ignored models
|
|
13
|
-
.map(m => [m.tableName, m]));
|
|
12
|
+
const migMap = new Map(migrations.map(m => [m.tableName, m]));
|
|
14
13
|
// 2) Collect “true” FKs only (skip back‐relation object fields)
|
|
15
14
|
const rawDeps = new Map();
|
|
16
15
|
for (const { tableName } of migrations) {
|