我如何在laravel中运行特定的迁移 [英] How can I run specific migration in laravel

查看:247
本文介绍了我如何在laravel中运行特定的迁移的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在地址表迁移上创建,但是数据库中已经进行了一次迁移,因此出现以下错误:

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

基本表或视图已存在:1050表通知"已存在

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

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

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

推荐答案

使用此命令php artisan migrate --path=/database/migrations/my_migration.php 它对我有用.

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

这篇关于我如何在laravel中运行特定的迁移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆