All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Best practices moving from development to production

Doug 11 Sep 2012 00:23 question, complete

I've been using LibrarEE and global variables/snippets for the last year or so. It works good, but there are of course some benefits to Low Variables. However there are also some workflow issues.

I was saving my GV and Snippets as files (via LibrarEE). This allows me to easily move from local to development to production environments. However Low Variables are created via the Control Panel and stored in the database first, then edited via the files. Moving from local to development or production means doing some database exporting/importing or just manually recreating the variables in the CP. To further muddy the water I'm doing this on an MSM site.

What are some of the workflows that work for people?

I'd also like to save each site's variables in their own directory (so I can put those files on the right place on the server and keep them all in the same repo). I tried some index.php config overrides, but no luck. Is this possible?

Replies

  1. Low 11 Sep 2012 06:36

    LV stores its data in the exp_global_variables, exp_low_variables and exp_low_variable_groups tables. So an export/import for those tables should work just fine.

    At the moment, all var files are stored in the same directory. Within that dir, they are stored in the /site_short_name/ subfolder. It's not possible to change that. But I'll make note of the feature request to override this behaviour.

    wojtek.dziejma 4 Sep 2014 19:19

    I would definitely second the feature request for separate directories for low variable groups - I have the same use case.

  2. Doug 11 Sep 2012 18:47

    Works like a charm. Nice that they are also near each other in the table list, no searching around for them.

    For others who might not be very MySQL savvy here is exactly what I did (on a Mac):
    -open Sequel Pro (amazing bit of free software)
    -connect to the server you will export from
    -select the database from the drop down in the upper left
    -a list of all tables will appear in the left column, select exp_global_variables, exp_low_variables and exp_low_variable_groups tables.
    -go to export and export those tables

    -now connect to your server that you will import these LV into
    -again, select the database in the drop down
    -go to file > import and select the file you just exported (will be a few k, not big)
    **This is where I got concerned...will it hose my entire db and just fill it with these three tables?
    -it will import the data into the database leaving everything else untouched.
    Done, simple as that.

    If there are any issues others notice with my process, let me know. I just wanted to offer some hand holding for others who were like me not so long ago. Messing with MySQL = much uncertainty and fear of crashing the internet.

    Low 5 Sep 2014 06:34

    I should note that this only works with vars that store their data in the exp_global_variables table. Some var types, like Matrix, Playa and Grid, use their own tables, which you might have to include if you're using them as vars.