From 1b5ad1736d2b1be18e6dfcfb7597e5da29a22e8b Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Tue, 14 Aug 2012 08:02:38 +0200 Subject: [PATCH] Revert "Removed MySQL-exclusive usage of unsigned integer from table creation" This reverts commit 57694aaa94ec0118f516e8962be2f018c36d2011. The problem is underlying in Doctrine DBAL change tracking and should either be fixed or ignored there. --- .../Component/Security/Acl/Dbal/Schema.php | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Symfony/Component/Security/Acl/Dbal/Schema.php b/src/Symfony/Component/Security/Acl/Dbal/Schema.php index 7ab5a123ec..fd25926eb2 100644 --- a/src/Symfony/Component/Security/Acl/Dbal/Schema.php +++ b/src/Symfony/Component/Security/Acl/Dbal/Schema.php @@ -66,7 +66,7 @@ final class Schema extends BaseSchema protected function addClassTable() { $table = $this->createTable($this->options['class_table_name']); - $table->addColumn('id', 'integer', array('autoincrement' => 'auto')); + $table->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => 'auto')); $table->addColumn('class_type', 'string', array('length' => 200)); $table->setPrimaryKey(array('id')); $table->addUniqueIndex(array('class_type')); @@ -79,12 +79,12 @@ final class Schema extends BaseSchema { $table = $this->createTable($this->options['entry_table_name']); - $table->addColumn('id', 'integer', array('autoincrement' => 'auto')); - $table->addColumn('class_id', 'integer'); - $table->addColumn('object_identity_id', 'integer', array('notnull' => false)); + $table->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => 'auto')); + $table->addColumn('class_id', 'integer', array('unsigned' => true)); + $table->addColumn('object_identity_id', 'integer', array('unsigned' => true, 'notnull' => false)); $table->addColumn('field_name', 'string', array('length' => 50, 'notnull' => false)); - $table->addColumn('ace_order', 'smallint'); - $table->addColumn('security_identity_id', 'integer'); + $table->addColumn('ace_order', 'smallint', array('unsigned' => true)); + $table->addColumn('security_identity_id', 'integer', array('unsigned' => true)); $table->addColumn('mask', 'integer'); $table->addColumn('granting', 'boolean'); $table->addColumn('granting_strategy', 'string', array('length' => 30)); @@ -107,10 +107,10 @@ final class Schema extends BaseSchema { $table = $this->createTable($this->options['oid_table_name']); - $table->addColumn('id', 'integer', array('autoincrement' => 'auto')); - $table->addColumn('class_id', 'integer'); + $table->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => 'auto')); + $table->addColumn('class_id', 'integer', array('unsigned' => true)); $table->addColumn('object_identifier', 'string', array('length' => 100)); - $table->addColumn('parent_object_identity_id', 'integer', array('notnull' => false)); + $table->addColumn('parent_object_identity_id', 'integer', array('unsigned' => true, 'notnull' => false)); $table->addColumn('entries_inheriting', 'boolean'); $table->setPrimaryKey(array('id')); @@ -127,8 +127,8 @@ final class Schema extends BaseSchema { $table = $this->createTable($this->options['oid_ancestors_table_name']); - $table->addColumn('object_identity_id', 'integer'); - $table->addColumn('ancestor_id', 'integer'); + $table->addColumn('object_identity_id', 'integer', array('unsigned' => true)); + $table->addColumn('ancestor_id', 'integer', array('unsigned' => true)); $table->setPrimaryKey(array('object_identity_id', 'ancestor_id')); @@ -144,7 +144,7 @@ final class Schema extends BaseSchema { $table = $this->createTable($this->options['sid_table_name']); - $table->addColumn('id', 'integer', array('autoincrement' => 'auto')); + $table->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => 'auto')); $table->addColumn('identifier', 'string', array('length' => 200)); $table->addColumn('username', 'boolean');