| Conditions | 3 |
| Paths | 3 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 4.679 |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 22 | 7 | protected function fixDatabaseVersion() |
|
| 23 | { |
||
| 24 | 7 | $databaseVersion = get_option(glsr()->prefix.'db_version'); |
|
| 25 | 7 | if ('5.2' === $databaseVersion) { |
|
| 26 | $version = '1.0'; // @compat |
||
| 27 | if (glsr(SqlSchema::class)->columnExists('ratings', 'terms')) { |
||
| 28 | $version = Application::DB_VERSION; |
||
| 29 | } |
||
| 30 | update_option(glsr()->prefix.'db_version', $version); |
||
| 31 | } |
||
| 55 |