How to update local SQLite database keeping data in Entity Framework Core

Viewed 18

I've an ASP.NET Core MVC project with Entity Framework Core and a DbContext with a local SQLite database connection.

The requirement is to update the database (by adding new tables, this means new models) but keeping the data on the old database (copying the data to the new one).

I am searching for an automated method (because it is up and running on a production server), this means something like killing the server, update the executable/binaries, relaunch the server and have the new database (database.db) schema updated.

Is it possible to achieve something like this?

Thank you.

0 Answers
Related