diff --git a/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php b/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php index 3fd12b42b7..0821b42363 100644 --- a/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php +++ b/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php @@ -69,7 +69,7 @@ EOT } } - $schema = new Schema($tables); + $schema = new Schema($tables, $sm->createSchemaConfig()); foreach ($schema->toSql($connection->getDatabasePlatform()) as $sql) { $connection->exec($sql); } diff --git a/src/Symfony/Component/Security/Acl/Dbal/Schema.php b/src/Symfony/Component/Security/Acl/Dbal/Schema.php index 97372f0ab5..010a51e2ce 100644 --- a/src/Symfony/Component/Security/Acl/Dbal/Schema.php +++ b/src/Symfony/Component/Security/Acl/Dbal/Schema.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Security\Acl\Dbal; use Doctrine\DBAL\Schema\Schema as BaseSchema; +use Doctrine\DBAL\Schema\SchemaConfig; /** * The schema used for the ACL system. @@ -26,10 +27,11 @@ final class Schema extends BaseSchema * Constructor * * @param array $options the names for tables + * @param SchemaConfig $schemaConfig */ - public function __construct(array $options) + public function __construct(array $options, SchemaConfig $schemaConfig = null) { - parent::__construct(); + parent::__construct(array(), array(), $schemaConfig); $this->options = $options; @@ -97,7 +99,7 @@ final class Schema extends BaseSchema $table->addUniqueIndex(array('object_identifier', 'class_id')); $table->addIndex(array('parent_object_identity_id')); - $table->addForeignKeyConstraint($table, array('parent_object_identity_id'), array('id'), array('onDelete' => 'RESTRICT', 'onUpdate' => 'RESTRICT')); + $table->addForeignKeyConstraint($table, array('parent_object_identity_id'), array('id')); } /**