1 (edited by Pokey 2014-08-07 08:16:23)

Topic: ERROR 1054 (42S22): Unknown column 'islist' in 'field list'

==== Required information ====
- iRedMail version: 0.8.7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: CentOS 6.5
====

Hello,

I am trying to migrate data from an old iRedMail 0.8.4 server to a new one 0.8.7 using the instructions here:

http://www.iredmail.org/wiki/index.php? … l_accounts

When I get to the point of cleaning up the database after import (under "MySQL/PostgreSQL: Migrate mail accounts"), the following command gives me an error message:

mysql> UPDATE alias SET islist=1 WHERE address NOT IN (SELECT username FROM mailbox);
ERROR 1054 (42S22): Unknown column 'islist' in 'field list'
mysql>

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: ERROR 1054 (42S22): Unknown column 'islist' in 'field list'

Sorry about my mistake, forgot to mention you should add it first:

sql> ALTER TABLE alias ADD COLUMN islist TINYINT(1) NOT NULL DEFAULT 0;

If you're running PostgreSQL, please use 'INT2' instead of 'TINYINT(1)'.

3

Re: ERROR 1054 (42S22): Unknown column 'islist' in 'field list'

ZhangHuangbin wrote:

Sorry about my mistake, forgot to mention you should add it first:

sql> ALTER TABLE alias ADD COLUMN islist TINYINT(1) NOT NULL DEFAULT 0;

If you're running PostgreSQL, please use 'INT2' instead of 'TINYINT(1)'.

Thank you Zhang, that got me a bit further. I also need the command for adding the domain.settings column.

4

Re: ERROR 1054 (42S22): Unknown column 'islist' in 'field list'

I assume it would be this?

 ALTER TABLE domain ADD COLUMN settings TEXT;

5

Re: ERROR 1054 (42S22): Unknown column 'islist' in 'field list'

Pokey wrote:

I assume it would be this?

 ALTER TABLE domain ADD COLUMN settings TEXT;

You can check iRedMail SQL template file:
iRedMail-0.8.7/samples/iredmail.mysql (and/or iredmail.pgsql)

6

Re: ERROR 1054 (42S22): Unknown column 'islist' in 'field list'

Hurray! It worked!

Thanks you saved me a huge headache of having to reconfigure multiple mail accounts (and contact all the users and inform them of new passwords etc.)

Thank you Zhang!