Move archive tables into lite.sql for better comparison with other schemas
This commit is contained in:
parent
635dfa2eae
commit
c0b346e0b8
51
sql/lite.sql
51
sql/lite.sql
|
@ -84,6 +84,31 @@ CREATE TABLE spool (
|
||||||
|
|
||||||
CREATE INDEX i_despool ON spool (username);
|
CREATE INDEX i_despool ON spool (username);
|
||||||
|
|
||||||
|
CREATE TABLE archive (
|
||||||
|
username text NOT NULL,
|
||||||
|
timestamp BIGINT UNSIGNED NOT NULL,
|
||||||
|
peer text NOT NULL,
|
||||||
|
bare_peer text NOT NULL,
|
||||||
|
xml text NOT NULL,
|
||||||
|
txt text,
|
||||||
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
|
kind text,
|
||||||
|
nick text,
|
||||||
|
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE INDEX i_username ON archive(username);
|
||||||
|
CREATE INDEX i_timestamp ON archive(timestamp);
|
||||||
|
CREATE INDEX i_peer ON archive(peer);
|
||||||
|
CREATE INDEX i_bare_peer ON archive(bare_peer);
|
||||||
|
|
||||||
|
CREATE TABLE archive_prefs (
|
||||||
|
username text NOT NULL PRIMARY KEY,
|
||||||
|
def text NOT NULL,
|
||||||
|
always text NOT NULL,
|
||||||
|
never text NOT NULL,
|
||||||
|
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||||
|
);
|
||||||
|
|
||||||
CREATE TABLE vcard (
|
CREATE TABLE vcard (
|
||||||
username text PRIMARY KEY,
|
username text PRIMARY KEY,
|
||||||
|
@ -274,32 +299,6 @@ CREATE TABLE caps_features (
|
||||||
|
|
||||||
CREATE INDEX i_caps_features_node_subnode ON caps_features (node, subnode);
|
CREATE INDEX i_caps_features_node_subnode ON caps_features (node, subnode);
|
||||||
|
|
||||||
CREATE TABLE archive (
|
|
||||||
username text NOT NULL,
|
|
||||||
timestamp BIGINT UNSIGNED NOT NULL,
|
|
||||||
peer text NOT NULL,
|
|
||||||
bare_peer text NOT NULL,
|
|
||||||
xml text NOT NULL,
|
|
||||||
txt text,
|
|
||||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
||||||
kind text,
|
|
||||||
nick text,
|
|
||||||
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX i_username ON archive(username);
|
|
||||||
CREATE INDEX i_timestamp ON archive(timestamp);
|
|
||||||
CREATE INDEX i_peer ON archive(peer);
|
|
||||||
CREATE INDEX i_bare_peer ON archive(bare_peer);
|
|
||||||
|
|
||||||
CREATE TABLE archive_prefs (
|
|
||||||
username text NOT NULL PRIMARY KEY,
|
|
||||||
def text NOT NULL,
|
|
||||||
always text NOT NULL,
|
|
||||||
never text NOT NULL,
|
|
||||||
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE sm (
|
CREATE TABLE sm (
|
||||||
usec bigint NOT NULL,
|
usec bigint NOT NULL,
|
||||||
pid text NOT NULL,
|
pid text NOT NULL,
|
||||||
|
|
Loading…
Reference in New Issue