| 123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateDoingsTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('doings', function (Blueprint $table) {
- $table->increments('id')->unsigned();
- $table->integer('user_id')->unsigned();
- $table->char('action',16);
- $table->morphs('source');
- $table->string('subject',128)->nullable();
- $table->string('content',256)->nullable();
- $table->integer('refer_id')->unsigned();
- $table->integer('refer_user_id')->unsigned();
- $table->string('refer_content',256)->nullable();
- $table->timestamp('created_at');
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::drop('doings');
- }
- }
|