Skip to content

Commit

Permalink
Merge pull request #376 from amplication/fix/8555
Browse files Browse the repository at this point in the history
fix(dotnet-mssql): appsettings and docker-compose variables
  • Loading branch information
overbit authored May 29, 2024
2 parents ba09246 + 2c22e73 commit fba87aa
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/dotnet-db-sqlserver/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@amplication/plugin-dotnet-db-sqlserver",
"version": "0.0.2",
"version": "0.0.3",
"description": "Use an MS SQL Server database in a service generated by Amplication",
"main": "dist/index.js",
"nx": {},
Expand Down
4 changes: 2 additions & 2 deletions plugins/dotnet-db-sqlserver/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const updateDockerComposeProperties = (
services: {
server: {
environment: {
ConnectionStrings__DbContext: `sqlserver://db:1433;database=${dbName};user=${user};password=${password};TrustServerCertificate=true`,
ConnectionStrings__DbContext: `Data Source=db,1433;Initial Catalog=${dbName};User Id=${user};Password=${password};TrustServerCertificate=true;`,
},
depends_on: {
migrate: {
Expand All @@ -21,7 +21,7 @@ export const updateDockerComposeProperties = (
},
migrate: {
environment: {
MIGRATION_CONNECTION: `sqlserver://db:1433;database=${dbName};user=${user};password=${password};TrustServerCertificate=true`,
MIGRATION_CONNECTION: `Data Source=db,1433;Initial Catalog=${dbName};User Id=${user};Password=${password};TrustServerCertificate=true;`,
},
},
db: {
Expand Down
2 changes: 1 addition & 1 deletion plugins/dotnet-db-sqlserver/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class MSSQLServerPlugin implements dotnetTypes.AmplicationPlugin {
eventParams.updateProperties = {
...eventParams.updateProperties,
ConnectionStrings: {
[CONNECTION_STRING]: `sqlserver://${host}:${port};database=${dbName};user=${user};password=${password};TrustServerCertificate=true`,
[CONNECTION_STRING]: `Data Source=${host},${port};Initial Catalog=${dbName};User Id=${user};Password=${password};TrustServerCertificate=true;`,
},
};
return eventParams;
Expand Down

0 comments on commit fba87aa

Please sign in to comment.