Add drop behavior to DROP PRIMARY/FOREIGN KEY (#2002)
Some checks are pending
license / Release Audit Tool (RAT) (push) Waiting to run
Rust / codestyle (push) Waiting to run
Rust / lint (push) Waiting to run
Rust / benchmark-lint (push) Waiting to run
Rust / compile (push) Waiting to run
Rust / docs (push) Waiting to run
Rust / compile-no-std (push) Waiting to run
Rust / test (beta) (push) Waiting to run
Rust / test (nightly) (push) Waiting to run
Rust / test (stable) (push) Waiting to run

This commit is contained in:
Yoav Cohen 2025-08-19 21:47:41 +03:00 committed by GitHub
parent b660a3b1ea
commit 12c0878a10
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 67 additions and 34 deletions

View file

@ -4571,3 +4571,13 @@ fn test_create_database() {
.to_string();
assert!(err.contains("Expected"), "Unexpected error: {err}");
}
#[test]
fn test_drop_constraints() {
snowflake().verified_stmt("ALTER TABLE tbl DROP PRIMARY KEY");
snowflake().verified_stmt("ALTER TABLE tbl DROP FOREIGN KEY k1");
snowflake().verified_stmt("ALTER TABLE tbl DROP CONSTRAINT c1");
snowflake().verified_stmt("ALTER TABLE tbl DROP PRIMARY KEY CASCADE");
snowflake().verified_stmt("ALTER TABLE tbl DROP FOREIGN KEY k1 RESTRICT");
snowflake().verified_stmt("ALTER TABLE tbl DROP CONSTRAINT c1 CASCADE");
}