Answer the question
In order to leave comments, you need to log in
How to make a single file migration?
Good afternoon!
You can migrate all files with a command: php artisan migrate
I know that you can migrate one file by moving it to another folder, with the following command: php artisan migrate --path=путь_до_папки
How can I migrate one specific file without moving it to another folder?
Answer the question
In order to leave comments, you need to log in
No way. Migrations are incremental changes to the database structure. Rolling in sequence.
It seems that one file is not supported, so they came up with a crutch with movement. But why? If this is a new file, then just run php artisan migrate and only the latest changes will be rolled. Your task is strange, and therefore there is no solution out of the box.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question