Hi,
We have a hosted Discourse solution, and recently I’ve had a little experiment with the Data Explorer plugin to run some queries.
This has led to a discussion regarding source control for the queries, which lead to a discussion regarding having access to a non-live instance. Below are some hypothetical thoughts, there isn’t a specific reason for needing any of the below at this time - just putting it out there for feedback etc.
So far, the queries have only been written using the plugin, whilst I assume these are also included in the backup that is taken, I am not entirely familiar with the process of a recovery from this backup. I have personally come from an MS background, we used SQL Server’s Management Studio, RedGate Tools etc and setup repositories for each database (on both live/dev environments).
By only using the Data Explorer plugin, and not accessing the database directly, any PostreSQL client tools are presumably of little use to us. This would leave us perhaps writing the scripts in the Plugin, then copying them out to a separate file and committing them to a repository.
Additionally, as a bit of a PostreSQL noob, trying to brush the dust off of his SQL writing skills, must queries via the plugin in go through a series of iterations before a) they work at all b) they return anything close to what I wanted. It dawns on me that firing these against the live environment is perhaps less than ideal.
This brings us to the point regarding a non-live instance. I have often thought it was a bit risky making our HTML/CSS changes on our only copy, as anything we did was reflected straight away and as such it was/is quite easy to screw things up for live users. In the same vein, whilst my little SQL scripts are fairly light weight, and in comparison to the work being done by the forum itself I’m sure amount to very little, it would be nice to perhaps develop/test/play on a non-live environment for putting the queries together, but perhaps one that is routinely populated from our backup data.
Any thoughts/feedback on this would be really appreciated.