Files
Mediarr/sqlc.yaml
T

77 lines
3.7 KiB
YAML

version: "2"
sql:
- engine: "sqlite"
queries: "./database/query/query.sql"
schema: "./database/migrations/00001_schema.sql"
gen:
go:
package: "database"
out: "database"
overrides:
# UUID (BLOB 16 octets), non null
- column: "principal.id"
go_type: { import: "mediarr/ident", type: "UUID" }
- column: "membership.group_id"
go_type: { import: "mediarr/ident", type: "UUID" }
- column: "membership.member_id"
go_type: { import: "mediarr/ident", type: "UUID" }
- column: "account.principal_id"
go_type: { import: "mediarr/ident", type: "UUID" }
- column: "session.id"
go_type: { import: "mediarr/ident", type: "UUID" }
- column: "session.principal_id"
go_type: { import: "mediarr/ident", type: "UUID" }
- column: "storage_policy.id"
go_type: { import: "mediarr/ident", type: "UUID" }
- column: "storage_backend.id"
go_type: { import: "mediarr/ident", type: "UUID" }
- column: "blob_location.backend_id"
go_type: { import: "mediarr/ident", type: "UUID" }
- column: "staging_item.id"
go_type: { import: "mediarr/ident", type: "UUID" }
- column: "document.id"
go_type: { import: "mediarr/ident", type: "UUID" }
- column: "document.owner_id"
go_type: { import: "mediarr/ident", type: "UUID" }
- column: "document.created_by"
go_type: { import: "mediarr/ident", type: "UUID" }
- column: "document_version.id"
go_type: { import: "mediarr/ident", type: "UUID" }
- column: "document_version.document_id"
go_type: { import: "mediarr/ident", type: "UUID" }
- column: "document_version.author_id"
go_type: { import: "mediarr/ident", type: "UUID" }
- column: "acl_entry.id"
go_type: { import: "mediarr/ident", type: "UUID" }
- column: "acl_entry.document_id"
go_type: { import: "mediarr/ident", type: "UUID" }
- column: "acl_entry.subject_id"
go_type: { import: "mediarr/ident", type: "UUID" }
- column: "acl_entry.granted_by"
go_type: { import: "mediarr/ident", type: "UUID" }
- column: "library_config.document_id"
go_type: { import: "mediarr/ident", type: "UUID" }
- column: "export_target.id"
go_type: { import: "mediarr/ident", type: "UUID" }
- column: "export_target.library_id"
go_type: { import: "mediarr/ident", type: "UUID" }
- column: "export_link.target_id"
go_type: { import: "mediarr/ident", type: "UUID" }
- column: "export_link.document_id"
go_type: { import: "mediarr/ident", type: "UUID" }
# UUID nullables
- column: "principal.successor_id"
go_type: { import: "mediarr/ident", type: "UUID", pointer: true }
- column: "document.parent_id"
go_type: { import: "mediarr/ident", type: "UUID", pointer: true }
- column: "document.head_version_id"
go_type: { import: "mediarr/ident", type: "UUID", pointer: true }
- column: "document.policy_id"
go_type: { import: "mediarr/ident", type: "UUID", pointer: true }
- column: "document.deleted_by"
go_type: { import: "mediarr/ident", type: "UUID", pointer: true }
- column: "document_version.device_id"
go_type: { import: "mediarr/ident", type: "UUID", pointer: true }
- column: "export_target.consent_by"
go_type: { import: "mediarr/ident", type: "UUID", pointer: true }