Skip to content
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

Add schema awareness to Postgres create_enum #44896

Conversation

philip-maina
Copy link

Summary

This PR fixes #44895 .

@philip-maina philip-maina changed the title Add schema awareness to postgres enum creation Add schema awareness to Postgres create_enum Apr 14, 2022
@philip-maina philip-maina changed the title Add schema awareness to Postgres create_enum Add schema awareness to Postgres create_enum Apr 14, 2022
@philip-maina philip-maina changed the title Add schema awareness to Postgres create_enum Add schema awareness to Postgres create_enum Apr 14, 2022
@philip-maina philip-maina force-pushed the add-schema-awareness-to-postgres-enum-creation branch from 1b9dabb to 70ff7b3 Compare April 16, 2022 18:46
end
ensure
@connection.drop_schema "test_schema"
@connection.schema_search_path = "'$user', public"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than hard coding the value here I think you should store the current value at the start of the test and reset it here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thanks.

@ghiculescu
Copy link
Member

Thanks for the fix here! It’ll just need review from the core / committer team.

@philip-maina philip-maina force-pushed the add-schema-awareness-to-postgres-enum-creation branch from 70ff7b3 to 4d1b276 Compare April 17, 2022 22:44
@ghiculescu ghiculescu added the ready PRs ready to merge label Apr 18, 2022
@yahonda yahonda merged commit 502c472 into rails:main May 31, 2022
ghiculescu added a commit to ghiculescu/rails that referenced this pull request Aug 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
activerecord ready PRs ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Postgresql create_enum fails to create the enum type in the current schema.
3 participants