1 contributor
42 lines | 1.145kb

Table: work_orders

Stores Work Order headers.

Columns

Column Type Null Default Notes
id TEXT no none Work Order ID. Primary key.
status TEXT no 'pending' Work Order state.
title TEXT no '' Title.
reason TEXT no '' Reason/context.
created_at TEXT no none ISO UTC creation timestamp.
confirmed_at TEXT no '' Confirmation timestamp, empty until confirmed.
result TEXT no '' Result summary.
updated_at TEXT no none ISO UTC update timestamp.

Keys And Indexes

  • Primary key: id

Relationships

Referenced by:

  • work_order_checklist.work_order_id
  • work_order_actions.work_order_id

Definition

CREATE TABLE IF NOT EXISTS work_orders (
    id TEXT PRIMARY KEY,
    status TEXT NOT NULL DEFAULT 'pending',
    title TEXT NOT NULL DEFAULT '',
    reason TEXT NOT NULL DEFAULT '',
    created_at TEXT NOT NULL,
    confirmed_at TEXT NOT NULL DEFAULT '',
    result TEXT NOT NULL DEFAULT '',
    updated_at TEXT NOT NULL
);