Convert the database integrity check from GORM to sqlc. No functional changes. Ref: #104305
boolean
smallint
FetchWorkerTask()