2021_10_28_160848_create_goods_shares_table.php 793 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. use Illuminate\Database\Schema\Blueprint;
  3. use Illuminate\Database\Migrations\Migration;
  4. /**
  5. * Class CreateGoodsSharesTable.
  6. */
  7. class CreateGoodsSharesTable extends Migration
  8. {
  9. /**
  10. * Run the migrations.
  11. *
  12. * @return void
  13. */
  14. public function up()
  15. {
  16. Schema::create('goods_shares', function(Blueprint $table) {
  17. $table->increments('id');
  18. $table->integer('goods_id')->default(0)->index('goods_id')->comment('商品ID');
  19. $table->integer('m_id')->default(0)->index('m_id')->comment('会员ID');
  20. $table->string('share_img')->default('')->comment('分享二维码');
  21. $table->timestamps();
  22. });
  23. }
  24. /**
  25. * Reverse the migrations.
  26. *
  27. * @return void
  28. */
  29. public function down()
  30. {
  31. Schema::drop('goods_shares');
  32. }
  33. }