vaultwarden/migrations/postgresql/2020-08-02-025025_add_favor.../up.sql

10 lines
231 B
SQL

CREATE TABLE favorites (
user_uuid VARCHAR(40) NOT NULL REFERENCES users(uuid),
cipher_uuid VARCHAR(40) NOT NULL REFERENCES ciphers(uuid),
PRIMARY KEY (user_uuid, cipher_uuid)
);
ALTER TABLE ciphers
DROP COLUMN favorite;