feat: add migration

This commit is contained in:
2025-01-16 13:48:05 +01:00
parent 703f2ae096
commit a68eae8519
9 changed files with 198 additions and 16 deletions

16
internal/worker/sqlc.yaml Normal file
View File

@@ -0,0 +1,16 @@
version: "2"
sql:
- queries: queries.sql
schema: ../persistence/migrations/
engine: "postgresql"
gen:
go:
out: "repositories"
package: "repositories"
sql_package: "sql/db"
emit_json_tags: true
emit_prepared_queries: true
emit_interface: true
emit_empty_slices: true
emit_result_struct_pointers: true
emit_params_struct_pointers: true

22
internal/worker/worker.go Normal file
View File

@@ -0,0 +1,22 @@
package worker
import (
"context"
"github.com/google/uuid"
)
type Worker struct {
workerID uuid.UUID
}
func NewWorker() *Worker {
return &Worker{
workerID: uuid.New(),
}
}
func (w *Worker) Setup(ctx context.Context) error {
return nil
}