| Total Complexity | 2 |
| Total Lines | 15 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class AddForeignKeysToCallbackQueryTable extends Migration |
||
| 10 | { |
||
| 11 | public function up(): void |
||
| 12 | { |
||
| 13 | Schema::table('callback_query', static function (Blueprint $table) { |
||
| 14 | $table->foreign('user_id', 'callback_query_ibfk_1')->references('id')->on('user')->onUpdate('RESTRICT')->onDelete('RESTRICT'); |
||
| 15 | $table->foreign('chat_id', 'callback_query_ibfk_2')->references('chat_id')->on('message')->onUpdate('RESTRICT')->onDelete('RESTRICT'); |
||
| 16 | }); |
||
| 17 | } |
||
| 18 | |||
| 19 | public function down(): void |
||
| 24 | }); |
||
| 25 | } |
||
| 27 |