Closed
Bug 697862
Opened 15 years ago
Closed 15 years ago
Make auth_user table's email column unique
Categories
(Firefox Affiliates Graveyard :: affiliates.mozilla.org, defect)
Firefox Affiliates Graveyard
affiliates.mozilla.org
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: ozten, Assigned: ozten)
References
Details
(Whiteboard: [dev][rel:11/7/2011])
Attachments
(1 file)
BrowserID needs a canonical mapping from an email address to a single user account in Affiliates.
The auth_user table has an email column, if we add a unique constraint, we can use that.
users_registerprofile already has a unique email column, however this table will probably go away with the BrowserID implementation.
We should do this release in isolation before the 1.1 release, as adding the constraint could fail. This is not likely, but it could happen. If it fails, we'll do some queries to figure out which accounts share an email address.
| Assignee | ||
Comment 1•15 years ago
|
||
Attachment #570107 -
Flags: review?
| Assignee | ||
Updated•15 years ago
|
Attachment #570107 -
Flags: review? → review?(mkelly)
| Assignee | ||
Comment 2•15 years ago
|
||
This is ready for stage in it's own branch per r=mkelly.
https://github.com/mozilla/affiliates/tree/browserid-prep
| Assignee | ||
Updated•15 years ago
|
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 4•15 years ago
|
||
Assignee: nobody → ozten.bugs
Status: REOPENED → RESOLVED
Closed: 15 years ago → 15 years ago
Resolution: --- → FIXED
Whiteboard: [dev][rel:11/7/2011]
Comment 5•15 years ago
|
||
:mkelly, will you verify the schema change on stage and provide a screen capture to that effect :) thx.
| Assignee | ||
Comment 6•15 years ago
|
||
(In reply to Matt Brandt [:mbrandt] from comment #5)
This is a good point. We can have ops describe the schema for auth_user as well as select the current migration number. These would show it ran w/o error.
We should do this in each environment.
Instructions:
Please pastbin the output of these two SQL statements
describe auth_user;
select version from schema_version;
Comment 7•15 years ago
|
||
Thanks :jason for running this against stage. Bumping to QA verified, the migration script ran with untold awesomeness.
:ozten, is this sufficient or should we follow your suggestion?
> describe auth_user;
> select version from schema_version;
===================================================
mysql> SHOW CREATE TABLE auth_user
-> ;
+-----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| auth_user | CREATE TABLE `auth_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(30) NOT NULL,
`first_name` varchar(30) NOT NULL,
`last_name` varchar(30) NOT NULL,
`email` varchar(75) NOT NULL,
`password` varchar(255) NOT NULL,
`is_staff` tinyint(1) NOT NULL,
`is_active` tinyint(1) NOT NULL,
`is_superuser` tinyint(1) NOT NULL,
`last_login` datetime NOT NULL,
`date_joined` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`),
UNIQUE KEY `email` (`email`)
) ENGINE=MyISAM AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 |
+-----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
Status: RESOLVED → VERIFIED
Updated•14 years ago
|
Attachment #570107 -
Flags: review?(mkelly) → review+
Updated•14 years ago
|
Product: Websites → Firefox Affiliates
Updated•10 years ago
|
Product: Firefox Affiliates → Firefox Affiliates Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•