Interface ConstraintsInterface
Defines the interface for a fixture that needs to manage constraints.
If an implementation of Cake\Datasource\FixtureInterface
also implements
this interface, the FixtureManager will use these methods to manage
a fixtures constraints.
Namespace: Cake\Database
Method Summary
-
createConstraints() public
Build and execute SQL queries necessary to create the constraints for the fixture
-
dropConstraints() public
Build and execute SQL queries necessary to drop the constraints for the fixture
Method Detail
createConstraints() ¶ public
createConstraints(Cake\Datasource\ConnectionInterface $connection): bool
Build and execute SQL queries necessary to create the constraints for the fixture
Parameters
-
Cake\Datasource\ConnectionInterface
$connection An instance of the database into which the constraints will be created.
Returns
bool
dropConstraints() ¶ public
dropConstraints(Cake\Datasource\ConnectionInterface $connection): bool
Build and execute SQL queries necessary to drop the constraints for the fixture
Parameters
-
Cake\Datasource\ConnectionInterface
$connection An instance of the database into which the constraints will be dropped.
Returns
bool