Transfer favorite status for user-owned ciphers

This commit is contained in:
Jeremy Lin committed 2020-08-22 17:14:05 -07:00
1 parent f83a8a36d1
commit 3bbdbb832c
6 files changed
+57 -9

No files matched your search

@@ -5,6 +5,13 @@ CREATE TABLE favorites (
PRIMARY KEY (user_uuid, cipher_uuid)
);
-- Transfer favorite status for user-owned ciphers.
INSERT INTO favorites(user_uuid, cipher_uuid)
SELECT user_uuid, uuid
FROM ciphers
WHERE favorite = 1
AND user_uuid IS NOT NULL;
-- Drop the `favorite` column from the `ciphers` table, using the 12-step
-- procedure from <https://www.sqlite.org/lang_altertable.html#altertabrename>.
-- Note that some steps aren't applicable and are omitted.