2019_02_18_165023_create_dispatch_classify.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateDispatchClassify extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. if (!Schema::hasTable('yz_dispatch_classify')) {
  15. Schema::create('yz_dispatch_classify', function (Blueprint $table) {
  16. $table->increments('id');
  17. $table->integer('uniacid');
  18. $table->string('dispatch_id')->nullable()->comment('');
  19. $table->tinyInteger('freight_type')->comment('运费类型');
  20. $table->integer('freight_value')->nullable()->comment('固定运费值');
  21. $table->integer('template_id')->nullable()->comment('运费模板ID');
  22. $table->integer('is_cod')->comment("是否支持貨到付款");
  23. $table->integer('created_at')->nullable();
  24. $table->integer('updated_at')->nullable();
  25. });
  26. \Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix() . "yz_dispatch_classify comment '配送分类表'");//表注释
  27. }
  28. }
  29. /**
  30. * Reverse the migrations.
  31. *
  32. * @return void
  33. */
  34. public function down()
  35. {
  36. Schema::dropIfExists('dispatch_classify');
  37. }
  38. }