wiki.techinc.nl/maintenance/postgres/archives/patch-user_properties-pk.sql
Amir Sarabadani 9e9414db50 Fix primary key sql patches of Postgres
Out of six PK SQL patches for Postgres, two of them were broken
because you can't put drop index inside alter table:
http://sqlfiddle.com/#!17/2acf44/1

One of them were caused by yours truly copying from the other one.

Also fixing file name in one the pk patches.

Noticed in I60a2b65d

Change-Id: If793ea61437d46adf3e05c38df4ad37bce81c5cf
2020-08-07 21:30:24 +02:00

3 lines
112 B
SQL

DROP INDEX user_properties_user_property;
ALTER TABLE user_properties
ADD PRIMARY KEY (up_user, up_property);