SQL-DROP-NO-EXISTS-001

DROP TABLE `#__lms_old`;

DROP TABLE without IF EXISTS

Reinstall and update SQL fail hard if the table is already gone. Joomla 4 installers expect IF EXISTS.

DROP TABLE `#__lms_old`;DROP TABLE IF EXISTS `#__lms_old`;

Dies at Joomla 3 → 4J3: Works nativelyJ4: Removed — fatalJ6: Removed — fatalBC plugin: no — already dead on J4Mechanical renameSQL / schema

What you will see

  • SQLSTATE[42S02]
  • Table doesn't exist

Symptoms people search

uninstall sql error · DROP TABLE

Replace this code

Swap DROP TABLE `#__lms_old`; for DROP TABLE IF EXISTS `#__lms_old`;.

Joomla 3

Remove or stop calling this

DROP TABLE `#__lms_courses`;

Joomla 4 / 6

Use this instead

DROP TABLE IF EXISTS `#__lms_courses`;

How to fix it

  1. 1Add IF EXISTS to every DROP in install/uninstall SQL.

Also known as

DROP TABLE · IF EXISTS

Related issues

Get in touch

Have a project in mind? Let's talk about it.

Tell us what you're building. Whether it's a new site, an online store, a mobile app, or something that needs AI under the hood, we'll get back to you within a business day.

Free consultation
No commitment, no pressure
Reply within 24 hours
Usually much faster

Prefer a direct conversation?

Request a project quote

Tell us about your project

Fill out the quick form and we'll reach out.