vaultwarden/migrations/mysql/2020-08-02-025025_add_favorites_table/up.sql

10 lines
225 B
MySQL
Raw Normal View History

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;