Mutiple Database
hi, i want to create 2 different database which one with Materials and the other one with Programs in order to easily extract the database on usb key if i want to save them separately.
is there a way to use add migration only on the directory Programs ? i know there is a way to focus ProgramsDbContext but i didnt find anything to specify the directory.
6 Replies
or should i keep only 1 database and save them separately with another solution ?
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
saving the database on usb key
because i'm using sqlite so i use a file *.db to store my data
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
if the user need to keep a save to avoid any manipulation problem like deleting the wrong programs etc.
or simply to reuse the program on another machine
It's possible to target a DbContext with
--context
(docs: https://docs.microsoft.com/en-us/ef/core/cli/dotnet#common-options)
So for example: dotnet ef migrations add MyCoolMigration --context ProgramsDbContext
After that you can move the migration to the folder you like, if you add a new migration it'll auto detect the folder where the other migrations are and it'll put it in there.