2019_07_08_123750_create_love_gifts_table.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateLoveGiftsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('love_gifts', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->softDeletes();
  17. $table->string('name',100)->comment('标题');
  18. $table->string('file',100)->nullable()->comment('图片');
  19. $table->string('svga',100)->nullable()->comment('动画');
  20. $table->tinyInteger('type')->default(0)->comment('0普通礼物1VIP礼物');
  21. $table->tinyInteger('size')->default(1)->comment('动画显示次数');
  22. $table->tinyInteger('sort')->default(1)->comment('排序');
  23. $table->unsignedInteger('rose')->default(0)->comment('多少玫瑰');
  24. $table->timestamps();
  25. $table->comment = '礼物表';
  26. });
  27. }
  28. /**
  29. * Reverse the migrations.
  30. *
  31. * @return void
  32. */
  33. public function down()
  34. {
  35. Schema::dropIfExists('love_gifts');
  36. }
  37. }