Skip to content

Instantly share code, notes, and snippets.

@neme101
Created April 2, 2013 23:03
Show Gist options
  • Save neme101/5297004 to your computer and use it in GitHub Desktop.
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
<?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