jenkins-bot has submitted this change and it was merged. Change subject: Re-write of lazy table reflection/generation. ......................................................................
Re-write of lazy table reflection/generation. I did not realize that ''Table'' objects and tables are completely exclusive: you can have either one and not the other. (You can, in fact, start with either and derive the other.) The procedure is now as follows: - Attempt to load a ''Table'' object from MetaData cache. - If it does not exist in the cache, derive a description of the table structure from the JSON Schema object. This description is a ''Table'' object. - Ensure an actual database table matching the description in ''Table'' exists in the database by creating it if it does not exist. No attempt is made to ALTER TABLE to match the description because it is assumed such cases are bugs -- EventLogging should be the only thing creating tables. - Return ''Table'' object. Plus: - Unit test. - Type check to capsule_uuid() to ensure datetime input fails loudly. - Minor comment / formatting touch-ups Change-Id: I51c7ef2e35e57d0414e3e3a2426ba3153efbf738 --- M server/bin/json2sql M server/bin/sv-alerts M server/bin/zmux M server/eventlogging/jrm.py M server/eventlogging/schema.py M server/tests/test_jrm.py 6 files changed, 52 insertions(+), 29 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified -- To view, visit https://gerrit.wikimedia.org/r/47372 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I51c7ef2e35e57d0414e3e3a2426ba3153efbf738 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/EventLogging Gerrit-Branch: master Gerrit-Owner: Ori.livneh <[email protected]> Gerrit-Reviewer: Ori.livneh <[email protected]> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
