1234567891011121314151617181920212223242526272829 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- return new class extends Migration {
- /**
- * Run the migrations.
- */
- public function up(): void
- {
- Schema::create('system_config', function (Blueprint $table) {
- $table->string('name')->comment('配置名称')->primary();
- $table->string('model')->nullable()->comment('配置模块')->index();
- $table->index('model', 'system_model_foreign_key_index');
- $table->string('value')->nullable()->comment('配置值');
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- */
- public function down(): void
- {
- Schema::dropIfExists('system_config');
- }
- };
|