Added a new sync that uses hash

Added a new sync that uses hash and sqlc for the queries. Added db
migration. Started adding a config file.
This commit is contained in:
2024-12-19 12:11:20 +01:00
parent 8fa93d580d
commit 5ab19e16e5
26 changed files with 1527 additions and 45 deletions

37
sqlc.yaml Normal file
View File

@@ -0,0 +1,37 @@
version: "2"
sql:
- engine: "postgresql"
queries: "./db/queries"
schema: "./db/migrations"
gen:
go:
emit_json_tags: true
package: "repository"
out: "db/repository"
sql_package: "pgx/v5"
overrides:
- db_type: "pg_catalog.timestamp"
go_type:
import: "time"
type: "Time"
- db_type: "pg_catalog.timestamp"
nullable: true
go_type:
pointer: true
import: "time"
type: "Time"
- db_type: "pg_catalog.varchar"
nullable: true
go_type:
pointer: true
type: "string"
- db_type: "int4"
nullable: true
go_type:
pointer: true
type: "int32"
- db_type: "date"
nullable: false
go_type:
import: "time"
type: "Time"