Fix extraneous white space in generated sql #20340
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Fix extraneous white space in generated sql - this incorporates #20339 and #20338 and a bunch more change and leaves us with fairly attractive sql at the end.
Schema.tpl whitespace overhaul
Before
If I regenerate sql in search kit I get
After
Schema.tpl less readable but generated sql much better (seems like a fair price IMHO)
Technical Details
Note I tried regenerating civicrm.mysql with this & it looked good - jenkins can
pass judgement too...
I didn't include the regenerated sql in search_kit but I hit what seems to me to be
an unreleated regression in civix - ie search_kit generates
ROW_FORMAT=DYNAMIC
With my version (lastest from master) of civix I get ENGINE = INNODB but
not the ROW_FORMAT
Comments
If totten/civix#202 were merged we possibly would no longer have generated sql files but that got stalled on negotiating feedback 6 months ago & I don't think it should be brought back onto the front burner given other priorities - so this could be short-lived formatting but better to have it now IMHO