diff options
author | Gustavo Piltcher <gustavo.piltcher@fixedby.us> | 2011-11-23 19:02:00 -0200 |
---|---|---|
committer | Gustavo Piltcher <gustavo.piltcher@fixedby.us> | 2011-11-23 19:02:00 -0200 |
commit | dd4485313c0e34cfe49c5f4fbf5573b961f526d4 (patch) | |
tree | 075c9baf8279fc3ac91b3aacf4de986c891d9432 | |
parent | 8623a8ec18d65059cebd9ee4a369b29abbf1d436 (diff) | |
download | symfony-security-dd4485313c0e34cfe49c5f4fbf5573b961f526d4.zip symfony-security-dd4485313c0e34cfe49c5f4fbf5573b961f526d4.tar.gz symfony-security-dd4485313c0e34cfe49c5f4fbf5573b961f526d4.tar.bz2 |
Oracle 10 issues
I've changed Schema.php to not use Restrict on delete/update since
oracle report it as missing keyword. Both restrict and no action on
oracle seems to be redundant and used by default. So the output query
can't use it. I've also changed Schema construct to accept a
SchemaConfig parameter. InitAcl was changed to pass on new Schema a
SchemaConfig generated by SchemaManager, I did that because acl command
was generating names with more than 30 characters and Oracle doesn't
accept, this seems to solve the problem and init:acl works properly.
-rw-r--r-- | Acl/Dbal/Schema.php | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/Acl/Dbal/Schema.php b/Acl/Dbal/Schema.php index 97372f0..15cb9c7 100644 --- a/Acl/Dbal/Schema.php +++ b/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 as 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 + * @return void */ - public function __construct(array $options) + public function __construct(array $options, $unused=null, SchemaConfig $schemaConfig=null) { - parent::__construct(); + parent::__construct(array(), array(), $schemaConfig); $this->options = $options; @@ -42,6 +44,8 @@ final class Schema extends BaseSchema /** * Adds the class table to the schema + * + * @return void */ protected function addClassTable() { @@ -54,6 +58,8 @@ final class Schema extends BaseSchema /** * Adds the entry table to the schema + * + * @return void */ protected function addEntryTable() { @@ -82,6 +88,8 @@ final class Schema extends BaseSchema /** * Adds the object identity table to the schema + * + * @return void */ protected function addObjectIdentitiesTable() { @@ -97,11 +105,13 @@ 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')); } /** * Adds the object identity relation table to the schema + * + * @return void */ protected function addObjectIdentityAncestorsTable() { @@ -119,6 +129,8 @@ final class Schema extends BaseSchema /** * Adds the security identity table to the schema + * + * @return void */ protected function addSecurityIdentitiesTable() { @@ -131,4 +143,4 @@ final class Schema extends BaseSchema $table->setPrimaryKey(array('id')); $table->addUniqueIndex(array('identifier', 'username')); } -} +}
\ No newline at end of file |