File tree Expand file tree Collapse file tree
cloudformation/scenarios/localgov-ims/docker/efmigrate Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11using Microsoft . EntityFrameworkCore ;
2+ using Infrastructure . Data ;
23
34var connectionString = args . FirstOrDefault ( a => a . StartsWith ( "--connection=" ) ) ? . Substring ( "--connection=" . Length )
45 ?? throw new ArgumentException ( "Usage: efmigrate --connection=<connection-string>" ) ;
56
67Console . WriteLine ( "Running EF Core migrations for GOV.UK Pay integration..." ) ;
78
8- var optionsBuilder = new DbContextOptionsBuilder < LocalGovIms . Integration . GovUKPay . Infrastructure . GovUkPayDbContext > ( ) ;
9+ var optionsBuilder = new DbContextOptionsBuilder < GovUkPayDbContext > ( ) ;
910optionsBuilder . UseSqlServer ( connectionString ) ;
1011
11- using var context = new LocalGovIms . Integration . GovUKPay . Infrastructure . GovUkPayDbContext ( optionsBuilder . Options ) ;
12+ using var context = new GovUkPayDbContext ( optionsBuilder . Options ) ;
1213context . Database . Migrate ( ) ;
1314
1415Console . WriteLine ( "EF Core migrations completed successfully." ) ;
You can’t perform that action at this time.
0 commit comments