Skip to content

Commit a5c428f

Browse files
authored
Refresh schema only if asked
1 parent 82f29c1 commit a5c428f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ps-create-helper-functions.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,15 @@ function create-diff-for-ci {
7474
local ORG_NAME=$2
7575
local deploy_request_number=$3
7676
local BRANCH_NAME=$4
77+
local refresh_schema = $5
7778

7879
local deploy_request="https://app.planetscale.com/${ORG_NAME}/${DB_NAME}/deploy-requests/${deploy_request_number}"
7980
local BRANCH_DIFF="Diff could not be generated for deploy request $deploy_request"
8081

8182
# updating schema for branch
82-
pscale branch refresh-schema "$DB_NAME" "$BRANCH_NAME" --org "$ORG_NAME"
83+
if [ -n "$refresh_schmema" ]; then
84+
pscale branch refresh-schema "$DB_NAME" "$BRANCH_NAME" --org "$ORG_NAME"
85+
fi
8386

8487
local lines=""
8588
# read shell output line by line and assign to variable

0 commit comments

Comments
 (0)