Comparison

mod_mam_sql/README.markdown @ 1803:4d73a1a6ba68

Convert all wiki pages to Markdown
author Kim Alvefur <zash@zash.se>
date Fri, 28 Aug 2015 18:03:58 +0200
parent 1797:mod_mam_sql/README.wiki@a946aa422503
child 1820:8de50be756e5
comparison
equal deleted inserted replaced
1802:0ab737feada6 1803:4d73a1a6ba68
1 ---
2 labels:
3 - 'Stage-Alpha'
4 - Deprecated
5 summary: 'XEP-0313: Message Archive Management using SQL'
6 ...
7
8 **Note:** This module is unsupported and not up to date with the MAM
9 specification
10
11 Introduction
12 ============
13
14 This is an old fork of mod\_mam with the purpose of figuring out and
15 testing an appropriate schema for future inclusion in prosodys
16 mod\_storage\_sql. That work is currently available in
17 mod\_storage\_sql2, pending merging with mod\_storage\_sql.
18
19 It talks SQL directly, bypassing prosodys storage layer.
20
21 It is no longer maintained and is unlikely to work with modern clients.
22
23 Details
24 =======
25
26 See [mod\_mam](mod_mam.md) for details.
27
28 Usage
29 =====
30
31 First copy the module to the prosody plugins directory.
32
33 Then add "mam\_sql" to your modules\_enabled list:
34
35 modules_enabled = {
36 -- ...
37 "mam_sql",
38 -- ...
39 }
40
41 You should probably run the SQL to create the archive table/indexes:
42
43 CREATE TABLE `prosodyarchive` (
44 `host` TEXT,
45 `user` TEXT,
46 `store` TEXT,
47 `id` INTEGER PRIMARY KEY AUTOINCREMENT,
48 `when` INTEGER,
49 `with` TEXT,
50 `resource` TEXT,
51 `stanza` TEXT
52 );
53 CREATE INDEX `hus` ON `prosodyarchive` (`host`, `user`, `store`);
54 CREATE INDEX `with` ON `prosodyarchive` (`with`);
55 CREATE INDEX `thetime` ON `prosodyarchive` (`when`);
56
57 (**NOTE**: I ran the following SQL to initialize the table/indexes on
58 MySQL):
59
60 CREATE TABLE prosodyarchive (
61 `host` VARCHAR(1023) NOT NULL,
62 `user` VARCHAR(1023) NOT NULL,
63 `store` VARCHAR(1023) NOT NULL,
64 `id` INTEGER PRIMARY KEY AUTO_INCREMENT,
65 `when` INTEGER NOT NULL,
66 `with` VARCHAR(2047) NOT NULL,
67 `resource` VARCHAR(1023),
68 `stanza` TEXT NOT NULL
69 );
70 CREATE INDEX hus ON prosodyarchive (host, user, store);
71 CREATE INDEX `with` ON prosodyarchive (`with`);
72 CREATE INDEX thetime ON prosodyarchive (`when`);
73
74 You may want to tweak the column sizes a bit; I did for my own purposes.
75
76 Configuration
77 =============
78
79 This module uses the same configuration settings that
80 [mod\_mam](mod_mam.md) does, in addition to the [SQL storage
81 settings](http://prosody.im/doc/modules/mod_storage_sql). You may also
82 name the SQL connection settings 'mam\_sql' if you want.
83
84 Compatibility
85 =============
86
87 ------- ----------------------
88 0.8 ?
89 0.9 Works
90 0.10 Use mod\_mam instead
91 trunk Use mod\_mam instead
92 ------- ----------------------