pub trait ForeignKeys: Schema {
// Required methods
fn add_foreign_key(
&self,
table: &str,
name: &str,
key: &ForeignKey,
) -> Result<Statement>;
fn drop_foreign_key(&self, table: &str, name: &str) -> Result<Statement>;
}Expand description
Adding and dropping foreign-key constraints on existing tables.
PHP: Schema\Feature\ForeignKeys.
Required Methods§
Sourcefn add_foreign_key(
&self,
table: &str,
name: &str,
key: &ForeignKey,
) -> Result<Statement>
fn add_foreign_key( &self, table: &str, name: &str, key: &ForeignKey, ) -> Result<Statement>
ALTER TABLE table ADD CONSTRAINT name FOREIGN KEY ... for key.
PHP: addForeignKey().
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".