version: "2"
sql:
  - engine: "sqlite"
    queries: "sql/sqlite/*_queries.sql"
    schema: "sql/sqlite/*_schemas.sql"
    gen:
      go:
        package: "sqlite"
        out: "internal/repository/sqlite"
        rename:
          uuid: "UUID"
          oauth_groups: "OAuthGroups"
          oauth_name: "OAuthName"
          oauth_sub: "OAuthSub"
          redirect_uri: "RedirectURI"
        overrides:
          - column: "sessions.oauth_groups"
            go_type: "string"
          - column: "sessions.oauth_name"
            go_type: "string"
          - column: "sessions.oauth_sub"
            go_type: "string"
          - column: "sessions.ldap_groups"
            go_type: "string"
          - column: "oidc_sessions.nonce"
            go_type: "string"
  - engine: "postgresql"
    queries: "sql/postgres/*_queries.sql"
    schema: "sql/postgres/*_schemas.sql"
    gen:
      go:
        package: "postgres"
        out: "internal/repository/postgres"
        rename:
          uuid: "UUID"
          oauth_groups: "OAuthGroups"
          oauth_name: "OAuthName"
          oauth_sub: "OAuthSub"
          redirect_uri: "RedirectURI"
