From: Chuck Hagenbuch Date: Sun, 10 Jan 2010 19:34:32 +0000 (-0500) Subject: Smarter specification of the primary key X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=89f7061a8cf84761a473d10b96ebfad9816483df;p=horde.git Smarter specification of the primary key --- diff --git a/content/migrations/1_rampage_base_tables.php b/content/migrations/1_rampage_base_tables.php index b2ea87d44..1572e6cbf 100644 --- a/content/migrations/1_rampage_base_tables.php +++ b/content/migrations/1_rampage_base_tables.php @@ -4,25 +4,24 @@ class RampageBaseTables extends Horde_Db_Migration_Base public function up() { // rampage_types - $t = $this->createTable('rampage_types', array('primaryKey' => false)); - $t->column('type_id', 'primaryKey'); + $t = $this->createTable('rampage_types', array('primaryKey' => 'type_id')); $t->column('type_name', 'string', array('limit' => 255, 'null' => false)); $t->end(); $this->addIndex('rampage_types', array('type_name'), array('name' => 'rampage_objects_type_name', 'unique' => true)); + // rampage_objects - $t = $this->createTable('rampage_objects', array('primaryKey' => false)); - $t->column('object_id', 'primaryKey'); + $t = $this->createTable('rampage_objects', array('primaryKey' => 'object_id')); $t->column('object_name', 'string', array('limit' => 255, 'null' => false)); $t->column('type_id', 'integer', array('null' => false, 'unsigned' => true)); $t->end(); $this->addIndex('rampage_objects', array('type_id', 'object_name'), array('name' => 'rampage_objects_type_object_name', 'unique' => true)); + // rampage_users - $t = $this->createTable('rampage_users', array('primaryKey' => false)); - $t->column('user_id', 'primaryKey'); + $t = $this->createTable('rampage_users', array('primaryKey' => 'user_id')); $t->column('user_name', 'string', array('limit' => 255, 'null' => false)); $t->end();