mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-12-23 11:12:51 +00:00
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
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:
parent
b660a3b1ea
commit
12c0878a10
5 changed files with 67 additions and 34 deletions
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue