From df31eb12147d22f291ff6122e29040f7a8925941 Mon Sep 17 00:00:00 2001 From: bo0tzz Date: Thu, 13 Jun 2024 15:58:44 +0200 Subject: [PATCH] chore(docs): Delete unsupported SQL shenanigans (#10278) --- docs/docs/FAQ.mdx | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/docs/docs/FAQ.mdx b/docs/docs/FAQ.mdx index 590094817e..d5d241753c 100644 --- a/docs/docs/FAQ.mdx +++ b/docs/docs/FAQ.mdx @@ -133,40 +133,6 @@ For example, say you have existing transcodes with the policy "Videos higher tha No. Our design principle is that the original assets should always be untouched. -### How can I move all data (photos, persons, albums, libraries) from one user to another? - -This is not officially supported but can be accomplished with some database updates. You can do this on the command line (in the PostgreSQL container using the `psql` command), or you can add, for example, an [Adminer](https://www.adminer.org/) container to the `docker-compose.yml` file so that you can use a web interface. - -
-Steps - -1. **MAKE A BACKUP** - See [backup and restore](/docs/administration/backup-and-restore.md). - -2. Find the ID of both the 'source' and the 'destination' user (it's the id column in the `users` table) - -3. Four tables need to be updated: - -```sql -BEGIN; --- reassign albums -UPDATE albums SET "ownerId" = '' WHERE "ownerId" = ''; - --- reassign people -UPDATE person SET "ownerId" = '' WHERE "ownerId" = ''; - --- reassign assets -UPDATE assets SET "ownerId" = '' WHERE "ownerId" = '' - AND CHECKSUM NOT IN (SELECT CHECKSUM FROM assets WHERE "ownerId" = ''); - --- reassign external libraries -UPDATE libraries SET "ownerId" = '' WHERE "ownerId" = ''; -COMMIT; -``` - -4. There might be left-over assets in the 'source' user's library if they are skipped by the last query because of duplicate checksums. These are probably duplicates anyway, and can probably be removed. - -
- --- ## Albums