Files
dagu/sqlc.yaml
Yota Hamada 04d1f43943 feat: add postgres control-plane store
Add an opt-in PostgreSQL control-plane store with goose migrations, sqlc queries, UUIDv7 identifiers, role-specific connection settings, and PostgreSQL-backed DAG runs, queues, distributed state, auth, audit, workspace, session, webhook, and event stores.

Keep file storage as the default, require explicit agent direct_access for local development, add dev-pg wiring with postgres:18, and add a separate PostgreSQL integration CI job.
2026-05-07 15:34:31 +09:00

80 lines
2.5 KiB
YAML

version: "2"
sql:
- engine: "postgresql"
queries: "internal/persis/controlplanestore/postgres/queries"
schema: "internal/persis/controlplanestore/postgres/migrations"
gen:
go:
package: "db"
out: "internal/persis/controlplanestore/postgres/db"
sql_package: "pgx/v5"
emit_json_tags: true
emit_empty_slices: true
overrides:
- db_type: "uuid"
go_type:
import: "github.com/google/uuid"
type: "UUID"
- db_type: "dagu_uuid_v7"
go_type:
import: "github.com/google/uuid"
type: "UUID"
- db_type: "dagu_uuid_v7"
nullable: true
go_type:
import: "github.com/google/uuid"
type: "NullUUID"
- db_type: "dagu_dag_name"
go_type: "string"
- db_type: "dagu_dag_name"
nullable: true
go_type:
import: "github.com/jackc/pgx/v5/pgtype"
type: "Text"
- db_type: "dagu_dag_run_id"
go_type: "string"
- db_type: "dagu_dag_run_id"
nullable: true
go_type:
import: "github.com/jackc/pgx/v5/pgtype"
type: "Text"
- db_type: "dagu_attempt_id"
go_type: "string"
- db_type: "dagu_attempt_id"
nullable: true
go_type:
import: "github.com/jackc/pgx/v5/pgtype"
type: "Text"
- db_type: "dagu_workspace_name"
nullable: false
go_type: "string"
- db_type: "dagu_workspace_name"
nullable: true
go_type:
import: "database/sql"
type: "NullString"
- db_type: "dagu_label_key"
go_type: "string"
- db_type: "dagu_label_value"
go_type: "string"
- db_type: "dagu_status_code"
nullable: false
go_type: "int32"
- db_type: "dagu_status_code"
nullable: true
go_type:
import: "github.com/jackc/pgx/v5/pgtype"
type: "Int4"
- db_type: "dagu_queue_priority"
go_type: "int32"
- db_type: "dagu_service_name"
go_type: "string"
- db_type: "dagu_service_status"
go_type: "int32"
- db_type: "dagu_auth_role"
go_type: "string"
- db_type: "dagu_audit_category"
go_type: "string"
- db_type: "dagu_event_kind"
go_type: "string"