- **n8n version: 1.4.1
- **Database (default: SQLite):postgresQL
- **n8n EXECUTIONS_PROCESS setting (default: own, main):default
- **Running n8n via (Docker, npm, n8n cloud, desktop app):Docker
- **Operating system:Amazon Linux 2
So basically I just specified my custom schema and when I do it seems to only create the “migrations” table and nothing else. The setup runs flawlessly when I don’t specify the schema (defaults to “public” schema).
error:
There was an error running database migrations
n8n_docker-n8n-1 | TypeORMError: Table "user" does not exist.
n8n_docker-postgres-1 | 2023-09-01 14:10:59.841 UTC [436] FATAL: role "-d" does not exist
docker-compose.yml:
version: '3.8'
volumes:
db_storage:
n8n_storage:
services:
postgres:
image: postgres:11
restart: always
environment:
- POSTGRES_USER=***
- POSTGRES_PASSWORD=***
- POSTGRES_DB=***
- DB_POSTGRESDB_SCHEMA=N8N
- POSTGRES_NON_ROOT_USER
- POSTGRES_NON_ROOT_PASSWORD
volumes:
- db_storage:/var/lib/postgresql/data
- ./init-data.sh:/docker-entrypoint-initdb.d/init-data.sh
healthcheck:
test: ['CMD-SHELL', 'pg_isready -h localhost -U ${POSTGRES_USER} -d ${POSTGRES_DB}']
interval: 5s
timeout: 5s
retries: 10
n8n:
image: docker.n8n.io/n8nio/n8n
restart: always
environment:
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=***
- DB_POSTGRESDB_PORT=5432
- DB_POSTGRESDB_DATABASE=***
- DB_POSTGRESDB_USER=***
- DB_POSTGRESDB_PASSWORD=***
- DB_POSTGRESDB_SCHEMA=N8N
ports:
- 5678:5678
links:
- postgres
volumes:
- n8n_storage:/home/node/.n8n
depends_on:
postgres:
condition: service_healthy
I created the schema in my database so I have no idea what’s going on, thank you in advance!