Comments (3)
Agreed 👍.
@DedrickEnc @jniles do you think it's worthwhile budgeting ~half a day for
someone to specifically write/ perform tests (E2E/Integration/Unit) on
DATETIME objects vs. DATES and showing that we can have some guarantees
about dates never being misinterpreted between the client/ server/
database? This would mean that 2.X can have this as a guarantee. Unless
this has already been shown within BHIMA.
Excellent suggestion backed with references.
On Wednesday, January 27, 2016, Jonathan Niles [email protected]
wrote:
As part of the bhima 2.X release cycle, I propose we migrate as many
tables as possible to using DATETIME column types instead of DATE for
storing date datapoints. Under this direction, we will design our table
columns following these guidelines:
- DATE should never be used. It does not store any time information,
and might result in incorrect dates conversions between JS and SQL.- DATETIME should be used for every column that needs to store a JS
Date() object. The SQL datatype does not convert records from their
original timezone to UTC (like a TIMESTAMP does), preferring to store them
in the time zone of the server.- TIMESTAMP should be used for every column that needs to know the
create/update time of the record. This should be seen as information about
the MySQL row, not the entity the row represents. TIMESTAMPs may help with
data migrations and analytical tools later on.It is worth reading the page on MySQL dates [1]. Also useful is this [2]
Stack Overflow discussion (see top two answers).[1] http://dev.mysql.com/doc/refman/5.7/en/datetime.html.
[2]
http://stackoverflow.com/questions/409286/should-i-use-field-datetime-or-timestamp
.—
Reply to this email directly or view it on GitHub
#45.
from bhima.
We definitely need integration tests to support this proposition. I'm working on a few, updating @mbayopanda's employee API tests (which register a date of birth), as part of #24. That is probably not enough though.
Another interesting experiment would be to see how large DATEs are compared to DATETIMEs. While I would still recommend using DATETIMEs over DATEs, it would be valuable information to have.
from bhima.
Most, if not all, of our dates have been migrated. Closing this.
from bhima.
Related Issues (20)
- Cannot search by user on registries in BHIMA HOT 1
- Do not accept negative values for payroll indices HOT 3
- Removing employees from payroll configuration crashes the multiple payroll indice HOT 1
- Users report 5% pay code increase does not work HOT 2
- Provide better error messages for payroll errors
- Ignore employees who worked 0 days in payroll calculation
- Add a confirmation modal before employees are put on the payment waiting list
- Unable to display the item in stock and batch in stock register due to the error ER_DIVISION_BY_ZERO HOT 2
- Journal entry error when customer invoice has a value of zero HOT 5
- Expiry date not showing on In Stock Batch Report HOT 1
- Suggestion to modify the text sale responsible on the invoice HOT 1
- Exclude "action" columns from the column selection modal
- OHADA income statement report crashes the application
- Patient billing, change select to selection with filter
- Error in Report OHADA Balance Sheet HOT 1
- Problem regarding the increase in basic indices based on percentages HOT 3
- Fix getAMC integration:stock test
- Fix unit price input field to allow zero
- Problem of deductions from salaries above the net salary (bonus) HOT 1
- Adding lines to a transaction in the transaction edit modal breaks the transaction
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bhima.