If you create a user in your database with permissions over a schema that is not public, and no permission on the postgres public schema, the initial migrations will fail due to:
query failed: DROP INDEX IF EXISTS "public"."UniqPaymentSessionCartIdProviderId
System information
Medusa version (including plugins): 1.20.2
Node.js version: N/A
Database: postgres
Operating system: Windows
Browser (if relevant): N/A
Steps to reproduce the behavior
Create a postgres database with user medusa_test, and schema medusa
Grant all permissions on medusa schema to medusa_test
In medusaconfig.js setup database_url to connect to postgres with medusa_test user
In medusaconfig.js set database_schema to "medusa"
Bug report
Describe the bug
If you create a user in your database with permissions over a schema that is not public, and no permission on the postgres public schema, the initial migrations will fail due to:
query failed: DROP INDEX IF EXISTS "public"."UniqPaymentSessionCartIdProviderId
System information
Medusa version (including plugins): 1.20.2 Node.js version: N/A Database: postgres Operating system: Windows Browser (if relevant): N/A
Steps to reproduce the behavior
database_url
to connect to postgres with medusa_test userdatabase_schema
to "medusa"Expected behavior
Migrations to complete successfully