2 modify column content text comment 'update content',
3 add column lat decimal(10,7) comment 'latitude',
4 add column lon decimal(10,7) comment 'longitude',
5 add column location_id integer comment 'location id if possible',
6 add column location_ns integer comment 'namespace for location',
7 add column repeat_of integer comment 'notice this is a repeat of' references notice (id),
8 drop index notice_profile_id_idx,
9 add index notice_profile_id_idx (profile_id,created,id),
10 add index notice_repeatof_idx (repeat_of);
13 modify column content text comment 'message content';
16 modify column bio text comment 'descriptive biography',
17 add column lat decimal(10,7) comment 'latitude',
18 add column lon decimal(10,7) comment 'longitude',
19 add column location_id integer comment 'location id if possible',
20 add column location_ns integer comment 'namespace for location';
22 alter table user_group
23 modify column description text comment 'group description';
25 alter table file_oembed
26 add column mimetype varchar(50) comment 'mime type of resource';
29 drop index fave_user_id_idx,
30 add index fave_user_id_idx (user_id,modified);
32 alter table subscription
33 drop index subscription_subscriber_idx,
34 add index subscription_subscriber_idx (subscriber,created),
35 drop index subscription_subscribed_idx,
36 add index subscription_subscribed_idx (subscribed,created);
38 create table deleted_notice (
40 id integer primary key comment 'identity of notice',
41 profile_id integer not null comment 'author of the notice',
42 uri varchar(255) unique key comment 'universally unique identifier, usually a tag URI',
43 created datetime not null comment 'date the notice record was created',
44 deleted datetime not null comment 'date the notice record was created',
46 index deleted_notice_profile_id_idx (profile_id)
48 ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
52 section varchar(32) comment 'configuration section',
53 setting varchar(32) comment 'configuration setting',
54 value varchar(255) comment 'configuration value',
56 constraint primary key (section, setting)
58 ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
60 create table profile_role (
62 profile_id integer not null comment 'account having the role' references profile (id),
63 role varchar(32) not null comment 'string representing the role',
64 created datetime not null comment 'date the role was granted',
66 constraint primary key (profile_id, role)
68 ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
70 create table location_namespace (
72 id integer primary key comment 'identity for this namespace',
73 description varchar(255) comment 'description of the namespace',
74 created datetime not null comment 'date the record was created',
75 modified timestamp comment 'date this record was modified'
77 ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
79 create table login_token (
80 user_id integer not null comment 'user owning this token' references user (id),
81 token char(32) not null comment 'token useable for logging in',
82 created datetime not null comment 'date this record was created',
83 modified timestamp comment 'date this record was modified',
85 constraint primary key (user_id)
86 ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
88 create table user_location_prefs (
89 user_id integer not null comment 'user who has the preference' references user (id),
90 share_location tinyint default 1 comment 'Whether to share location data',
91 created datetime not null comment 'date this record was created',
92 modified timestamp comment 'date this record was modified',
94 constraint primary key (user_id)
95 ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
97 create table queue_item_new (
98 id integer auto_increment primary key comment 'unique identifier',
99 frame blob not null comment 'data: object reference or opaque string',
100 transport varchar(8) not null comment 'queue for what? "email", "jabber", "sms", "irc", ...',
101 created datetime not null comment 'date this record was created',
102 claimed datetime comment 'date this item was claimed',
104 index queue_item_created_idx (created)
106 ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
108 insert into queue_item_new (frame,transport,created,claimed)
109 select notice_id,transport,created,claimed from queue_item;
110 alter table queue_item rename to queue_item_old;
111 alter table queue_item_new rename to queue_item;
113 alter table file_to_post
114 add index post_id_idx (post_id);
116 alter table group_inbox
117 add index group_inbox_notice_id_idx (notice_id);