usememos / memos

An open-source, lightweight note-taking solution. The pain-less way to create your meaningful notes. Your Notes, Your Way.
https://usememos.com
MIT License
34.17k stars 2.47k forks source link

The preview images before April are all displayed the same.(2023年4月之前的图片预览图展示全部一样) #1734

Closed Jonnyan404 closed 1 year ago

Jonnyan404 commented 1 year ago

Describe the bug

The preview images before April are all displayed the same

Steps to reproduce

You can view the pictures before April.

Screenshots or additional context

No response

Jonnyan404 commented 1 year ago

Because the UUID was only added on April 3rd, the UUID values before this date are the same, resulting in the same preview image being parsed.

https://github.com/usememos/memos/commit/1cab30f32f737844090240434defdd834b01ea74

boojack commented 1 year ago

Execute the following SQL into your database or wait next release.

UPDATE
  resource
SET
  public_id = printf (
    '%s-%s-%s-%s-%s',
    lower(hex(randomblob(4))),
    lower(hex(randomblob(2))),
    lower(hex(randomblob(2))),
    lower(hex(randomblob(2))),
    lower(hex(randomblob(6)))
  );