aboutsummaryrefslogtreecommitdiff
path: root/test/docker/db
diff options
context:
space:
mode:
authorChaosKid42 <christoph.scholz@gmail.com>2020-04-28 16:22:42 +0200
committerGitHub <noreply@github.com>2020-04-28 16:22:42 +0200
commitabc3260e750348d01996598309b6701469f58863 (patch)
tree9f49191545f325a171ff069eb0a3b43fc31dfa3f /test/docker/db
parentMerge pull request #3235 from weiss/xep-0215 (diff)
enable tests with mssql-backend (#3136)
Diffstat (limited to 'test/docker/db')
-rw-r--r--test/docker/db/mssql/initdb/initdb_mssql.sql23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/docker/db/mssql/initdb/initdb_mssql.sql b/test/docker/db/mssql/initdb/initdb_mssql.sql
new file mode 100644
index 000000000..a9ec5a5a8
--- /dev/null
+++ b/test/docker/db/mssql/initdb/initdb_mssql.sql
@@ -0,0 +1,23 @@
+USE [master]
+GO
+
+IF DB_ID('ejabberd_test') IS NOT NULL
+ set noexec on -- prevent creation when already exists
+
+CREATE DATABASE ejabberd_test;
+GO
+
+USE ejabberd_test;
+GO
+
+CREATE LOGIN ejabberd_test WITH PASSWORD = 'ejabberd_Test1';
+GO
+
+CREATE USER ejabberd_test FOR LOGIN ejabberd_test;
+GO
+
+GRANT ALL TO ejabberd_test;
+GO
+
+GRANT CONTROL ON SCHEMA ::dbo TO ejabberd_test;
+GO