On Sat, Mar 9, 2019 at 2:57 PM jacksonp <[email protected]> wrote:
> We would like to add a custom field to the connection table to store an > additional attribute of the device we are connecting to. Is there a best > practice or recommendation for this so we don't break something down the > road? > It kind of depends on what you're trying to do - more detail might help to determine that - but the best way to do this (in my opinion) would be to create a custom extension that decorates the connections, and uses the ability of the JDBC module to store arbitrary attributes. An example of this in practice is the TOTP extension, which decorates User objects from the database, storing the relevant TOTP information in the guacamole_user_attribute table. I've also written a Wake-on-LAN extension (currently has a pull request) that decorates Connection objects, storing the MAC address in the guacamole_connection_attribute table. You can do similar things for user groups and connection groups. Using this method would definitely help prevent breaking something down the road, as you're working within the schema defined in the database and not modifying it, which has a higher risk of being broken or overridden by future changes to the database schema. -Nick
