medusajs / medusa

Building blocks for digital commerce
https://medusajs.com
MIT License
24.45k stars 2.4k forks source link

Hardcoded schema name breaks migrations with restricted permissions #7058

Open lechinoix opened 4 months ago

lechinoix commented 4 months ago

Bug report

Describe the bug

System information

Medusa version (including plugins): 1.3.22 Node.js version: Database: Postgres Operating system: MacOS Browser (if relevant):

Steps to reproduce the behavior

  1. Create a user with GRANT ALL ON SCHEMA medusa TO "medusa-user";
  2. Use this user in DATABASE_URL
  3. Run yarn medusa migrations run
  4. It will fail
lechinoix commented 4 months ago

I think we just need to remove the schema here and here