cli: Realtime fails on supabase cli v1.112.0
Describe the bug During local development, realtime fails to initialize with Could not create schema migrations table.
To Reproduce Steps to reproduce the behavior:
- Install supabase 1.112.0
supabase start- Observe log failure in console output
Expected behavior Realtime should work in local development.
Screenshots N/A
Desktop (please complete the following information):
- OS: macOS Sonoma (14.1)
- Browser (if applicable) [e.g. chrome, safari]
- Version of CLI: 1.112.0
- Version of supabase-js (if applicable) [e.g. v2.22.0]
- Version of Node.js: 18.18.2
Additional context Error log:
realtime-dev.supabase_realtime_biblio container logs:
14:05:09.866 [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
The full error report is shown below.
** (Postgrex.Error) ERROR 3F000 (invalid_schema_name) no schema has been selected to create in
(ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:932: Ecto.Adapters.SQL.raise_sql_call_error/1
(elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
(ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:1024: Ecto.Adapters.SQL.execute_ddl/4
(ecto_sql 3.8.3) lib/ecto/migrator.ex:696: Ecto.Migrator.verbose_schema_migration/3
(ecto_sql 3.8.3) lib/ecto/migrator.ex:510: Ecto.Migrator.lock_for_migrations/4
(ecto_sql 3.8.3) lib/ecto/migrator.ex:422: Ecto.Migrator.run/4
(ecto_sql 3.8.3) lib/ecto/migrator.ex:146: Ecto.Migrator.with_repo/3
nofile:1: (file)
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (8 by maintainers)
We pushed a fix that potential fixes this. A seed file had a wrong configuration hence it was impossible for it to create migrations.
https://github.com/supabase/cli/pull/1672
After both recommendations it worked, thanks @sweatybridge and @filipecabaco !