love_php/database/migrations/2017_10_20_151356_create_wechat.php
2026-04-02 09:20:51 +08:00

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');
}
}