If I create need custom fields for a module, is it possible to copy all those changes over to a completely different installation of Suite? If so, what needs to be copied?
If possible, my first guess would be:
- The table structure (not the data) of the _cstm table for that module.
- Copy the fields_meta_data table
- Copy the custom/modules/{module name}/Ext/Vardefs/vardefs.ext.php
Anything else?
What about if I want to copy layouts, such as the Case module edit and detail view layouts? What files would I need to copy?
To copy just a new table structure to a pre-existing table, this is what I assume is how to do it:
A phpmyadmin variant would be to export the table’s structure only (Export->Custom->Choose “Structure”). After that, you will get something like this in the exported SQL file:
CREATE TABLE table
(
id
int(10) NOT NULL,
name
varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
At that point, you can go ahead and remove the last line of the query and the parenthesis after the CREATE TABLE. Then, go ahead and substitute the [other_table] name and change the query to match the following:
ALTER TABLE [other_table]
ADD id
int(10) NOT NULL,
ADD name
varchar(50) DEFAULT NULL;
Notice how all I did was change CREATE to ALTER and add ADD before each field.
This is obviously not an example specific to Suite. In case of suite, you would also delete all the fields that are pre-existing and only leave the new fields (that would be at the end of the list.)