0

MySQL4 is largely obsolete now, even Magento 1 latest versions send a warning if you use Mysql4 prefixed classes. I searched if the setup file names also had this deprecation but couldn't find a thing.

Is this a choice from the Magento team and is there a reason behind it ?

asked Jan 27, 2020 at 16:37

1 Answer 1

0

They dont need them

https://inchoo.net/magento/magento-install-install-upgrade-data-and-data-upgrade-scripts/

Create the installation file app/code/community/Inchoo/DBScript/sql/inchoo_dbscript_setup/install-3.1.5.6.php with the content like shown below.

<?php
$installer = $this;
$installer->startSetup();
$table = $installer->getConnection()
 ->newTable($installer->getTable('inchoo_dbscript/ticket'))
 ->addColumn('ticket_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
 'identity' => true,
 'unsigned' => true,
 'nullable' => false,
 'primary' => true,
 ), 'Id')
 ->addColumn('title', Varien_Db_Ddl_Table::TYPE_VARCHAR, null, array(
 'nullable' => false,
 ), 'Title')
 ->addColumn('description', Varien_Db_Ddl_Table::TYPE_TEXT, null, array(
 'nullable' => false,
 ), 'Description');
$installer->getConnection()->createTable($table);
$table = $installer->getConnection()
 ->newTable($installer->getTable('inchoo_dbscript/comment'))
 ->addColumn('comment_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
 'identity' => true,
 'unsigned' => true,
 'nullable' => false,
 'primary' => true,
 ), 'Id')
 ->addColumn('comment', Varien_Db_Ddl_Table::TYPE_VARCHAR, null, array(
 'nullable' => false,
 ), 'Comment');
$installer->getConnection()->createTable($table);
$installer->endSetup();

Or are you saying why no warning? Warning on file names is harder to scan for than class names

answered Jan 28, 2020 at 20:56

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.