You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Erik de Bruin <er...@ixsoftware.nl> on 2017/03/27 07:15:54 UTC

Tweaks.php and the upcoming release

Hi,

With another release around the corner, I want to make sure that everyone
understands the new database change paradigm:

1) When you create a JIRA stack, it's database (a fresh copy of production)
is brought up to date with the recent changes made earlier in the dev
process by automatically running 'tools/run_tweaks.php' when the stack
creation is complete; no dev action needed.

2) Any database changes you make during development (structurally, always,
and content when relevant) should be recorded in 'db/tweaks.php'. The
correct syntax is to add to the changes array a HEREDOC containing the SQL
statements. Note: the statements in a block are split over the semi-colons
to get the individual queries.

3) When you merge your branch back into it's parent - most likely trunk -
make sure to run 'tools/run_tweaks.php' on the parent - most likely
staging. This will bring the database up to date and will be a good check
if the merge of 'db/tweaks.php' did not introduce any issues.

4) Upon release I will run the fully combined 'db/tweaks.php' on production
and all should be well ;-)

The update mechanism records which queries have already been run. This has
the advantage that you can run 'tools/run_tweaks.php' as often as you like.
Any queries in 'db/tweaks.php' will only run once on the database in your
stack. WARNING: do not make changes to earlier statements, not even to the
whitespace. Take care when committing any changes that any changes to
earlier statements are excluded. Since the procedure to determine which
queries to run depends on a has of the statement, any changes to the
statement will cause the hash to change and the query to run again. This
can be BAD :-)

Thanks,

EdB



-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl