mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Run migrations before adding the admin user (#5128)
This commit is contained in:
@@ -23,6 +23,9 @@ export default async function bootstrap() {
|
||||
|
||||
await installDatabase(database);
|
||||
|
||||
logger.info('Running migrations...');
|
||||
await runMigrations(database, 'latest');
|
||||
|
||||
const schema = await getSchema();
|
||||
|
||||
logger.info('Setting up first admin role...');
|
||||
@@ -54,11 +57,10 @@ export default async function bootstrap() {
|
||||
}
|
||||
} else {
|
||||
logger.info('Database already initialized, skipping install');
|
||||
logger.info('Running migrations...');
|
||||
await runMigrations(database, 'latest');
|
||||
}
|
||||
|
||||
logger.info('Running migrations...');
|
||||
await runMigrations(database, 'latest');
|
||||
|
||||
logger.info('Done');
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user