We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17249 ☆ 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?



      • 4172
      • 5,888 Posts
      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.

        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 17249 ☆ A M B ☆
        • 165 Posts
        Quote from: Bruno17 at Nov 26, 2012, 08:14 AM
        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


        I like the idea of having the data in transport or json files inside my package folder.
        Can you elaborate a bit on that matter or point me to some example?

        UPDATE: Most of the time the data only will need to be inserted once upon installation of the package.

        Thanks for your explanation. [ed. note: lithiumlab last edited this post 13 years, 10 months ago.]