-
Notifications
You must be signed in to change notification settings - Fork 348
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
Add postgres as database engine #388
Conversation
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.
Thanks I'm more open to this now, as the code doesn't use any SQLite specific features anymore. For some history, also see #218, and this fork: https://github.com/RoGryza/linkding-postgres.
The setup in the PR currently doesn't work, as the psycopg2
database driver is missing. So the main issue that needs to be solved is to get the driver set up for local development and in the Docker container for production.
Polished the docs a bit. I also had to change the setup a bit to fix issues with the Docker image. The only combination I got to work (locally at least) was to use I'm still waiting for the cross-platform image to built, I'll post an update when it's ready for testing. |
I've pushed the Docker image with Postgres support for testing to: @tomamplius Would you mind giving it a try? |
I sorry i not use docker. i don't know how test it? |
Out of curiosity, how do you intend to run linkding without using Docker? If you still want to give it a try using Docker, you can follow the instruction in the README, but use the Otherwise I'll try to do some manual testing myself soon. |
Hi, i create script to create Debian package from git and deploy on proxmox lxc contener with apt. |
OK got it 👍 Anyway, then I'll do some testing using Docker myself. |
Thank you a lot. |
Thanks for the Postgres support! Does anyone know if there's an easy way to migrate a sqlite database to Postgres? I'd like to migrate my existing installation and would prefer to avoid manually re-adding my bookmarks if possible. |
The easiest way is probably to export your bookmarks from the settings, and then import them again after switching the database. This will result in some minor differences (web archive snapshots will be generated again, scraped websites titles+descriptions will become the default unless an explicit title+description has been set), but those are usually acceptable. Otherwise SQLite allows backups to SQL files, but I have my doubts if the generated syntax works out of the box with PostreSQL. Also the schema definition would have to be removed, as that is created by linkding on startup. |
pg loader is a good way https://pgloader.readthedocs.io/en/latest/ref/sqlite.html |
with data only option |
Allow use postgres as db engine