40 lines
754 B
PHP
40 lines
754 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
class CreateUsersTable extends Migration {
|
|
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('users', function(Blueprint $table)
|
|
{
|
|
$table->bigInteger('id', true)->unsigned();
|
|
$table->string('username')->nullable();
|
|
$table->string('password')->nullable();
|
|
$table->string('openid', 64);
|
|
$table->string('remember_token', 100)->nullable();
|
|
$table->boolean('is_contract')->default(0)->comment('是否签订合同');
|
|
$table->timestamps();
|
|
$table->softDeletes();
|
|
});
|
|
}
|
|
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::drop('users');
|
|
}
|
|
|
|
}
|