So do you suggest to do this kind of custom config through the orm.xml and maybe load a different orm.xml based on a configuration ? would that work?
If you really have to, I guess that is the only way, but like I wrote before, I would suggest you to not do this and instead figure out a way to always use the same schema in dev and prod.
Why can’t you just make the new schema version backwards compatible so that it can also function if a feature is not enabled? This can be done by making columns nullable even though they might not logically be nullable. You can cleanup the schema once you decide to permanently activate a feature.