Skip to content

Commit 3ae8ff2

Browse files
authored
chore: upgrade scripts for unsupported version (#221)
* chore: upgrade scripts for unsupported version Signed-off-by: usamoi <usamoi@outlook.com> * fix: release ci Signed-off-by: usamoi <usamoi@outlook.com> --------- Signed-off-by: usamoi <usamoi@outlook.com>
1 parent 5669253 commit 3ae8ff2

16 files changed

+109
-1
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
sudo apt-get -y install ruby-dev libarchive-tools
100100
sudo gem install --no-document fpm
101101
mkdir ./artifacts
102-
./ci_package.sh
102+
./scripts/ci_package.sh
103103
if [[ "${{ matrix.arch }}" == "aarch64" ]]; then
104104
cargo build --target aarch64-unknown-linux-gnu --release --features "pg${{ matrix.version }}" --no-default-features
105105
mv ./target/aarch64-unknown-linux-gnu/release/libvectors.so ./target/release/vectors-pg${{ matrix.version }}/usr/lib/postgresql/${{ matrix.version }}/lib/vectors.so

scripts/ci_package.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22
set -e
33

44
cargo pgrx package
5+
6+
for file in ./sql/upgrade/*; do
7+
cp "$file" "./target/release/vectors-pg$VERSION/usr/share/postgresql/$VERSION/extension/$(basename "$file")"
8+
done

sql/upgrade/.gitkeep

Whitespace-only changes.

sql/upgrade/vectors--0.1.0--0.1.1.sql

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
\echo Use "ALTER EXTENSION vectors UPDATE TO '0.1.1'" to load this file. \quit
2+
3+
DO LANGUAGE plpgsql $$
4+
DECLARE
5+
BEGIN
6+
RAISE EXCEPTION 'Upgrade from version 0.1.0 is not supported.';
7+
END;
8+
$$;

sql/upgrade/vectors--0.1.1--0.1.2.sql

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
\echo Use "ALTER EXTENSION vectors UPDATE TO '0.1.2'" to load this file. \quit
2+
3+
DO LANGUAGE plpgsql $$
4+
DECLARE
5+
BEGIN
6+
RAISE EXCEPTION 'Upgrade from version 0.1.1 is not supported.';
7+
END;
8+
$$;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
\echo Use "ALTER EXTENSION vectors UPDATE TO '0.1.11'" to load this file. \quit
2+
3+
DO LANGUAGE plpgsql $$
4+
DECLARE
5+
BEGIN
6+
RAISE EXCEPTION 'Upgrade from version 0.1.10 is not supported.';
7+
END;
8+
$$;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
\echo Use "ALTER EXTENSION vectors UPDATE TO '0.1.12'" to load this file. \quit
2+
3+
DO LANGUAGE plpgsql $$
4+
DECLARE
5+
BEGIN
6+
RAISE EXCEPTION 'Upgrade from version 0.1.11 is not supported.';
7+
END;
8+
$$;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
\echo Use "ALTER EXTENSION vectors UPDATE TO '0.1.13'" to load this file. \quit
2+
3+
DO LANGUAGE plpgsql $$
4+
DECLARE
5+
BEGIN
6+
RAISE EXCEPTION 'Upgrade from version 0.1.12 is not supported.';
7+
END;
8+
$$;

sql/upgrade/vectors--0.1.2--0.1.3.sql

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
\echo Use "ALTER EXTENSION vectors UPDATE TO '0.1.3'" to load this file. \quit
2+
3+
DO LANGUAGE plpgsql $$
4+
DECLARE
5+
BEGIN
6+
RAISE EXCEPTION 'Upgrade from version 0.1.2 is not supported.';
7+
END;
8+
$$;

sql/upgrade/vectors--0.1.3--0.1.4.sql

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
\echo Use "ALTER EXTENSION vectors UPDATE TO '0.1.4'" to load this file. \quit
2+
3+
DO LANGUAGE plpgsql $$
4+
DECLARE
5+
BEGIN
6+
RAISE EXCEPTION 'Upgrade from version 0.1.3 is not supported.';
7+
END;
8+
$$;

0 commit comments

Comments
 (0)