chore: allow storing resource references >256 chars long in mysql (#4408)

fix: allow storing resource references >256 chars long in mysql
This commit is contained in:
Chris Dzombak 2025-02-16 05:20:51 -05:00 committed by GitHub
parent 04d7ba48e5
commit d25f355392
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View file

@ -0,0 +1,3 @@
-- https://github.com/usememos/memos/issues/4322
ALTER TABLE `resource` MODIFY `reference` TEXT NOT NULL DEFAULT ('');

View file

@ -77,7 +77,7 @@ CREATE TABLE `resource` (
`size` INT NOT NULL DEFAULT '0',
`memo_id` INT DEFAULT NULL,
`storage_type` VARCHAR(256) NOT NULL DEFAULT '',
`reference` VARCHAR(256) NOT NULL DEFAULT '',
`reference` TEXT NOT NULL DEFAULT (''),
`payload` TEXT NOT NULL
);