Page MenuHomePhabricator

Allow extensions to validate that their tables.json file when transformed matches the SQL output
Open, Needs TriagePublic

Description

An extra step would be to add a test to make sure the .sql files are indeed generated from the abstract schemas (so we don't end up people doing the old way). There is such test in core already, maybe we can sorta hook it up so they define it extension.json?

Event Timeline

Reedy renamed this task from Allow extensions to add into to DatabaseIntegrationTest::testAutomaticSqlGeneration() to Allow extensions to validate that their tables.json file when transformed matches the SQL output.Aug 23 2020, 1:44 AM

Sounds like something for a structure test with determine the files from a hard coded folder name?
I am not sure if the tables.json is always in sql or should be there (like we have "tests/phpunit" or "tests/parser" as fix folders for some magic) or even it is always called "tables.json"

The initiative is over and these are improvements that are welcome but not really any blocker to call the project done.