D
D
des1roer2015-06-26 08:08:27
Yii
des1roer, 2015-06-26 08:08:27

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',
];

when creating the user database through migration, I get
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 question

Ask a Question

731 491 924 answers to any question