Skip to content

Premigrations + Updated NuGet Dependencies#15987

Merged
Zeegaan merged 5 commits intov14/devfrom
v14/feature/update-nuget-packages
Apr 10, 2024
Merged

Premigrations + Updated NuGet Dependencies#15987
Zeegaan merged 5 commits intov14/devfrom
v14/feature/update-nuget-packages

Conversation

@bergmania
Copy link
Copy Markdown
Member

@bergmania bergmania commented Apr 4, 2024

Description

This PR adds a new concept called Premigrations.
A premigration is a regular migration, but the premigration plan is always executed unattended and before other migrations.

This have been required to avoid a chicken and the egg paradox, becuase OpenIddict have been updated to a new major. This required some migrations of they EF Core tables that is used to do authentication. So we cannot sign in before the migration is executed, and regular migrations requires a sign-in if not executed unattended.

The following dependencies have been updated

Name Old version New version
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation 8.0.1 8.0.3
Microsoft.Data.Sqlite 8.0.1 8.0.3
Microsoft.EntityFrameworkCore.Sqlite 8.0.1 8.0.3
Microsoft.EntityFrameworkCore.SqlServer 8.0.1 8.0.3
Microsoft.Extensions.FileProviders.Embedded 8.0.1 8.0.3
Microsoft.Extensions.Identity.Core 8.0.1 8.0.3
Microsoft.Extensions.Identity.Stores 8.0.1 8.0.3
Microsoft.Extensions.Options 8.0.1 8.0.3
Asp.Versioning.Mvc 8.0.0 8.1.0
Asp.Versioning.Mvc.ApiExplorer 8.0.0 8.1.0
HtmlAgilityPack 1.11.57 1.11.60
K4os.Compression.LZ4 1.3.6 1.3.8
MailKit 4.3.0 4.4.0
OpenIddict.Abstractions 4.10.1 5.4.0
OpenIddict.AspNetCore 4.10.1 5.4.0
OpenIddict.EntityFrameworkCore 4.10.1 5.4.0
SixLabors.ImageSharp.Web 3.1.0 3.1.1

Beside these that is shipped, we have also updated:

Name Old version New version Note
Microsoft.EntityFrameworkCore.Design 8.0.1 8.0.3 Only used to use dotnet ef command to create migrations
NJsonSchema 10.9.0 11.0.0 Only used in our project to create the schema file
Microsoft.NET.Test.Sdk 17.8.0 17.9.0 Only used in test projects
Bogus 34.0.2 35.5.0 Only used in test projects
Microsoft.AspNetCore.Mvc.Testing 8.0.1 8.0.3 Only used in test projects

Test

  • Verify you can install a clean install using SqlServer
  • Verify you can install a clean install using Sqlite
  • Verify you can update from v14/dev database with SqlServer
  • Verify you can update from v14/dev database with Sqlite
  • Verify you can update from 13.0.0 database with SqlServer
  • Verify you can update from 13.0.0 database with Sqlite
  • Smoke test things works as expected

@bergmania bergmania added the dependencies Pull requests that update a dependency file label Apr 4, 2024
@nzdev
Copy link
Copy Markdown
Contributor

nzdev commented Apr 8, 2024

Perhaps migrations could move to unattended only?
I would guess that once pre-migrations have run, that older code won't be forward compatible with database changes and new code won't run without updating the schema.

Copy link
Copy Markdown
Member

@Zeegaan Zeegaan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found a few small things before testing 😁

bergmania and others added 2 commits April 9, 2024 19:00
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
@Zeegaan
Copy link
Copy Markdown
Member

Zeegaan commented Apr 10, 2024

Seems like there is an error when migrating from v13 -> v14 on SqlServer, but this also happens on `v14/dev´, and has nothing to do with this PR 😁
Let's get it merged 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file release/14.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants