attach
| Field | Description | Type | Null | Key | Default |
|---|---|---|---|---|---|
| id | generated index | int(10) unsigned | NO | PRI | NULL |
| aid | account_id of owner | int(10) unsigned | NO | MUL | 0 |
| uid | channel_id of owner | int(10) unsigned | NO | MUL | 0 |
| hash | hash for cross-site identification | char(191) | NO | MUL | |
| creator | xchan_hash of author/creator | char(191) | NO | MUL | |
| filename | filename of original | char(191) | NO | MUL | |
| filetype | mimetype | char(128) | NO | MUL | |
| filesize | size in bytes | int(10) unsigned | NO | MUL | 0 |
| revision | for version control (partially implemented) | int(10) unsigned | NO | MUL | 0 |
| folder | attach.hash of parent folder | char(191) | NO | MUL | |
| flags | no longer used | int(10) unsigned | NO | MUL | 0 |
| is_dir | 0 (file) or 1 to indicate a directory | tinyint(1) | NO | MUL | 0 |
| is_photo | if 1, a photo is linked to this resource | tinyint(1) | NO | MUL | 0 |
| os_storage | if 0, data contains content; if 1 data contains path to content (always 1 in hubzilla) | tinyint(1) | NO | MUL | 0 |
| os_path | under construction, store the system path | mediumtext | NO | ||
| display_path | under construction, store the human readable path | mediumtext | NO | ||
| content | file data or pathname to stored data if ATTACH_FLAG_OS | longblob | NO | ||
| created | creation time | datetime | NO | MUL | 0001-01-01 00:00:00 |
| edited | last edit time | datetime | NO | MUL | 0001-01-01 00:00:00 |
| allow_cid | permissions | mediumtext | NO | ||
| allow_gid | permissions | mediumtext | NO | ||
| deny_cid | permissions | mediumtext | NO | ||
| deny_gid | permissions | mediumtext | NO |
permissions are xchan_hash or group_hash surrounded by angle chars. e.g. ‘