From 60e42bcbda4344d11bf7e87f9ccab8ad34eb2177 Mon Sep 17 00:00:00 2001 From: Qiao Han Date: Fri, 20 Jan 2023 10:40:01 +0800 Subject: [PATCH] chore: document how to migrate external database --- apps/docs/pages/guides/self-hosting/docker.mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/docs/pages/guides/self-hosting/docker.mdx b/apps/docs/pages/guides/self-hosting/docker.mdx index 0a32049889b..d789a0e9ee1 100644 --- a/apps/docs/pages/guides/self-hosting/docker.mdx +++ b/apps/docs/pages/guides/self-hosting/docker.mdx @@ -95,6 +95,10 @@ POSTGRES_PORT=5432 Once you have done this, you can safely comment out the `db` section of the `docker-compose` file, and remove any instances where the services `depends_on` the `db` image. +Supabase services require your external database to be initialized with a specific schema. Refer to our [postgres/migrations](https://github.com/supabase/postgres/tree/develop/migrations) repository for instructions on running these migrations. + +Note that you need superuser permission on the postgres role to perform the initial schema migration. Once completed, the postgres role will be demoted to non-superuser to prevent abuse. + ### Setting database's `log_min_messages` By default, `docker compose` sets the database's `log_min_messages` configuration to `fatal` to prevent redundant logs generated by Realtime.