Topic: Unknown column 'expires'
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version: CentOS 7.6.1810
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
I manually upgraded the server from 0.8.3 to 0.9.9. After executing
/usr/bin/php /opt/www/roundcubemail/bin/gc.sh >/dev/null
root receives mail:
ERROR: [1054] Unknown column 'expires' in 'where clause' (SQL Query: DELETE FROM `cache` WHERE `expires` < now())
ERROR: [1054] Unknown column 'expires' in 'where clause' (SQL Query: DELETE FROM `cache_messages` WHERE `expires` < now())
ERROR: [1054] Unknown column 'expires' in 'where clause' (SQL Query: DELETE FROM `cache_index` WHERE `expires` < now())
ERROR: [1054] Unknown column 'expires' in 'where clause' (SQL Query: DELETE FROM `cache_thread` WHERE `expires` < now())
I have the following in the roundcubemail database:
MariaDB [roundcubemail]> SHOW TABLES;
+-------------------------+
| Tables_in_roundcubemail |
+-------------------------+
| cache |
| cache_index |
| cache_messages |
| cache_shared |
| cache_thread |
| contactgroupmembers |
| contactgroups |
| contacts |
| dictionary |
| forgot_password |
| identities |
| notes |
| searches |
| session |
| system |
| users |
+-------------------------+
MariaDB [roundcubemail]> SHOW COLUMNS FROM cache;
+-----------+------------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+------------------+------+-----+---------------------+----------------+
| cache_id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| cache_key | varchar(128) | NO | | NULL | |
| created | datetime | NO | MUL | 1000-01-01 00:00:00 | |
| data | longtext | NO | | NULL | |
| user_id | int(10) unsigned | NO | MUL | NULL | |
+-----------+------------------+------+-----+---------------------+----------------+
MariaDB [roundcubemail]> SHOW COLUMNS FROM cache_messages;
+---------+------------------+------+-----+---------------------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+------------------+------+-----+---------------------+-------+
| user_id | int(10) unsigned | NO | PRI | NULL | |
| mailbox | varchar(255) | NO | PRI | NULL | |
| uid | int(11) unsigned | NO | PRI | 0 | |
| changed | datetime | NO | MUL | 1000-01-01 00:00:00 | |
| data | longtext | NO | | NULL | |
| flags | int(11) | NO | | 0 | |
+---------+------------------+------+-----+---------------------+-------+
MariaDB [roundcubemail]> SHOW COLUMNS FROM cache_index;
+---------+------------------+------+-----+---------------------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+------------------+------+-----+---------------------+-------+
| user_id | int(10) unsigned | NO | PRI | NULL | |
| mailbox | varchar(255) | NO | PRI | NULL | |
| changed | datetime | NO | MUL | 1000-01-01 00:00:00 | |
| valid | tinyint(1) | NO | | 0 | |
| data | longtext | NO | | NULL | |
+---------+------------------+------+-----+---------------------+-------+
MariaDB [roundcubemail]> SHOW COLUMNS FROM cache_thread;
+---------+------------------+------+-----+---------------------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+------------------+------+-----+---------------------+-------+
| user_id | int(10) unsigned | NO | PRI | NULL | |
| mailbox | varchar(255) | NO | PRI | NULL | |
| changed | datetime | NO | MUL | 1000-01-01 00:00:00 | |
| data | longtext | NO | | NULL | |
+---------+------------------+------+-----+---------------------+-------+
I did not find 'expires' in the upgrade tutorials. How do I fix the error?
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.