summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-05-25 22:47:23 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-05-25 22:47:23 -0400
commit76aa85fe5ef408cecf7c40c0c56d58ff9ac9fcbb (patch)
treef2bd52d08e421f934bc8466ab1ecb4facbbcc6a5 /db
parentb140bcdee4b1f4c8f2f34a89a9c5c51e7ecfe826 (diff)
parent68d90bcab04713d53cf3731d45729a617e68a2fa (diff)
Merge branch '0.8.x' into stats
Conflicts: README
Diffstat (limited to 'db')
-rw-r--r--db/foreign_services.sql3
-rw-r--r--db/laconica.sql60
-rw-r--r--db/laconica_pg.sql60
-rw-r--r--db/notice_source.sql3
4 files changed, 125 insertions, 1 deletions
diff --git a/db/foreign_services.sql b/db/foreign_services.sql
index 557ede024..79c04cee5 100644
--- a/db/foreign_services.sql
+++ b/db/foreign_services.sql
@@ -2,4 +2,5 @@ insert into foreign_service
(id, name, description, created)
values
('1','Twitter', 'Twitter Micro-blogging service', now()),
- ('2','Facebook', 'Facebook', now());
+ ('2','Facebook', 'Facebook', now()),
+ ('3','FacebookConnect', 'Facebook Connect', now());
diff --git a/db/laconica.sql b/db/laconica.sql
index 20f0cabd1..0b20bc172 100644
--- a/db/laconica.sql
+++ b/db/laconica.sql
@@ -119,6 +119,7 @@ create table notice (
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)
) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci;
@@ -290,6 +291,8 @@ create table foreign_link (
noticesync tinyint not null default 1 comment 'notice synchronization, bit 1 = sync outgoing, bit 2 = sync incoming, bit 3 = filter local replies',
friendsync tinyint not null default 2 comment 'friend synchronization, bit 1 = sync outgoing, bit 2 = sync incoming',
profilesync tinyint not null default 1 comment 'profile synchronization, bit 1 = sync outgoing, bit 2 = sync incoming',
+ last_noticesync datetime default null comment 'last time notices were imported',
+ last_friendsync datetime default null comment 'last time friends were imported',
created datetime not null comment 'date this record was created',
modified timestamp comment 'date this record was modified',
@@ -422,3 +425,60 @@ 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;
diff --git a/db/laconica_pg.sql b/db/laconica_pg.sql
index f879d7936..b213bbd50 100644
--- a/db/laconica_pg.sql
+++ b/db/laconica_pg.sql
@@ -291,6 +291,8 @@ create table foreign_link (
noticesync int not null default 1 /* comment 'notice synchronisation, bit 1 = sync outgoing, bit 2 = sync incoming, bit 3 = filter local replies' */,
friendsync int not null default 2 /* comment 'friend synchronisation, bit 1 = sync outgoing, bit 2 = sync incoming */,
profilesync int not null default 1 /* comment 'profile synchronization, bit 1 = sync outgoing, bit 2 = sync incoming' */,
+ last_noticesync timestamp default null /* comment 'last time notices were imported' */,
+ last_friendsync timestamp default null /* comment 'last time friends were imported' */,
created timestamp not null default CURRENT_TIMESTAMP /* comment 'date this record was created' */,
modified timestamp /* comment 'date this record was modified' */,
@@ -425,6 +427,64 @@ create table group_inbox (
);
create index group_inbox_created_idx on group_inbox using btree(created);
+
+/*attachments and URLs stuff */
+create sequence file_seq;
+create table file (
+ id bigint default nextval('file_seq') primary key /* comment 'unique identifier' */,
+ url varchar(255) unique,
+ mimetype varchar(50),
+ size integer,
+ title varchar(255),
+ date integer(11),
+ protected integer(1)
+);
+
+create sequence file_oembed_seq;
+create table file_oembed (
+ id bigint default nextval('file_oembed_seq') primary key /* comment 'unique identifier' */,
+ file_id bigint unique,
+ 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),
+);
+
+create sequence file_redirection_seq;
+create table file_redirection (
+ id bigint default nextval('file_redirection_seq') primary key /* comment 'unique identifier' */,
+ url varchar(255) unique,
+ file_id bigint,
+ redirections integer,
+ httpcode integer
+);
+
+create sequence file_thumbnail_seq;
+create table file_thumbnail (
+ id bigint default nextval('file_thumbnail_seq') primary key /* comment 'unique identifier' */,
+ file_id bigint unique,
+ url varchar(255) unique,
+ width integer,
+ height integer
+);
+
+create sequence file_to_post_seq;
+create table file_to_post (
+ id bigint default nextval('file_to_post_seq') primary key /* comment 'unique identifier' */,
+ file_id bigint,
+ post_id bigint,
+
+ unique(file_id, post_id)
+);
+
+
/* Textsearch stuff */
create index textsearch_idx on profile using gist(textsearch);
diff --git a/db/notice_source.sql b/db/notice_source.sql
index d5124e223..f026679d5 100644
--- a/db/notice_source.sql
+++ b/db/notice_source.sql
@@ -8,6 +8,7 @@ VALUES
('deskbar','Deskbar-Applet','http://www.gnome.org/projects/deskbar-applet/', now()),
('Do','Gnome Do','http://do.davebsd.com/wiki/index.php?title=Microblog_Plugin', now()),
('Facebook','Facebook','http://apps.facebook.com/identica/', now()),
+ ('feed2omb','feed2omb','http://projects.ciarang.com/p/feed2omb/', now()),
('Gwibber','Gwibber','http://launchpad.net/gwibber', now()),
('HelloTxt','HelloTxt','http://hellotxt.com/', now()),
('identicatools','Laconica Tools','http://bitbucketlabs.net/laconica-tools/', now()),
@@ -23,6 +24,7 @@ VALUES
('peoplebrowsr', 'PeopleBrowsr', 'http://www.peoplebrowsr.com/', now()),
('Pikchur','Pikchur','http://www.pikchur.com/', now()),
('Ping.fm','Ping.fm','http://ping.fm/', now()),
+ ('pingvine','PingVine','http://pingvine.com/', now()),
('pocketwit','PockeTwit','http://code.google.com/p/pocketwit/', now()),
('posty','Posty','http://spreadingfunkyness.com/posty/', now()),
('royalewithcheese','Royale With Cheese','http://p.hellyeah.org/', now()),
@@ -42,6 +44,7 @@ VALUES
('twidge','Twidge','http://software.complete.org/twidge', now()),
('twidroid','twidroid','http://www.twidroid.com/', now()),
('twittelator','Twittelator','http://www.stone.com/iPhone/Twittelator/', now()),
+ ('twitter','Twitter','http://twitter.com/', now()),
('twitterfeed','twitterfeed','http://twitterfeed.com/', now()),
('twitterphoto','TwitterPhoto','http://richfish.org/twitterphoto/', now()),
('twitterpm','Net::Twitter','http://search.cpan.org/dist/Net-Twitter/', now()),