GitHub user mike-jumper opened a pull request:
https://github.com/apache/incubator-guacamole-client/pull/21
GUACAMOLE-52: Ensure history records remain when users/connections are
deleted.
From [GUACAMOLE-52](https://issues.apache.org/jira/browse/GUACAMOLE-52):
> The connection history records currently stored within the Guacamole
database schema are always deleted when an associated user or connection is
deleted (due to "ON DELETE CASCADE"). This maintains consistency, but has a
number of problems:
>
> 1. Historical records become permanently unavailable if the corresponding
user account or connection are deleted.
> 2. Table replication for the sake of providing a centralized log across
multiple instances is impossible as foreign keys will not necessarily be
consistent across the databases.
>
> This could be resolved by removing the dependencies on ID for context.
While foreign keys should still be maintained, the table could be augmented to
include connection name and username. If "ON DELETE CASCADE" is replaced with
"ON DELETE SET NULL", consistency is maintained without compromising history.
>
> **NOTE:** This blocks
[GUACAMOLE-5](https://issues.apache.org/jira/browse/GUACAMOLE-5), as share
links depend on history records being savable for users which do not actually
exist in the database.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mike-jumper/incubator-guacamole-client
store-names
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-guacamole-client/pull/21.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #21
----
commit f4a3c5b31e410fa03463064df7a8eb144d2fd9cf
Author: Michael Jumper <[email protected]>
Date: 2016-04-27T20:12:31Z
GUACAMOLE-52: Foreign keys in history table should be ON DELETE SET NULL.
For sake of context, always store username and connection name in history table.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---