-- Allow multiple users to own the same or different versions of a movie.
-- New PK: (hash, user) — one row per file-per-user.
ALTER TABLE `movies`
    DROP PRIMARY KEY,
    DROP INDEX `uid`,
    MODIFY COLUMN `user` VARCHAR(320) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
    ADD PRIMARY KEY (`hash`, `user`) USING BTREE;
