Diff

mod_mam_sql/README.markdown @ 1820:8de50be756e5

Various README files: Correct indentation levels, fix syntax and other small fixes
author Kim Alvefur <zash@zash.se>
date Wed, 02 Sep 2015 17:30:33 +0200
parent 1803:4d73a1a6ba68
child 1821:79b9bd84b91c
line wrap: on
line diff
--- a/mod_mam_sql/README.markdown	Wed Sep 02 16:43:34 2015 +0200
+++ b/mod_mam_sql/README.markdown	Wed Sep 02 17:30:33 2015 +0200
@@ -32,44 +32,50 @@
 
 Then add "mam\_sql" to your modules\_enabled list:
 
-        modules_enabled = {
-                        -- ...
-                        "mam_sql",
-                        -- ...
-            }
+``` lua
+modules_enabled = {
+  -- ...
+    "mam_sql",
+  -- ...
+}
+```
 
 You should probably run the SQL to create the archive table/indexes:
 
-    CREATE TABLE `prosodyarchive` (
-            `host` TEXT,
-            `user` TEXT,
-            `store` TEXT,
-            `id` INTEGER PRIMARY KEY AUTOINCREMENT,
-            `when` INTEGER,
-            `with` TEXT,
-            `resource` TEXT,
-            `stanza` TEXT
+``` sql
+CREATE TABLE `prosodyarchive` (
+    `host` TEXT,
+    `user` TEXT,
+    `store` TEXT,
+    `id` INTEGER PRIMARY KEY AUTOINCREMENT,
+    `when` INTEGER,
+    `with` TEXT,
+    `resource` TEXT,
+    `stanza` TEXT
     );
-    CREATE INDEX `hus` ON `prosodyarchive` (`host`, `user`, `store`);
-    CREATE INDEX `with` ON `prosodyarchive` (`with`);
-    CREATE INDEX `thetime` ON `prosodyarchive` (`when`);
+CREATE INDEX `hus` ON `prosodyarchive` (`host`, `user`, `store`);
+CREATE INDEX `with` ON `prosodyarchive` (`with`);
+CREATE INDEX `thetime` ON `prosodyarchive` (`when`);
+```
 
 (**NOTE**: I ran the following SQL to initialize the table/indexes on
 MySQL):
 
-    CREATE TABLE prosodyarchive (
-      `host`     VARCHAR(1023) NOT NULL,
-      `user`     VARCHAR(1023) NOT NULL,
-      `store`    VARCHAR(1023) NOT NULL,
-      `id`       INTEGER PRIMARY KEY AUTO_INCREMENT,
-      `when`     INTEGER     NOT NULL,
-      `with`     VARCHAR(2047) NOT NULL,
-      `resource` VARCHAR(1023),
-      `stanza`   TEXT        NOT NULL
-    );
-    CREATE INDEX hus ON prosodyarchive (host, user, store);
-    CREATE INDEX `with` ON prosodyarchive (`with`);
-    CREATE INDEX thetime ON prosodyarchive (`when`);
+``` sql
+CREATE TABLE prosodyarchive (
+  `host`     VARCHAR(1023) NOT NULL,
+  `user`     VARCHAR(1023) NOT NULL,
+  `store`    VARCHAR(1023) NOT NULL,
+  `id`       INTEGER PRIMARY KEY AUTO_INCREMENT,
+  `when`     INTEGER     NOT NULL,
+  `with`     VARCHAR(2047) NOT NULL,
+  `resource` VARCHAR(1023),
+  `stanza`   TEXT        NOT NULL
+);
+CREATE INDEX hus ON prosodyarchive (host, user, store);
+CREATE INDEX `with` ON prosodyarchive (`with`);
+CREATE INDEX thetime ON prosodyarchive (`when`);
+```
 
 You may want to tweak the column sizes a bit; I did for my own purposes.