How to "reload" a custom module after code changes
If you have your attribute in adminhtml it means that you have used your sql script (InstalData.php) at least once. Sql scripts are run when you run setup:upgrade
.
Take a look at table setup_module
. Here you can find all modules and their versions. You should also find yours. There is a column data_version
or something like that. If you want to modify our attribute programatically (from sql script) you have to delete row with your module version and run setup:upgrade
again. Before it, you should also delete your attribute (I think the best way to do it is from adminhtml, not directly in DB). Than when command is executed you should have your attribute with changes, of course if they are correct.
There is other way to make changes - Upgrade script, then apart preparing script itself you have to change your module version for higher one.
Take a look at this: http://inchoo.net/magento-2/setup-scripts-magento-2/