Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Can Payload work with MSSQL ?

default discord avatar
rentprompts2 years ago
4

Payload officially support Mongo and Postgress for now but I read somewhere that it is compatible with any database. Can payload work with MS-SQL server ? and works the same way as it does with officially supported databases. Any help on this much appreciated.

  • default discord avatar
    markatomniux2 years ago
    They are looking into adding adapters for MY-SQL!

    https://github.com/payloadcms/payload/discussions/287

    Right now they are more focused on Payload v3 from Express to NextJS, but under the hood Payload uses Drizzle, so it will hopefully be a relatively easy addition 🙂

    I misread it as mysql, According to Drizzle (the ORM Payload uses for Postgress and hopefully other DBs) they currently do not have support for MSSQL, but there's a PR for it -

    https://github.com/drizzle-team/drizzle-orm/pull/1610
  • default discord avatar
    rentprompts2 years ago

    I feel they should implement a generic adaptor for all SQL databases, so that its easy to switch over or point more databases as the clients have their own databases and they can not go with what payload supports only. To increase more adoption payload should aim to write a generic stable adaptor, I am open to support this cause.



    I've proposed payload to one of my big client and he loved it but the moment we got to know that we don't have MS SQL adaptor currently, we got little disappointed. Payload is been working so nice so far where we have Mongo DB. Postgres has still some issues. If we go one by one and write adaptors it will take us time to increase the adoption. We should vision for writing a generic adaptor or an option to write a quick one by your own. This way we increase the adoption, everyone would be in a position where they can adopt. My client is group of 10+ companies and they all use Azure MS SQL, but since we dont have the adaptor ready they will move on to something else. Thats why I want to support if someone can write adaptor for MSQL or a generic one.

  • discord user avatar
    denolfe
    2 years ago

    We use Drizzle ORM under the hood. There is actually work underway to support SQLite, which abstracts many of the common pieces for DBs. This paves the way for more DB support.



    That being said, adding more DB adapters means more upkeep, so we don't take these decisions lightly.



    MS SQL is quite down the list in demand from our perspective

  • default discord avatar
    rentprompts2 years ago

    Is there any way to do it with MASQL, we are desperate.



    MSSQl*

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.