Entity Framework - Migrations Production (Postgres)
I'm using this approach: Create database model -> Create OnModelCreating -> dotnet ef migrations add AND dotnet ef database update But it aint suitable for production. I need to do something on startup.
VINI JR10/24/2022
If someone could suggest me something
Message Not Public
Sign In and Join Server To See
10/25/2022
Cisien10/25/2022
EnsureCreated wont update an existing database, instead you will need to call Migrate, which creates if it doesnt exist.
Cisien10/25/2022
Instead of creating your own console app, ef has the ability to generate a migration bundle for you, which you can execute manually or as part of your ci/cd. Ef can also generate sql scripts that you can run
Message Not Public
Sign In and Join Server To See
10/25/2022
Cisien10/25/2022
Its new as of 6, iirc
VINI JR10/25/2022
VINI JR10/25/2022
doing like this its impossible versioning it. Do you have an idea of how do it