-
Notifications
You must be signed in to change notification settings - Fork 923
Disable schema prefix in generated structs name, eg, SchemaTableName
from schema.table_name
#3211
-
Is it possible to drop the schema from the generated struct without having to manually rename each one?
Eg.
create table app.users (
id uuid primary key,
confirmed boolean not null default false,
type AppUser struct {
ID pgtype.UUID
Confirmed bool
I understand that there might be conflicts if the schema name is dropped, but I'd deal with that in another way. (by prefixing only in the case of a conflict if possible).
This is especially annoying since the new postgres 15 changes and the move towards using per user schemas, and discouraging the usage of public schema.
My full setup uses SQLC queries with atlas-go
for migration generation out of a db schema, not sure if there is a better way of doing this.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 1 reply
-
I have the same problem. Did you find any solution?
Beta Was this translation helpful? Give feedback.
All reactions
-
Just stopped specifying the schema explicitly for now, haven't found a better solution
Beta Was this translation helpful? Give feedback.
All reactions
-
👀 1