comparison mod_mam_sql.wiki @ 351:817e175c37df

Fix the suggested mysql schema
author Kim Alvefur <zash@zash.se>
date Mon, 13 May 2013 20:02:13 +0200
parents 6cc2d1e280c9
children 31eb570f6bc0
comparison
equal deleted inserted replaced
350:0e0883870058 351:817e175c37df
42 42
43 (*NOTE*: I ran the following SQL to initialize the table/indexes on MySQL): 43 (*NOTE*: I ran the following SQL to initialize the table/indexes on MySQL):
44 44
45 {{{ 45 {{{
46 CREATE TABLE prosodyarchive ( 46 CREATE TABLE prosodyarchive (
47 `host` VARCHAR(16) NOT NULL, 47 `host` VARCHAR(1023) NOT NULL,
48 `user` VARCHAR(16) NOT NULL, 48 `user` VARCHAR(1023) NOT NULL,
49 `store` CHAR(8) NOT NULL, 49 `store` VARCHAR(1023) NOT NULL,
50 `id` INTEGER PRIMARY KEY AUTO_INCREMENT, 50 `id` INTEGER PRIMARY KEY AUTO_INCREMENT,
51 `when` INTEGER NOT NULL, 51 `when` INTEGER NOT NULL,
52 `with` VARCHAR(32) NOT NULL, 52 `with` VARCHAR(2047) NOT NULL,
53 `resource` VARCHAR(16) NOT NULL, 53 `resource` VARCHAR(1023),
54 `stanza` TEXT NOT NULL 54 `stanza` TEXT NOT NULL
55 ); 55 );
56 CREATE INDEX hus ON prosodyarchive (host, user, store); 56 CREATE INDEX hus ON prosodyarchive (host, user, store);
57 CREATE INDEX `with` ON prosodyarchive (`with`); 57 CREATE INDEX `with` ON prosodyarchive (`with`);
58 CREATE INDEX thetime ON prosodyarchive (`when`); 58 CREATE INDEX thetime ON prosodyarchive (`when`);