12345678910111213141516171819202122232425262728293031323334 |
- <?php
- use yii\db\Schema;
- use yii\db\Migration;
- class m231017_071711_reaction_button extends Migration
- {
- public function init()
- {
- $this->db = 'db';
- parent::init();
- }
- public function safeUp()
- {
- $tableOptions = 'ENGINE=InnoDB';
- $this->createTable(
- '{{%reaction_button}}',
- [
- 'id'=> $this->primaryKey()->unsigned(),
- 'counter'=> $this->text()->notNull()->comment('Счётчики json'),
- 'type'=> $this->string(32)->notNull()->comment('Метка для разных разделов'),
- ],$tableOptions
- );
- }
- public function safeDown()
- {
- $this->dropTable('{{%reaction_button}}');
- }
- }
|