Skip to content

Support MariaDB. #1367

Description

@Cleboost

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions