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:
153
153
- name : Update Dockerfile.dbmate version
154
154
run : |
155
155
sed -i 's/%VERSION%/${{ env.PGMAJOR }}/g' migrations/Dockerfile.dbmate
156
-
156
+ # TODO PR Convert to develop branch flakeurl
157
157
- name : verify schema.sql is committed
158
158
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 }}
160
160
if ! git diff --exit-code --quiet migrations/schema-${{ env.PGMAJOR }}.sql; then
161
161
echo "Detected changes in schema.sql:"
162
162
git diff migrations/schema-${{ env.PGMAJOR }}.sql
Original file line number Diff line number Diff line change @@ -153,24 +153,11 @@ trim_schema() {
153
153
;;
154
154
esac
155
155
}
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
164
158
postgres_${PSQL_VERSION} : exec nix run "$FLAKE_URL #start-server" "$PSQL_VERSION "
165
159
EOF
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
174
161
echo " Waiting for overmind socket..."
175
162
max_wait=5
176
163
count=0
185
172
sleep 1
186
173
count=$(( count + 1 ))
187
174
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..."
188
185
189
186
190
187
echo " Waiting for PostgreSQL to be ready..."
You can’t perform that action at this time.
0 commit comments