Created
April 2, 2013 23:03
-
-
Save neme101/5297004 to your computer and use it in GitHub Desktop.
How I think the doctrine executable may work on windows running it directly with php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('BASEPATH','.'); // mockup that this app was executed from ci ;) | |
chdir(dirname(__FILE__)); | |
include('doctrine.php'); | |
define('ENVIRONMENT', 'development'); | |
require_once('config/database.php'); | |
// Configure Doctrine Cli | |
// Normally these are arguments to the cli tasks but if they are set here the arguments will be auto-filled | |
$config = array('data_fixtures_path' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '/fixtures', | |
'models_path' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '/models', | |
'migrations_path' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '/migrations', | |
'sql_path' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '/sql', | |
'yaml_schema_path' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '/schema'); | |
$cli = new Doctrine_Cli($config); | |
$cli->run($_SERVER['argv']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment