General developer forum

Backing up a table not linked to any other

Picture of Marcus Green
Backing up a table not linked to any other
Core developersParticularly helpful MoodlersPlugin developersTesters

I am writing the backup/restore code for a plugin. The plugin includes a table that will be used by every instance of the plugin as a reference (which field names can be displayed). In some senses it is a bit like the values that are put in a plugins settings file, but we want it to be backed up and restored in each instance.

My question is how can I code this in the stepslib file. The other tables are using set_source_table and I was wondering if I should be using set_source_table but I cannot think of a way of telling it to always backup every record rather than backing up selectively based on the values in another table. Any clues?

Average of ratings: -