A
A
Anton2016-12-27 13:11:55
Laravel
Anton, 2016-12-27 13:11:55

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

2 answer(s)
E
Eugene, 2016-12-27
@Nc_Soft

No way. Migrations are incremental changes to the database structure. Rolling in sequence.

V
Vyacheslav Plisko, 2016-12-28
@AmdY

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 question

Ask a Question

731 491 924 answers to any question