summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/laconica_pg.sql15
1 files changed, 10 insertions, 5 deletions
diff --git a/db/laconica_pg.sql b/db/laconica_pg.sql
index d9e0c6da7..f879d7936 100644
--- a/db/laconica_pg.sql
+++ b/db/laconica_pg.sql
@@ -1,7 +1,8 @@
/* local and remote users have profiles */
+create sequence profile_seq;
create table profile (
- id serial primary key /* comment 'unique identifier' */,
+ id bigint default nextval('profile_seq') primary key /* comment 'unique identifier' */,
nickname varchar(64) not null /* comment 'nickname or username' */,
fullname varchar(255) /* comment 'display name' */,
profileurl varchar(255) /* comment 'URL, cached so we dont regenerate' */,
@@ -30,8 +31,9 @@ create table avatar (
);
create index avatar_profile_id_idx on avatar using btree(profile_id);
+create sequence sms_carrier_seq;
create table sms_carrier (
- id serial primary key /* comment 'primary key for SMS carrier' */,
+ id bigint default nextval('sms_carrier_seq') primary key /* comment 'primary key for SMS carrier' */,
name varchar(64) unique /* comment 'name of the carrier' */,
email_pattern varchar(255) not null /* comment 'sprintf pattern for making an email address from a phone number' */,
created timestamp not null default CURRENT_TIMESTAMP /* comment 'date this record was created' */,
@@ -101,9 +103,10 @@ create table subscription (
create index subscription_subscriber_idx on subscription using btree(subscriber);
create index subscription_subscribed_idx on subscription using btree(subscribed);
+create sequence notice_seq;
create table notice (
- id serial primary key /* comment 'unique identifier' */,
+ id bigint default nextval('notice_seq') primary key /* comment 'unique identifier' */,
profile_id integer not null /* comment 'who made the update' */ references profile (id) ,
uri varchar(255) unique /* comment 'universally unique identifier, usually a tag URI' */,
content varchar(140) /* comment 'update content' */,
@@ -317,9 +320,10 @@ create table invitation (
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 sequence message_seq;
create table message (
- id serial primary key /* comment 'unique identifier' */,
+ id bigint default nextval('message_seq') 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),
@@ -367,9 +371,10 @@ create table profile_block (
);
+create sequence user_group_seq;
create table user_group (
- id serial primary key /* comment 'unique identifier' */,
+ id bigint default nextval('user_group_seq') primary key /* comment 'unique identifier' */,
nickname varchar(64) unique /* comment 'nickname for addressing' */,
fullname varchar(255) /* comment 'display name' */,