mirror of https://github.com/usememos/memos
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
465 B
MySQL
20 lines
465 B
MySQL
2 years ago
|
-- Make resource internal_path relative (to MEMOS_DATA) and replace backslash with slash
|
||
|
-- This is a best-effort approach, but even if it fails, it won't break assets from loading
|
||
|
UPDATE resource
|
||
|
SET
|
||
|
internal_path = REPLACE (internal_path, '\\', '/')
|
||
|
WHERE
|
||
|
internal_path LIKE '%assets\\\%';
|
||
|
|
||
|
UPDATE resource
|
||
|
SET
|
||
|
internal_path = REPLACE (
|
||
|
internal_path,
|
||
|
SUBSTR (
|
||
|
internal_path,
|
||
|
1,
|
||
|
INSTR (internal_path, '/assets')
|
||
|
),
|
||
|
''
|
||
|
);
|