This commit is contained in:
2021-06-18 21:55:30 +02:00
parent e79080a004
commit e7bf15168f
2 changed files with 15 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@linkyjs/core",
"version": "1.0.10",
"version": "1.0.11",
"description": "URL Shortener for Developers 💻",
"main": "start/kernel.ts",
"repository": {

View File

@@ -23,7 +23,20 @@ export default class AppProvider {
password: Env.get('ADMIN_PASSWORD', 'password')
})
if (user) {
Logger.info('User successfully created')
Logger.info('Admin User successfully created !')
}
const { default: Migrator } = await import('@ioc:Adonis/Lucid/Migrator')
const { default: Database } = await import('@ioc:Adonis/Lucid/Database')
const { default: Application } = await import('@ioc:Adonis/Core/Application')
const migrator = new Migrator(Database, Application, {
direction: 'up',
})
await migrator.run()
if (migrator.status === 'completed') {
Logger.info('Migrations successfully passed !')
}
}