mirror of https://github.com/usememos/memos
feat(store): change default storage type to local filesystem
Add migration scripts for existing instances without a storage setting to explicitly preserve DATABASE as their storage type, ensuring backward compatibility. Change the default for new installations to LOCAL to improve out-of-the-box performance.pull/5638/head
parent
026ea92f7b
commit
78efa6802e
@ -0,0 +1,6 @@
|
||||
-- Set storage type to DATABASE for existing instances that have no storage setting configured.
|
||||
-- This preserves backward-compatible behavior before the default was changed to LOCAL.
|
||||
INSERT INTO system_setting (name, value, description)
|
||||
SELECT 'STORAGE', '{"storageType":"DATABASE"}', ''
|
||||
FROM DUAL
|
||||
WHERE NOT EXISTS (SELECT 1 FROM system_setting WHERE name = 'STORAGE');
|
||||
@ -0,0 +1,5 @@
|
||||
-- Set storage type to DATABASE for existing instances that have no storage setting configured.
|
||||
-- This preserves backward-compatible behavior before the default was changed to LOCAL.
|
||||
INSERT INTO system_setting (name, value, description)
|
||||
SELECT 'STORAGE', '{"storageType":"DATABASE"}', ''
|
||||
WHERE NOT EXISTS (SELECT 1 FROM system_setting WHERE name = 'STORAGE');
|
||||
@ -0,0 +1,5 @@
|
||||
-- Set storage type to DATABASE for existing instances that have no storage setting configured.
|
||||
-- This preserves backward-compatible behavior before the default was changed to LOCAL.
|
||||
INSERT INTO system_setting (name, value, description)
|
||||
SELECT 'STORAGE', '{"storageType":"DATABASE"}', ''
|
||||
WHERE NOT EXISTS (SELECT 1 FROM system_setting WHERE name = 'STORAGE');
|
||||
Loading…
Reference in New Issue