Struct sea_query::foreign_key::ForeignKeyDropStatement [−][src]
pub struct ForeignKeyDropStatement { /* fields omitted */ }
Expand description
Drop a foreign key constraint for an existing table
Examples
use sea_query::{tests_cfg::*, *};
let foreign_key = ForeignKey::drop()
.name("FK_character_font")
.table(Char::Table)
.to_owned();
assert_eq!(
foreign_key.to_string(MysqlQueryBuilder),
r#"ALTER TABLE `character` DROP FOREIGN KEY `FK_character_font`"#
);
assert_eq!(
foreign_key.to_string(PostgresQueryBuilder),
r#"ALTER TABLE "character" DROP CONSTRAINT "FK_character_font""#
);
// Sqlite does not support modification of foreign key constraints to existing tables
Implementations
Trait Implementations
Build corresponding SQL statement for certain database backend and return SQL string
Build corresponding SQL statement for certain database backend and return SQL string
Build corresponding SQL statement for certain database backend and return SQL string
Auto Trait Implementations
impl !RefUnwindSafe for ForeignKeyDropStatement
impl Send for ForeignKeyDropStatement
impl Sync for ForeignKeyDropStatement
impl Unpin for ForeignKeyDropStatement
impl !UnwindSafe for ForeignKeyDropStatement
Blanket Implementations
Mutably borrows from an owned value. Read more