| 1234567891011121314151617181920212223242526272829303132 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- return new class extends Migration {
- public function up(): void
- {
- Schema::create('telegram_channel_messages', function (Blueprint $table) {
- $table->id();
- $table->unsignedBigInteger('channel_id');
- $table->string('channel_name', 255);
- $table->string('target', 64);
- $table->json('message');
- $table->boolean('is_top')->default(false);
- $table->string('status', 20);
- $table->dateTime('scheduled_at');
- $table->dateTime('attempted_at')->nullable();
- $table->unsignedBigInteger('telegram_message_id')->nullable();
- $table->boolean('pinned')->nullable();
- $table->text('error')->nullable();
- $table->timestamps();
- $table->index(['status', 'scheduled_at', 'id']);
- });
- }
- public function down(): void
- {
- Schema::dropIfExists('telegram_channel_messages');
- }
- };
|