2023_04_27_064441_create_setting_table.php 762 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. return new class extends Migration {
  6. /**
  7. * Run the migrations.
  8. *
  9. * @return void
  10. */
  11. public function up()
  12. {
  13. Schema::create('setting', function (Blueprint $table) {
  14. $table->id();
  15. $table->string("type", 20)->default("");
  16. $table->string("key")->default("");
  17. $table->string("value")->default("");
  18. $table->timestamps();
  19. $table->index(["type"]);
  20. });
  21. }
  22. /**
  23. * Reverse the migrations.
  24. *
  25. * @return void
  26. */
  27. public function down()
  28. {
  29. Schema::dropIfExists('setting');
  30. }
  31. };