Auto-generation template for entities
[!IMPORTANT] This issue is not ready for contributions yet. The Kestra team still has to review it. Please wait until this message is removed and the issue has been move to Backlog stage before you start working on it. Pull requests opened before that will not be reviewed. In the meantime, feel free to get started on a different issue by checking out our good first issues list.
Feature description
Idk which form it could take (CLI, script, some code gen framework) but we may consider creating something that takes either a POJO or some form telling which fields the entity should have and everything would be auto-generated (at least the bases) based on a template: JDBC repositories, ES repositories and most importantly the basis of every flyways for each JDBC implementation.
It will avoid discrepancies between handling each field types (dates for each database for eg.), could ask with checkbox whether to have created / updated date fields with automatically creating the on_update triggers or similar. It could also ask if we want some index and auto-create them based on what field we want them on.
It was cumbersome for me to go through all JDBC flyway script to copy paste syntaxes which is very error prone and we could enhance rules on entity / repository generations as we come across some issues.
Source: kestra-io/kestra