when I trying to migrate something I get this error:
**************************************
* Application In Production! *
**************************************
Do you really wish to run this command?
Command Cancelled!
Im running a centOS 6.5 server without Plesk 12 Is there anyway to figure out what the error is or how to solve it?
Thanks
IF you want to re-migrate all the database, you can simply do: php artisan migrate:refresh . IF you want to make sure your database to be clean with your latest changes, you can drop your entire database tables and do php artisan migrate again. Also, you can try php artisan migrate --seed if you have any seeder.
Migrations are an integral part of the Laravel procedure and are usually done in conjecture with the Laravel schema builder. This helps to build easily the database schema. Laravel Migrations are an essential part of the Laravel architecture.
If you've only created the migration and you've not executed the php artisan migrate command, all you would need to do to remove the migration is to delete the file. You could do that via your text editor or the command line with the rm command.
A bit late for answer but just for info purpose you can use php artisan migrate --force
to avoid it OR in laravel 5.2 they are using a key env
in config/app.php configure it to avoid this prompt
reference https://github.com/laravel/laravel/blob/master/config/app.php
Just use --force flag in production:
php artisan migrate --force
https://laravel.com/docs/6.x/migrations#running-migrations
Forcing Migrations To Run In Production
Some migration operations are destructive, which means they may cause you to lose data. In order to protect you from running these commands against your production database, you will be prompted for confirmation before the commands are executed. To force the commands to run without a prompt, use the --force flag.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With