Нужно сделать миграцию таблицы с postgres в mysql yii2
Я написал миграцию которая создает таблицу в mysql аналогичную postgres
use yii\db\Migration;
/**
* Class m210318_094143_teaser_block_show
*/
class m210318_094143_teaser_block_show extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->createTable('teaser_price_buffer', [
'id' => $this->bigPrimaryKey()->unsigned(),
'type' => $this->tinyInteger()->notNull(),
'type_id' => $this->bigInteger()->notNull(),
'amount' => $this->float()->notNull(),
'created_at' => $this->timestamp()->notNull()->defaultExpression('now()'),
]);
$this->createIndex('price_type', 'teaser_price_buffer', ['type', 'type_id']);
$this->createIndex('price_type_amount', 'teaser_price_buffer', ['type', 'type_id', 'amount']);
}
/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->dropTable('teaser_price_buffer');
}
}
но мне нужно еще вытащить данные из postgress и удалить таблицу, я новичок в Yii2 и не совсем понимаю как это сделать. подскажите куда двигаться.