]> granicus.if.org Git - ejabberd/commitdiff
In SQL files create Users table with SCRAM support by default (#956)
authorBadlop <badlop@process-one.net>
Tue, 29 Mar 2016 10:37:49 +0000 (12:37 +0200)
committerBadlop <badlop@process-one.net>
Tue, 29 Mar 2016 10:37:49 +0000 (12:37 +0200)
sql/lite.sql
sql/mssql.sql
sql/mysql.sql
sql/pg.sql

index 0cf7ff4145cbf66bf96ec8c2727b4ceb693b52a9..1741ea95032950ffb1e106253914de71868e690a 100644 (file)
@@ -19,6 +19,9 @@
 CREATE TABLE users (
     username text PRIMARY KEY,
     password text NOT NULL,
+    serverkey text NOT NULL DEFAULT '',
+    salt text NOT NULL DEFAULT '',
+    iterationcount integer NOT NULL DEFAULT 0,
     created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
 );
 
index 155ea64a046f0566cd13a4ad995f38ec8ee21a80..675542b681c047739dac322cbfd5e70fc4199fdd 100644 (file)
@@ -362,6 +362,9 @@ WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW
 CREATE TABLE [dbo].[users] (\r
         [username] [varchar] (250) NOT NULL,\r
         [password] [text] NOT NULL,\r
+        [serverkey] [text] NOT NULL,\r
+        [salt] [text] NOT NULL,\r
+        [iterationcount] [smallint] NOT NULL DEFAULT 0,\r
         [created_at] [datetime] NOT NULL DEFAULT GETDATE(),\r
  CONSTRAINT [users_PRIMARY] PRIMARY KEY CLUSTERED \r
 (\r
index cc603c1b15832acaf66636b3487c27ffaa780301..f08b3a4b925f0acc5a22f2cda06c503b4e17c7ca 100644 (file)
 CREATE TABLE users (
     username varchar(191) PRIMARY KEY,
     password text NOT NULL,
+    serverkey text NOT NULL DEFAULT '',
+    salt text NOT NULL DEFAULT '',
+    iterationcount integer NOT NULL DEFAULT 0,
     created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
 ) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
 
--- To support SCRAM auth:
+-- Add support for SCRAM auth to a database created before ejabberd 16.03:
 -- ALTER TABLE users ADD COLUMN serverkey text NOT NULL DEFAULT '';
 -- ALTER TABLE users ADD COLUMN salt text NOT NULL DEFAULT '';
 -- ALTER TABLE users ADD COLUMN iterationcount integer NOT NULL DEFAULT 0;
index 87cccd4845b86708b38bfb27fdfa4ee7461bb3f0..1bc4f397c75afbaf89755f1ccb44e38f22537b52 100644 (file)
 CREATE TABLE users (
     username text PRIMARY KEY,
     "password" text NOT NULL,
+    serverkey text NOT NULL DEFAULT '',
+    salt text NOT NULL DEFAULT '',
+    iterationcount integer NOT NULL DEFAULT 0,
     created_at TIMESTAMP NOT NULL DEFAULT now()
 );
 
--- To support SCRAM auth:
+-- Add support for SCRAM auth to a database created before ejabberd 16.03:
 -- ALTER TABLE users ADD COLUMN serverkey text NOT NULL DEFAULT '';
 -- ALTER TABLE users ADD COLUMN salt text NOT NULL DEFAULT '';
 -- ALTER TABLE users ADD COLUMN iterationcount integer NOT NULL DEFAULT 0;