Conditions | 4 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | public function up() |
||
32 | { |
||
33 | $this->info( 'Creating CMS tables', 'vv' ); |
||
34 | $db = $this->db( 'db-cms' ); |
||
35 | |||
36 | foreach( $this->paths( 'default/schema/cms.php' ) as $filepath ) |
||
37 | { |
||
38 | if( ( $list = include( $filepath ) ) === false ) { |
||
39 | throw new \RuntimeException( sprintf( 'Unable to get schema from file "%1$s"', $filepath ) ); |
||
40 | } |
||
41 | |||
42 | foreach( $list['table'] ?? [] as $name => $fcn ) { |
||
43 | $db->table( $name, $fcn ); |
||
44 | } |
||
48 |