add repeat_of column to notice table

This commit is contained in:
Evan Prodromou 2009-12-11 10:20:32 -05:00
parent 63642dccf1
commit 3d06431787
4 changed files with 9 additions and 2 deletions

View File

@ -4,8 +4,10 @@ alter table notice
add column lon decimal(10,7) comment 'longitude', add column lon decimal(10,7) comment 'longitude',
add column location_id integer comment 'location id if possible', add column location_id integer comment 'location id if possible',
add column location_ns integer comment 'namespace for location', add column location_ns integer comment 'namespace for location',
add column repeat_of integer comment 'notice this is a repeat of' references notice (id),
drop index notice_profile_id_idx, drop index notice_profile_id_idx,
add index notice_profile_id_idx (profile_id,created,id); add index notice_profile_id_idx (profile_id,created,id),
add index notice_repeatof_idx (repeat_of);
alter table message alter table message
modify column content text comment 'message content'; modify column content text comment 'message content';

View File

@ -74,6 +74,7 @@ ALTER TABLE notice ADD COLUMN lat decimal(10, 7) /* comment 'latitude'*/;
ALTER TABLE notice ADD COLUMN lon decimal(10,7) /* comment 'longitude'*/; ALTER TABLE notice ADD COLUMN lon decimal(10,7) /* comment 'longitude'*/;
ALTER TABLE notice ADD COLUMN location_id integer /* comment 'location id if possible'*/ ; ALTER TABLE notice ADD COLUMN location_id integer /* comment 'location id if possible'*/ ;
ALTER TABLE notice ADD COLUMN location_ns integer /* comment 'namespace for location'*/; ALTER TABLE notice ADD COLUMN location_ns integer /* comment 'namespace for location'*/;
ALTER TABLE notice ADD COLUMN repeat_of integer / * comment 'notice this is a repeat of' */ references notice (id);
ALTER TABLE profile ADD COLUMN lat decimal(10,7) /*comment 'latitude'*/ ; ALTER TABLE profile ADD COLUMN lat decimal(10,7) /*comment 'latitude'*/ ;
ALTER TABLE profile ADD COLUMN lon decimal(10,7) /*comment 'longitude'*/; ALTER TABLE profile ADD COLUMN lon decimal(10,7) /*comment 'longitude'*/;

View File

@ -129,11 +129,13 @@ create table notice (
lon decimal(10,7) comment 'longitude', lon decimal(10,7) comment 'longitude',
location_id integer comment 'location id if possible', location_id integer comment 'location id if possible',
location_ns integer comment 'namespace for location', location_ns integer comment 'namespace for location',
repeat_of integer comment 'notice this is a repeat of' references notice (id),
index notice_profile_id_idx (profile_id,created,id), index notice_profile_id_idx (profile_id,created,id),
index notice_conversation_idx (conversation), index notice_conversation_idx (conversation),
index notice_created_idx (created), index notice_created_idx (created),
index notice_replyto_idx (reply_to), index notice_replyto_idx (reply_to),
index notice_repeatof_idx (repeat_of),
FULLTEXT(content) FULLTEXT(content)
) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci; ) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci;

View File

@ -135,7 +135,9 @@ create table notice (
lat decimal(10,7) /* comment 'latitude'*/ , lat decimal(10,7) /* comment 'latitude'*/ ,
lon decimal(10,7) /* comment 'longitude'*/ , lon decimal(10,7) /* comment 'longitude'*/ ,
location_id integer /* comment 'location id if possible'*/ , location_id integer /* comment 'location id if possible'*/ ,
location_ns integer /* comment 'namespace for location'*/ location_ns integer /* comment 'namespace for location'*/ ,
repeat_of integer /* comment 'notice this is a repeat of' */ references notice (id) ,
/* FULLTEXT(content) */ /* FULLTEXT(content) */
); );