2019_11_26_092044_create_meta_table.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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->string('variety')->default('')->comment('鸡种');
  18. $table->string('variety_img')->default('')->comment('鸡种图片');
  19. $table->string('age')->default('')->comment('鸡龄');
  20. $table->string('food')->default('')->comment('口粮');
  21. $table->string('food_img')->default('')->comment('口粮图片');
  22. $table->string('water')->default('')->comment('水源');
  23. $table->string('water_img')->default('')->comment('水源图片');
  24. $table->string('logistical')->default('')->comment('物流追踪');
  25. $table->text('farm')->comment('农场');
  26. $table->text('report')->comment('检测报告');
  27. $table->string('zip')->default('')->comment('zip包地址');
  28. $table->string('trans_id')->default('')->comment('交易ID');
  29. $table->string('block_height')->default(0)->comment('区块高度');
  30. $table->string('block_time')->default('')->comment('上链时间');
  31. $table->string('md5')->default('')->comment('meta信息md5码');
  32. $table->tinyInteger('status')->default(0)->comment('上链状态 0准备上链 1上链成功 2上链失败');
  33. $table->timestamps();
  34. });
  35. }
  36. /**
  37. * Reverse the migrations.
  38. *
  39. * @return void
  40. */
  41. public function down()
  42. {
  43. Schema::dropIfExists('meta');
  44. }
  45. }