2 create sequence design_seq;
4 id bigint default nextval('design_seq') /* comment 'design ID'*/,
5 backgroundcolor integer /* comment 'main background color'*/ ,
6 contentcolor integer /*comment 'content area background color'*/ ,
7 sidebarcolor integer /*comment 'sidebar background color'*/ ,
8 textcolor integer /*comment 'text color'*/ ,
9 linkcolor integer /*comment 'link color'*/,
10 backgroundimage varchar(255) /*comment 'background image, if any'*/,
11 disposition int default 1 /*comment 'bit 1 = hide background image, bit 2 = display background image, bit 4 = tile background image'*/,
15 add column design_id integer references design(id);
17 add column viewdesigns integer default 1;
19 alter table notice add column
20 conversation integer references notice (id);
22 create index notice_conversation_idx on notice(conversation);
24 alter table foreign_user
25 alter column id TYPE bigint;
27 alter table foreign_user alter column id set not null;
29 alter table foreign_link
30 alter column foreign_id TYPE bigint;
32 alter table user_group
33 add column design_id integer;
35 /*attachments and URLs stuff */
36 create sequence file_seq;
38 id bigint default nextval('file_seq') primary key /* comment 'unique identifier' */,
39 url varchar(255) unique,
45 filename text /* comment 'if a local file, name of the file' */,
46 modified timestamp default CURRENT_TIMESTAMP /* comment 'date this record was modified'*/
49 create sequence file_oembed_seq;
50 create table file_oembed (
51 file_id bigint default nextval('file_oembed_seq') primary key /* comment 'unique identifier' */,
55 provider_url varchar(255),
60 author_name varchar(50),
61 author_url varchar(255),
65 create sequence file_redirection_seq;
66 create table file_redirection (
67 url varchar(255) primary key,
73 create sequence file_thumbnail_seq;
74 create table file_thumbnail (
75 file_id bigint primary key,
76 url varchar(255) unique,
80 create sequence file_to_post_seq;
81 create table file_to_post (
85 primary key (file_id, post_id)
89 create table group_block (
90 group_id integer not null /* comment 'group profile is blocked from' */ references user_group (id),
91 blocked integer not null /* comment 'profile that is blocked' */references profile (id),
92 blocker integer not null /* comment 'user making the block'*/ references "user" (id),
93 modified timestamp /* comment 'date of blocking'*/ ,
95 primary key (group_id, blocked)
98 create table group_alias (
100 alias varchar(64) /* comment 'additional nickname for the group'*/ ,
101 group_id integer not null /* comment 'group profile is blocked from'*/ references user_group (id),
102 modified timestamp /* comment 'date alias was created'*/,
106 create index group_alias_group_id_idx on group_alias (group_id);