N
N
Nikolay2017-05-25 12:37:24
Laravel
Nikolay, 2017-05-25 12:37:24

Why doesn't migration creation work when creating a model?

Hello) I am mastering this framework)
According to the translation of the documentation

If you want to create a DB migration when you create the model, use the --migration or -m option

Or the official
If you would like to generate a database migration when you generate the model, you may use the --migration or -m option

I enter the command
php artisan make:model MyModel -m
The model is being created
Model created successfully.

But then an error follows (that the file was not found - although it should be created?) and the migration is not created:
[ErrorException]
include(/home/projects/web/laravel/public_html/vendor/composer/../
../database/migrations/2017_05_02_110722_create_calculators_table.php): failed to open stream: No such file or directory

Tell me, maybe I misunderstand, or I'm doing something wrong? =)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolay, 2017-05-25
@iNickolay

Maybe someone will come in handy for the future:
The solution was to simply clean up the migration table:
TRUNCATE TABLE `migrations`

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question