Skip to content

Commit

Permalink
Add the address type and persist.Address mapping to the mirror db
Browse files Browse the repository at this point in the history
  • Loading branch information
radazen committed Jun 11, 2024
1 parent 176dcf4 commit ea2fdfb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
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

0 comments on commit ea2fdfb

Please sign in to comment.