X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=db%2Flaconica_pg.sql;h=e784bb16996fd0b3861cd270c7cc59631b05ea13;hb=fd7bc1f5653b59d9cb3116ea428b38074a5862bf;hp=ff11219d5db4a67c508d5844e3c73d3df5c465f8;hpb=3632a76773dbfc31cf6f99ad831bf13f793871ae;p=quix0rs-gnu-social.git diff --git a/db/laconica_pg.sql b/db/laconica_pg.sql index ff11219d5d..e784bb1699 100644 --- a/db/laconica_pg.sql +++ b/db/laconica_pg.sql @@ -47,6 +47,8 @@ create table "user" ( email varchar(255) unique /* comment 'email address for password recovery etc.' */, incomingemail varchar(255) unique /* comment 'email address for post-by-email' */, emailnotifysub integer default 1 /* comment 'Notify by email of subscriptions' */, + emailnotifyfav integer default 1 /* comment 'Notify by email of favorites' */, + emailnotifynudge integer default 1 /* comment 'Notify by email of nudges' */, emailmicroid integer default 1 /* comment 'whether to publish email microid' */, language varchar(50) /* comment 'preferred language' */, timezone varchar(50) /* comment 'timezone' */, @@ -63,6 +65,7 @@ create table "user" ( smsemail varchar(255) /* comment 'built from sms and carrier' */, uri varchar(255) unique /* comment 'universally unique identifier, usually a tag URI' */, autosubscribe integer default 0 /* comment 'automatically subscribe to users who subscribe to us' */, + urlshorteningservice varchar(50) default 'ur1.ca' /* comment 'service to use for auto-shortening URLs' */, created timestamp not null /* comment 'date this record was created' */, modified timestamp /* comment 'date this record was modified' */ @@ -218,7 +221,7 @@ create table confirm_address ( code varchar(32) not null primary key /* comment 'good random code' */, user_id integer not null /* comment 'user who requested confirmation' */ references "user" (id), address varchar(255) not null /* comment 'address (email, Jabber, SMS, etc.)' */, - address_extra varchar(255) not null /* comment 'carrier ID, for SMS' */, + address_extra varchar(255) not null default '' /* comment 'carrier ID, for SMS' */, address_type varchar(8) not null /* comment 'address type ("email", "jabber", "sms")' */, claimed timestamp /* comment 'date this was claimed for queueing' */, sent timestamp /* comment 'date this was sent for queueing' */, @@ -288,6 +291,35 @@ create table foreign_subscription ( create index foreign_subscription_subscriber_idx on foreign_subscription using btree(subscriber); create index foreign_subscription_subscribed_idx on foreign_subscription using btree(subscribed); +create table invitation ( + code varchar(32) not null primary key /* comment 'random code for an invitation' */, + user_id int not null /* comment 'who sent the invitation' */ references "user" (id), + address varchar(255) not null /* comment 'invitation sent to' */, + address_type varchar(8) not null /* comment 'address type ("email", "jabber", "sms") '*/, + created timestamp not null /* comment 'date this record was created' */ + +); +create index invitation_address_idx on invitation using btree(address,address_type); +create index invitation_user_id_idx on invitation using btree(user_id); + +create table message ( + + id serial primary key /* comment 'unique identifier' */, + uri varchar(255) unique /* comment 'universally unique identifier' */, + from_profile integer not null /* comment 'who the message is from' */ references profile (id), + to_profile integer not null /* comment 'who the message is to' */ references profile (id), + content varchar(140) /* comment 'message content' */, + rendered text /* comment 'HTML version of the content' */, + url varchar(255) /* comment 'URL of any attachment (image, video, bookmark, whatever)' */, + created timestamp not null /* comment 'date this record was created' */, + modified timestamp /* comment 'date this record was modified' */, + source varchar(32) /* comment 'source of comment, like "web", "im", or "clientname"' */ + +); +create index message_from_idx on message using btree(from_profile); +create index message_to_idx on message using btree(to_profile); +create index message_created_idx on message using btree(created); + /* Textsearch stuff */ create index textsearch_idx on profile using gist(textsearch);