add unique constraints to stop client_* tables from growing out of bounds#1313
add unique constraints to stop client_* tables from growing out of bounds#1313bodewig wants to merge 1 commit intomitreid-connect:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1313 +/- ##
========================================
Coverage 23.7% 23.7%
Complexity 849 849
========================================
Files 209 209
Lines 11664 11664
Branches 2116 2116
========================================
Hits 2765 2765
Misses 8422 8422
Partials 477 477Continue to review full report at Codecov.
|
|
The clients.sql and associated MERGE statements aren't really meant to be used with persistent databases, they're really only there to bootstrap systems such as the in-memory HSQL database. We've considered dropping all the MERGE stuff entirely now that we have an import/export function that can be used to get data into the server, and use a simple pre-loaded table for HSQL only. This pull request looks fine on its own though, as these constraints make sense. We try to not change the table schema within a release but this is additive and should be ok to get in. |
In our dev environments where we provision clients via a
clients.sqlscript three of theclient_grew with every service restart. The reason is the code assumes entries in that table to be unique while in fact they are not (at the DB level).I've added unique constraints for postgres and mysql only as I think the
mergecommands used for hsql and oracle should already avoid growing those tables.