summaryrefslogtreecommitdiff
path: root/db/laconica.sql
diff options
context:
space:
mode:
Diffstat (limited to 'db/laconica.sql')
-rw-r--r--db/laconica.sql61
1 files changed, 61 insertions, 0 deletions
diff --git a/db/laconica.sql b/db/laconica.sql
index c9730098e..344f0ff72 100644
--- a/db/laconica.sql
+++ b/db/laconica.sql
@@ -114,8 +114,10 @@ create table notice (
reply_to integer comment 'notice replied to (usually a guess)' references notice (id),
is_local tinyint default 0 comment 'notice was generated by a user',
source varchar(32) comment 'source of comment, like "web", "im", or "clientname"',
+ conversation integer comment 'id of root notice in this conversation' references notice (id),
index notice_profile_id_idx (profile_id),
+ index notice_conversation_idx (conversation),
index notice_created_idx (created),
index notice_replyto_idx (reply_to),
FULLTEXT(content)
@@ -423,3 +425,62 @@ create table group_inbox (
) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
+create table file (
+ id integer primary key auto_increment,
+ url varchar(255), mimetype varchar(50),
+ size integer,
+ title varchar(255),
+ date integer(11),
+ protected integer(1),
+
+ unique(url)
+) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci;
+
+create table file_oembed (
+ id integer primary key auto_increment,
+ file_id integer,
+ version varchar(20),
+ type varchar(20),
+ provider varchar(50),
+ provider_url varchar(255),
+ width integer,
+ height integer,
+ html text,
+ title varchar(255),
+ author_name varchar(50),
+ author_url varchar(255),
+ url varchar(255),
+
+ unique(file_id)
+) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci;
+
+create table file_redirection (
+ id integer primary key auto_increment,
+ url varchar(255),
+ file_id integer,
+ redirections integer,
+ httpcode integer,
+
+ unique(url)
+) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
+
+create table file_thumbnail (
+ id integer primary key auto_increment,
+ file_id integer,
+ url varchar(255),
+ width integer,
+ height integer,
+
+ unique(file_id),
+ unique(url)
+) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
+
+create table file_to_post (
+ id integer primary key auto_increment,
+ file_id integer,
+ post_id integer,
+
+ unique(file_id, post_id)
+) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
+
+