| 123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateExchangesTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('exchanges', function (Blueprint $table) {
- $table->increments('id');
- $table->integer('user_id')->unsigned()->index();
- $table->unsignedInteger('goods_id')->index();
- $table->unsignedInteger('coins')->default(0);
- $table->string('real_name',64);
- $table->string('phone',24);
- $table->string('email',128);
- $table->string('comment',512)->nullable();
- $table->unsignedTinyInteger('status')->default(0);
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::drop('exchanges');
- }
- }
|