2024_09_30_025556_create_system_config_table.php 825 B

1234567891011121314151617181920212223242526272829
  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('system_config', function (Blueprint $table) {
  12. $table->string('name')->nullable()->comment('配置名称')->primary();
  13. $table->string('model')->nullable()->comment('配置模块')->index();
  14. $table->index('model', 'system_model_foreign_key_index');
  15. $table->string('value')->nullable()->comment('配置值');
  16. $table->timestamps();
  17. });
  18. }
  19. /**
  20. * Reverse the migrations.
  21. */
  22. public function down(): void
  23. {
  24. Schema::dropIfExists('system_config');
  25. }
  26. };