首次提交 Laravel 專案
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<?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');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user