Answer the question
In order to leave comments, you need to log in
How to migrate from a file in Yii2, taking into account the use of vagrant?
I'm using Yii2 basic template out of the box. I run vagrant, run the migrations, everything works and does not give any errors. Regular migrations work fine. But file migrations don't make any changes to the database. I implement it like this:
public $maxSqlOutputLength = 300;
public function safeUp()
{
$this->execute(
file_get_contents(
__DIR__ . '/../backup.sql')
);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question