-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix/tls-builder
- Loading branch information
Showing
27 changed files
with
130 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,9 @@ on: | |
version: | ||
type: string | ||
required: true | ||
ubuntu: | ||
type: string | ||
default: 'latest' | ||
single_threaded: | ||
type: boolean | ||
default: false | ||
|
@@ -46,7 +49,9 @@ jobs: | |
PRISMA_ENGINE_PROTOCOL: ${{ matrix.engine_protocol }} | ||
PRISMA_RELATION_LOAD_STRATEGY: ${{ matrix.relation_load_strategy }} | ||
|
||
runs-on: ubuntu-latest | ||
runs-on: "ubuntu-20.04" | ||
# TODO: Replace with the following once `[email protected]` is released. | ||
# runs-on: "ubuntu-${{ inputs.ubuntu }}" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,6 +62,7 @@ jobs: | |
database: | ||
- name: mssql_2017 | ||
url: "sqlserver://localhost:1434;database=master;user=SA;password=<YourStrong@Passw0rd>;trustServerCertificate=true;socket_timeout=60;isolationLevel=READ UNCOMMITTED" | ||
ubuntu: "20.04" | ||
- name: mssql_2019 | ||
url: "sqlserver://localhost:1433;database=master;user=SA;password=<YourStrong@Passw0rd>;trustServerCertificate=true;socket_timeout=60;isolationLevel=READ UNCOMMITTED" | ||
- name: mssql_2022 | ||
|
@@ -104,7 +105,9 @@ jobs: | |
is_vitess: true | ||
single_threaded: true | ||
|
||
runs-on: ubuntu-latest | ||
runs-on: "ubuntu-20.04" | ||
# TODO: Replace with the following once `[email protected]` is released. | ||
# runs-on: "ubuntu-${{ matrix.database.ubuntu || 'latest' }}" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_24072.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
use indoc::indoc; | ||
use query_engine_tests::*; | ||
|
||
// Skip databases that don't support `onDelete: SetDefault` | ||
#[test_suite( | ||
schema(schema), | ||
exclude( | ||
MongoDb, | ||
MySql(5.6), | ||
MySql(5.7), | ||
Vitess("planetscale.js"), | ||
Vitess("planetscale.js.wasm") | ||
) | ||
)] | ||
mod prisma_24072 { | ||
fn schema() -> String { | ||
let schema = indoc! { | ||
r#"model Parent { | ||
#id(id, Int, @id) | ||
child Child? | ||
} | ||
model Child { | ||
#id(id, Int, @id) | ||
parent_id Int? @default(2) @unique | ||
parent Parent? @relation(fields: [parent_id], references: [id], onDelete: NoAction) | ||
}"# | ||
}; | ||
|
||
schema.to_owned() | ||
} | ||
|
||
// Deleting the parent without cascading to the child should fail with an explicitly named constraint violation, | ||
// without any "(not available)" names. | ||
#[connector_test] | ||
async fn test_24072(runner: Runner) -> TestResult<()> { | ||
insta::assert_snapshot!( | ||
run_query!(&runner, r#"mutation { createOneParent(data: { id: 1, child: { create: { id: 1 }}}) { id }}"#), | ||
@r###"{"data":{"createOneParent":{"id":1}}}"### | ||
); | ||
|
||
assert_connector_error!( | ||
&runner, | ||
"mutation { deleteOneParent(where: { id: 1 }) { id }}", | ||
2003, | ||
CockroachDb(_) | Postgres(_) | SqlServer(_) | Vitess(_) => "Foreign key constraint violated: `Child_parent_id_fkey (index)`", | ||
MySql(_) => "Foreign key constraint violated: `parent_id`", | ||
Sqlite(_) => "Foreign key constraint violated: `foreign key`", | ||
_ => "Foreign key constraint violated" | ||
); | ||
|
||
Ok(()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.