ExpinBot/.svn/pristine/a3/a3f8e30e9ef8b3fdfa6e839f0eb...

39 lines
1.4 KiB
Plaintext
Executable File

<?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('tg_bot', function (Blueprint $table) {
$table->increments('id'); // 主键 + AUTO_INCREMENT
$table->string('bot_id')->nullable()->comment('bot_id');
$table->string('bot_token')->nullable()->comment('bot_oken');
$table->string('bot_username')->nullable()->comment('bot名称');
$table->string('subjection_username')->nullable()->comment('隶属飞机用户');
$table->string('subjection_mobile')->nullable()->comment('隶属飞机用户手机号');
$table->text('webhook')->nullable()->comment('webhook_url');
$table->text('memo')->nullable()->comment('备注说明');
$table->timestamp('created_at')->useCurrent()->nullable();
$table->timestamp('updated_at')->nullable()->useCurrentOnUpdate();
$table->charset = 'utf8mb4';
$table->collation = 'utf8mb4_0900_ai_ci';
$table->comment('机器人资料');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('tg_bot');
}
};