2018_04_23_095021_create_actives_themes_table.php 843 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateActivesThemesTable extends Migration
  6. {
  7. protected $table = 'actives_themes';
  8. /**
  9. * Run the migrations.
  10. *
  11. * @return void
  12. */
  13. public function up()
  14. {
  15. Schema::create($this->table, function (Blueprint $table) {
  16. $table->tinyIncrements('id')->comment('唯一标识')->unsigned();
  17. $table->string('name', 25)->comment('名称')->unique();
  18. $table->timestamps();
  19. });
  20. DB::statement("ALTER TABLE ".$this->table." comment'活动主题信息表'");
  21. }
  22. /**
  23. * Reverse the migrations.
  24. *
  25. * @return void
  26. */
  27. public function down()
  28. {
  29. Schema::dropIfExists($this->table);
  30. }
  31. }