Commit c3ad4cd5 by san58

добавил миграцию по TIX

1 parent f3773981
<?php
use yii\db\Migration;
/**
* Class m210607_123711_add_host_tix_date_status
*/
class m210607_123711_add_host_tix_date_status extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->addColumn('{{%host}}', 'tix_status', $this->tinyInteger(1)->notNull()->defaultValue(0)->comment('Статус проверки стоимости'));
$this->addColumn('{{%host}}', 'tix_date', $this->dateTime()->null()->comment('Дата проверки стоимости домена'));
$this->createIndex('idx-tix_status', '{{%host}}', 'tix_status');
$this->createIndex('idx-status', '{{%host}}', 'status');
}
/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->dropIndex('idx-status', '{{%host}}');
$this->dropIndex('idx-tix_status', '{{%host}}');
$this->dropColumn('{{%host}}', 'tix_date');
$this->dropColumn('{{%host}}', 'tix_status');
}
}
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!