plugin to alter table change column name and update schema

2 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: September 6   (RSS)

By daniel - September 6

Hi Jeff,

It's possible to make modifications to schemas using the loadSchema() and saveSchema() functions. Specifically, if you want to rename a field, you could do something like this:

  $schema = loadSchema('table_name');
  $schema['field_key']['label'] = 'New Label';
  saveSchema('table_name', $schema);

You'd just need to substitute your own table/field values.

Let me know if you have any questions!

Thanks,

Daniel
Technical Lead
interactivetools.com