teable icon indicating copy to clipboard operation
teable copied to clipboard

mysql alternatvie

Open Drjuror opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

Drjuror avatar Jul 23 '24 15:07 Drjuror

can i use mysql not pg instead?

Drjuror avatar Jul 23 '24 15:07 Drjuror

please, no)

mmospanenko avatar Aug 15 '24 08:08 mmospanenko

Related: #832

kpodp0ra avatar Dec 28 '24 14:12 kpodp0ra

I think what is needed is the capability to install self-hosted using MySQL/MariaDB instead of Postgress, I tried to use MySQL image as a database and modify the ENV, but there is an Application level error where the Prisma connection uses a hard-coded constant string "postgresql"

PrismaClientInitializationError: 
Invalid `prisma.attachments.upsert()` invocation:
error: Error validating datasource `db`: the URL must start with the protocol `postgresql://` or `postgres://`.

  -->  schema.prisma:9
   | 
 8 |   provider = "postgres"
 9 |   url      = env("PRISMA_DATABASE_URL")
   | 

decky-grande avatar Jan 16 '25 12:01 decky-grande

@decky-grande I see what you were going for, but unfortunately, it’s not that straightforward. The application was designed with multiple databases in mind, and each database is handled in a modular way through separate files. This means that adding support for another database, like MySQL/MariaDB, is definitely possible. That said, it’s not something that can be done instantly—it requires careful implementation to ensure everything works seamlessly. Simply swapping “postgres” for “mysql” in the schema won’t work because there’s a lot happening under the hood that depends on PostgreSQL.

kpodp0ra avatar Jan 16 '25 15:01 kpodp0ra