Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(schema) declare timestamps as number to keep millisecond precision #3660

Closed
wants to merge 1 commit into from

Conversation

kikito
Copy link
Member

@kikito kikito commented Jul 31, 2018

Currently the created_at the field in the new DAO uses second-level numbers instead of millisecond-level numbers (since we use ngx.time instead of ngx.now)

This changes that and makes all timestamps be stored with millisecond precision (no changes to the database are required, just that we replaced ngx.time by ngx.now).

However this is a breaking change: until now the created_at field looked like an integer, and now it will start looking like a float.

This change is required by #3622

@Tieske
Copy link
Member

Tieske commented Jul 31, 2018

My guess would be that this is because of the time order required by the targets?

An alternative would be to replace the UUID by a ULID. In a ULID, part of the randomness is sacrificed and replaced with a time stamp. The way this is done ensures that you can lexically sort based on the ULID, and get historical order.

A ULID is compatible (as a format) with UUID

But I don't know what the impact of that would be regarding breaking changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants