feat: add migration
This commit is contained in:
16
internal/worker/sqlc.yaml
Normal file
16
internal/worker/sqlc.yaml
Normal 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
22
internal/worker/worker.go
Normal 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
|
||||
}
|
Reference in New Issue
Block a user