fief-dev / fief

Users and authentication management SaaS
https://www.fief.dev
Other
488 stars 42 forks source link

using fief with mysql planetscale #212

Closed Ozzy1997 closed 9 months ago

Ozzy1997 commented 1 year ago

Describe the bug

when creating a new workspace and connecting to planetscale i get this error (pymysql.err.OperationalError) (1105, 'create database is not supported') [SQL: CREATE SCHEMA 988150ae-da92-4eae-9a45-6cf8a843741f] (Background on this error at: https://sqlalche.me/e/20/e3q8)

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'create new work space'
  2. connect to the db with the giving info from planetscale with ssl required
  3. click on ('test connection)
  4. Click on 'create the work space '
  5. See error

Expected behavior

this prevent the workspace from being created

Configuration

fief-bailiff[bot] commented 1 year ago

Hail, @Ozzy1997 👋 Welcome to Fief's kingdom!

Our team will get back to you very soon to help.

In the meantime, take a minute to star our repository ⭐️

star-fief

Farewell!

frankie567 commented 1 year ago

Hmm, yes, it comes from the way we manage workspaces inside a database.

With PostgreSQL, we leverage the schema feature, which can be seen as "sub-database": each workspace lives in its own schema.

Unfortunately, with MySQL, this feature is not supported, so we fall back to create a "normal" database. And obvisouly, cloud providers like Planetscale don't allow that.

We have to reconsider this and maybe consider that, for BYOD, we shouldn't try to use a schema but directly the provided database.