2019_11_26_092044_create_meta_table.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreateMetaTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('meta', function (Blueprint $table) {
  15. $table->bigIncrements('id');
  16. $table->string('patch_num')->default('')->comment('批次号');
  17. $table->dateTime('produce_date')->nullable()->comment('产蛋时间');
  18. $table->string('variety')->default('')->comment('鸡种');
  19. $table->string('variety_img')->default('')->comment('鸡种图片');
  20. $table->string('age')->default('')->comment('鸡龄');
  21. $table->string('food')->default('')->comment('口粮');
  22. $table->string('food_img')->default('')->comment('口粮图片');
  23. $table->string('water')->default('')->comment('水源');
  24. $table->string('water_img')->default('')->comment('水源图片');
  25. $table->string('logistical')->default('')->comment('物流追踪');
  26. $table->text('farm')->comment('农场');
  27. $table->text('report')->comment('检测报告');
  28. $table->string('zip')->default('')->comment('zip包地址');
  29. $table->string('trans_id')->default('')->comment('交易ID');
  30. $table->string('block_height')->default(0)->comment('区块高度');
  31. $table->string('block_time')->default('')->comment('上链时间');
  32. $table->string('md5')->default('')->comment('meta信息md5码');
  33. $table->tinyInteger('status')->default(0)->comment('上链状态 0准备上链 1上链成功 2上链失败');
  34. $table->timestamps();
  35. $table->softDeletes();
  36. });
  37. }
  38. /**
  39. * Reverse the migrations.
  40. *
  41. * @return void
  42. */
  43. public function down()
  44. {
  45. Schema::dropIfExists('meta');
  46. }
  47. }