mirror of
https://github.com/usememos/memos.git
synced 2025-11-10 01:10:52 +08:00
fix: update 01__memo_pinned.sql (#4370)
This commit is contained in:
parent
7996586488
commit
3f33ccd906
1 changed files with 4 additions and 4 deletions
|
|
@ -2,7 +2,7 @@
|
|||
ALTER TABLE `memo` ADD COLUMN `pinned` BOOLEAN NOT NULL DEFAULT FALSE;
|
||||
|
||||
-- Update pinned column from memo_organizer.
|
||||
UPDATE `memo`
|
||||
SET `pinned` = TRUE
|
||||
FROM `memo_organizer`
|
||||
WHERE `memo`.`id` = `memo_organizer`.`memo_id` AND `memo_organizer`.`pinned` = 1;
|
||||
UPDATE memo
|
||||
JOIN memo_organizer ON memo.id = memo_organizer.memo_id
|
||||
SET memo.pinned = TRUE
|
||||
WHERE memo_organizer.pinned = 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue