| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | public function up(): void |
||
| 13 | { |
||
| 14 | Schema::disableForeignKeyConstraints(); |
||
| 15 | |||
| 16 | try { |
||
| 17 | Schema::table($this->prefix . 'telegram_update', static function (Blueprint $table) { |
||
| 18 | $table->dropIndex('message_id'); |
||
| 19 | $table->index('message_id', 'message_id'); |
||
| 20 | $table->index(['chat_id', 'message_id'], 'chat_message_id'); |
||
| 21 | }); |
||
| 22 | } catch (Throwable $e) { |
||
| 23 | Log::error($e->getMessage()); |
||
| 24 | return; // Migration may be partly done already... |
||
| 25 | } |
||
| 26 | |||
| 27 | Schema::enableForeignKeyConstraints(); |
||
| 28 | } |
||
| 48 |