go-shiori / shiori

Simple bookmark manager built with Go
MIT License
9.28k stars 551 forks source link

Shiori auto increasment not work currectly on sqlite database #892

Closed Monirzadeh closed 4 months ago

Monirzadeh commented 5 months ago

Data

Describe the bug / actual behavior

if you add just first bookmark it will get ID 1 now if you remove that bookmark and add new bookmark it again get same ID number 1

Expected behavior

shiori always should create uniq id that not ever use.

To Reproduce

Steps to reproduce the behavior:

  1. add bookmark a that you will get id 1 for that
  2. delete that bookmark
  3. add bookmark b
  4. you will get id 1 again instead of 2 for bookmark b

Notes

it happen just in sqlite

fmartingr commented 5 months ago

Related documentation: https://www.sqlite.org/autoinc.html