Yureien / YABin

Yet another pastebin, simple but feature-rich, along with a CLI client
https://bin.sohamsen.me/
MIT License
142 stars 18 forks source link

Database Compatibility Issues: MySQL and SQLite Not Supported as Claimed #51

Open QuintenQVD0 opened 1 month ago

QuintenQVD0 commented 1 month ago

Database Compatibility Issues

I was initially excited about this project due to its promise of supporting MySQL and SQLite. However, I've encountered several issues that have forced me to consider alternative solutions. The project claims to support MySQL and SQLite, but in my experience, this support is not functional.

Issues Encountered

  1. Database Selection Ignored:

    • Regardless of what is specified for the database in the .env file, the project always defaults to using PostgreSQL. Manual changes in the schema file are required to specify a different database.
  2. SQLite Configuration Errors:

    • When setting the database to sqlite with file:./main.db, the application encounters errors and fails to connect.
  3. MySQL Port Issue:

    • The .env file contains a hardcoded port for the MySQL connection string that does not match the default MySQL port. This requires manual modification of the connection string.
  4. Database Specification Issues:

    • There is no direct method to specify the desired database without modifying the connection string manually.
  5. Migration Problems:

    • After successfully connecting to the desired database, the application fails to migrate schemas properly. Adding a migration command to the package.json file results in errors indicating mismatches with migration_lock.toml. After adjusting this, SQL errors occur, as the migrations seem to be designed exclusively for PostgreSQL.

Screenshots

Database Configuration Error

Migration Error

Request

Please address these issues or update the documentation to clarify the actual database support. The current state of the project does not align with the claim of supporting MySQL and SQLite.

Thank you for your attention to these matters.

Yureien commented 1 month ago

This is due to the underlying Prisma ORM. You could specify the database directly in the .env file earlier but now it is required to be hard-coded into the schema.

I'll see what can be done to make this easier, but you can still use SQLite/MySQL with some changes to the schema and regenerating migration files. The project itself is not using any PostgreSQL specific features.

On Fri, 17 May, 2024, 20:16 Quinten, @.***> wrote:

Database Compatibility Issues

I was initially excited about this project due to its promise of supporting MySQL and SQLite. However, I've encountered several issues that have forced me to consider alternative solutions. The project claims to support MySQL and SQLite, but in my experience, this support is not functional. Issues Encountered

1.

Database Selection Ignored:

  • Regardless of what is specified for the database in the .env file, the project always defaults to using PostgreSQL. Manual changes in the schema file are required to specify a different database. 2.

    SQLite Configuration Errors:

  • When setting the database to sqlite with file:./main.db, the application encounters errors and fails to connect. 3.

    MySQL Port Issue:

  • The .env file contains a hardcoded port for the MySQL connection string that does not match the default MySQL port. This requires manual modification of the connection string. 4.

    Database Specification Issues:

  • There is no direct method to specify the desired database without modifying the connection string manually. 5.

    Migration Problems:

  • After successfully connecting to the desired database, the application fails to migrate schemas properly. Adding a migration command to the package.json file results in errors indicating mismatches with migration_lock.toml. After adjusting this, SQL errors occur, as the migrations seem to be designed exclusively for PostgreSQL.

Screenshots

afbeelding.png (view on web) https://github.com/Yureien/YABin/assets/67589015/8842dd69-9745-4ba8-8952-008440666ab8

afbeelding.png (view on web) https://github.com/Yureien/YABin/assets/67589015/40254412-0166-4b26-a14a-954db001faea Request

Please address these issues or update the documentation to clarify the actual database support. The current state of the project does not align with the claim of supporting MySQL and SQLite.

Thank you for your attention to these matters.

— Reply to this email directly, view it on GitHub https://github.com/Yureien/YABin/issues/51, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEENSIJ6UVLBIJPFQG3BPWLZCYJ25AVCNFSM6AAAAABH4I66U2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGMYDEOJUGAZTIMQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

QuintenQVD0 commented 1 month ago

afbeelding

import.zip

A litte magic and a converted postgress dump and I got it to work but this was way to advanced for normal users.