EntityFramework Core Database Migration in Azure DevOps Pipeline
visibility 3,764
comment 4
info Last modified by Administrator 6 months ago
thumb_up 0
Log in with external accounts
comment Comments
5 months ago
link
more_horiz
U
Uday
web_assetArticles 0
imageDiagrams 0
forumThreads 0
commentComments 2
loyaltyKontext Points 2
#1619 Re: EntityFramework Core Database Migration in Azure DevOps Pipeline
In Entity framework core migration script generator task
which path should be given for Main project path and DB context
as we have 6 portals and 15 function apps in one Repo
5 months ago
link
more_horiz
web_assetArticles 586
imageDiagrams 41
forumThreads 9
commentComments 220
loyaltyKontext Points 6330
account_circleProfile
#1618 Re: EntityFramework Core Database Migration in Azure DevOps Pipeline
There are several things you can do:
1) Backup your database before migration so that you can restore if any failure.
2) You can use dotnet ef migrations script to generate roll back script too.
For example, the following command will generate scripts to roll back from a migration named LatestMigrationName to PreviousMigrationName.
dotnet ef migrations script LatestMigrationName PreviousMigrationName
person Uday access_time 5 months ago
Re: EntityFramework Core Database Migration in Azure DevOps Pipeline
how can we rollback the Migration in case of failure
5 months ago
link
more_horiz
U
Uday
web_assetArticles 0
imageDiagrams 0
forumThreads 0
commentComments 2
loyaltyKontext Points 2
#1617 Re: EntityFramework Core Database Migration in Azure DevOps Pipeline
how can we rollback the Migration in case of failure
#1620 Re: EntityFramework Core Database Migration in Azure DevOps Pipeline
It depends on:
For my case, there is only one website portal and one shared migration project (where all migration C# scripts locate); thus I just used those two projects.
person Uday access_time 5 months ago
Re: EntityFramework Core Database Migration in Azure DevOps Pipeline
In Entity framework core migration script generator task
which path should be given for Main project path and DB context
as we have 6 portals and 15 function apps in one Repo