| 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 locale schema', 'v' ); |
||
| 17 | $db = $this->db( 'db-locale' ); |
||
| 18 | |||
| 19 | foreach( $this->paths( 'default/schema/locale.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 | } |
||
| 30 | } |