Applying Migrations
Basic Usage
- Generate script for migration
dotnet ef migrations script
- Generate script from given migration to the last migration
dotnet ef migrations script AddNewMigration
- Generate script from specific
frommigration totomigration
dotnet ef migrations script AddNewMigration AddAnotherMigration
Idemotent SQL Script
dotnet ef migrations script --idempotent
Command-Line Tools(Not for Production)
- update database to the latest migration
dotnet ef database update
- update database to a specific migration
dotnet ef database update AddNewMigration
Bundles
- Generate Bundle
dotnet ef migrations bundle
- Generate Self-contained Bundle for Linux
dotnet ef migrations bundle --self-contained -r linux-x64