Skip to content

Instantly share code, notes, and snippets.

@vincejv
Last active November 1, 2023 06:04
Show Gist options
  • Save vincejv/4e50256152d6efd6b222e75f31ce36d1 to your computer and use it in GitHub Desktop.
Save vincejv/4e50256152d6efd6b222e75f31ce36d1 to your computer and use it in GitHub Desktop.
Postgres
# 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