Npgsql: EntityFramework6.Npgsql always tries to access database template1

Created on 23 Aug 2016  路  4Comments  路  Source: npgsql/npgsql

I'm trying to use EF6 and npgsql against a database I'm not an admin for.
I've got no access to the template1 database, only my application database.
I've tried dumping a db I have locally and restoring it there [to copy the migrations data], but to no avail.

I won't be given permissions to the template1 db, is there any other way to make this work?

Most helpful comment

In the end I solved by adding the undocumented EF Admin Database parameter and setting it to the database I have access too. So I guess the bug is in the documentation.

Sorry for misposting by the way.

All 4 comments

Try specifying the EF Template Database parameter, which defaults to template, it's listed in http://www.npgsql.org/doc/connection-string-parameters.html.

Am closing this but if you still have issues don't hesitate to ask.

Also, note that EF6-related issues belong in https://github.com/npgsql/EntityFramework6.Npgsql,

In the end I solved by adding the undocumented EF Admin Database parameter and setting it to the database I have access too. So I guess the bug is in the documentation.

Sorry for misposting by the way.

Have added a note about this in http://www.npgsql.org/doc/ef6.html

Was this page helpful?
0 / 5 - 0 ratings