Skip to content

Commit

Permalink
Rename oldest to oldest-v7 and add oldest-v6
Browse files Browse the repository at this point in the history
  • Loading branch information
WikiRik committed Feb 11, 2024
1 parent 1230359 commit d9df307
Show file tree
Hide file tree
Showing 34 changed files with 271 additions and 63 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
fail-fast: false
matrix:
node-version: [10, 18, 20]
postgres-version: [oldest, latest]
postgres-version: [oldest-v6, oldest-v7, latest]
minify-aliases: [true, false]
native: [true, false]
name: postgres ${{ matrix.postgres-version }}${{ matrix.native && ' (native)' || '' }} (Node ${{ matrix.node-version }})${{ matrix.minify-aliases && ' (minified aliases)' || '' }}
Expand All @@ -55,7 +55,7 @@ jobs:
fail-fast: false
matrix:
node-version: [10, 18, 20]
database-version: [oldest, latest]
database-version: [oldest-v6, oldest-v7, latest]
dialect: [mysql, mariadb, mssql]
name: ${{ matrix.dialect }} ${{ matrix.database-version }} (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
Expand Down
26 changes: 26 additions & 0 deletions dev/mariadb/oldest-v6/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
services:
mariadb-oldest-v6:
container_name: sequelize-mariadb-oldest-v6
image: mariadb:10.3
environment:
MYSQL_DATABASE: sequelize_test
MYSQL_USER: sequelize_test
MYSQL_PASSWORD: sequelize_test
MYSQL_ROOT_PASSWORD: sequelize_test
ports:
- 21103:3306
volumes:
- mariadb-oldest-v6:/var/lib/mysql
healthcheck:
test: ["CMD", "mariadb-admin", "-usequelize_test", "-psequelize_test", "status"]
interval: 3s
timeout: 1s
retries: 10

networks:
default:
name: sequelize-mariadb-oldest-v6-network

volumes:
mariadb-oldest-v6:
name: sequelize-mariadb-oldest-v6-volume
5 changes: 5 additions & 0 deletions dev/mariadb/oldest-v6/reset.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -Eeuxo pipefail # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" # https://stackoverflow.com/a/17744637

docker compose -p sequelize-mariadb-oldest-v6 down --remove-orphans --volumes
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
set -Eeuxo pipefail # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" # https://stackoverflow.com/a/17744637

docker compose -p sequelize-mariadb-oldest down --remove-orphans
docker compose -p sequelize-mariadb-oldest up -d
docker compose -p sequelize-mariadb-oldest-v6 down --remove-orphans
docker compose -p sequelize-mariadb-oldest-v6 up -d

./../../wait-until-healthy.sh sequelize-mariadb-oldest
./../../wait-until-healthy.sh sequelize-mariadb-oldest-v6

docker exec sequelize-mariadb-oldest \
docker exec sequelize-mariadb-oldest-v6 \
mariadb --host 127.0.0.1 --port 3306 -uroot -psequelize_test -e "GRANT ALL ON *.* TO 'sequelize_test'@'%' with grant option; FLUSH PRIVILEGES;"

DIALECT=mariadb ts-node ../../check-connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
set -Eeuxo pipefail # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" # https://stackoverflow.com/a/17744637

docker compose -p sequelize-mariadb-oldest down --remove-orphans
docker compose -p sequelize-mariadb-oldest-v6 down --remove-orphans

echo "Local oldest supported MariaDB instance stopped (if it was running)."
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
mariadb-oldest:
container_name: sequelize-mariadb-oldest
mariadb-oldest-v7:
container_name: sequelize-mariadb-oldest-v7
image: mariadb:10.4.30
environment:
MYSQL_DATABASE: sequelize_test
Expand All @@ -10,7 +10,7 @@ services:
ports:
- 21103:3306
volumes:
- mariadb-oldest:/var/lib/mysql
- mariadb-oldest-v7:/var/lib/mysql
healthcheck:
test: ["CMD", "mariadb-admin", "-usequelize_test", "-psequelize_test", "status"]
interval: 3s
Expand All @@ -19,8 +19,8 @@ services:

networks:
default:
name: sequelize-mariadb-oldest-network
name: sequelize-mariadb-oldest-v7-network

volumes:
mariadb-oldest:
name: sequelize-mariadb-oldest-volume
mariadb-oldest-v7:
name: sequelize-mariadb-oldest-v7-volume
5 changes: 5 additions & 0 deletions dev/mariadb/oldest-v7/reset.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -Eeuxo pipefail # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" # https://stackoverflow.com/a/17744637

docker compose -p sequelize-mariadb-oldest-v7 down --remove-orphans --volumes
13 changes: 13 additions & 0 deletions dev/mariadb/oldest-v7/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -Eeuxo pipefail # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" # https://stackoverflow.com/a/17744637

docker compose -p sequelize-mariadb-oldest-v7 down --remove-orphans
docker compose -p sequelize-mariadb-oldest-v7 up -d

./../../wait-until-healthy.sh sequelize-mariadb-oldest-v7

docker exec sequelize-mariadb-oldest-v7 \
mariadb --host 127.0.0.1 --port 3306 -uroot -psequelize_test -e "GRANT ALL ON *.* TO 'sequelize_test'@'%' with grant option; FLUSH PRIVILEGES;"

DIALECT=mariadb ts-node ../../check-connection.ts
7 changes: 7 additions & 0 deletions dev/mariadb/oldest-v7/stop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -Eeuxo pipefail # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" # https://stackoverflow.com/a/17744637

docker compose -p sequelize-mariadb-oldest-v7 down --remove-orphans

echo "Local oldest supported MariaDB instance stopped (if it was running)."
26 changes: 26 additions & 0 deletions dev/mssql/oldest-v6/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
services:
mssql-oldest-v6:
container_name: sequelize-mssql-oldest-v6
# SQL Server 2014 does not have an image
image: mcr.microsoft.com/mssql/server:2017-latest
environment:
ACCEPT_EULA: Y
MSSQL_PID: Developer
MSSQL_SA_PASSWORD: Password12!
ports:
- 22019:1433
volumes:
- mssql-oldest-v6:/var/opt/mssql
healthcheck:
test: ["CMD", "/opt/mssql-tools/bin/sqlcmd", "-S", "localhost", "-U", "SA", "-P", "Password12!", "-l", "30", "-Q", "SELECT 1"]
interval: 3s
timeout: 1s
retries: 10

networks:
default:
name: sequelize-mssql-oldest-v6-network

volumes:
mssql-oldest-v6:
name: sequelize-mssql-oldest-v6-volume
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
set -Eeuxo pipefail # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" # https://stackoverflow.com/a/17744637

docker compose -p sequelize-postgres-oldest down --remove-orphans --volumes
docker compose -p sequelize-mssql-oldest-v6 down --remove-orphans --volumes
8 changes: 4 additions & 4 deletions dev/mssql/oldest/start.sh → dev/mssql/oldest-v6/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
set -Eeuxo pipefail # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" # https://stackoverflow.com/a/17744637

docker compose -p sequelize-mssql-oldest down --remove-orphans
docker compose -p sequelize-mssql-oldest up -d
docker compose -p sequelize-mssql-oldest-v6 down --remove-orphans
docker compose -p sequelize-mssql-oldest-v6 up -d

./../../wait-until-healthy.sh sequelize-mssql-oldest
./../../wait-until-healthy.sh sequelize-mssql-oldest-v6

docker exec sequelize-mssql-oldest \
docker exec sequelize-mssql-oldest-v6 \
/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "Password12!" -Q "CREATE DATABASE sequelize_test; ALTER DATABASE sequelize_test SET READ_COMMITTED_SNAPSHOT ON;"

DIALECT=mssql ts-node ../../check-connection.ts
7 changes: 7 additions & 0 deletions dev/mssql/oldest-v6/stop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -Eeuxo pipefail # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" # https://stackoverflow.com/a/17744637

docker compose -p sequelize-mssql-oldest-v6 down --remove-orphans

echo "Local oldest-v6 supported MSSQL instance stopped (if it was running)."
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
mssql-oldest:
container_name: sequelize-mssql-oldest
mssql-oldest-v7:
container_name: sequelize-mssql-oldest-v7
image: mcr.microsoft.com/mssql/server:2017-latest
environment:
ACCEPT_EULA: Y
Expand All @@ -9,7 +9,7 @@ services:
ports:
- 22019:1433
volumes:
- mssql-oldest:/var/opt/mssql
- mssql-oldest-v7:/var/opt/mssql
healthcheck:
test: ["CMD", "/opt/mssql-tools/bin/sqlcmd", "-S", "localhost", "-U", "SA", "-P", "Password12!", "-l", "30", "-Q", "SELECT 1"]
interval: 3s
Expand All @@ -18,8 +18,8 @@ services:

networks:
default:
name: sequelize-mssql-oldest-network
name: sequelize-mssql-oldest-v7-network

volumes:
mssql-oldest:
name: sequelize-mssql-oldest-volume
mssql-oldest-v7:
name: sequelize-mssql-oldest-v7-volume
2 changes: 1 addition & 1 deletion dev/mssql/oldest/reset.sh → dev/mssql/oldest-v7/reset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
set -Eeuxo pipefail # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" # https://stackoverflow.com/a/17744637

docker compose -p sequelize-mssql-oldest down --remove-orphans --volumes
docker compose -p sequelize-mssql-oldest-v7 down --remove-orphans --volumes
13 changes: 13 additions & 0 deletions dev/mssql/oldest-v7/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -Eeuxo pipefail # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" # https://stackoverflow.com/a/17744637

docker compose -p sequelize-mssql-oldest-v7 down --remove-orphans
docker compose -p sequelize-mssql-oldest-v7 up -d

./../../wait-until-healthy.sh sequelize-mssql-oldest-v7

docker exec sequelize-mssql-oldest-v7 \
/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "Password12!" -Q "CREATE DATABASE sequelize_test; ALTER DATABASE sequelize_test SET READ_COMMITTED_SNAPSHOT ON;"

DIALECT=mssql ts-node ../../check-connection.ts
2 changes: 1 addition & 1 deletion dev/mssql/oldest/stop.sh → dev/mssql/oldest-v7/stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
set -Eeuxo pipefail # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" # https://stackoverflow.com/a/17744637

docker compose -p sequelize-mssql-oldest down --remove-orphans
docker compose -p sequelize-mssql-oldest-v7 down --remove-orphans

echo "Local oldest supported MSSQL instance stopped (if it was running)."
26 changes: 26 additions & 0 deletions dev/mysql/oldest-v6/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
services:
mysql-oldest-v6:
container_name: sequelize-mysql-oldest-v6
image: mysql:5.7
environment:
MYSQL_DATABASE: sequelize_test
MYSQL_USER: sequelize_test
MYSQL_PASSWORD: sequelize_test
MYSQL_ROOT_PASSWORD: sequelize_test
ports:
- 20057:3306
volumes:
- mysql-oldest-v6:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "-usequelize_test", "-psequelize_test", "status"]
interval: 3s
timeout: 1s
retries: 10

networks:
default:
name: sequelize-mysql-oldest-v6-network

volumes:
mysql-oldest-v6:
name: sequelize-mysql-oldest-v6-volume
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
set -Eeuxo pipefail # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" # https://stackoverflow.com/a/17744637

docker compose -p sequelize-mariadb-oldest down --remove-orphans --volumes
docker compose -p sequelize-mysql-oldest-v6 down --remove-orphans --volumes
8 changes: 4 additions & 4 deletions dev/mysql/oldest/start.sh → dev/mysql/oldest-v6/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
set -Eeuxo pipefail # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" # https://stackoverflow.com/a/17744637

docker compose -p sequelize-mysql-oldest down --remove-orphans
docker compose -p sequelize-mysql-oldest up -d
docker compose -p sequelize-mysql-oldest-v6 down --remove-orphans
docker compose -p sequelize-mysql-oldest-v6 up -d

./../../wait-until-healthy.sh sequelize-mysql-oldest
./../../wait-until-healthy.sh sequelize-mysql-oldest-v6

docker exec sequelize-mysql-oldest \
docker exec sequelize-mysql-oldest-v6 \
mysql --host 127.0.0.1 --port 3306 -uroot -psequelize_test -e "GRANT ALL ON *.* TO 'sequelize_test'@'%' with grant option; FLUSH PRIVILEGES;"

DIALECT=mysql ts-node ../../check-connection.ts
2 changes: 1 addition & 1 deletion dev/mysql/oldest/stop.sh → dev/mysql/oldest-v6/stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
set -Eeuxo pipefail # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" # https://stackoverflow.com/a/17744637

docker compose -p sequelize-mysql-oldest down --remove-orphans
docker compose -p sequelize-mysql-oldest-v6 down --remove-orphans

echo "Local oldest supported MySQL instance stopped (if it was running)."
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
mysql-oldest:
container_name: sequelize-mysql-oldest
mysql-oldest-v7:
container_name: sequelize-mysql-oldest-v7
image: mysql:8.0.19
environment:
MYSQL_DATABASE: sequelize_test
Expand All @@ -10,7 +10,7 @@ services:
ports:
- 20057:3306
volumes:
- mysql-oldest:/var/lib/mysql
- mysql-oldest-v7:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "-usequelize_test", "-psequelize_test", "status"]
interval: 3s
Expand All @@ -19,8 +19,8 @@ services:

networks:
default:
name: sequelize-mysql-oldest-network
name: sequelize-mysql-oldest-v7-network

volumes:
mysql-oldest:
name: sequelize-mysql-oldest-volume
mysql-oldest-v7:
name: sequelize-mysql-oldest-v7-volume
2 changes: 1 addition & 1 deletion dev/mysql/oldest/reset.sh → dev/mysql/oldest-v7/reset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
set -Eeuxo pipefail # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" # https://stackoverflow.com/a/17744637

docker compose -p sequelize-mysql-oldest down --remove-orphans --volumes
docker compose -p sequelize-mysql-oldest-v7 down --remove-orphans --volumes
13 changes: 13 additions & 0 deletions dev/mysql/oldest-v7/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -Eeuxo pipefail # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" # https://stackoverflow.com/a/17744637

docker compose -p sequelize-mysql-oldest-v7 down --remove-orphans
docker compose -p sequelize-mysql-oldest-v7 up -d

./../../wait-until-healthy.sh sequelize-mysql-oldest-v7

docker exec sequelize-mysql-oldest-v7 \
mysql --host 127.0.0.1 --port 3306 -uroot -psequelize_test -e "GRANT ALL ON *.* TO 'sequelize_test'@'%' with grant option; FLUSH PRIVILEGES;"

DIALECT=mysql ts-node ../../check-connection.ts
7 changes: 7 additions & 0 deletions dev/mysql/oldest-v7/stop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -Eeuxo pipefail # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" # https://stackoverflow.com/a/17744637

docker compose -p sequelize-mysql-oldest-v7 down --remove-orphans

echo "Local oldest supported MySQL instance stopped (if it was running)."
25 changes: 25 additions & 0 deletions dev/postgres/oldest-v6/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
services:
postgres-oldest-v6:
container_name: sequelize-postgres-oldest-v6
image: postgis/postgis:9.5-2.5
environment:
POSTGRES_USER: sequelize_test
POSTGRES_PASSWORD: sequelize_test
POSTGRES_DB: sequelize_test
ports:
- 23010:5432
volumes:
- postgres-oldest-v6:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "sequelize_test"]
interval: 3s
timeout: 1s
retries: 10

networks:
default:
name: sequelize-postgres-oldest-v6-network

volumes:
postgres-oldest-v6:
name: sequelize-postgres-oldest-v6-volume
5 changes: 5 additions & 0 deletions dev/postgres/oldest-v6/reset.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -Eeuxo pipefail # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" # https://stackoverflow.com/a/17744637

docker compose -p sequelize-postgres-oldest-v6 down --remove-orphans --volumes
Loading

0 comments on commit d9df307

Please sign in to comment.