| Conditions | 4 |
| Paths | 4 |
| Total Lines | 21 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function upgrade($oldVersion) |
||
| 26 | { |
||
| 27 | switch ($oldVersion) { |
||
| 28 | case '1.0.0': |
||
|
|
|||
| 29 | // routes of system modules are not stored in database anymore |
||
| 30 | $sql = ' |
||
| 31 | DELETE FROM zikula_routes_route |
||
| 32 | WHERE userRoute = 0 |
||
| 33 | '; |
||
| 34 | $this->entityManager->getConnection()->exec($sql); |
||
| 35 | |||
| 36 | // update table to meet entity structure |
||
| 37 | $this->schemaTool->update(['\Zikula\RoutesModule\Entity\RouteEntity']); |
||
| 38 | case '1.0.1': |
||
| 39 | // nothing |
||
| 40 | case '1.1.0': |
||
| 41 | // current version |
||
| 42 | } |
||
| 43 | |||
| 44 | return true; |
||
| 45 | } |
||
| 46 | } |
||
| 47 |