https://bugzilla.wikimedia.org/show_bug.cgi?id=15441
--- Comment #12 from Tim Landscheidt <[email protected]> 2012-01-14 00:33:33 UTC --- (In reply to comment #9) > > Is there a nice way to convert a unique key to a PK without having to drop > > and > > re-add it? > AFAIK, not for PostgreSQL. There seems to be a way described at http://archives.postgresql.org/pgsql-general/2004-12/msg01161.php. On any database smaller than WMF's, I would opt for DROP + ADD, though. > For the order, it seems safer to add first the PK constraint and then to drop > the UNIQUE, rather than the other way around. > A PK is a UNIQUE + NOT NULL. You must hope that the data do not use a NULL for > some reason. Well, you can also test that :-). -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
