Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"failed to open stream" error when executing "migrate:make"

I am trying to create a simple database migration. But when I run the following command in the root directory of my project:

php artisan migrate:make --create=users create_users_table

I get the following error:

[ErrorException]

file_put_contents(/var/www/blog/app/database/migrations/2015_12_20_052832_create_users_table.php): failed to open stream: No such file or directory

I am using the latest version of OctoberCMS and am getting the same error both on Linux and Windows. How can I fix this?

like image 984
B Faley Avatar asked Jun 27 '26 00:06

B Faley


1 Answers

The command is wrong for the latest version of OctoberCMS. To create a new migration, you should run this:

php artisan make:migration create_users_table --create=users

Also, you should create the path of migrations because it does not created at the installation of OctoberCMS.

# execute from the root app folder
mkdir -p database/migrations
like image 171
Pantelis Peslis Avatar answered Jun 29 '26 14:06

Pantelis Peslis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!