docs: added a note about db user create privilege (#4584)
* docs: added a note about db user create privilege * added troubleshooting section
This commit is contained in:
@@ -70,6 +70,10 @@ DATABASE_URL=<YOUR_DATABASE_URL>
|
||||
|
||||
Where `<YOUR_DATABASE_URL>` is the URL of your PostgreSQL database.
|
||||
|
||||
#### Database User Privileges
|
||||
|
||||
The database user that you use must have create privileges. If you're using the `postgres` superuser, then it should have these privileges by default. Otherwise, make sure to grant your user create priviliges. You can learn how to do that in [PostgreSQL's documentation](https://www.postgresql.org/docs/current/ddl-priv.html).
|
||||
|
||||
### Changing PostgreSQL Schema
|
||||
|
||||
By default, the `public` schema is used in PostgreSQL. You can change it to use a custom schema by passing the `search_path` option in the database URL. For example:
|
||||
|
||||
@@ -4,6 +4,7 @@ title: 'Database Errors'
|
||||
|
||||
import SaslSection from './database-errors/_sasl.md'
|
||||
import ConnectionErrorSection from './database-errors/_connection-error.md'
|
||||
import PrivilegesSection from './database-errors/_privileges.md'
|
||||
|
||||
## Error: SASL: SCRAM-SERVER-FIRST-MESSAGE: Client password must be a string
|
||||
|
||||
@@ -13,4 +14,10 @@ import ConnectionErrorSection from './database-errors/_connection-error.md'
|
||||
|
||||
## Error: connect ECONNREFUSED ::1:5432
|
||||
|
||||
<ConnectionErrorSection />
|
||||
<ConnectionErrorSection />
|
||||
|
||||
---
|
||||
|
||||
## Database User Privileges
|
||||
|
||||
<PrivilegesSection />
|
||||
@@ -0,0 +1,3 @@
|
||||
The database user you use in the `database_url` Medusa backend configuration must have create privileges. Otherwise, you'll face problems when running migrations.
|
||||
|
||||
If you're using the `postgres` superuser, then it should have these privileges by default. Otherwise, make sure to grant your user create privileges. You can learn how to do that in [PostgreSQL's documentation](https://www.postgresql.org/docs/current/ddl-priv.html).
|
||||
@@ -1876,7 +1876,7 @@ module.exports = {
|
||||
{
|
||||
type: "doc",
|
||||
id: "troubleshooting/database-error",
|
||||
label: "Database SASL Error",
|
||||
label: "Database Errors",
|
||||
},
|
||||
{
|
||||
type: "doc",
|
||||
|
||||
@@ -42,7 +42,7 @@ export default function DocItemContent({ children }: Props): JSX.Element {
|
||||
badge && "md:tw-flex md:tw-items-center md:tw-gap-0.5 tw-mb-2"
|
||||
)}
|
||||
>
|
||||
<Heading as="h1" className="!tw-mb-0">
|
||||
<Heading as="h1" className={clsx(badge && "!tw-mb-0")}>
|
||||
{syntheticTitle}
|
||||
{badge && (
|
||||
<Badge
|
||||
|
||||
Reference in New Issue
Block a user