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

34 lines
833 B
PHP

<?php
use yii\db\Migration;
/**
* Handles the creation of table `phone_request`.
*/
class m170816_151727_create_phone_request_table extends Migration
{
/**
* @inheritdoc
*/
public function up()
{
$this->createTable('phone_request', [
'id' => $this->primaryKey(),
'user_id' => $this->integer()->defaultValue(null),
'tm' => $this->dateTime()->defaultExpression('NOW()'),
'ip' => $this->string(),
'data' => $this->text(),
'wallet' => $this->string(),
'contact' => $this->string(),
'status' => $this->smallInteger()->defaultValue(0)
]);
}
/**
* @inheritdoc
*/
public function down()
{
$this->dropTable('phone_request');
}
}