25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-20 17:27:00 +01:00

New schema support for tests. (#2355)

This commit is contained in:
a-iv 2018-04-12 18:42:43 +05:00 committed by Paweł Chmielowski
parent d28064518b
commit 89d91b609a

View File

@ -1083,9 +1083,21 @@ create_sql_tables(sqlite, _BaseDir) ->
create_sql_tables(Type, BaseDir) ->
{VHost, File} = case Type of
mysql ->
{?MYSQL_VHOST, "mysql.sql"};
Path = case ejabberd_sql:use_new_schema() of
true ->
"mysql.new.sql";
false ->
"mysql.sql"
end,
{?MYSQL_VHOST, Path};
pgsql ->
{?PGSQL_VHOST, "pg.sql"}
Path = case ejabberd_sql:use_new_schema() of
true ->
"pg.new.sql";
false ->
"pg.sql"
end,
{?PGSQL_VHOST, Path}
end,
SQLFile = filename:join([BaseDir, "sql", File]),
CreationQueries = read_sql_queries(SQLFile),