createTable('{{%currency}}', [ 'currency_id' => $this->primaryKey(), 'name' => $this->string(), 'symbol' => $this->string(), 'code' => $this->string(3), 'rate' => $this->float(4), 'date_update' => $this->timestamp()->defaultExpression('NOW()') ->notNull(), 'is_default' => $this->smallInteger(), 'label' => $this->string(), ]); $this->batchInsert('{{%currency}}', [ 'currency_id', 'name', 'symbol', 'code', 'rate', 'is_default', 'label', ], [ [ 1, 'Доллар США', '$', 'USD', 27.31, 0, '$', ], [ 2, 'Евро', '€', 'EUR', 30.28, 0, '€', ], [ 3, 'Украинская гривна', '₴', 'UAH', 1, 1, 'грн.', ], [ 4, 'Российский рубль', '₽', 'RUB', 0.34, 0, 'руб.', ], ]); } public function down() { $this->dropTable('{{%currency}}'); } }