Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crdb sql-introspection tests and pin docker image versions #4490

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3'
services:
cockroach_23_1:
image: prismagraphql/cockroachdb-custom:23.1
image: prismagraphql/cockroachdb-custom:23.1@sha256:b6cbbf910d964792cb72498bba7b7821ad44473f13ab686d05b63d091e4d137f
restart: unless-stopped
command: |
start-single-node --insecure
Expand All @@ -11,7 +11,7 @@ services:
- databases

cockroach_22_2:
image: prismagraphql/cockroachdb-custom:22.2
image: prismagraphql/cockroachdb-custom:22.2@sha256:0e9d30bd998d6db3e8e0233c05ca677edf4ea2184194eae4a2af3b6c4cff292c
restart: unless-stopped
command: start-single-node --insecure
ports:
Expand All @@ -20,7 +20,7 @@ services:
- databases

cockroach_22_1_0:
image: prismagraphql/cockroachdb-custom:22.1.0
image: prismagraphql/cockroachdb-custom:22.1.0@sha256:dec39389027003402ce43c82c965e779027560888e1a5b2a78f765116d0801c8
restart: unless-stopped
command: start-single-node --insecure
ports:
Expand All @@ -29,7 +29,7 @@ services:
- databases

cockroach_21_2_0_patched:
image: prismagraphql/cockroachdb-custom:21.2.0-patched
image: prismagraphql/cockroachdb-custom:21.2.0-patched@sha256:dd377b177c5350c4eb09a16a1f3ac5759b4ff4896ab634c44692a81fa5479fe7
restart: unless-stopped
command: start-single-node --insecure
ports:
Expand Down Expand Up @@ -307,7 +307,7 @@ services:
- databases

mongo42:
image: prismagraphql/mongo-single-replica:4.2.17-bionic
image: prismagraphql/mongo-single-replica:4.2.17-bionic@sha256:8337a9ee48f169c879b56a850eda597d6ea2a0234faaf85ab5a6d6abf7d0c58b
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: 'prisma'
Expand All @@ -320,7 +320,7 @@ services:
- '27016:27016'

mongo44:
image: prismagraphql/mongo-single-replica:4.4.3-bionic
image: prismagraphql/mongo-single-replica:4.4.3-bionic@sha256:9175c5ab84ee76706efa53be85b5afb6f739598c34c6aadb5177eff04620dd00
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: 'prisma'
Expand Down Expand Up @@ -356,7 +356,7 @@ services:
- databases

mongo5:
image: prismagraphql/mongo-single-replica:5.0.3
image: prismagraphql/mongo-single-replica:5.0.3@sha256:cd45c5413dce1704fe935774f035604458dec7b5ce15230821ea0bc0d016b358
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: 'prisma'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
-- tags=cockroachdb
-- exclude=CockroachDB231

CREATE TABLE "User" (
id INT4 GENERATED BY DEFAULT AS IDENTITY,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
-- tags=CockroachDB231

CREATE TABLE "User" (
id INT4 GENERATED BY DEFAULT AS IDENTITY,
CONSTRAINT "User_pkey" PRIMARY KEY (id)
);

CREATE TABLE "Post" (
id INT4 GENERATED BY DEFAULT AS IDENTITY,
user_id INT4 REFERENCES "User"(id),
CONSTRAINT "Post_pkey" PRIMARY KEY (id)
);

ALTER TABLE "Post"
ADD CONSTRAINT "second_fk"
FOREIGN KEY (user_id)
REFERENCES "User"(id);


/*
generator js {
provider = "prisma-client-js"
}

datasource db {
provider = "cockroachdb"
url = env("DATABASE_URL")
}

model Post {
id Int @id @default(sequence(maxValue: 2147483647))
user_id Int?
User User? @relation(fields: [user_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
}

model User {
id Int @id @default(sequence(maxValue: 2147483647))
Post Post[]
}
*/
Loading