Conditions | 2 |
Paths | 3 |
Total Lines | 18 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | public function down(): void |
||
26 | { |
||
27 | try { |
||
28 | Schema::create('botan_shortener', function (Blueprint $table) { |
||
29 | $table->bigInteger('id', true)->unsigned()->comment('Unique identifier for this entry'); |
||
30 | $table->bigInteger('user_id')->nullable()->index('user_id')->comment('Unique user identifier'); |
||
31 | $table->text('url')->comment('Original URL'); |
||
32 | $table->char('short_url')->default('')->comment('Shortened URL'); |
||
33 | $table->timestamp('created_at')->nullable()->comment('Entry date creation'); |
||
34 | $table->foreign('user_id', 'botan_shortener_ibfk_1')->references('id')->on($this->prefix . 'user')->onUpdate('RESTRICT')->onDelete('RESTRICT'); |
||
35 | }); |
||
36 | |||
37 | Schema::table($this->prefix . 'message', static function (Blueprint $table) { |
||
38 | $table->dropColumn('reply_markup'); |
||
39 | }); |
||
40 | } catch (Throwable $e) { |
||
41 | Log::error($e->getMessage()); |
||
42 | return; // Migration may be partly done already... |
||
43 | } |
||
46 |