What is the purpose behind having DROP TABLE IF EXISTS in commented SQL in Magento installers?

From app/code/core/Mage/Admin/sql/admin_setup/mysql4-install-0.7.0.php:

-- DROP TABLE IF EXISTS {$this->getTable('admin_assert')};
CREATE TABLE {$this->getTable('admin_assert')} (

I know in mysqldump certain comments can be executed - how is this used in Magento setup scripts?

1 Answer 1


I'm sure it was inserted for debugging purposes to test the creation of the table.

Then it was commented to not use it anymore and forgotten :)

Look on the version, it is pre-beta.

  • That's what I thought, too, but it's used on the 1.4+ installer for Mage_Catalog, too: app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-install-
    – philwinkle
    Commented Jul 25, 2013 at 21:40
  • 1
    Yep, not intended for evaluation. Consider this similar to all of the commented out code in Magento... (ex)
    – benmarks
    Commented Jul 26, 2013 at 0:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.