Skip to content
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

Fix: Properly detect a postgres connection #4435

Merged
merged 1 commit into from Jan 12, 2024

Conversation

halkeye
Copy link
Contributor

@halkeye halkeye commented Jan 12, 2024

Database Migration

No

Description

Previously was looking for a ".db" in the connection string, which is the typical sqlite filename. The problem is if your connection string has a .db anywhere in it, such as postgres.db.internal it'll think its a sqlite file

Solution borrowed from sonarr:

https://github.com/Sonarr/Sonarr/blob/develop/src/NzbDrone.Core/Datastore/Database.cs#L43

Screenshot (if UI related)

NA

Todos

  • Tests
  • Translation Keys (./src/NzbDrone.Core/Localization/Core/en.json)
  • Wiki Updates

Previously was looking for a ".db" in the connection string, which is
the typical sqlite filename. The problem is if your connection string has a
.db anywhere in it, such as postgres.db.internal it'll think its a
sqlite file

Solution borrowed from sonarr:

https://github.com/Sonarr/Sonarr/blob/develop/src/NzbDrone.Core/Datastore/Database.cs#L43
@mynameisbogdan mynameisbogdan merged commit a9c19a8 into Lidarr:develop Jan 12, 2024
34 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants