2015_12_04_120431_create_doings_table.php 1015 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateDoingsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('doings', function (Blueprint $table) {
  15. $table->increments('id')->unsigned();
  16. $table->integer('user_id')->unsigned();
  17. $table->char('action',16);
  18. $table->morphs('source');
  19. $table->string('subject',128)->nullable();
  20. $table->string('content',256)->nullable();
  21. $table->integer('refer_id')->unsigned();
  22. $table->integer('refer_user_id')->unsigned();
  23. $table->string('refer_content',256)->nullable();
  24. $table->timestamp('created_at');
  25. });
  26. }
  27. /**
  28. * Reverse the migrations.
  29. *
  30. * @return void
  31. */
  32. public function down()
  33. {
  34. Schema::drop('doings');
  35. }
  36. }