Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Make the database primary key incremental #77

Closed
zhouhao opened this issue Apr 23, 2023 · 0 comments · Fixed by #86
Closed

Make the database primary key incremental #77

zhouhao opened this issue Apr 23, 2023 · 0 comments · Fixed by #86
Assignees
Labels
enhancement New feature or request

Comments

@zhouhao
Copy link
Member

zhouhao commented Apr 23, 2023

For now, the service use https://github.com/Devskiller/friendly-id for primary id generation.
While the generated id is not incremental, which means the latter generated id may have smaller lexicographical order.

The issue is that if a page has multiple notes, there are displayed based on the id order, not the timestamp.
I feel it is better to use a better id generate mechanism to make sure the latter generated one have increased order, e.g. snowflake

@zhouhao zhouhao added the enhancement New feature or request label Apr 23, 2023
@zhouhao zhouhao self-assigned this Apr 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant