© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
1 reply
johnnn

Encountering Error Starting Local Env

I'm running into an odd issue. I've been able to get my local supabase running following the documentation but lately, when I link my remote db to my local using
--project-ref [reference id]
--project-ref [reference id]
, whenever I attempt to
supabase start
supabase start
, I get the following errors:

realtime-dev.supabase_realtime_local-db container logs:
13:46:50.453 [error] Could not create schema migrations table. This error usually happens due to the following:

  * The database does not exist
  * The "schema_migrations" table, which Ecto uses for managing
    migrations, was defined by another library
  * There is a deadlock while migrating (such as using concurrent
    indexes with a migration_lock)

To fix the first issue, run "mix ecto.create".

To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table and/or repository for managing migrations:

    config :realtime, Realtime.Repo,
      migration_source: "some_other_table_for_schema_migrations",
      migration_repo: AnotherRepoForSchemaMigrations
realtime-dev.supabase_realtime_local-db container logs:
13:46:50.453 [error] Could not create schema migrations table. This error usually happens due to the following:

  * The database does not exist
  * The "schema_migrations" table, which Ecto uses for managing
    migrations, was defined by another library
  * There is a deadlock while migrating (such as using concurrent
    indexes with a migration_lock)

To fix the first issue, run "mix ecto.create".

To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table and/or repository for managing migrations:

    config :realtime, Realtime.Repo,
      migration_source: "some_other_table_for_schema_migrations",
      migration_repo: AnotherRepoForSchemaMigrations


I'd really appreciate any help I can get!
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Error starting local database
SupabaseSSupabase / help-and-questions
7mo ago
Pull secrets for local env
SupabaseSSupabase / help-and-questions
6mo ago
Authentication Options in local Env
SupabaseSSupabase / help-and-questions
8mo ago
Feature request - Auto use local.env
SupabaseSSupabase / help-and-questions
13mo ago