Bug 31172 - Shouldn't issues.issuedate have a DEFAULT NOW() and be NOT NULL?
Summary: Shouldn't issues.issuedate have a DEFAULT NOW() and be NOT NULL?
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Database (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-18 10:55 UTC by Martin Renvoize (ashimema)
Modified: 2022-07-18 17:27 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize (ashimema) 2022-07-18 10:55:14 UTC
We are currently defaulting to dt_from_string in code, we could just set `NOT NULL DEFAULT NOW()` to get a more consistent behaviour couldn't we?

I see this as a good starting place for moving C4::Circulation::AddIssue to Koha::Checkouts->store() eventually.
Comment 1 Kyle M Hall (khall) 2022-07-18 14:47:31 UTC
That seems totally reasonable to me now that we can set the database timezone to the Koha timezone!
Comment 2 Tomás Cohen Arazi (tcohen) 2022-07-18 17:27:06 UTC
I like the idea, but we need to think of bad data and the upgrade process.