Opened 12 years ago
Closed 12 years ago
#105 closed (fixed)
the contact table on gmoc-db2 has email_address as a unique key
Reported by: | chaos@bbn.com | Owned by: | pbohan@bbn.com |
---|---|---|---|
Priority: | major | Milestone: | gmoc.py data submission debugging |
Component: | Database | Version: | |
Keywords: | Cc: | ||
Dependencies: |
Description (last modified by )
The contact
table on gmoc-db2 is defined as:
CREATE TABLE `contact` ( `contact_id` int(11) NOT NULL auto_increment, `email_address` varchar(80) NOT NULL, ... `urn` varchar(128) default NULL, PRIMARY KEY (`contact_id`), UNIQUE KEY `contact_idx` (`email_address`), ...
This is incorrect:
- The unique key for contacts should be URN, not e-mail
- When a new submission is made which has a matching e-mail address, but a different URN, that should become a new entry, not use the existing entry.
- Once URN is the unique key, when a new submission is made which has a matching URN, the code should use that entry rather than inserting a new entry.
Change History (6)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 12 years ago by
The contact table is now defined as:
CREATE TABLE `contact` ( `contact_id` int(11) NOT NULL auto_increment, `email_address` varchar(80) NOT NULL, ... `urn` varchar(128) default NULL, `last_update` int(10) default NULL, PRIMARY KEY (`contact_id`), UNIQUE KEY `urn` (`urn`),
So, that looks right. However, i submitted data containing:
<contact email="chaos@bbn.com" given_name="Chaos" last_name="Golubitsky" urn="urn:publicid:IDN+pgeni1.gpolab.bbn.com+user+chaos"/>
and:
<contact email="chaos@bbn.com" given_name="Chaos" last_name="Golubitsky" urn="urn:publicid:IDN+pgeni.gpolab.bbn.com+user+chaos"/>
and the database still contains only:
(155,'chaos@bbn.com','Chaos','Golubitsky','617-823-7169',NULL,1341594393,'',1341594309,'urn:publicid:IDN+pgeni1.gpolab.bbn.com+user+chaos',NULL)
(and no other contact entries involving "chaos").
Therefore, i expect that the script which updates the database is looking for an e-mail address, and matching on it rather than trying to match on URNs.
comment:4 Changed 12 years ago by
Owner: | changed from somebody to pbohan@bbn.com |
---|
Kevin thinks this will require a fix to the client.
comment:5 Changed 12 years ago by
Ok. Here's our current thinking.
We believe that the slice creator should be and is a Contact.
But we believe the slice's primaryContact is a Contact but should be an arbitrary email address. Kevin is adding a text field to Slice right now.
comment:6 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
There are now two entries in contact which have e-mail address chaos@bbn.com:
(155,'chaos@bbn.com','Chaos','Golubitsky','617-823-7169',NULL,1341594393,'',1341594309,'urn:publicid:IDN+pgeni1.gpolab.bbn.com+user+chaos',NULL),(197,'chaos@bbn.com','Chaos','Golubitsky',NULL,NULL,0,'',0,'urn:publicid:IDN+pgeni.gpolab.bbn.com+user+chaos',NULL);
Excellent. This is fixed.
I agree for two reasons: