create-nextblock 0.15.2 → 0.15.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/package.json
CHANGED
|
@@ -1075,6 +1075,24 @@ async function updateSchema(install, core, flags) {
|
|
|
1075
1075
|
fail(`Could not read the migration history: ${applied.error}`);
|
|
1076
1076
|
return { ok: false, applied: 0 };
|
|
1077
1077
|
}
|
|
1078
|
+
// Versions recorded remotely that have no file here mean the two histories have diverged
|
|
1079
|
+
// — most often an install that predates the July 2026 re-baseline, where the old 000–044
|
|
1080
|
+
// numbering is still recorded. That matters because Supabase (and this applier) match
|
|
1081
|
+
// history by VERSION ONLY, never by content: a local file whose number is already
|
|
1082
|
+
// recorded is skipped in silence, with no error and no output. Warn rather than block —
|
|
1083
|
+
// a hand-written migration of the operator's own is a perfectly legitimate cause.
|
|
1084
|
+
const localVersions = new Set(files.map((f) => f.version));
|
|
1085
|
+
const remoteOnly = [...applied.versions].filter((v) => !localVersions.has(v)).sort();
|
|
1086
|
+
if (remoteOnly.length > 0) {
|
|
1087
|
+
warn(`${remoteOnly.length} version(s) are recorded in the database with no matching file:`);
|
|
1088
|
+
for (const v of remoteOnly.slice(0, 10)) info(C.dim(` ${v}`));
|
|
1089
|
+
if (remoteOnly.length > 10) info(C.dim(` … and ${remoteOnly.length - 10} more`));
|
|
1090
|
+
info('Migrations are matched by version, never by content, so a local file reusing one');
|
|
1091
|
+
info('of those numbers would never run. If this install predates the migration');
|
|
1092
|
+
info(`re-baseline, reconcile it once with ${C.cyan('npm run db:migrate:repair-history')}.`);
|
|
1093
|
+
say();
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1078
1096
|
const pending = files.filter((f) => !applied.versions.has(f.version));
|
|
1079
1097
|
|
|
1080
1098
|
if (pending.length === 0) {
|