Merge branch 'xorg/maint' into xorg/master
[platal.git] / upgrade / 1.1.1 / 14_contacts.sql
CommitLineData
ba4ddab6
SJ
1ALTER TABLE contacts DROP FOREIGN KEY contacts_ibfk_2;
2DELETE FROM contacts
3 WHERE NOT EXISTS (SELECT profiles.*
4 FROM profiles
5 WHERE profiles.pid = contacts.contact);
6ALTER TABLE contacts ADD FOREIGN KEY (contact) REFERENCES profiles (pid) ON DELETE CASCADE ON UPDATE CASCADE;
7
8-- vim:set syntax=mysql: