2021_11_03_111759_create_used_imgs_table.php 690 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. use Illuminate\Database\Schema\Blueprint;
  3. use Illuminate\Database\Migrations\Migration;
  4. /**
  5. * Class CreateUsedImgsTable.
  6. */
  7. class CreateUsedImgsTable extends Migration
  8. {
  9. /**
  10. * Run the migrations.
  11. *
  12. * @return void
  13. */
  14. public function up()
  15. {
  16. Schema::create('used_imgs', function(Blueprint $table) {
  17. $table->increments('id');
  18. $table->integer('used_id')->default(0)->index('used_id')->comment('闲置商品ID');
  19. $table->string('used_imgs')->comment('闲置商品照片');
  20. $table->timestamps();
  21. });
  22. }
  23. /**
  24. * Reverse the migrations.
  25. *
  26. * @return void
  27. */
  28. public function down()
  29. {
  30. Schema::drop('used_imgs');
  31. }
  32. }