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 the address type and persist.Address mapping to the mirror db #1525

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions db/migrations/mirror/000016_custom_types.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
create domain address as text;
5 changes: 5 additions & 0 deletions sqlc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,11 @@ sql:
emit_db_tags: true
emit_pointers_for_null_types: true
overrides:
# DB type overrides. These are typically mappings from our own custom Postgres types to our own Go types,
# which allows us to use standard ::casts to specify query parameter types.
- db_type: 'address'
go_type: 'github.com/mikeydub/go-gallery/service/persist.Address'

# Overrides are prioritized from top to bottom, so if we need to override one of the * entries (like *.id),
# the override should come _before_ the * entry
# Users (and pii.user_view)
Expand Down
Loading