2021_02_01_172827_create_owner_material_table.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreateOwnerMaterialTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('owner_material', function (Blueprint $table) {
  15. $table->id();
  16. $table->bigInteger('owner_id')->index()->comment('货主');
  17. $table->bigInteger('material_id')->index()->comment('耗材');
  18. $table->string('material_code',30)->comment('耗材编码');
  19. $table->string('size')->comment('尺寸');
  20. $table->string('special')->nullable()->comment('特殊要求');
  21. $table->text('specification')->nullable()->comment('材质规格');
  22. $table->bigInteger('initiator')->comment('创建者');
  23. $table->timestamps();
  24. });
  25. }
  26. /**
  27. * Reverse the migrations.
  28. *
  29. * @return void
  30. */
  31. public function down()
  32. {
  33. Schema::dropIfExists('owner_materials');
  34. }
  35. }