private function requiredFields(array $columns) {
        $required = [];

        foreach ($columns as $name => $column) {
            if (empty($column['autoIncrement']) && !isset($column['default']) && empty($column['allowNull'])) {
                $required[] = $name;
            }
        }

        return $required;
    }
private function requiredFields(array $columns) {
        $required = [];

        foreach ($columns as $name => $column) {
            if (empty($column['autoIncrement']) && !isset($column['default']) && empty($column['allowNull'])) {
                $required[] = $name;
            }
        }

        return $required;
    }
private function requiredFields ( array $ columns ) { $ required = [ ] ; foreach ( $ columns as $ name => $ column ) { if ( empty ( $ column [ 'autoIncrement' ] ) && ! isset ( $ column [ 'default' ] ) && empty ( $ column [ 'allowNull' ] ) ) { $ required [ ] = $ name ; } } return $ required ; }
Figure out the schema required fields from a list of columns.

A column is required if it meets all of the following criteria.

- The column does not have an auto increment.
- The column does not have a default value.
- The column does not allow null.

@param array $columns An array of column schemas.
Figure out the schema required fields from a list of columns .