fix: prepare fastapi migrations syncing docker migrations

This commit is contained in:
sauravniraula 2026-04-09 19:19:06 +05:45
parent 5a6bfdb1be
commit 0f460d74f5
No known key found for this signature in database
GPG key ID: 60FCC1B5A5E83326

View file

@ -70,10 +70,6 @@ function syncMigrations() {
throw new Error(`No migration files found in source directory: ${sourceDir}`);
}
for (const filename of listPythonMigrations(targetDir)) {
fs.unlinkSync(path.join(targetDir, filename));
}
for (const filename of sourceFiles) {
fs.copyFileSync(path.join(sourceDir, filename), path.join(targetDir, filename));
}
@ -82,7 +78,7 @@ function syncMigrations() {
validateSingleHead(targetDir, targetFiles);
console.log(
`Synced ${targetFiles.length} migration files and verified a single Alembic head.`
`Synced ${sourceFiles.length} migration files into ${targetFiles.length} target migrations and verified a single Alembic head.`
);
}