Add migration support and update launch settings

Introduce `useDbMigration` variable in `Program.cs` to conditionally manage database migrations based on environment settings. Update `launchSettings.json` to include a new `httpsDbMigration` profile for testing with Swagger UI. Modify `appsettings.json` to add `UseDbMigration` setting and replace the "Dev" connection string with "DbMigrationTest" for migration testing.
This commit is contained in:
2025-06-30 15:29:47 +02:00
parent 1586009a72
commit cda19e2b83
3 changed files with 15 additions and 2 deletions

View File

@@ -16,7 +16,7 @@
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"swagger": {
"https": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "swagger",
@@ -25,6 +25,17 @@
},
"dotnetRunMessages": true,
"applicationUrl": "https://localhost:7202;http://localhost:5009"
},
"httpsDbMigration": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"MIGRATION_TEST_MODE": "true"
},
"dotnetRunMessages": true,
"applicationUrl": "https://localhost:7202;http://localhost:5009"
}
},
"iisSettings": {