Development

/branches/1.1/lib/plugins/sfPropelPlugin/lib/task/sfPropelBuildSqlTask.class.php

You must first sign up to be able to contribute.

root/branches/1.1/lib/plugins/sfPropelPlugin/lib/task/sfPropelBuildSqlTask.class.php

Revision 7247, 1.4 kB (checked in by fabien, 7 years ago)

moved all autoload classes to lib/autoload

  • Property svn:mime-type set to text/x-php
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
Line 
1 <?php
2
3 /*
4  * This file is part of the symfony package.
5  * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 require_once(dirname(__FILE__).'/sfPropelBaseTask.class.php');
12
13 /**
14  * Create SQL for the current model.
15  *
16  * @package    symfony
17  * @subpackage command
18  * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
19  * @version    SVN: $Id$
20  */
21 class sfPropelBuildSqlTask extends sfPropelBaseTask
22 {
23   /**
24    * @see sfTask
25    */
26   protected function configure()
27   {
28     $this->aliases = array('propel-build-sql');
29     $this->namespace = 'propel';
30     $this->name = 'build-sql';
31     $this->briefDescription = 'Creates SQL for the current model';
32
33     $this->detailedDescription = <<<EOF
34 The [propel:build-sql|INFO] task creates SQL statements for table creation:
35
36   [./symfony propel:build-sql|INFO]
37
38 The generated SQL is optimized for the database configured in [config/propel.ini|COMMENT]:
39
40   [propel.database = mysql|INFO]
41 EOF;
42   }
43
44   /**
45    * @see sfTask
46    */
47   protected function execute($arguments = array(), $options = array())
48   {
49     $this->schemaToXML(self::DO_NOT_CHECK_SCHEMA, 'generated-');
50     $this->copyXmlSchemaFromPlugins('generated-');
51     $this->callPhing('sql', self::CHECK_SCHEMA);
52     $this->cleanup();
53   }
54 }
55
Note: See TracBrowser for help on using the browser.