Saturday, December 12, 2015

Joomla: Installing Module throws the "updates" table error

While I was installing a module to the joomla 3.4.X,  I got the below error:

Table 'xxxx_updates' doesn't exist SQL=SHOW FULL COLUMNS FROM `updates` in joomla

And the installation failed. 

It's very easy to solve this issue.

I found that the "xxxx_updates" does not exist in the database Hence we get the above error. To solve this, we can remove this table from the database if exists and then recreate the table with the sql commands mentioned

Here xxxx is the string with the table name. You can replace this with your own string of the database.

To remove the table from table:

DROP TABLE xxxx_updates

To create the new table:

  `update_id` int(11) NOT NULL AUTO_INCREMENT,
  `update_site_id` int(11) DEFAULT 0,
  `extension_id` int(11) DEFAULT 0,
  `name` varchar(100) DEFAULT '',
  `description` text NOT NULL,
  `element` varchar(100) DEFAULT '',
  `type` varchar(20) DEFAULT '',
  `folder` varchar(20) DEFAULT '',
  `client_id` tinyint(3) DEFAULT 0,
  `version` varchar(32) DEFAULT '',
  `data` text NOT NULL,
  `detailsurl` text NOT NULL,
  `infourl` text NOT NULL,
  `extra_query` varchar(1000) DEFAULT '',
  PRIMARY KEY (`update_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Available Updates';

This solves the issue. Now try to install the new module And it installs successfully