Skip to content

Issue: Database Initialization Not Setting Up Tables Correctly #36073

@mmark23

Description

@mmark23

When deploying this project (following the README instructions), the supabase-db container is started, but the expected database tables (like users, sources, etc.) are missing. Services depending on these tables (such as auth, storage, realtime) fail with errors including:

ERROR: relation "users" does not exist
and

password authentication failed for user "supabase_auth_admin"

Steps to reproduce

Clone the repo.

Copy .env.example to .env and fill in / replace required values.

Run docker compose down -v && docker compose up -d to reset and start fresh.

Check logs for supabase-db container.

Expected behavior

The initial database setup (docker-entrypoint-initdb.d) should create the necessary tables, schemas, and users so that all dependent services can connect and run properly as per video.

Actual behavior

The logs show these tables are missing and some users don’t have passwords assigned. It appears that:

the docker-entrypoint-initdb.d scripts might not be executed at all, or

some important SQL scripts for the base schema (users, etc.) are missing from the init phase.

I’ve checked the repo’s docker/init and docker/volumes/db folders, and I see many .sql files (roles.sql, data.sql, etc.). However, it’s unclear:

✅ Which scripts are meant to be run for the initial database setup
✅ If they’re ordered properly (since docker-entrypoint-initdb.d executes them alphabetically)
✅ Whether essential tables (like users) are meant to be created by a migration instead

System details
OS: Ubuntu 24.04.02
Docker version: 28.2.2
Supabase repo branch: [master]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions