Answer the question
In order to leave comments, you need to log in
Yii 2 postgres migrations?
still in the first there were dances with a tambourine with postgres. I thought they would fix it in the second ... naive ....
connection
'yii\db\Connection',
//'dsn' => 'mysql:host=localhost;dbname=localdb',
'dsn' => 'pgsql:host=***.ru;port=5432;dbname=DB_**',
'username' => 'postgres',
'password' => '****',
'schemaMap' => [
'pgsql' => [
'class' => 'yii\db\pgsql\Schema',
'defaultSchema' => 'yii2' //specify your schema here
]
],
'charset' => 'utf8',
];
Creating migration history table "migration"...Exception 'yii\db\Exception' with message 'SQLSTATE[3F000]: Invalid schema name: 7 ERROR: no schema has been
selected to create in
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