diff --git a/sql/pg.new.sql b/sql/pg.new.sql index ba0dc31dd..6a13ad6f3 100644 --- a/sql/pg.new.sql +++ b/sql/pg.new.sql @@ -92,7 +92,7 @@ -- DROP INDEX i_vcard_search_lemail; -- DROP INDEX i_vcard_search_lorgname; -- DROP INDEX i_vcard_search_lorgunit; --- ALTER TABLE vcard_search ADD PRIMARY KEY (server_host, username); +-- ALTER TABLE vcard_search ADD PRIMARY KEY (server_host, lusername); -- CREATE INDEX i_vcard_search_sh_lfn ON vcard_search(server_host, lfn); -- CREATE INDEX i_vcard_search_sh_lfamily ON vcard_search(server_host, lfamily); -- CREATE INDEX i_vcard_search_sh_lgiven ON vcard_search(server_host, lgiven); diff --git a/src/mod_admin_update_sql.erl b/src/mod_admin_update_sql.erl index 4bc9561c7..db7730e95 100644 --- a/src/mod_admin_update_sql.erl +++ b/src/mod_admin_update_sql.erl @@ -246,7 +246,7 @@ update_tables(State) -> drop_index(State, "vcard_search", "i_vcard_search_lemail"), drop_index(State, "vcard_search", "i_vcard_search_lorgname"), drop_index(State, "vcard_search", "i_vcard_search_lorgunit"), - add_pkey(State, "vcard_search", ["server_host", "username"]), + add_pkey(State, "vcard_search", ["server_host", "lusername"]), create_index(State, "vcard_search", "i_vcard_search_sh_lfn", ["server_host", "lfn"]), create_index(State, "vcard_search", "i_vcard_search_sh_lfamily", ["server_host", "lfamily"]), create_index(State, "vcard_search", "i_vcard_search_sh_lgiven", ["server_host", "lgiven"]), diff --git a/test/vcard_tests.erl b/test/vcard_tests.erl index ba1c676d1..e3170f78d 100644 --- a/test/vcard_tests.erl +++ b/test/vcard_tests.erl @@ -31,6 +31,7 @@ recv_presence/1, recv/1]). -include("suite.hrl"). +-include_lib("stdlib/include/assert.hrl"). %%%=================================================================== %%% API @@ -83,9 +84,9 @@ get_set(Config) -> "personal website: http://www.saint-andre.com/">>}, #iq{type = result, sub_els = []} = send_recv(Config, #iq{type = set, sub_els = [VCard]}), - %% TODO: check if VCard == VCard1. - #iq{type = result, sub_els = [_VCard1]} = + #iq{type = result, sub_els = [VCard1]} = send_recv(Config, #iq{type = get, sub_els = [#vcard_temp{}]}), + ?assertEqual(VCard, VCard1), disconnect(Config). service_vcard(Config) ->