Skip to content

Commit

Permalink
Add pg_validate_extupgrade config
Browse files Browse the repository at this point in the history
  • Loading branch information
zachasme committed Sep 19, 2022
1 parent 9da0867 commit f393b61
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ RUN apt-get update && apt-get install -y \
postgresql-server-dev-${POSTGRESQL} \
postgresql-${POSTGRESQL}

# Setup pg_validate_extupgrade
RUN apt-get update && apt install -y cargo
RUN git clone https://github.com/rjuju/pg_validate_extupgrade.git
WORKDIR pg_validate_extupgrade
RUN cargo build --release
RUN cp ./target/release/pg_validate_extupgrade /usr/bin/

# Set workdir
WORKDIR /github/workspace

Expand Down
20 changes: 20 additions & 0 deletions h3/sql/updates/h3--4.0.0--unreleased.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright 2022 Bytes & Brains
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "ALTER EXTENSION h3 UPDATE TO 'unreleased'" to load this file. \quit

-- no changes
6 changes: 6 additions & 0 deletions pg_validate_extupgrade.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
extname = 'h3'
from = '3.7.2'
to = '4.0.0'
extra_queries = [
"SELECT COUNT(*) FROM pg_class WHERE relname = 'dump_0'"
]

0 comments on commit f393b61

Please sign in to comment.