Thanks for the link! It's rather interesting! Yeah, I think "created" and "updated" columns would be useful. I think we already use them in "biblio", although maybe the code in Koha is setting those rather than the database. It would be handy to either auto-initialize/auto-update, or just pass null once to a "created" column and every time to an "updated" column. I'm happy to drop it, but thanks for the clarification :D. David Cook Systems Librarian Prosentient Systems 72/330 Wattle St, Ultimo, NSW 2007
-----Original Message----- From: koha-devel-bounces@lists.koha-community.org [mailto:koha-devel- bounces@lists.koha-community.org] On Behalf Of Robin Sheat Sent: Thursday, 13 November 2014 1:03 PM To: koha-devel@lists.koha-community.org Subject: Re: [Koha-devel] Ambiguous column names
David Cook schreef op do 13-11-2014 om 12:12 [+1100]:
I think the best option, if we were to change away from timestamp, would have to be "lastmodified", as timestamp types will get updated after every insert/update, I believe. But since they'd all be called "lastmodified", changing it from "timestamp" would become a bit moot, I think.
Well, I was thinking both, "created" and "updated." So you know when the record was created, and when it was last changed. Both very handy for simple auditing or bug finding.
It's possible to have a timestamp field that is initialised to the current date automatically on creation, and another that is auto updated.
http://dev.mysql.com/doc/refman/5.1/en/timestamp-initialization.html
This would nicely mean that there's no code at all in Koha required to maintain this.
Anyway, I was just sticking my oar in, I've no desire to bikeshed it into the ground, anything is better than nothing :)
-- Robin Sheat Catalyst IT Ltd. ✆ +64 4 803 2204 GPG: 5FA7 4B49 1E4D CAA4 4C38 8505 77F5 B724 F871 3BDF