Last active
November 1, 2023 06:04
-
-
Save vincejv/4e50256152d6efd6b222e75f31ce36d1 to your computer and use it in GitHub Desktop.
Postgres
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List users | |
SELECT * FROM pg_catalog.pg_user; | |
# Create user | |
CREATE USER youruser WITH ENCRYPTED PASSWORD 'yourpass'; | |
# Create db owned by user | |
CREATE DATABASE "sonarr-main" OWNER sonarr; | |
CREATE DATABASE "sonarr-log" OWNER sonarr; | |
# Migrate to postgres from sqlite | |
docker run --rm -v /absolute/path/to/prowlarr.db:/prowlarr.db:ro --network=host ghcr.io/roxedus/pgloader --with "quote identifiers" --with "data only" /prowlarr.db "postgresql://qstick:qstick@localhost/prowlarr-main" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment