<?xml version="1.0" encoding="UTF-8"?><database name="assignrhythm" schema="public" type="PostgreSQL - 18.4 (Ubuntu 18.4-1.pgdg24.04+1)">
   <sequences>
      <sequence increment="1" name="assignment_events_id_seq" startValue="1"/>
      <sequence increment="1" name="assignments_id_seq" startValue="1"/>
      <sequence increment="1" name="deliverables_id_seq" startValue="1"/>
   </sequences>
   <tables>
      <table name="assignment_events" remarks="{&quot;what&quot;:&quot;Log of assignment status transitions, including failed attempts.&quot;,&quot;why&quot;:&quot;Without it, there is no audit trail to reconstruct assignment status history or diagnose failed transitions.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-22T23:54:10.208444657+00:00&quot;}" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('assignment_events_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="{&quot;what&quot;:&quot;Unique numeric identifier for the event; auto-generated sequence.&quot;,&quot;why&quot;:&quot;Without it, events cannot be uniquely identified or referenced.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-22T23:54:10.228591064+00:00&quot;}" size="19" type="bigserial" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="assignment_id" nullable="false" remarks="{&quot;what&quot;:&quot;Identifier of the assignment this event belongs to.&quot;,&quot;why&quot;:&quot;Without it, it is unknown which assignment the event refers to, making the log useless.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-22T23:54:10.250393896+00:00&quot;}" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="assignment_events_assignment_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="assignments"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="from_status" nullable="true" remarks="{&quot;what&quot;:&quot;Status value the assignment was in before the transition; null when no prior status.&quot;,&quot;why&quot;:&quot;Without it, the starting point of the transition is unknown, so the change cannot be reconstructed.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-22T23:54:10.269128990+00:00&quot;}" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="to_status" nullable="true" remarks="{&quot;what&quot;:&quot;Status value the assignment moved to; null if no new status was set.&quot;,&quot;why&quot;:&quot;Without it, the outcome of the transition is unknown, so the final state cannot be determined.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-22T23:54:10.297198035+00:00&quot;}" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="detail" nullable="true" remarks="{&quot;what&quot;:&quot;Free-form text with extra context about the event, such as reason or message.&quot;,&quot;why&quot;:&quot;Without it, context beyond status change is lost, making debugging and auditing incomplete.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-22T23:54:10.327447333+00:00&quot;}" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="error" nullable="true" remarks="{&quot;what&quot;:&quot;Error message if the transition failed; null on success.&quot;,&quot;why&quot;:&quot;Without it, failed transitions are indistinguishable from successful ones, hiding problems.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-22T23:54:10.445040845+00:00&quot;}" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="6" name="created_at" nullable="false" remarks="{&quot;what&quot;:&quot;Timestamp with time zone of when the event was logged.&quot;,&quot;why&quot;:&quot;Without it, the order and timing of events is unknown, breaking chronological analysis.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-22T23:54:10.500236624+00:00&quot;}" size="35" type="timestamptz" typeCode="93"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="assignment_events_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="idx_assignment_events_assignment" unique="false">
            <column ascending="true" name="assignment_id"/>
            <column ascending="false" name="created_at"/>
         </index>
      </table>
      <table name="assignments" remarks="{&quot;what&quot;:&quot;A unit of work tied to an application, with its own lifecycle and outcome.&quot;,&quot;why&quot;:&quot;Without it, the state and result of each application's task would be untracked.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-22T23:54:22.714934767+00:00&quot;}" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('assignments_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="{&quot;what&quot;:&quot;Unique integer from a sequence; identifies this row.&quot;,&quot;why&quot;:&quot;Without it, rows cannot be referenced uniquely by foreign keys or updates.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-22T23:54:22.744590818+00:00&quot;}" size="19" type="bigserial" typeCode="-5">
            <child column="assignment_id" foreignKey="assignment_events_assignment_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="assignment_events"/>
            <child column="assignment_id" foreignKey="deliverables_assignment_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="deliverables"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="application_id" nullable="false" remarks="{&quot;what&quot;:&quot;Identifier of the application this assignment is for.&quot;,&quot;why&quot;:&quot;Without it, assignments cannot be linked to their parent application.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-22T23:54:22.759579475+00:00&quot;}" size="19" type="int8" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="job_id" nullable="true" remarks="{&quot;what&quot;:&quot;Identifier of the job associated with this assignment, if any.&quot;,&quot;why&quot;:&quot;Without it, the job context for the assignment is unknown.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-22T23:54:22.777008369+00:00&quot;}" size="19" type="int8" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="business_id" nullable="true" remarks="{&quot;what&quot;:&quot;Identifier of the business that owns the job or assignment.&quot;,&quot;why&quot;:&quot;Without it, the responsible business for this assignment is unknown.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-22T23:54:22.889856004+00:00&quot;}" size="19" type="int8" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="kind" nullable="false" remarks="{&quot;what&quot;:&quot;Category of assignment, such as coding or writing.&quot;,&quot;why&quot;:&quot;Without it, the format and expected output of the assignment are ambiguous.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-22T23:54:22.963993747+00:00&quot;}" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="brief" nullable="false" remarks="{&quot;what&quot;:&quot;Full instructions or description of the assignment.&quot;,&quot;why&quot;:&quot;Without it, the assignee has no details on what to do.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-22T23:54:23.002656610+00:00&quot;}" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="attachments" nullable="true" remarks="{&quot;what&quot;:&quot;JSON array of file references or metadata attached to the assignment.&quot;,&quot;why&quot;:&quot;Without it, supporting files for the assignment are missing.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-22T23:54:23.026621877+00:00&quot;}" size="2147483647" type="jsonb" typeCode="1111"/>
         <column autoUpdated="false" defaultValue="null" digits="6" id="7" name="due_at" nullable="true" remarks="{&quot;what&quot;:&quot;Deadline for submission, in UTC with time zone.&quot;,&quot;why&quot;:&quot;Without it, there is no deadline to enforce or track.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-22T23:54:23.136330608+00:00&quot;}" size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="'received'::text" digits="0" id="8" name="status" nullable="false" remarks="{&quot;what&quot;:&quot;Current state of the assignment, e.g., received, in_progress, submitted.&quot;,&quot;why&quot;:&quot;Without it, you cannot know whether the assignment is pending, active, or done.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-22T23:54:23.262172544+00:00&quot;}" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="last_error" nullable="true" remarks="{&quot;what&quot;:&quot;Error message from the last failed processing attempt.&quot;,&quot;why&quot;:&quot;Without it, the cause of a failed attempt is unknown.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-22T23:54:23.309648787+00:00&quot;}" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="6" id="10" name="last_solve_at" nullable="true" remarks="{&quot;what&quot;:&quot;Timestamp of the most recent automated solve attempt.&quot;,&quot;why&quot;:&quot;Without it, you cannot tell when the last attempt occurred.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-22T23:54:23.353528606+00:00&quot;}" size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="solve_attempts" nullable="false" remarks="{&quot;what&quot;:&quot;Count of automated solve attempts made so far.&quot;,&quot;why&quot;:&quot;Without it, you cannot limit retries or detect repeated failures.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-22T23:54:23.413505240+00:00&quot;}" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="submission_path" nullable="true" remarks="{&quot;what&quot;:&quot;File path or URL where the final submission is stored.&quot;,&quot;why&quot;:&quot;Without it, the submitted work cannot be retrieved.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-22T23:54:23.427573306+00:00&quot;}" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="6" id="13" name="submitted_at" nullable="true" remarks="{&quot;what&quot;:&quot;Timestamp when the assignment was submitted.&quot;,&quot;why&quot;:&quot;Without it, submission timing and deadlines cannot be verified.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-22T23:54:23.493946254+00:00&quot;}" size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="14" name="created_at" nullable="false" remarks="{&quot;what&quot;:&quot;Timestamp when the assignment record was created.&quot;,&quot;why&quot;:&quot;Without it, the creation time and ordering of assignments is unknown.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-22T23:54:23.513078138+00:00&quot;}" size="35" type="timestamptz" typeCode="93"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="assignments_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="idx_assignments_application" unique="false">
            <column ascending="true" name="application_id"/>
         </index>
         <index name="idx_assignments_business" unique="false">
            <column ascending="true" name="business_id"/>
         </index>
         <index name="idx_assignments_status" unique="false">
            <column ascending="true" name="status"/>
         </index>
         <checkConstraint constraint="(kind = ANY (ARRAY['coding'::text, 'case_study'::text, 'design_doc'::text, 'data'::text, 'other'::text]))" name="assignments_kind_check"/>
         <checkConstraint constraint="(status = ANY (ARRAY['received'::text, 'in_progress'::text, 'review'::text, 'submitted'::text]))" name="assignments_status_check"/>
      </table>
      <table name="deliverables" remarks="{&quot;what&quot;:&quot;A submitted file or artifact for an assignment, with path and optional review.&quot;,&quot;why&quot;:&quot;Without it, assignment submissions cannot be tracked or reviewed.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-23T00:00:21.912049733+00:00&quot;}" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('deliverables_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="{&quot;what&quot;:&quot;Unique integer assigned by sequence; primary key.&quot;,&quot;why&quot;:&quot;Without it, there is no stable way to reference a specific deliverable in other tables or in URLs.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-23T00:00:21.943351209+00:00&quot;}" size="19" type="bigserial" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="assignment_id" nullable="false" remarks="{&quot;what&quot;:&quot;Foreign key to assignments table; the assignment this deliverable is for.&quot;,&quot;why&quot;:&quot;Without it, a deliverable cannot be associated with a specific assignment, making it impossible to know which assignment it fulfills.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-23T00:00:21.955191359+00:00&quot;}" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="deliverables_assignment_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="assignments"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="path" nullable="false" remarks="{&quot;what&quot;:&quot;File system path or URL where the deliverable content is stored.&quot;,&quot;why&quot;:&quot;Without it, the actual submitted file cannot be located, so the deliverable is unusable.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-23T00:00:21.970458300+00:00&quot;}" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="summary" nullable="true" remarks="{&quot;what&quot;:&quot;Optional short text describing the deliverable, such as a changelog or notes.&quot;,&quot;why&quot;:&quot;Without it, reviewers have no context about what the deliverable contains or changes made.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-23T00:00:21.986164107+00:00&quot;}" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="self_review" nullable="true" remarks="{&quot;what&quot;:&quot;Optional JSON object containing the submitter's self-assessment, structure not enforced.&quot;,&quot;why&quot;:&quot;Without it, there is no record of the submitter's own evaluation, which may be required for grading or reflection.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-23T00:00:22.005057638+00:00&quot;}" size="2147483647" type="jsonb" typeCode="1111"/>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="5" name="created_at" nullable="false" remarks="{&quot;what&quot;:&quot;Timestamp when the deliverable was submitted, in UTC with time zone.&quot;,&quot;why&quot;:&quot;Without it, submission order and deadlines cannot be verified, making it impossible to enforce due dates.&quot;,&quot;by&quot;:&quot;fleet-annotator-worker&quot;,&quot;at&quot;:&quot;2026-09-23T00:00:22.017834457+00:00&quot;}" size="35" type="timestamptz" typeCode="93"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="deliverables_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="idx_deliverables_assignment" unique="false">
            <column ascending="true" name="assignment_id"/>
         </index>
      </table>
   </tables>
</database>
