---
TaskQueueEntry:
  tableName: taskqueue_entries
  columns:
    id:
      type: integer
      primary: true
      autoincrement: true
      unsigned: true
    taskname: &STR
      type: string(128)
      notnull: true
    method: *STR
    format: string(128)
    body:
      type: string
    priority:
      type: integer
      unsigned: true
      notnull: true
      default: 0

TaskQueueEntryArgument:
  tableName: taskqueue_entry_arguments
  columns:
    entry_id:
      type: integer
      notnull: true
      unsigned: true
      primary: true
    name:
      type: string(128)
      notnull: true
      primary: true
    value: string
  relations:
    TaskQueueEntry:
      local: entry_id
      foreign: id
      alias: Entry
      foreignAlias: Arguments
      onUpdate: cascade
      onDelete: cascade

TaskQueueEntryTag:
  tableName: taskqueue_entry_tags
  columns:
    entry_id:
      type: integer
      notnull: true
      unsigned: true
      primary: true
    tag:
      type: string(128)
      notnull: true
      primary: true
  relations:
    TaskQueueEntry:
      local: entry_id
      foreign: id
      alias: Entry
      foreignAlias: Tags
      onUpdate: cascade
      onDelete: cascade
