# $Id: magic.md,v 1.12 2008-11-26 03:21:13 bills Exp $

### Fault in magicRun indicates that the processing tree failed
magicRun METADATA
    magic_id    S64         0       # Primary Key AUTO_INCREMENT
    exp_id      S64         0       # Key
    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

magicDSRun METADATA
    magic_ds_id S64         0       # Primary Key fkey(magic_ds_id)
    magic_id    S64         0       # Primary Key fkey(magic_id) ref magicRun(magic_id)
    state       STR         0       # Key
    stage       STR         64
    stage_id    S64         0
    cam_id      S64         0
    outroot     STR         255
    recoveryroot    STR     255
    re_place    BOOL        f
    remove      BOOL        f
END

magicDSFile METADATA
    magic_ds_id S64         0       # Primary Key
    component   STR         64
    backup_path_base  STR         255
    recovery_path_base STR        255
    fault       S16         0
END
