mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-04-08 05:23:35 +03:00
Currently, favorites are tracked at the cipher level. For org-owned ciphers, this means that if one user sets it as a favorite, it automatically becomes a favorite for all other users that the cipher has been shared with.
9 lines
225 B
SQL
9 lines
225 B
SQL
CREATE TABLE favorites (
|
|
user_uuid CHAR(36) NOT NULL REFERENCES users(uuid),
|
|
cipher_uuid CHAR(36) NOT NULL REFERENCES ciphers(uuid),
|
|
|
|
PRIMARY KEY (user_uuid, cipher_uuid)
|
|
);
|
|
|
|
ALTER TABLE ciphers
|
|
DROP COLUMN favorite;
|