8000 enh: prefix schema to enum migrations by willnode · Pull Request #2040 · supabase/auth · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

enh: prefix schema to enum migrations #2040

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

willnode
Copy link

Add support for nonstandard search path migrations

What kind of change does this PR introduce?

Continuation of #1983 and fixes #1729

What is the current behavior?

The current migration script assumes the search path has been set to a custom schema.

ALTER USER supabase_auth_admin SET search_path = '$DB_NAMESPACE';

If this step missed, the default schema for all migrations is public. This should be fine if all tables and enums are prefixed accordingly, but currently it's not. All postgres enum is not prefixed with schema.

What is the new behavior?

All postgres enum will be prefixed with the schema. This should fixes issue #1729 where the migration is broken if search path is not set properly.

This doesn't introduce a breaking change, because if search_path is already set all enums stay on the former search_path .

Additional context

Haven't test. Will test soon.

Add support for nonstandard search path migrations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with migrations
1 participant
0