| Conditions | 2 |
| Paths | 2 |
| Total Lines | 23 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | public function migrate() |
||
| 32 | { |
||
| 33 | $dbdomain = 'db-coupon'; |
||
| 34 | $this->msg( 'Migrating basketvalues configuration in coupon table', 0 ); |
||
| 35 | |||
| 36 | if( $this->getSchema( $dbdomain )->tableExists( 'mshop_coupon' ) === false ) |
||
| 37 | { |
||
| 38 | $this->status( 'OK' ); |
||
| 39 | return; |
||
| 40 | } |
||
| 41 | |||
| 42 | $update = ' |
||
| 43 | UPDATE "mshop_coupon" |
||
| 44 | SET "provider" = REPLACE("provider", \'BasketValues\', \'Basket\'), |
||
| 45 | "config" = REPLACE("config", \'basketvalues\', \'basket\') |
||
| 46 | WHERE "provider" LIKE \'%BasketValues%\' OR "config" LIKE \'%basketvalues%\' |
||
| 47 | '; |
||
| 48 | |||
| 49 | $conn = $this->acquire( $dbdomain ); |
||
| 50 | $conn->create( $update )->execute(); |
||
| 51 | $this->release( $conn, $dbdomain ); |
||
| 52 | |||
| 53 | $this->status( 'done' ); |
||
| 54 | } |
||
| 56 |