| Conditions | 6 |
| Paths | 4 |
| Total Lines | 21 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 44 | public function migrate() |
||
| 45 | { |
||
| 46 | $this->msg( 'Remove left over Laravel user references', 0, '' ); |
||
| 47 | |||
| 48 | $schema = $this->getSchema( 'db-customer' ); |
||
| 49 | |||
| 50 | foreach( $this->sql as $table => $map ) |
||
| 51 | { |
||
| 52 | foreach( $map as $constraint => $sql ) |
||
| 53 | { |
||
| 54 | $this->msg( sprintf( 'Remove records from %1$s', $table ), 1 ); |
||
| 55 | |||
| 56 | if( $schema->tableExists( 'fe_users' ) && $schema->tableExists( $table ) |
||
| 57 | && $schema->constraintExists( $table, $constraint ) === false |
||
| 58 | ) { |
||
| 59 | $this->execute( $sql, 'db-customer' ); |
||
| 60 | $this->status( 'done' ); |
||
| 61 | } |
||
| 62 | else |
||
| 63 | { |
||
| 64 | $this->status( 'OK' ); |
||
| 65 | } |
||
| 70 |