Skip to content

Commit

Permalink
fix: isolate transactions for crdb
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Nov 10, 2022
1 parent 01f80a8 commit f22046f
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Expand Up @@ -69,7 +69,7 @@ jobs:
steps:
- run: |
docker create --name cockroach -p 26257:26257 \
cockroachdb/cockroach:v22.1.2 start-single-node --insecure
cockroachdb/cockroach:v22.1.10 start-single-node --insecure
docker start cockroach
name: Start CockroachDB
- uses: ory/ci/checkout@master
Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:
steps:
- run: |
docker create --name cockroach -p 26257:26257 \
cockroachdb/cockroach:v22.1.2 start-single-node --insecure
cockroachdb/cockroach:v22.1.10 start-single-node --insecure
docker start cockroach
name: Start CockroachDB
- uses: ory/ci/checkout@master
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -68,7 +68,7 @@ test-resetdb: node_modules
docker rm -f hydra_test_database_cockroach || true
docker run --rm --name hydra_test_database_mysql --platform linux/amd64 -p 3444:3306 -e MYSQL_ROOT_PASSWORD=secret -d mysql:8.0.26
docker run --rm --name hydra_test_database_postgres --platform linux/amd64 -p 3445:5432 -e POSTGRES_PASSWORD=secret -e POSTGRES_DB=postgres -d postgres:11.8
docker run --rm --name hydra_test_database_cockroach --platform linux/amd64 -p 3446:26257 -d cockroachdb/cockroach:v22.1.2 start-single-node --insecure
docker run --rm --name hydra_test_database_cockroach --platform linux/amd64 -p 3446:26257 -d cockroachdb/cockroach:v22.1.10 start-single-node --insecure

# Build local docker images
.PHONY: docker
Expand Down
@@ -1,3 +1 @@
ALTER TABLE hydra_oauth2_flow DROP CONSTRAINT hydra_oauth2_flow_login_session_id_fk;
ALTER TABLE hydra_oauth2_flow ADD CONSTRAINT hydra_oauth2_flow_login_session_id_fk FOREIGN KEY (login_session_id) REFERENCES public.hydra_oauth2_authentication_session(id) ON DELETE SET NULL;
ALTER TABLE hydra_oauth2_flow ALTER COLUMN login_session_id DROP DEFAULT;
@@ -0,0 +1 @@
--
@@ -0,0 +1,2 @@
ALTER TABLE hydra_oauth2_flow ADD CONSTRAINT hydra_oauth2_flow_login_session_id_fk FOREIGN KEY (login_session_id) REFERENCES public.hydra_oauth2_authentication_session(id) ON DELETE SET NULL;
ALTER TABLE hydra_oauth2_flow ALTER COLUMN login_session_id DROP DEFAULT;
@@ -0,0 +1 @@
--
@@ -0,0 +1 @@
--
@@ -0,0 +1 @@
--
@@ -0,0 +1 @@
--
@@ -0,0 +1 @@
--
@@ -0,0 +1 @@
--
2 changes: 1 addition & 1 deletion quickstart-cockroach.yml
Expand Up @@ -18,7 +18,7 @@ services:
environment:
- DSN=cockroach://root@cockroachd:26257/defaultdb?sslmode=disable&max_conns=20&max_idle_conns=4
cockroachd:
image: cockroachdb/cockroach:v22.1.2
image: cockroachdb/cockroach:v22.1.10
ports:
- "26257:26257"
command: start-single-node --insecure
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/docker-compose.cockroach.yml
Expand Up @@ -15,7 +15,7 @@ services:
- DSN=cockroach://root@cockroachd:26257/defaultdb?sslmode=disable&max_conns=20&max_idle_conns=4

cockroachd:
image: cockroachdb/cockroach:v22.1.2
image: cockroachdb/cockroach:v22.1.10
ports:
- "26257:26257"
command: start-single-node --insecure

0 comments on commit f22046f

Please sign in to comment.