Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Laravel 创建php artisan迁移,但不在数据库中创建新表_Laravel - Fatal编程技术网

Laravel 创建php artisan迁移,但不在数据库中创建新表

Laravel 创建php artisan迁移,但不在数据库中创建新表,laravel,Laravel,首先,我创建了一个迁移,并在cmd中运行了php artisan migrate,但它没有创建新表。它正在显示此消息。高级开发人员,您有什么答案吗!请帮帮我。非常感谢 如果要运行迁移而不在数据库中保存任何数据,可以: php artisan migrate:fresh // Refresh the database and run all database seeds... php artisan migrate:fresh --seed 你能告诉我们你收到的错误信息吗?谢谢Romain S

首先,我创建了一个迁移,并在cmd中运行了php artisan migrate,但它没有创建新表。它正在显示此消息。高级开发人员,您有什么答案吗!请帮帮我。非常感谢

如果要运行迁移而不在数据库中保存任何数据,可以:

php artisan migrate:fresh

// Refresh the database and run all database seeds...
php artisan migrate:fresh --seed

你能告诉我们你收到的错误信息吗?谢谢Romain Seite。运行-php artisam migrate并显示错误后,如-'基本表或视图已存在:1050表'密码\u重置'已存在SQL:create表'密码\u重置''电子邮件'varchar255不为空,'token'varchar255 not nulltry php artisan migrate:freshI按照您所说的那样进行了尝试,结果显示在迁移过程中-'drop all tables successfully'。如果您检查数据库,是否有新表?哦!现在不发生错误,这是好的。非常感谢罗曼塞特