From 73cf8351058e3a26ee1780e02aa264835df7698b Mon Sep 17 00:00:00 2001 From: funkecoder23 <12570656+FunkeCoder23@users.noreply.github.com> Date: Sun, 4 Feb 2024 21:03:15 -0500 Subject: [PATCH] add information on dropping items table after import --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1853665..9f5e2f1 100644 --- a/README.md +++ b/README.md @@ -167,9 +167,11 @@ with include drop, create tables, create indexes, reset sequences > [!TIP] > Your `docker-ip` can be found using the following command: -> `docker network inspect knightcrawler-network | grep knightcrawler-postgres -A 4` +> ``` +> docker network inspect knightcrawler-network | grep knightcrawler-postgres -A 4 +> ``` -Then run `pgloader db.load` to create a new `items` table. +Then run `pgloader db.load` to create a new `items` table. This can take a few minutes, depending on the size of the database. ### INSERT INTO ingested_torrents @@ -191,6 +193,15 @@ SELECT title, 'RARBG', cat, hash, size, NULL, NULL, imdb, false, current_timesta FROM items where cat='tv' OR cat='movies';" ``` +You should get a response similar to: + +`INSERT 0 669475` + +After, you can delete the `items` table by running: + +```docker exec -it knightcrawler-postgres-1 psql -d knightcrawler -c "drop table items";``` + + ## Selfhostio to KnightCrawler Migration With the renaming of the project, you will have to change your database name in order to keep your existing data.