2025_12_16_175341_create_config.php 908 B

1234567891011121314151617181920212223242526272829303132
  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. public function up(): void
  10. {
  11. Schema::create('config', function (Blueprint $table) {
  12. $table->id();
  13. $table->string('field', 150)->unique();
  14. $table->longText('val');
  15. $table->string('remark')->comment('备注');
  16. $table->tinyInteger('group_id')->default(0)->comment('分组');
  17. $table->string('type')->comment('值的类型:string,text,number,radio,checkbox...');
  18. $table->longText('data')->comment('数据');
  19. $table->timestamps();
  20. });
  21. }
  22. /**
  23. * Reverse the migrations.
  24. */
  25. public function down(): void
  26. {
  27. Schema::dropIfExists('config');
  28. }
  29. };