php 如何在 Laravel 中运行特定的迁移

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/47151886/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 02:32:22  来源:igfitidea点击:

How can I run specific migration in laravel

phplaravel

提问by Keval Mangukiya

I create on address table migration but one migration is already in the database it gives following error :

我在地址表迁移时创建,但数据库中已经有一个迁移,它给出了以下错误:

Base table or view already exists: 1050 Table 'notification' already exists

基表或视图已存在:1050 表“通知”已存在

So, Can I run specific migration? How can I run in Laravel?

那么,我可以运行特定的迁移吗?我如何在 Laravel 中运行?

回答by Ravi Thummar

use this command php artisan migrate --path=/database/migrations/my_migration.phpit worked for me..

使用这个php artisan migrate --path=/database/migrations/my_migration.php对我有用的命令..