|
Revision 7247, 1.3 kB
(checked in by fabien, 5 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 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
require_once(dirname(__FILE__).'/sfPropelBaseTask.class.php'); |
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
class sfPropelInsertSqlTask extends sfPropelBaseTask |
|---|
| 22 |
{ |
|---|
| 23 |
|
|---|
| 24 |
* @see sfTask |
|---|
| 25 |
*/ |
|---|
| 26 |
protected function configure() |
|---|
| 27 |
{ |
|---|
| 28 |
$this->aliases = array('propel-insert-sql'); |
|---|
| 29 |
$this->namespace = 'propel'; |
|---|
| 30 |
$this->name = 'insert-sql'; |
|---|
| 31 |
$this->briefDescription = 'Inserts SQL for current model'; |
|---|
| 32 |
|
|---|
| 33 |
$this->detailedDescription = <<<EOF |
|---|
| 34 |
The [propel:insert-sql|INFO] task creates database tables: |
|---|
| 35 |
|
|---|
| 36 |
[./symfony propel:insert-sql|INFO] |
|---|
| 37 |
|
|---|
| 38 |
The task connects to the database and executes all SQL statements |
|---|
| 39 |
found in [config/sql/*schema.sql|COMMENT] files. |
|---|
| 40 |
EOF; |
|---|
| 41 |
} |
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
* @see sfTask |
|---|
| 45 |
*/ |
|---|
| 46 |
protected function execute($arguments = array(), $options = array()) |
|---|
| 47 |
{ |
|---|
| 48 |
$this->schemaToXML(self::DO_NOT_CHECK_SCHEMA, 'generated-'); |
|---|
| 49 |
$this->copyXmlSchemaFromPlugins('generated-'); |
|---|
| 50 |
$this->callPhing('insert-sql', self::CHECK_SCHEMA); |
|---|
| 51 |
$this->cleanup(); |
|---|
| 52 |
} |
|---|
| 53 |
} |
|---|
| 54 |
|
|---|