mirror of
https://github.com/ViViDboarder/bitwarden_rs.git
synced 2024-11-18 03:06:37 +00:00
14 lines
322 B
SQL
14 lines
322 B
SQL
ALTER TABLE ciphers
|
|
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;
|