相关疑难解决方法(0)

65
推荐指数
4
解决办法
10万
查看次数

在迁移层5.1中设置自动增量字段开始表单1000

我需要在用户表中从1000开始我的ID,我怎么能为此创建迁移.

我目前的迁移是:

public function up()
{
    Schema::create('users', function (Blueprint $table) {
        $table->increments('id'); // how can I start this from 1000
        $table->integer('qualification_id')->nullable();
        $table->integer('experience_id')->nullable();
    });
}
Run Code Online (Sandbox Code Playgroud)

php mysql migration laravel-5.1

21
推荐指数
4
解决办法
2万
查看次数

标签 统计

mysql ×2

auto-increment ×1

laravel-5.1 ×1

migration ×1

php ×1