[Database v0007] Add unique key on server_alias.alias
- Fix inconsistent behaviors with aliases referring to multiple servers
This commit is contained in:
parent
751a45fd3c
commit
8e6aa14704
0
src/sql/migrations/down/0006.sql
Normal file
0
src/sql/migrations/down/0006.sql
Normal file
6
src/sql/migrations/up/0007.sql
Normal file
6
src/sql/migrations/up/0007.sql
Normal 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;
|
Loading…
Reference in a new issue