Data and migrations
lezhnev74 opened this issue · 4 comments
I feel like there is a lack of database migration support in Lucid.
- There is a folder within each service called
database
where I can seedatabase/migration
but the data is also located inData
folder. How do those relate to each other? lucid
does not have any way to make a migration (while it has amake:model
command). Why?
Did you succeed to make a migration in the src/Api/database/migration ?
Looks likephp artisan migrate && db:seed
does not looks for src/Api/database/
Has anyone succeeded in migrating migrations in each service in Lucid?
@Mulkave said: You may use Laravel's php artisan migrate --path=src/Services/{service}/database/migrations/{file}.php to specify a custom path for the migration.
Thanks @undjike that is exactly how it works. It was left as such because there's an existing functionality that can achieve it, but i would be happy to provide a command that runs this in the background if it's deemed helpful such as:
lucid migrate <service>
Nevertheless, it's also been covered in the docs now, thank you all for reporting!