DB query failed: Unknown column ’serial’ in ‘field list’

After upgrading plesk from version 8.4 to 8.6, you may encounter the following error while deactivating a domain.

Plesk >> Domains >> domain.com

Error:

DB query failed: Unknown column ’serial’ in ‘field list’
———————- Debug Info ——————————-
0: plib\common_func.php3:243
db_query(string ’select `id`, `name`, `displayName`, `email`, `status`, `type`, `ttl`, `ttl_unit`, `refresh`, `refresh_unit`, `retry`, `retry_unit`, `expire`, `expire_unit`, `minimum`, `minimum_unit`, `serial`, `serial_format` from `dns_zone` where `id`=311′)
1: plib\class.Table.php:189
Table->select()
2: plib\dns\DNSZone.php:49
DNSZone->DNSZone(string ‘311′)
3: plib\common_func.php3:2929
objectMaker(string ‘DNSZone’, string ‘311′)
4: plib\dns\DNSManager.php:34
DNSManager::getDNSZone(string ‘311′)
5: plib\class.Domain.php:787
Domain->getDNSZone()
6: plib\class.Domain.php:244
Domain->turnOff(integer ‘16′, integer ‘0′, boolean false)
7: plib\class.BsDomain.php:417
BsDomain->turnOff()
8: htdocs\domains\dom_ctrl.php3:107

Cause:

Due to the missing entries “serial” and “serial_format” in the table “dns_zone”(under psa database).

Solution:

mysql -u admin -p `cat /etc/psa/.psa.shadow`
(Log in to mysql using Plesk’s stored password)

mysql> use psa
(Select Plesk’s database)

mysql> describe dns_zone;
(Check if there are rows titled serial and serial_format. If not, perform the steps below)

mysql> ALTER TABLE `dns_zone` add `serial` VARCHAR( 12 ) CHARACTER SET ascii COLLATE ascii_bin NOT NULL DEFAULT ‘0′;
mysql> ALTER TABLE `dns_zone` add `serial_format` ENUM( ‘UNIXTIMESTAMP’, ‘YYYYMMDDNN’ ) NOT NULL DEFAULT ‘UNIXTIMESTAMP’;
(Add the appropriate rows to the dns_zone table.)

describe dns_zone;
Should look something like:

+—————+————————————+——+—–+—————+—————-+
| Field | Type | Null | Key | Default | Extra |
+—————+————————————+——+—–+—————+—————-+
| id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| name | varchar(255) | NO | | | |
| displayName | varchar(255) | NO | | | |
| status | int(10) unsigned | NO | | 0 | |
| email | varchar(255) | YES | | NULL | |
| type | enum(’slave’,'master’) | NO | | master | |
| ttl | int(10) unsigned | NO | | 86400 | |
| ttl_unit | int(10) unsigned | NO | | 1 | |
| refresh | int(10) unsigned | NO | | 10800 | |
| refresh_unit | int(10) unsigned | NO | | 1 | |
| retry | int(10) unsigned | NO | | 3600 | |
| retry_unit | int(10) unsigned | NO | | 1 | |
| expire | int(10) unsigned | NO | | 604800 | |
| expire_unit | int(10) unsigned | NO | | 1 | |
| minimum | int(10) unsigned | NO | | 10800 | |
| minimum_unit | int(10) unsigned | NO | | 1 | |
| serial | varchar(12) | NO | | 0 | |
| serial_format | enum(’UNIXTIMESTAMP’,'YYYYMMDDNN’) | NO | | UNIXTIMESTAMP | |
+—————+————————————+——+—–+—————+—————-+
18 rows in set (0.00 sec)

One Response to “DB query failed: Unknown column ’serial’ in ‘field list’”

  1. 3stimulion 13 Jan 2022 at 1:58 am

    3chaotic…

Trackback URI | Comments RSS

Leave a Reply

You must be logged in to post a comment.