forked from GNUsocial/gnu-social
change queue_item to use a compound primary key
Breaking up to use multiple queue handlers means we need multiple queue items for the same notice. So, change the queue_item table to have a compound pkey, (notice_id,transport). darcs-hash:20080827211239-84dde-db118799bfd43be62fb02380829c64813c9334f8.gz
This commit is contained in:
parent
f59ead93ee
commit
35ed6f473c
@ -11,7 +11,7 @@ class Queue_item extends DB_DataObject
|
||||
|
||||
public $__table = 'queue_item'; // table name
|
||||
public $notice_id; // int(4) primary_key not_null
|
||||
public $transport; // varchar(8) not_null
|
||||
public $transport; // varchar(8) primary_key not_null
|
||||
public $created; // datetime() not_null
|
||||
public $claimed; // datetime()
|
||||
|
||||
|
@ -154,6 +154,7 @@ claimed = 14
|
||||
|
||||
[queue_item__keys]
|
||||
notice_id = K
|
||||
transport = K
|
||||
|
||||
[remember_me]
|
||||
code = 130
|
||||
|
@ -233,11 +233,12 @@ create table remember_me (
|
||||
|
||||
create table queue_item (
|
||||
|
||||
notice_id integer not null primary key comment 'notice queued' references notice (id),
|
||||
notice_id integer not null comment 'notice queued' references notice (id),
|
||||
transport varchar(8) not null comment 'queue for what? "email", "jabber", "sms", "irc", ...',
|
||||
created datetime not null comment 'date this record was created',
|
||||
claimed datetime comment 'date this item was claimed',
|
||||
|
||||
constraint primary key (notice_id, transport),
|
||||
index queue_item_created_idx (created)
|
||||
|
||||
) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_bin;
|
||||
|
Loading…
Reference in New Issue
Block a user