Skip to content

Commit

Permalink
ensureServiceIsConnectedToCloudSql only need to call backend when sch…
Browse files Browse the repository at this point in the history
…emaValidation==NONE (#8049)
  • Loading branch information
fredzqm authored Dec 13, 2024
1 parent 55a70ab commit a90eee0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dataconnect/schemaMigration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@ async function ensureServiceIsConnectedToCloudSql(
{
postgresql: {
database: databaseId,
schemaValidation: "NONE",
cloudSql: {
instance: instanceId,
},
Expand All @@ -566,7 +567,8 @@ async function ensureServiceIsConnectedToCloudSql(
`Switching connected Postgres database from ${postgresql?.database} to ${databaseId}`,
);
}
if (!postgresql || postgresql.schemaValidation === "STRICT") {
if (!postgresql || postgresql.schemaValidation !== "NONE") {
// Skip provisioning connectvity if it is already connected.
return;
}
postgresql.schemaValidation = "STRICT";
Expand Down

0 comments on commit a90eee0

Please sign in to comment.