2020_10_28_110936_create_features_table.php 912 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreateFeaturesTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('features', function (Blueprint $table) {
  15. $table->id();
  16. $table->enum("type",["商品名称","订单类型","承运商","店铺类型"])->index()->comment("特征类型");
  17. $table->enum("logic",["包含","不包含","等于","小于","小于等于","大于","大于等于"])->index()->comment("逻辑");
  18. $table->string("describe")->comment("特征");
  19. $table->timestamps();
  20. });
  21. }
  22. /**
  23. * Reverse the migrations.
  24. *
  25. * @return void
  26. */
  27. public function down()
  28. {
  29. Schema::dropIfExists('features');
  30. }
  31. }