How To Change SQLite To MongoDB Database after creating app using CLI 3.0 with Remix Template?

Topic summary

Users are encountering errors when attempting to migrate a Shopify Remix app from SQLite to MongoDB using Prisma. Despite following official Shopify and Prisma documentation to update the schema.prisma file with MongoDB provider settings and configuring the DATABASE_URL environment variable, the migration process fails.

Key Issue:

  • Error message indicates: “The provider ‘mongodb’ is not supported with this command”
  • Problem persists even after proper schema configuration

Current Status:

  • Multiple users experiencing the same issue for extended periods (2+ days of troubleshooting)
  • A GitHub issue thread has been referenced as a potential resource: shopify-app-template-remix/issues/285
  • No confirmed solution has been shared yet; discussion remains open with users seeking guidance
Summarized with AI on November 16. AI used: claude-sonnet-4-5-20250929.

In my schema.prisma file I have made some chenges as per the Shopify and prisma documentation

datasource db {
provider = “mongodb”
url = env(“DATABASE_URL”)
}

generator client {
provider = “prisma-client-js”
}

model Session {
id String @id @default(auto()) @map(“_id”) @db.ObjectId
shop String
state String
isOnline Boolean @default(false)
scope String?
expires DateTime?
accessToken String
userId Int?
}

I entered the DATABASE_URL also as per the documentation but still I’m not able to migrate to MongoDB

2 Likes

I have the same problem and I’ve been trying to find a solution for 2 days already :sad_but_relieved_face:

You get this Error: The “mongodb” provider is not supported with this command. ???

See https://github.com/Shopify/shopify-app-template-remix/issues/285#issuecomment-1700603930

1 Like