Time for action – adding additional fields to the host table
Besides the country information, the plugin is also going to store the site and room information. You're not going to store this information in a new table, but will instead add new columns to the existing host table. Let's look at how you can do this. You're going to use Example 2 for this. As a preparation, you should now disable and uninstall the plugin from Example 1.
- Open the
setup.phpfile from Example 2.
- Go to the
- Search for the following code:
/* The additional columns are missing here --->*/ /* <--- */
- Between these two lines, enter the following code:
api_plugin_db_add_column ('cbEnhancedInfo', 'host', array('name' => 'ebEnhancedInfo_country', ...