Hey there, my 2 cents on this topic:
TLDR: Yes, let’s create schema automatically from TCA. Armins patch that takes care of ‘ctrl’ section is a great start, for ‘columns’ fields we’ll have to sort out syntax, though.
In general, TCA is the main array in TYPO3. We’ve been embracing this one over the past years already: It is relatively well encapsulated and it is almost always loaded in basically all situations. Soon, it will be possible to warm it up, too.
This array is the main glue it TYPO3: It contains field definitions, it steers formEngine, it steers the DataHandler, extbase mapping is based on it and extbase persistence should be based on it properly, it leads most of the main views of the backend.
In standard extension scenarios, field definitions are written at three times: ext_tables.sql, TCA, extbase models. That’s really annoying for extension developers. I think further pushing TCA can solve that. It is our central configuration solution.
Thus, I talked with Armin a couple of weeks ago about that: It is pretty easy to get rid of ext_tables.sql for tables based on TCA.
The most low-hanging fruit in here is automatic creation of fields steered from within the ‘ctrl’ section: All those nasty deleted, hidden and workspace fields. We have properties for all those in TCA already. They are always the same and can be created without any TCA syntax change. As you can see in the patch https://review.typo3.org/#/c/52808/ hundreds of redundant lines can be kicked from ext_tables.sql this way. I think that’s really a nice start.
For single fields and keys, we’ll have to add some additional information here and there in TCA. While an type=input, eval=int could be made a default integer field already, we may need the one or the other idea on how to override default field length and stuff like that. I’m not yet entirely sure on how this will look like, though.