| 1234567891011121314151617181920212223242526272829303132 |
- <?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('config', function (Blueprint $table) {
- $table->id();
- $table->string('field', 150)->unique();
- $table->longText('val');
- $table->string('remark')->comment('备注');
- $table->tinyInteger('group_id')->default(0)->comment('分组');
- $table->string('type')->comment('值的类型:string,text,number,radio,checkbox...');
- $table->longText('data')->comment('数据');
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- */
- public function down(): void
- {
- Schema::dropIfExists('config');
- }
- };
|