mirror of
https://github.com/dani-garcia/vaultwarden
synced 2024-11-21 19:33:11 +00:00
13 lines
320 B
SQL
13 lines
320 B
SQL
ALTER TABLE ciphers
|
|
ADD COLUMN favorite BOOLEAN NOT NULL DEFAULT FALSE;
|
|
|
|
-- Transfer favorite status for user-owned ciphers.
|
|
UPDATE ciphers
|
|
SET favorite = TRUE
|
|
WHERE EXISTS (
|
|
SELECT * FROM favorites
|
|
WHERE favorites.user_uuid = ciphers.user_uuid
|
|
AND favorites.cipher_uuid = ciphers.uuid
|
|
);
|
|
|
|
DROP TABLE favorites;
|