app.attachments
TableRow level security on
Files attached to a subject row (Section 7.3). Each attachment has numbered versions; the newest Clean version is the current file. Readable by whoever can read the subject.
Primary key: id
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | uuid | No | Primary key, UUID v7. |
| org_id | uuid | No | Org of the subject, derived from it on insert; never accepted from the caller.References app.organizations.id |
| subject_table | text | No | Table of the subject.References private.comment_subjects.table_name |
| subject_id | uuid | No | Row the file is attached to. |
| title | text | No | Display name, the first version's file name unless renamed. |
| created_at | timestamp with time zone | No | When the row was inserted. Set by the database. |
| created_by | uuid | Yes | Person who inserted the row, or null for a platform process. Set by the database.References app.people.id |
| updated_at | timestamp with time zone | No | When the row last changed. Set by the database. |
| updated_by | uuid | Yes | Person who last changed the row, or null for a platform process. Set by the database.References app.people.id |
| deleted_at | timestamp with time zone | Yes | Soft delete time. A row with deleted_at set is ignored by every access helper. |
| classification | app.data_classification | No | Classification of the file (Section 8.6): Public, Internal (the default), Confidential or Restricted. It decides who may download it, whether it may be shared by link and whether the copy carries a watermark. Anyone who can read the file may raise it; lowering it needs the uploader or data.classification.write. |