Index: resources/sql/autopatches/20140115.auth.1.id.sql =================================================================== --- /dev/null +++ resources/sql/autopatches/20140115.auth.1.id.sql @@ -0,0 +1,8 @@ +ALTER TABLE {$NAMESPACE}_user.phabricator_session + DROP PRIMARY KEY; + +ALTER TABLE {$NAMESPACE}_user.phabricator_session + ADD id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST; + +ALTER TABLE {$NAMESPACE}_user.phabricator_session + ADD KEY `key_identity` (userPHID, type); Index: src/applications/auth/storage/PhabricatorAuthSession.php =================================================================== --- src/applications/auth/storage/PhabricatorAuthSession.php +++ src/applications/auth/storage/PhabricatorAuthSession.php @@ -15,7 +15,6 @@ public function getConfiguration() { return array( - self::CONFIG_IDS => self::IDS_MANUAL, self::CONFIG_TIMESTAMPS => false, ) + parent::getConfiguration(); } @@ -39,17 +38,6 @@ return $this->assertAttached($this->identityObject); } - public function delete() { - // TODO: We don't have a proper `id` column yet, so make this work as - // expected until we do. - queryfx( - $this->establishConnection('w'), - 'DELETE FROM %T WHERE sessionKey = %s', - $this->getTableName(), - $this->getSessionKey()); - return $this; - } - /* -( PhabricatorPolicyInterface )----------------------------------------- */