# $Id: magic.md,v 1.9 2008-07-15 01:16:49 price Exp $

### Fault in magicRun indicates that the processing tree failed
magicRun METADATA
    magic_id    S64         0       # Primary Key AUTO_INCREMENT
    state       STR         64      # Key
    workdir     STR         255
    workdir_state STR       255     # Key
    label       STR         64      # key
    dvodb       STR         255
    registered  TAI         NULL
    fault       S16         0       # Key
END

magicInputSkyfile METADATA
    magic_id    S64         0       # Primary Key fkey(magic_id) ref magicRun(magic_id)
    diff_id     S64         0       # Primary Key fkey(diff_id) ref diffRun(diff_id)
    node        STR         64      #
END

magicTree METADATA
    magic_id    S64         0       # Key fkey(magic_id) ref magicRun(magic_id)
    node        STR         64      # Key INDEX(magic_id, node)
    dep         STR         64      # Key
END

magicNodeResult METADATA
    magic_id    S64         0       # Primary Key fkey(magic_id) ref magicRun(magic_id)
    node        STR         64      # Primary Key fkey(magic_id, node) ref magicTree(magic_id, node)
    uri         STR         255
    fault       S16         0       # Key
END

magicMask METADATA
    magic_id    S64         0       # Primary Key fkey(magic_id) ref magicRun(magic_id)
    uri         STR         255
    streaks     S32         0
    fault       S16         0       # Key
END

### I don't think we need this if magic produces mask descriptions. -- PAP.
#magicSkyfileMask METADATA
#    magic_id    S64         0       # Primary Key fkey(magic_id) ref magicRun(magic_id)
#    diff_id     S64         0       # Primary Key fkey(magic_id, diff_id) ref magicInputSkyfile(magic_id, diff_id)
#    uri         STR         255     #  fkey(magic_id) ref magicMask(magic_id)
#END
