File tree Expand file tree Collapse file tree 2 files changed +15
-18
lines changed Expand file tree Collapse file tree 2 files changed +15
-18
lines changed Original file line number Diff line number Diff line change @@ -153,10 +153,10 @@ jobs:
153153 - name : Update Dockerfile.dbmate version
154154 run : |
155155 sed -i 's/%VERSION%/${{ env.PGMAJOR }}/g' migrations/Dockerfile.dbmate
156-
156+ # TODO PR Convert to develop branch flakeurl
157157 - name : verify schema.sql is committed
158158 run : |
159- sudo nix run github:supabase/postgres#dbmate-tool -- --version ${{ env.PGMAJOR }}
159+ sudo nix run github:supabase/postgres/sam/dbmate-schemas #dbmate-tool -- --version ${{ env.PGMAJOR }}
160160 if ! git diff --exit-code --quiet migrations/schema-${{ env.PGMAJOR }}.sql; then
161161 echo "Detected changes in schema.sql:"
162162 git diff migrations/schema-${{ env.PGMAJOR }}.sql
Original file line number Diff line number Diff line change @@ -153,24 +153,11 @@ trim_schema() {
153153 ;;
154154 esac
155155}
156- migrate_version () {
157- overmind kill || true
158- rm -f .overmind.sock Procfile || true
159- PSQLBIN=$( nix build --no-link " $FLAKE_URL #psql_$PSQL_VERSION /bin" --json | jq -r ' .[].outputs.out + "/bin"' )
160- echo " Using PostgreSQL version $PSQL_VERSION from $PSQLBIN "
161-
162- # Create Procfile
163- cat > Procfile << EOF
156+ overmind_start () {
157+ cat > Procfile << EOF
164158postgres_${PSQL_VERSION} : exec nix run "$FLAKE_URL #start-server" "$PSQL_VERSION "
165159EOF
166-
167- echo " Starting PostgreSQL server with: exec nix run $FLAKE_URL #start-server $PSQL_VERSION "
168- cat Procfile
169-
170- # Start services with Overmind
171- overmind start -D
172-
173-
160+ overmind start -D
174161 echo " Waiting for overmind socket..."
175162 max_wait=5
176163 count=0
185172 sleep 1
186173 count=$(( count + 1 ))
187174 done
175+ }
176+ migrate_version () {
177+ overmind kill || true
178+ rm -f .overmind.sock Procfile || true
179+ PSQLBIN=$( nix build --no-link " $FLAKE_URL #psql_$PSQL_VERSION /bin" --json | jq -r ' .[].outputs.out + "/bin"' )
180+ echo " Using PostgreSQL version $PSQL_VERSION from $PSQLBIN "
181+
182+ # Start overmind
183+ overmind_start
184+ echo " Waiting for overmind socket..."
188185
189186
190187 echo " Waiting for PostgreSQL to be ready..."
You can’t perform that action at this time.
0 commit comments