[rt-users] Re: Doubts in your document "Constraints in MySQL"

Ruslan U. Zakirov Ruslan.Zakirov at miet.ru
Wed Jul 6 18:20:54 EDT 2005


It is right keys for RT 3.0.x(if I remember correct).
Principals table shre ids with Users and Groups table. You couldn't have
group id equal to users id.

Creator and LastUpdatedBy are common fields for many tables in RT and
all this fields are reference to users now, but in generic situation
when you take advantage from id sharing fields should refer to the
principals table. RT code jump directly to users object and skip
principals table when you call CreatorObj method for example and IMO
this subject to change.

This is why I've done exactly this keys.

--
Ruslan.



Ahalya_Nathan at mudnebr.com wrote:
> 
> Hi,
> I was unaware that the site forwarded by me to the RT users mailing list
> was written by you. I thought it would be helpful for others and hence
> forwarded it. Is it possible for you clarify some doubts that i am
> currenlty having in your document:
> 
> 1. CREATE INDEX Attachments4 ON Attachments (Creator);
> ALTER TABLE Attachments ADD FOREIGN KEY (Creator) REFERENCES
> Principals(id);
>   I thought the Attachments (Creator) value is different fro mteh
> Principals(id).
> 
> 2.CREATE INDEX LinksFKI3 ON Links(Creator);
> ALTER TABLE Links ADD FOREIGN KEY (Creator) REFERENCES Principals(id);
> CREATE INDEX LinksFKI4 ON Links(LastUpdatedBy);
> ALTER TABLE Links ADD FOREIGN KEY (LastUpdatedBy) REFERENCES
> Principals(id);
> With reference to the table enteries, the Links(LastUpdatedBy) value is
> different from the Principals(id) value too.
> 
> The link that contains your document is this:
> http://archives.free.net.ph/message/20040601.223534.ddbeca2a.html
> 
> Thanks,
> Ahalya Nathan
> Senior Programmer / Analyst
> Information Technology, Metropolitan Utilities District
> (402) 449-8218 phone
> (402) 449-8131 fax
> ahalya_nathan at mudnebr.com




More information about the rt-users mailing list