1 -- SQL commands to update an 0.8.x version of Laconica
4 --these are just comments
7 modify column content text comment 'update content';
10 modify column content text comment 'message content';
13 modify column bio text comment 'descriptive biography';
15 alter table user_group
16 modify column description text comment 'group description';
19 alter table file_oembed
20 add column mimetype varchar(50) /*comment 'mime type of resource'*/;
24 section varchar(32) /* comment 'configuration section'*/,
25 setting varchar(32) /* comment 'configuration setting'*/,
26 value varchar(255) /* comment 'configuration value'*/,
28 primary key (section, setting)
32 create table user_role (
34 user_id integer not null /* comment 'user having the role'*/ references "user" (id),
35 role varchar(32) not null /* comment 'string representing the role'*/,
36 created timestamp /* not null comment 'date the role was granted'*/,
38 primary key (user_id, role)
42 create table login_token (
43 user_id integer not null /* comment 'user owning this token'*/ references "user" (id),
44 token char(32) not null /* comment 'token useable for logging in'*/,
45 created timestamp not null DEFAULT CURRENT_TIMESTAMP /* comment 'date this record was created'*/,
46 modified timestamp /* comment 'date this record was modified'*/,
51 DROP index fave_user_id_idx;
52 CREATE index fave_user_id_idx on fave (user_id,modified);
54 DROP index subscription_subscriber_idx;
55 CREATE index subscription_subscriber_idx ON subscription (subscriber,created);
57 DROP index subscription_subscribed_idx;
58 CREATE index subscription_subscribed_idx ON subscription (subscribed,created);
60 DROP index notice_profile_id_idx;
61 CREATE index notice_profile_id_idx ON notice (profile_id,created,id);