mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-05-21 19:13:57 +00:00
Transfer favorite status for user-owned ciphers
This commit is contained in:
parent
f83a8a36d1
commit
3bbdbb832c
6 changed files with 57 additions and 9 deletions
|
@ -1,4 +1,13 @@
|
|||
DROP TABLE favorites;
|
||||
|
||||
ALTER TABLE ciphers
|
||||
ADD COLUMN favorite BOOLEAN NOT NULL;
|
||||
ADD COLUMN favorite BOOLEAN NOT NULL DEFAULT 0; -- FALSE
|
||||
|
||||
-- Transfer favorite status for user-owned ciphers.
|
||||
UPDATE ciphers
|
||||
SET favorite = 1
|
||||
WHERE EXISTS (
|
||||
SELECT * FROM favorites
|
||||
WHERE favorites.user_uuid = ciphers.user_uuid
|
||||
AND favorites.cipher_uuid = ciphers.uuid
|
||||
);
|
||||
|
||||
DROP TABLE favorites;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue