mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-04 14:34:49 +01:00
35 lines
515 B
PHP
35 lines
515 B
PHP
<?php
|
|
|
|
return <<<CODE
|
|
<?php
|
|
|
|
use yii\db\Migration;
|
|
|
|
/**
|
|
* Handles the creation of table `test`.
|
|
*/
|
|
class {$class} extends Migration
|
|
{
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public function up()
|
|
{
|
|
\$this->createTable('test', [
|
|
'title' => \$this->primaryKey(),
|
|
'body' => \$this->text()->notNull(),
|
|
'price' => \$this->money(11,2),
|
|
]);
|
|
}
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public function down()
|
|
{
|
|
\$this->dropTable('test');
|
|
}
|
|
}
|
|
|
|
CODE;
|