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

search_path obtain with schema_query is too restrictive #33

Open
neo-escieur opened this issue Jul 12, 2024 · 0 comments
Open

search_path obtain with schema_query is too restrictive #33

neo-escieur opened this issue Jul 12, 2024 · 0 comments

Comments

@neo-escieur
Copy link

neo-escieur commented Jul 12, 2024

On Postgres;
Enum are created in public schema so when you want to insert new record you have an error.
1_init_migration.toml :

[[actions]]
type = "create_enum"
name = "user_type"
values = ["Local", "Social"]
[[actions]]
type = "create_table"
name = "user"
primary_key = ["id"]
....
[[actions.columns]]
	name = "user_type"
	type = "user_type"
	default = "CAST('Local' AS user_type)"
	

so search_path is set to SET search_path TO migration_1_init_migration

and an insert failled because "user_type" does not exist

can you explain how deal correctly with enum ?

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

No branches or pull requests

1 participant