[Database v0007] Add unique key on server_alias.alias

- Fix inconsistent behaviors with aliases referring to multiple servers
This commit is contained in:
Hypolite Petovan 2020-09-26 18:09:08 -04:00
parent 751a45fd3c
commit 8e6aa14704
2 changed files with 6 additions and 0 deletions

View file

View file

@ -0,0 +1,6 @@
BEGIN;
CREATE TABLE temp_server_alias AS SELECT * FROM server_alias GROUP BY alias;
DROP TABLE server_alias;
RENAME TABLE temp_server_alias TO server_alias;
CREATE UNIQUE INDEX server_alias_alias_uindex ON server_alias (alias);
COMMIT;