-
-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add postgres support + migrations #628
feat: add postgres support + migrations #628
Conversation
Merge 'origin/develop' into main
Merge develop into main
Merge 'develop' into main
Merge develop into main
…ed ssl for postgres config Fallenbagel#186
Whats the difference between this and #421? |
This PR contains all the changes in #421 plus changes from @ralgar that are also mentioned in that PR. Additionally, this PR contains the migration script required to get postgres running, documentation on how to configure postgres, and improved ssl configuration options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for your contribution 😄
I'd like a few more people to test this before we merge this into develop, and especially to test with SQLite, because the database is at the core of the app and SQLite is what will be used by most of the users.
I just updated the preview tag: preview-postgres
Hey everyone, could a few of you test and give me feedback to make sure everything works fine on various setups? |
I can test with sqlite initially for 3 days and another 3 days after migration to postgres. Is there a manual migration step required to get data from sqlite into postgres? Do you have any command at hand to do it easily? I would appreciate a nudge how to switch to postgres, including where to put connection details. |
On previous note, I think https://github.com/Fallenbagel/jellyseerr/blob/00e18a272a8842f0c3d59924f37967f9cbfb413e/docs/extending-jellyseerr/database-config.mdx got it all covered. I'll give it a try and report back after 6 days. |
I've moved (i.e. duplicated) my production jellyseerr to postgres, below the pgloader config I used and logs for the migration. I think most of the warnings/errors are false positives? Everything seems to be working fine so far but will continue monitoring in the coming days. EDIT: I'm running on Ubuntu 20.04.6 with Docker (see below for extended docker version output). jellyseerr.load:
pgloader migration log:
|
…nto v1.7.0/postgresql
From the current :develop tag to this feature tag it failed with this SQLite error:
|
@dr-carrot last fix I hope 🙏 |
A clean install worked for me so I tried an existing migration. A question on the documentation... From the notes, it mentions using this command to import the data. What is the significance of "pgloader/pgloader.load" volume mount? Where would I find that file?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@Fallenbagel do you want to review before we merge this?
@dr-carrot thanks again for your contribution! |
@all-contributors please add @dr-carrot for code |
I've put up a pull request to add @dr-carrot! 🎉 |
@all-contributors please add @dr-carrot for code |
I've put up a pull request to add @dr-carrot! 🎉 |
* chore(release): 1.4.0 * chore(release): 1.4.1 * chore(release): 1.5.0 * chore(release): 1.6.0 * chore(release): 1.7.0 * feat: support for postgresql * test(pgsql): disable root certificate verification * test(ci): temporarily change CI for local repo * fix: don't use SQLite idiom when using PgSQL * feat(db): add flag to toggle TLS for Postgres * feat(postgres and migrations): added migrations for postgres & imporved ssl for postgres config Fallenbagel#186 * fix: restored workflow actions * fix: access order * fix: added pushover sound migration tto initial migration * fix: added option to log queries * fix: issue with session migration * chore: relocate pushover sound migration * feat: added logging option to other datasources * chore: small tweaks for the datasource. Added docs for db setup * chore: cleanup logs * fix: added default dates to postgres migration * fix: removed psql specific relation checks * chore: added some debug sanity checks * chore: added some more debug sanity checks * chore: added some more additional debug sanity checks * chore: added some more+ additional debug sanity checks * chore: mild log cleanup * chore: more log cleanup * chore: finish log cleanup * fix: added not null to migration so typeorm doesn't delete ids * chore: cleanup extra psql code * fix: remove eager load * docs: added documentation for migration to postgres * docs: added database option to bug template * feat: created docker-compose postgres file * fix: updated ts schema to align with change to migration * fix: switch timestamp to include timezone * fix: fixed indentation in psql docker-compose * fix: changed version to 0.1.0 to remove ui notification * style: fixed prettier in docker-compose.pastgres.yaml * chore: restored CHANGELOG.md * chore: revverted ts commit * fix: update pnpm lock with pg package * chore(pnpm-lock.yaml): updated pnpm-lock * docs: update docs to add psql set up info * refactor: clean up code from cr comments * feat: migrate blacklist * fix: fix issue with cypress tests * docs: update psql docs * fix: fix psql issue in user page; fix tiny psql error when selecting by empty list * fix: incorrect current date function * fix: null contraint with mediaAddedAt; fix psql col type * refactor: removed unnecessary import * feat: add postgres migration for streaming region --------- Co-authored-by: Fallenbagel <[email protected]> Co-authored-by: semantic-release-bot <[email protected]> Co-authored-by: zackhow <[email protected]> Co-authored-by: Ryan Algar <[email protected]> Co-authored-by: Ryan Algar <[email protected]>
PR #628 changed some fields to disallow null values, causing issues with some older SQLite database having null values. This PR reverts this change.
PR #628 changed some fields to disallow null values, causing issues with some older SQLite database having null values. This PR reverts this change.
🎉 This PR is included in version 2.2.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Description
Screenshot (if UI-related)
To-Dos
yarn build
yarn i18n:extract
Issues Fixed or Closed
TODO:
drcarrot/jellyseerr-postgres:latest
Switch date column types to remove timezoneIt is generally recommended to usetimestamp with timezone
akatimestampz