Anybody have any idea/suggestion about creating Magento 2(CE Stable version) Upgrade Script(in custom-module) for adding/updating new field into custom table ?
I know about "InstallSchema" but is there something like "UpgradeSchema" for upgrading the module tables ?
Please explain in detail with examples.
Best Answer
create a
app\code\Sugarcode\Test\Setup\UpgradeSchema.php
and run upgrade commandwhen ever version was changed just change in module.xml and in UpgradeSchema.php add one more if condition with version compare
so when you run upgrade command it will run
UpgradeSchema.php
file and in that it will compare the version based on that version it will execute the codeex
module.xml
if it works accept the answer by clicking right symbol