42 lines
1.1 KiB
PHP
42 lines
1.1 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
class CreateWechat extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('wechats', function (Blueprint $table) {
|
|
$table->increments('id');
|
|
$table->integer('user_id')->unsigned()->nullable();
|
|
$table->string('openid', 64)->unique();
|
|
$table->string('nickname', 100)->nullable();
|
|
$table->integer('gender')->nullable();
|
|
$table->string('city', 175)->nullable();
|
|
$table->string('privince', 175)->nullable();
|
|
$table->string('country', 175)->nullable();
|
|
$table->string('unionid');
|
|
$table->string('avatar')->nullable();
|
|
$table->timestamps();
|
|
$table->softDeletes();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('wechats');
|
|
}
|
|
}
|