I am creating an extension with a model file, it needs some new database tables to store data. Now the install() method does actually create 3 new tables as it should. However, the uninstall() method does not remove the tables from the database. When re-installing, as a result, it generates an error saying the tables already exist until I've manually removed the tables from the OC database. What am I missing?
Controller says:
(the file name is correct)
Code: Select all
public function uninstall() {
$this->load->model('extension/module/smanager');
$this->model_extension_module_smanager->uninstall();
}
Code: Select all
public function uninstall() {
$this->db->query("DROP TABLE IF EXISTS `" . DB_PREFIX . "sproduct`");
$this->db->query("DROP TABLE IF EXISTS `" . DB_PREFIX . "ssetting`");
$this->db->query("DROP TABLE IF EXISTS `" . DB_PREFIX . "slisting`");
}