0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-17 23:11:29 -05:00

prepare to run seed on all db push commands

This commit is contained in:
Fred K. Schott 2024-02-09 10:21:25 -08:00
parent ed4294abbe
commit 452a3c8581
2 changed files with 5 additions and 3 deletions

View file

@ -60,7 +60,8 @@ export async function cmd({ config, flags }: { config: AstroConfig; flags: Argum
// exit early if there are no migrations to push
if (missingMigrations.length === 0) {
console.log(MIGRATIONS_UP_TO_DATE);
process.exit(0);
// Preparing to seed for all runs
// process.exit(0);
}
// push the database schema
if (missingMigrations.length > 0) {

View file

@ -63,10 +63,11 @@ export async function setupDbTables({
db,
mode,
});
} catch (e) {
} catch (error) {
(logger ?? console).error(
`Failed to seed data. Did you update to match recent schema changes? Full error:\n\n${e}`
`Failed to seed data. Did you update to match recent schema changes?`
);
(logger ?? console).error(error as string);
}
}
}