33 lines
662 B
PHP
33 lines
662 B
PHP
<?php
|
||
/**
|
||
* This view is used by console/controllers/MigrateController.php
|
||
* The following variables are available in this view:
|
||
*/
|
||
|
||
/* @var $className string the new migration class name */
|
||
|
||
echo <<<HTML
|
||
<?php
|
||
|
||
use mirzaev\yii2\arangodb\Migration;
|
||
|
||
class $className extends Migration
|
||
{
|
||
public function up()
|
||
{
|
||
/**
|
||
* @param string Название коллекции
|
||
* @param array Тип коллекции (2 - документ, 3 - ребро)
|
||
*/
|
||
\$this->createCollection('$className', ['type' => 2]);
|
||
}
|
||
|
||
public function down()
|
||
{
|
||
\$this->dropCollection('$className');
|
||
}
|
||
}
|
||
HTML;
|
||
|
||
?>
|