| 123456789101112131415161718192021222324252627282930313233 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Support\Facades\DB;
- return new class extends Migration {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::table('config', function (Blueprint $table) {
- $table->tinyInteger('group_id')->default(1)->comment('配置分组');
- });
- DB::table('config')->where('field', 'channel_message')->update(['group_id' => 2]);
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- //
- }
- };
|