2020_03_25_164242_create_process_dailies_table.php 924 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateProcessDailiesTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * 加工单每日记录
  11. *
  12. * @return void
  13. */
  14. public function up()
  15. {
  16. Schema::create('process_dailies', function (Blueprint $table) {
  17. $table->bigIncrements('id');
  18. $table->bigInteger('process_id')->comment('外键二次加工单');
  19. $table->date('date')->index()->comment('日期');
  20. $table->integer('output')->comment('当日产量');
  21. $table->integer('remain')->comment('当日剩余');
  22. $table->timestamps();
  23. });
  24. }
  25. /**
  26. * Reverse the migrations.
  27. *
  28. * @return void
  29. */
  30. public function down()
  31. {
  32. Schema::dropIfExists('process_dailies');
  33. }
  34. }