2020_04_03_150514_change_process_contents_table.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class ChangeProcessContentsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::dropIfExists('processes_additional_bills');
  15. Schema::create('processes_contents', function (Blueprint $table) {
  16. $table->bigIncrements('id');
  17. $table->bigInteger('process_id')->index()->comment('外键二次加工单');
  18. $table->enum('bill_type',['移库单','入库单','出库单'])->comment('单据类型');
  19. $table->bigInteger('commodity_id')->comment('外键商品');
  20. $table->string('wms_code')->index()->comment('单据号');
  21. $table->integer('amount')->comment('数量');
  22. $table->timestamps();
  23. });
  24. }
  25. /**
  26. * Reverse the migrations.
  27. *
  28. * @return void
  29. */
  30. public function down()
  31. {
  32. Schema::dropIfExists('processes_contents');
  33. Schema::create('processes_additional_bills', function (Blueprint $table) {
  34. $table->bigIncrements('id');
  35. $table->bigInteger('process_id')->index()->comment('外键二次加工单');
  36. $table->string('wms_code')->index()->comment('单据号');
  37. $table->enum('bill_type',['入库单'])->default('入库单')->comment('单据类型');
  38. $table->integer('amount')->comment('数量');
  39. $table->timestamps();
  40. });
  41. }
  42. }