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

[Feature Request] Support for other databases #1226

Open
Tsabo opened this issue Jan 9, 2025 · 9 comments
Open

[Feature Request] Support for other databases #1226

Tsabo opened this issue Jan 9, 2025 · 9 comments
Labels
enhancement New feature or request

Comments

@Tsabo
Copy link

Tsabo commented Jan 9, 2025

What feature should be added to Suwayomi?

The ability to use a different database other than H2.

Why/Project's Benefit/Existing Problem

Performance, third-party querying outside the API and GraphQL, and backup strategies.

It appears that you are using JetBrains Exposed for the data layer which does provide support for other databases:
https://jetbrains.github.io/Exposed/working-with-database.html#mysql

DBManager.kt#L24

Database.connect(
    "jdbc:mysql://localhost:3306/test",
    driver = "com.mysql.cj.jdbc.Driver",
    user = "user",
    password = "password"
)

I'm happy to take a look. I'm a .NET developer by day. Java isn't my thing, so I have to work through some build issues before I could do anything.

@Tsabo Tsabo added the enhancement New feature or request label Jan 9, 2025
Copy link

github-actions bot commented Jan 9, 2025

@Tsabo this issue was automatically closed because:

  • The lines requesting to be removed were not removed.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 9, 2025
@Syer10 Syer10 reopened this Jan 9, 2025
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 9, 2025
@Robonau
Copy link
Contributor

Robonau commented Jan 9, 2025

the bot is just gonna auto close it unless that first line is deleted

@Syer10 Syer10 reopened this Jan 9, 2025
@Syer10
Copy link
Collaborator

Syer10 commented Jan 9, 2025

I would be open to a PR adding support for other databases, PostgreSQL should be compatible with how we use H2. This would need to be tested with multiple different GraphQL queries, specifically each filtering option, since we do use some custom queries in H2 like the DistinctOn function.

@Robonau
Copy link
Contributor

Robonau commented Jan 9, 2025

syer has said PostgreSQL should be possible in the discord before

@Robonau
Copy link
Contributor

Robonau commented Jan 9, 2025

though an external DB isn't gonna be better for performance
the network overhead alone should make any gains from a faster DB irrelevant
3rd party queries and backups are still valid tho i guess

@Syer10
Copy link
Collaborator

Syer10 commented Jan 9, 2025

There is also the issue of migrations, I am not sure how that has to be handled. Maybe the plain SQL we use will be compatible, or maybe we will need migrations for each database type.

@Robonau
Copy link
Contributor

Robonau commented Jan 9, 2025

i mean for postgres and other SQL compatable DBs migrations in plain SQL should work fine

@Tsabo
Copy link
Author

Tsabo commented Jan 9, 2025

I'm happy that this stirred up some interest. I'll spend the weekend getting my environment set up (necessary requirements, etc..) and playing around with it. I make no promises, but I am motivated for this to be implemented.

@Robonau
Copy link
Contributor

Robonau commented Jan 9, 2025

if u run in to any issues or need help with yr environment or whatnot you are probably best asking in the discord, stuff like that will get lost on github

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants