install

fun install()

Creates the dynamic_dto type if the database does not have it.

Nothing else here touches the schema, and this only does because it was asked to. Where migrations manage the schema, put DYNAMIC_DTO_DDL in one instead and never call this.

It also reloads the driver's type catalogue, which is loaded once per database on the first connection opened to it and shared by every session after that: a type created later is one the driver has never heard of, and opening a fresh connection does not help. A type that was already there before anything connected needs no reload.