]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - db/08to09_pg.sql
de6a822090fce394fb8784cc9df308eb3c60584c
[quix0rs-gnu-social.git] / db / 08to09_pg.sql
1 -- SQL commands to update an 0.8.x version of Laconica
2 -- to 0.9.x.
3
4 --these are just comments
5 /*
6 alter table notice
7      modify column content text comment 'update content';
8
9 alter table message
10      modify column content text comment 'message content';
11
12 alter table profile
13      modify column bio text comment 'descriptive biography';
14
15 alter table user_group
16      modify column description text comment 'group description';
17 */
18
19 alter table file_oembed
20      add column mimetype varchar(50) /*comment 'mime type of resource'*/;
21
22 create table config (
23
24     section varchar(32) /* comment 'configuration section'*/,
25     setting varchar(32) /* comment 'configuration setting'*/,
26     value varchar(255) /* comment 'configuration value'*/,
27
28     primary key (section, setting)
29
30 );
31
32 create table profile_role (
33
34     profile_id integer not null /* comment 'account having the role'*/ references profile (id),
35     role    varchar(32) not null /* comment 'string representing the role'*/,
36     created timestamp /* not null comment 'date the role was granted'*/,
37
38     primary key (profile_id, role)
39
40 );
41
42 DROP index fave_user_id_idx;
43 CREATE index fave_user_id_idx on fave (user_id,modified);
44
45 DROP index subscription_subscriber_idx;
46 CREATE index subscription_subscriber_idx ON subscription (subscriber,created);
47
48 DROP index subscription_subscribed_idx;
49 CREATE index subscription_subscribed_idx ON subscription (subscribed,created);
50
51 DROP index notice_profile_id_idx;
52 CREATE index notice_profile_id_idx ON notice (profile_id,created,id);