2021_12_29_050502_create_progress_table.php 878 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreateProgressTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('progress', function (Blueprint $table) {
  15. $table->id();
  16. $table->integer('book');
  17. $table->integer('para');
  18. $table->string('lang',16);
  19. $table->integer('all_strlen');
  20. $table->integer('public_strlen');
  21. $table->timestamp('created_at')->useCurrent();
  22. $table->index(['book','para']);
  23. $table->index(['book','para','lang']);
  24. });
  25. }
  26. /**
  27. * Reverse the migrations.
  28. *
  29. * @return void
  30. */
  31. public function down()
  32. {
  33. Schema::dropIfExists('progress');
  34. }
  35. }