yii2-arangodb/mirzaev/yii2/arangodb/views/migration.php

33 lines
662 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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;
?>