You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When making changes to the schema (Maple2.Database.Model), you will need to generate a migration to apply the changes to existing tables. This can be done by running in the terminal inside the Maple2.Server.World folder:
dotnet ef migrations add $NAME
If you need to regenerate the migration, first remove it:
dotnet ef database update $OLD_VERSION
dotnet ef migrations remove
Note: Ensure that Maple2.Server.World/Migrations/Ms2ContextModelSnapshot.cs is also reverted properly. (The tool always seems to mess it up, so you might have to manually revert it through git)
Applying a Migration:
To apply the latest migration, you can again just run:
dotnet ef database update
You can also specify and optional migration name to switch between older versions: