[Dovecot] expire: mysql table creation error
Timo Sirainen
tss at iki.fi
Fri May 29 00:15:51 EEST 2009
On Thu, 2009-05-28 at 08:04 +0200, John Fawcett wrote:
> but maybe that's not such a good primary key,
> probably better to do:
>
> mysql> CREATE TABLE expires (
> -> id integer not null auto_increment,
> -> username varchar(100) not null,
> -> mailbox varchar(255) not null,
> -> expire_stamp integer not null,
> -> primary key (id),
> -> key (username, mailbox(200))
> -> );
> Query OK, 0 rows affected (0.00 sec)
Nothing uses the id, so I don't really see a point in having primary key
at all then. You could instead create a unique index on (username,
mailbox), unless MySQL disallows that too.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20090528/de8a3e5e/attachment.bin
More information about the dovecot
mailing list