Umbraco Upgrade from 12.0.1 to 12.2
# help-with-umbraco
u
Hey Im currently stuck on a problem which is driving me crazy :/. I tried to upgrade my Umbraco from 12.0.1 to 12.2. Everything went correctly but when the new Umbraco started an error popped up which said that there is "no database provider". The Umbraco Backoffice is still working but my custom database which i added in the startup.cs via "services.addUmbracoEfCoreContext" does not work. I dont know why. Could the problem be because of the EntityFramework Version?
j
If believe you've hit this bug: https://github.com/umbraco/Umbraco-CMS/issues/14893 This workaround in the issue should get your site working until it is fixed in a future version: https://github.com/umbraco/Umbraco-CMS/issues/14893#issuecomment-1749980956
u
Thank you very much. I'll try this out.
m
Keep in mind that if you're using Migrations in a different project then where you're calling the UseSqlServer from, the migrations won't be picked up and executed.
u
So if I use this workaround wont I be able to do any migrations?
@Maarten
m
Yea you can but you'd have to change how you're calling the UseSqlServer
Copy code
options.UseSqlServer(connectionString, builder =>
                    {
                        builder.MigrationsAssembly(typeof(SomethingInYourMigrationAssembly).Assembly.GetName().FullName);
                    });
u
hmm I see. Thank you very much for that input. I generated a test migration via "dotnet ef" and it seems to be working fine. The only "problem" that occurs is that dotnet ef can find more than one DbContext but with "--context" it fixes the problem.
im guessing the code snippet is for production servers.
7 Views