C
C#2y ago
Remi

EFCore Database Update and Migrations Add will not work

Hey, I've got some CLI project where I have 3 Tables in One DB and they are all used in one only Con text whose name is "PricingContext", it has 3 DbSets containing respectively Fournisseurs, Catalogue and PrixBase. Yesterday I only had PrixBase and it was working okay, then today I added the two others because yesterday was mostly testing some stuff. I tried creating a migration, no problem, migration file creates itself, but when I start the database update it will not do a thing. It says database is already up to date but it isnt. I tried resetting the database, changing the db name in connection string to something else, looked it up as much as I could but it's been almost 4 hours now and I still have no clue why it does that. Also I have to mention that doing the migrations list command shows nothing. Even if I created successfuly the migration right before. Thanks for any help provided. ❤️
1 Reply
Remi
Remi2y ago
Found out for some reason my Migrations folder was excluded in the project config file. What an idiot.