]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - db/laconica_pg.sql
Merge branch '0.7.x' into 0.8.x
[quix0rs-gnu-social.git] / db / laconica_pg.sql
index f879d7936ff1c83cf62957c9d9155de84a0abf7c..b213bbd5021f6383822f369586857164a8731a73 100644 (file)
@@ -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' */,\r
      friendsync int not null default 2 /* comment 'friend synchronisation, bit 1 = sync outgoing, bit 2 = sync incoming */, \r
      profilesync int not null default 1 /* comment 'profile synchronization, bit 1 = sync outgoing, bit 2 = sync incoming' */,\r
+     last_noticesync timestamp default null /* comment 'last time notices were imported' */,\r
+     last_friendsync timestamp default null /* comment 'last time friends were imported' */,\r
      created timestamp not null default CURRENT_TIMESTAMP /* comment 'date this record was created' */,\r
      modified timestamp /* comment 'date this record was modified' */,\r
 \r
@@ -425,6 +427,64 @@ create table group_inbox (
 );\r
 create index group_inbox_created_idx on group_inbox using btree(created);\r
 \r
+\r
+/*attachments and URLs stuff */\r
+create sequence file_seq;\r
+create table file (\r
+    id bigint default nextval('file_seq') primary key /* comment 'unique identifier' */,\r
+    url varchar(255) unique, \r
+    mimetype varchar(50), \r
+    size integer, \r
+    title varchar(255), \r
+    date integer(11), \r
+    protected integer(1)\r
+);\r
+\r
+create sequence file_oembed_seq;\r
+create table file_oembed (\r
+    id bigint default nextval('file_oembed_seq') primary key /* comment 'unique identifier' */,\r
+    file_id bigint unique,\r
+    version varchar(20),\r
+    type varchar(20),\r
+    provider varchar(50),\r
+    provider_url varchar(255),\r
+    width integer,\r
+    height integer,\r
+    html text,\r
+    title varchar(255),\r
+    author_name varchar(50), \r
+    author_url varchar(255), \r
+    url varchar(255), \r
+);\r
+\r
+create sequence file_redirection_seq;\r
+create table file_redirection (\r
+    id bigint default nextval('file_redirection_seq') primary key /* comment 'unique identifier' */,\r
+    url varchar(255) unique, \r
+    file_id bigint, \r
+    redirections integer, \r
+    httpcode integer\r
+);\r
+\r
+create sequence file_thumbnail_seq;\r
+create table file_thumbnail (\r
+    id bigint default nextval('file_thumbnail_seq') primary key /* comment 'unique identifier' */,\r
+    file_id bigint unique, \r
+    url varchar(255) unique, \r
+    width integer, \r
+    height integer \r
+);\r
+\r
+create sequence file_to_post_seq;\r
+create table file_to_post (\r
+    id bigint default nextval('file_to_post_seq') primary key /* comment 'unique identifier' */,\r
+    file_id bigint, \r
+    post_id bigint, \r
+\r
+    unique(file_id, post_id)\r
+);\r
+\r
+\r
 /* Textsearch stuff */\r
 \r
 create index textsearch_idx on profile using gist(textsearch);\r