The jenkins uses DB_BASE variable which is path to db.git repo. So if
this variable is set - we need to use db_scripts from this path.
Change-Id: If7af8a38890f7d5da95effeb4bec2b0c7e2ab920
With current set of options (which are quite similar to the ones in
/etc/mysql/my.cnf) db script db_scripts/diff/15787.up renames the index
name of voip_preferences_enum.preference_id to pref_id_fk.
So to fix this problem and prevent any further ones - copy existing
/etc/mysql/my.cnf and modify it for dedicated instance.
Change-Id: I9311c12d0d3f0bf0e5a28a40790dd6908a92f32a
It was initially added to reduce the diff on a review but now we
automatically merge generated schemes.
So no need to do such substitution besides it's dangerous to do such
manipulation on sql file.
Change-Id: I1e78ebe85e731f6be2f84afdf53c3befbb8d55ef
Instead of using the script which is installed - use the one from
review. If it's missing for some reason - try installed one.
So you can see if there is any problem with build tools when you create a
review not after you merged it.
Change-Id: I9725db44f94c77099bdc9e50db41596fb2f29061
The DDL statements should be as precise as possible so don't change
anything there.
In data part we need to replace dates (which are different on every
build) with some value, so use NOW() function.
Change-Id: Ia731f2f6836de2d2770cfd148e402cc83db6182e
To speed up loading of the dump we use 'autocommit=0' in the header of
sql dump. So add final 'commit'.
Change-Id: Iaf8dd6dde16d64a288460e00e47605b029b5d0c2
For sql dump we need to setup some variable like FOREIGN_KEY_CHECKS=0,
or NAMES utf8 as well as 'CREATE DATABASE' statement. And we do but then
it's wiped due to incorrect redirection '>' instead of '>>'. So fix it.
Change-Id: Id37153d5e4ac038f788c34443e1bb5715d5e3985
This parameter was changed in templates.git:279d3ce for mysql servers so
change build instance accordingly.
Change-Id: Ie69adea67066c582c9887b8b7ab2c683b6ca24b5
The main tool ngcp-build-schema-files:
1. initializes and starts a dedicated mysql instance in tmpfs.
2. prepares schemes.
3. runs ngcp-dump-json.pl and mysqldump to get sql and json files.
4. stops and deletes mysql instance.
The helper ngcp-dump-json.pl creates json dump of the schema.
Change-Id: I65968d0f9136b619f9adc5ed735daca0bd129e6e