Skip to content

Modules: Avoid error when calling an uninstall function with "DROP TABLE" #1176

@blackcoder87

Description

@blackcoder87

Describe the bug
Calling the uninstall function of a not installed module can cause an error if "DROP TABLE" is used. "DROP TABLE" without the "IF EXISTS" clause throws an error if the table doesn't exist. You might want to call the uninstall function of a module to make sure there are no leftovers of a failed module install in the database.

See: https://dev.mysql.com/doc/refman/5.7/en/drop-table.html

application\modules\kvteam\config\config.php (1 Treffer)
    Zeile 38:         $this->db()->queryMulti('DROP TABLE `[prefix]_kvteam`');
application\modules\kvticket\config\config.php (2 Treffer)
    Zeile  37:         $this->db()->queryMulti('DROP TABLE `[prefix]_kvticket`');
    Zeile  38:         $this->db()->queryMulti('DROP TABLE `[prefix]_kvticket_cat`');

Additional context
https://dev.mysql.com/doc/refman/5.7/en/drop-table.html
#1175

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugThe issue documents broken, incorrect, or confusing behavior.good first issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions