Conditions | 4 |
Paths | 6 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
27 | public function up(): void |
||
28 | { |
||
29 | foreach ($this->tables as $table) { |
||
30 | try { |
||
31 | if (Schema::hasTable($this->prefix . $table)) { |
||
32 | Log::warning("Prefixed table '{$this->prefix}{$table}' already exists. Verify your migration status."); |
||
33 | continue; // Migration may be partly done already... |
||
34 | } |
||
35 | |||
36 | Schema::rename($table, $this->prefix . $table); |
||
37 | } catch (Throwable $e) { |
||
38 | Log::error($e->getMessage()); |
||
39 | } |
||
59 |