| 1 | [[PageOutline(2)]] |
| 2 | |
| 3 | = Trac Database Schema: Attachments |
| 4 | |
| 5 | Trac's attachment module uses just a single database table. |
| 6 | |
| 7 | == Table `attachment` |
| 8 | ||'''Table'''||'''Key'''|| |
| 9 | ||''attachment''||''type'', ''id'', ''filename''|| |
| 10 | |
| 11 | ||'''Columns'''||'''Type'''|| |
| 12 | ||''type''|| || |
| 13 | ||''id''|| || |
| 14 | ||''filename''|| || |
| 15 | ||''size''||`int`|| |
| 16 | ||''time''||`int64`|| |
| 17 | ||''description''|| || |
| 18 | ||''author''|| || |
| 19 | ||''ipnr''|| || |
| 20 | |
| 21 | Stores metadata describing the attachments of e.g. Wiki pages or tickets. The actual file contents are stored on disk, not in the DB. |
| 22 | |
| 23 | Use the `trac.attachment.Attachment` model class to access this table. |
| 24 | |
| 25 | See [browser:trunk/trac/attachment.py trac.attachment.Attachment] |