Skip to content

Add support for PASSWORD clause in EFCore.Jet specific CREATE DATABASE statement - #91

Merged
lauxjpn merged 2 commits into
CirrusRedOrg:masterfrom
lauxjpn:feature/create_database_options
Dec 10, 2020
Merged

lauxjpn merged 2 commits into
CirrusRedOrg:masterfrom
lauxjpn:feature/create_database_options

Conversation

@lauxjpn

@lauxjpn lauxjpn commented Dec 10, 2020

Copy link
Copy Markdown
Member

If I change the provider to Microsoft.ACE.OLEDB.12.0 this works but the migration does not create an database password.

Your sample code uses the Database.EnsureCreated() method, which generates a EFCore.Jet specific CREATE DATABASE statement. This statement currently does not support specifying a password [...]

This adds database password support to the CREATE DATABASE statement.

When EF Core migrations run and a database password is specified in a connection string, the provided password will be translated into the CREATE DATABASE statement.
(We might want to think about, whether we only want to enable that, if the Persist Security Info=False connection string option has been specified.)

@lauxjpn lauxjpn added this to the 3.1.0-alpha.4 milestone Dec 10, 2020
@lauxjpn lauxjpn self-assigned this Dec 10, 2020
@lauxjpn
lauxjpn merged commit b749447 into CirrusRedOrg:master Dec 10, 2020
@lauxjpn
lauxjpn deleted the feature/create_database_options branch December 10, 2020 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant