question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Migration failed. Reason: An error occurred running 'pathtoken-column'.

See original GitHub issue

I am trying to deploy supabase on my private server but supabase-storage image is failed to build. This cause other three image to failed alongside in my side.

This is the result of docker image logs for:

  • supabase-storage
running migrations
(node:6) UnhandledPromiseRejectionWarning: Error: Migration failed. Reason: An error occurred running 'pathtoken-column'. Rolled back this migration. No further migrations were run. Reason: schema "storage" does not exist
    at /snapshot/storage-api/node_modules/postgres-migrations/dist/migrate.js:63:27
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async /snapshot/storage-api/node_modules/postgres-migrations/dist/with-lock.js:25:28
(Use `storage-api-x86_64 --trace-warnings ...` to show where the warning was created)

  • supabase-auth
time="2022-07-12T14:34:19Z" level=fatal msg="running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to `host=db user=postgres database=postgres`: dial error (dial tcp 172.22.0.2:5432: connect: connection refused)"
[POP] 2022/07/12 14:34:19 info - 0.0294 seconds
[POP] 2022/07/12 14:34:20 info - 0.0442 seconds
time="2022-07-12T14:34:20Z" level=fatal msg="running db migrations: Migrator: problem creating schema migrations: CREATE TABLE \"schema_migrations\" (\n\"version\" VARCHAR (14) NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migrations_version_idx\" ON \"schema_migrations\" (version);: ERROR: no schema has been selected to create in (SQLSTATE 3F000)"

  • supabase-realtime
2022-07-12 14:34:21.858 [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.RLS.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) schema "realtime" does not exist
    (ecto_sql 3.7.1) lib/ecto/adapters/sql.ex:760: Ecto.Adapters.SQL.raise_sql_call_error/1
    (elixir 1.11.4) lib/enum.ex:1411: Enum."-map/2-lists^map/1-0-"/2
    (ecto_sql 3.7.1) lib/ecto/adapters/sql.ex:852: Ecto.Adapters.SQL.execute_ddl/4
    (ecto_sql 3.7.1) lib/ecto/migrator.ex:678: Ecto.Migrator.verbose_schema_migration/3
    (ecto_sql 3.7.1) lib/ecto/migrator.ex:504: Ecto.Migrator.lock_for_migrations/4
    (ecto_sql 3.7.1) lib/ecto/migrator.ex:419: Ecto.Migrator.run/4
    (ecto_sql 3.7.1) lib/ecto/migrator.ex:146: Ecto.Migrator.with_repo/3
  • supabase-kong
2022/07/12 14:34:18 [warn] 1#0: load balancing method redefined in /usr/local/kong/nginx-kong.conf:59
nginx: [warn] load balancing method redefined in /usr/local/kong/nginx-kong.conf:59
2022/07/12 14:34:18 [error] 1#0: init_by_lua error: /usr/local/share/lua/5.1/kong/init.lua:490: error parsing declarative config file /var/lib/kong/kong.yml:
/var/lib/kong/kong.yml: No such file or directory
stack traceback:
	[C]: in function 'error'
	/usr/local/share/lua/5.1/kong/init.lua:490: in function 'init'
	init_by_lua:3: in main chunk

And here I think i already do all from wiki as it’s written. Can someone help me? .env file is as closely as the example.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
yusuf-khamiscommented, Oct 18, 2022

Am currently encountering this, pretty frustrating to know you’ve done everything right, followed the wiki to the latter and still having some errors poping up, did you manage to figure this one out?

0reactions
sweatybridgecommented, Dec 23, 2022

I will close this issue as fixed. If you are using custom postgres images like timescale/timescaledb-ha:pg14-latest, remember to run migrations to setup initial schemas. These are open sourced in our postgres repo.

The realtime logs are now suppressed by default https://github.com/supabase/supabase/blob/master/docker/docker-compose.yml#L197.

Read more comments on GitHub >

github_iconTop Results From Across the Web

asp.net - PostgreSql migration error - Stack Overflow
1 Answer 1 · Delete all existing migrations and Add-Migration from scratch. · Be sure there's not an existing database (that specified in...
Read more >
Data migration service error codes - Google Support
There was an unexpected error when Google tried to authenticate to the Exchange server. This error indicates one of the following issues: The...
Read more >
Why is my AWS DMS task in an error status?
An AWS DMS task that is in an error status means that one or more of the tables in the task couldn't be...
Read more >
Troubleshooting Mover migration errors - Microsoft Learn
Authorize the connector by granting admin consent in the Azure Tenant for the "Office 365 Mover" App. Error: "Authorization failure" shown on ......
Read more >
Migration failed while copying data, Broken Pipe (1013150 ...
vMotion fails at 10%; You see these errors in vCenter Server: A general system error occurred: Migration failed while copying data, Broken Pipe...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found