1
0
Fork 0
mirror of https://github.com/janickiy/yii2-nomer synced 2025-02-12 10:01:52 +00:00
yii2-nomer/migrations/m170616_124111_create_plati_codes_table.php
2020-02-05 06:34:26 +03:00

32 lines
727 B
PHP

<?php
use yii\db\Migration;
/**
* Handles the creation of table `plati_codes`.
*/
class m170616_124111_create_plati_codes_table extends Migration
{
/**
* @inheritdoc
*/
public function up()
{
$this->createTable('plati_codes', [
'id' => $this->primaryKey(),
'code' => $this->string(),
'checks' => $this->smallInteger(),
'user_id' => $this->integer()->defaultValue(null),
'tm_create' => $this->timestamp()->defaultExpression('NOW()'),
'tm_used' => $this->timestamp(),
]);
}
/**
* @inheritdoc
*/
public function down()
{
$this->dropTable('plati_codes');
}
}