Beispiel #1
0
function run_propel_build_schema($task, $args)
{
    _call_phing($task, 'creole', false);
    // fix database name
    if (file_exists('config/schema.xml')) {
        $schema = file_get_contents('config/schema.xml');
        $schema = preg_replace('/<database\\s+name="[^"]+"/s', '<database name="propel"', $schema);
        file_put_contents('config/schema.xml', $schema);
    }
    if (!isset($args[0]) || $args[0] != 'xml') {
        _propel_convert_xml_schema(false, '');
        $finder = pakeFinder::type('file')->name('schema.xml');
        pake_remove($finder, 'config');
    }
}
Beispiel #2
0
function run_propel_convert_xml_schema($task, $args)
{
    _propel_convert_xml_schema(true);
}