Conditions | 6 |
Paths | 5 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
44 | public function up() |
||
45 | { |
||
46 | $db = $this->db( 'db-customer' ); |
||
47 | |||
48 | if( !$db->hasTable( 'fos_user' ) ) { |
||
49 | return; |
||
50 | } |
||
51 | |||
52 | $this->info( 'Remove left over FosUser references', 'vv' ); |
||
53 | |||
54 | foreach( $this->sql as $table => $map ) |
||
55 | { |
||
56 | foreach( $map as $constraint => $sql ) |
||
57 | { |
||
58 | if( $db->hasTable( $table ) && !$db->hasForeign( $table, $constraint ) ) |
||
59 | { |
||
60 | $this->info( sprintf( 'Remove records from %1$s', $table ), 'vv', 1 ); |
||
61 | $db->exec( $sql ); |
||
62 | } |
||
67 |