Php Laravel 5.6特定表迁移

Php Laravel 5.6特定表迁移,php,laravel-5.6,Php,Laravel 5.6,当我运行这个命令时,它没有说明要迁移 php artisan migrate --path=/database/migrations/2018_11_30_093512_create_task_user_table.php Nothing to migrate. 这是task_用户迁移文件 */ public function up() { Schema::create('task_user', function (Blueprint $table) { $tabl

当我运行这个命令时,它没有说明要迁移

php artisan migrate --path=/database/migrations/2018_11_30_093512_create_task_user_table.php

Nothing to migrate.
这是task_用户迁移文件

 */
public function up()
{
    Schema::create('task_user', function (Blueprint $table) {
        $table->increments('id');
        $table->integer('task_id')->unsigned();
        $table->integer('user_id')->unsigned();
        $table->foreign('user_id')->references('id')->on('users');
        $table->foreign('task_id')->references('id')->on('tasks');

        $table->timestamps();
    });
}

你能帮我解决这个问题吗?

这意味着,你只能迁移一次文件,如果你想进行更改,你应该创建另一个迁移文件,然后运行
artisan migrate
命令。要再次
rollback
migrate
相同的文件,请像这样使用
migrate:refresh
命令

php artisan migrate:refresh

这意味着,一个文件只能迁移一次,如果要进行更改,应创建另一个迁移文件,然后运行
artisan migrate
命令。要再次
rollback
migrate
相同的文件,请像这样使用
migrate:refresh
命令

php artisan migrate:refresh

在migration folder下创建一个子文件夹,并将该特定迁移文件移动/复制到该子文件夹,然后运行
php artisan migrate--path=/database/migrations/sub folder/
命令。它将迁移将驻留在该子文件夹中的所有迁移文件

在“迁移文件夹”下创建一个子文件夹,并将该特定迁移文件移动/复制到该子文件夹,然后运行
php artisan migrate--path=/database/migrations/sub folder/
命令。它将迁移将驻留在该子文件夹中的所有迁移文件

@Banjuran Balendrakumar我执行这个命令。但是这个表不是在数据库中创建的,而且它也没有说明什么migrate@Banjuran巴伦德拉库马尔,我执行这个命令。但是这个表不是在数据库中创建的,它再次对迁移没有任何说明您检查过迁移之前是否运行过吗?您检查过迁移之前是否运行过吗?