https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20271
Jonathan Druart <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |In Discussion --- Comment #198 from Jonathan Druart <[email protected]> --- As we are going to face this situation for some other tables as well (at least columns borrowers.cardnumber, borrowers.userid, issues.itemnumber), I think we need an approach that will work and be named identically for them. We could have a boolean flag is_deleted, in addition of deleted_on that contains an important info. The problem is that it will not work either, as: The following situation should be valid but will fail the unique constraint: (id, is_deleted) (42, 1) (42, 0) (42, 0) So we could have a nullable is_not_deleted: (id, is_not_deleted) (42, 1) (42, NULL) (42, NULL) The work but it will not be a boolean, as 0 will not be a "valid" value (not a big deal anyway). "is_not_deleted" is not ideal, maybe is_alive? is_current? naming suggestions? We will not be able to confirm the data integrity between this new column and deleted_on. But that seems easy to handle at code level. Note that Postgres can deal with a WHERE clause on a unique constraint. Also that CHECK could be helpful here, but we need it to be present in the stable versions of the DBMS we support. Something else to suggest? -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
