首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >laravel未创建新表

laravel未创建新表
EN

Stack Overflow用户
提问于 2017-02-05 20:28:56
回答 3查看 616关注 0票数 1

我只有一个新的迁移文件,它是2017_02_05_121119_create_posts_table.php,但当我运行"php artisan migrate“时,它显示"Symfony\Component\Debug\Exception\FatalErrorException无法重新声明类CreateUsersTable”。

代码语言:javascript
复制
    <?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePostsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('posts', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title');
            $table->string('description');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('posts');
    }
}
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42052048

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档