1
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-05-20 10:33:55 +00:00
vaultwarden/migrations/postgresql/2020-08-02-025026_add_favorites_table_fix/up.sql
2025-03-15 17:45:22 +01:00

9 lines
228 B
SQL

-- Transfer favorite status for user-owned ciphers.
INSERT INTO favorites(user_uuid, cipher_uuid)
SELECT user_uuid, uuid
FROM ciphers
WHERE favorite = TRUE
AND user_uuid IS NOT NULL;
ALTER TABLE ciphers
DROP COLUMN favorite;