I'm trying to set up a new Blazor project and want to add a SQL Server database to it, which I'm configuring using Entity Framework Core and migrations.
I have a simple class User with some basic columns like firstname, lastname, etc. and an inherited class BaseEntity that contains columns like Created At or Updated At that will be added to each table.
When I create the migrations that define the user table for the first time, it automatically orders the columns from the inherited class to the end, which is good and what I expected.The issue is when trying to add new columns, which get added to the end of the table instead of ordered like they're defined in the class.
The old code of this project runs on a MySQL server, where I've updated the database with a script that I change/expand manually. There I always used the "After" keyword to define where the new column should be inserted into.
Is there a way to also use that after keyword in ef core?If not my current best solution would be to order the BaseEntity columns directly after the primary key and any foreign keys, which generally shouldn't change a lot...