Total Complexity | 2 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class CreateEditedMessageTable extends Migration |
||
10 | { |
||
11 | public function up(): void |
||
12 | { |
||
13 | Schema::create('edited_message', static function (Blueprint $table) { |
||
14 | $table->bigInteger('id', true)->unsigned()->comment('Unique identifier for this entry'); |
||
15 | $table->bigInteger('chat_id')->nullable()->index('chat_id')->comment('Unique chat identifier'); |
||
16 | $table->bigInteger('message_id')->unsigned()->nullable()->index('message_id')->comment('Unique message identifier'); |
||
17 | $table->bigInteger('user_id')->nullable()->index('user_id')->comment('Unique user identifier'); |
||
18 | $table->dateTime('edit_date')->nullable()->comment('Date the message was edited in timestamp format'); |
||
19 | $table->text('text')->nullable()->comment('For text messages, the actual UTF-8 text of the message max message length 4096 char utf8'); |
||
20 | $table->text('entities')->nullable()->comment('For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text'); |
||
21 | $table->text('caption')->nullable()->comment('For message with caption, the actual UTF-8 text of the caption'); |
||
22 | $table->index(['chat_id', 'message_id'], 'chat_id_2'); |
||
23 | }); |
||
24 | } |
||
25 | |||
26 | public function down(): void |
||
29 | } |
||
30 | } |
||
31 |