-
☆ A M B ☆
- 165 Posts
I've been playing with PackMan, MIGX/MIGXdb to create custom packages.
I need to include actual data from some tables in my custom packages (countries of the world) for example, along with some snippets, chunks, etc.
Snippets, Chunks and directories are being packaged ok with PackMan, but i still need actual data from some tables to be transported.
I'm currently creating the tables from schema using MIGX after the package is installed in a new modx instance but i feel the need to insert this data when the package is installed to be able to use it right away.
How can i transport this data rows in the package?
without knowing your scenario, when, which datas, how often you need it.... its not easy to say what's the best way to do what you want.
You will need to create your own build-script to do it all at once.
(Creating the package, the tables, the records and import MIGXdb-settings)
it would also be possible with MIGXdb to export (filtered) records to a file in your package-folder in json-format whith a simple export-processor.
Then pack this directory with packman, or just download/upload that file to your new installation.
Finally import the records from this json-file with another MIGXdb-import-processor into your new table.
It should also be possible to read the records directly from a master-installation with some cURL - magic.
Or, if you have access to your db with a sql-client you could copy your tables from one installation to another directly with help of that one.
Or with help of phpmyadmin.