1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateUserAddressTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('user_address', function (Blueprint $table) {
- $table->increments('id');
- $table->integer('user_id')->comment('所有人');
- $table->string('name', 60)->default('')->comment('联系人');
- $table->char('phone', 11)->comment('联系电话');
- $table->integer('area')->default(0)->comment('省市区编号');
- $table->string('address')->default('')->comment('省市区地址');
- $table->string('detail_address')->default('')->comment('详细地址');
- $table->tinyInteger('status')->default(1)->comment('默认状态');
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('user_address');
- }
- }
|