Conditions | 4 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | public function up() |
||
15 | { |
||
16 | $this->info( 'Creating group schema', 'vv' ); |
||
17 | $db = $this->db( 'db-group' ); |
||
18 | |||
19 | foreach( $this->paths( 'default/schema/group.php' ) as $filepath ) |
||
20 | { |
||
21 | if( ( $list = include( $filepath ) ) === false ) { |
||
22 | throw new \RuntimeException( sprintf( 'Unable to get schema from file "%1$s"', $filepath ) ); |
||
23 | } |
||
24 | |||
25 | foreach( $list['table'] ?? [] as $name => $fcn ) { |
||
26 | $db->table( $name, $fcn ); |
||
27 | } |
||
31 |