studio icon indicating copy to clipboard operation
studio copied to clipboard

Support MariaDB.

Open Cleboost opened this issue 4 months ago • 5 comments

Hi! I've just updated Prisma to v7 and it works fine on my backend, but Prisma Studio won't load and gives me some errors. I've done some research but couldn't find a solution. I only found that the MariaDB dialect is a little bit different from MySQL.

introspect, 12:31:10
Error
SQL Query

select `t`.`TABLE_SCHEMA` as `schema`, `t`.`TABLE_NAME` as `name`, `t`.`TABLE_TYPE` as `type`, (select cast(coalesce(json_arrayagg(json_object('name', `agg`.`name`, 'datatype', `agg`.`datatype`, 'position', `agg`.`position`, 'fk_table', `agg`.`fk_table`, 'fk_column', `agg`.`fk_column`, 'autoincrement', `agg`.`autoincrement`, 'computed', `agg`.`computed`, 'pk', `agg`.`pk`, 'nullable', `agg`.`nullable`)), '[]') as json) from (select `c`.`COLUMN_NAME` as `name`, `c`.`COLUMN_TYPE` as `datatype`, `c`.`ORDINAL_POSITION` as `position`, `kcu`.`REFERENCED_TABLE_NAME` as `fk_table`, `kcu`.`REFERENCED_COLUMN_NAME` as `fk_column`, `c`.`EXTRA` = ? as `autoincrement`, `c`.`EXTRA` in (?, ?, ?) as `computed`, `c`.`COLUMN_KEY` = ? as `pk`, `c`.`IS_NULLABLE` = ? as `nullable` from `information_schema`.`columns` as `c` left join `information_schema`.`KEY_COLUMN_USAGE` as `kcu` on `kcu`.`TABLE_SCHEMA` = `c`.`TABLE_SCHEMA` and `kcu`.`TABLE_NAME` = `c`.`TABLE_NAME` and `kcu`.`COLUMN_NAME` = `c`.`COLUMN_NAME` and `kcu`.`POSITION_IN_UNIQUE_CONSTRAINT` is not null where `c`.`TABLE_SCHEMA` = `t`.`TABLE_SCHEMA` and `c`.`TABLE_NAME` = `t`.`TABLE_NAME`) as agg) as `columns` from `information_schema`.`tables` as `t` where `t`.`TABLE_SCHEMA` = database() and `t`.`TABLE_TYPE` in (?, ?) order by `t`.`TABLE_SCHEMA`, `t`.`TABLE_NAME`, `t`.`TABLE_TYPE`
Error Details
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'json) from (select `c`.`COLUMN_NAME` as `name`, `c`.`COLUMN_TYPE` as `datatyp...' at line 1

I am on 10.11.14-MariaDB-0+deb12u2

OS: Linux CashyOS (arch based) Database: 10.11.14-MariaDB-0+deb12u2 Browser: Chromium

Cleboost avatar Nov 22 '25 11:11 Cleboost

Hey 👋

The first iteration of new Prisma Studio supports PostgreSQL, MySQL and SQLite. Sorry about that.

igalklebanov avatar Nov 22 '25 14:11 igalklebanov

I need this too 🔥

KevinVedder avatar Nov 26 '25 08:11 KevinVedder

I need this fix :)

GVALFER avatar Nov 26 '25 23:11 GVALFER

I need this fix.

obconbiz avatar Dec 08 '25 15:12 obconbiz

latest TiDB doesn't work too

seyukun avatar Dec 12 '25 04:12 seyukun