Updates database structure documentation

This commit is contained in:
Michael 2021-06-13 20:33:50 +00:00
parent cd8ce7eada
commit 84ab5d6159
83 changed files with 1289 additions and 796 deletions

View file

@ -3,50 +3,76 @@ Database Tables
* [Home](help)
| Table | Description |
|------------------------------------------------------|--------------------------------------------------|
| [addon](help/database/db_addon) | registered addons |
| [attach](help/database/db_attach) | file attachments |
| [auth_codes](help/database/db_auth_codes) | OAuth usage |
| [cache](help/database/db_cache) | OEmbed cache |
| [challenge](help/database/db_challenge) | |
| [clients](help/database/db_clients) | OAuth usage |
| [config](help/database/db_config) | main configuration storage |
| [contact](help/database/db_contact) | contact table |
| [conv](help/database/db_conv) | private messages |
| [conversation](help/database/db_conversation) | Raw data and structure information for messages |
| [event](help/database/db_event) | Events |
| [fcontact](help/database/db_fcontact) | friend suggestion stuff |
| [fsuggest](help/database/db_fsuggest) | friend suggestion stuff |
| [group](help/database/db_group) | privacy groups, group info |
| [group_member](help/database/db_group_member) | privacy groups, member info |
| [gserver](help/database/db_gserver) | |
| [hook](help/database/db_hook) | addon hook registry |
| [intro](help/database/db_intro) | |
| [item](help/database/db_item) | all posts |
| [locks](help/database/db_locks) | |
| [mail](help/database/db_mail) | private messages |
| [mailacct](help/database/db_mailacct) | |
| [manage](help/database/db_manage) | table of accounts that can "su" each other |
| [notify](help/database/db_notify) | notifications |
| [notify-threads](help/database/db_notify-threads) | |
| [oembed](help/database/db_oembed) | cache for OEmbed queries |
| [parsed_url](help/database/db_parsed_url) | cache for "parse_url" queries |
| [pconfig](help/database/db_pconfig) | personal (per user) configuration storage |
| [photo](help/database/db_photo) | photo storage |
| [poll](help/database/db_poll) | data for polls |
| [poll_result](help/database/db_poll_result) | data for poll elements |
| [profile](help/database/db_profile) | user profiles data |
| [profile_check](help/database/db_profile_check) | DFRN remote auth use |
| [push_subscriber](help/database/db_push_subscriber) | |
| [queue](help/database/db_queue) | |
| [register](help/database/db_register) | registrations requiring admin approval |
| [search](help/database/db_search) | |
| [session](help/database/db_session) | web session storage |
| [sign](help/database/db_sign) | Diaspora signatures |
| [term](help/database/db_term) | item taxonomy (categories, tags, etc.) table |
| [thread](help/database/db_thread) | |
| [tokens](help/database/db_tokens) | OAuth usage |
| [user](help/database/db_user) | local user table |
| [userd](help/database/db_userd) | |
| [workerqueue](help/database/db_workerqueue) | |
| Table | Description |
|-------|-------------|
| [gserver](help/database/db_gserver) | Global servers |
| [user](help/database/db_user) | The local users |
| [contact](help/database/db_contact) | contact table |
| [item-uri](help/database/db_item-uri) | URI and GUID for items |
| [tag](help/database/db_tag) | tags and mentions |
| [clients](help/database/db_clients) | OAuth usage |
| [permissionset](help/database/db_permissionset) | |
| [verb](help/database/db_verb) | Activity Verbs |
| [2fa_app_specific_password](help/database/db_2fa_app_specific_password) | Two-factor app-specific _password |
| [2fa_recovery_codes](help/database/db_2fa_recovery_codes) | Two-factor authentication recovery codes |
| [2fa_trusted_browser](help/database/db_2fa_trusted_browser) | Two-factor authentication trusted browsers |
| [addon](help/database/db_addon) | registered addons |
| [apcontact](help/database/db_apcontact) | ActivityPub compatible contacts - used in the ActivityPub implementation |
| [application](help/database/db_application) | OAuth application |
| [application-token](help/database/db_application-token) | OAuth user token |
| [attach](help/database/db_attach) | file attachments |
| [auth_codes](help/database/db_auth_codes) | OAuth usage |
| [cache](help/database/db_cache) | Stores temporary data |
| [challenge](help/database/db_challenge) | |
| [config](help/database/db_config) | main configuration storage |
| [contact-relation](help/database/db_contact-relation) | Contact relations |
| [conv](help/database/db_conv) | private messages |
| [conversation](help/database/db_conversation) | Raw data and structure information for messages |
| [delayed-post](help/database/db_delayed-post) | Posts that are about to be distributed at a later time |
| [diaspora-interaction](help/database/db_diaspora-interaction) | Signed Diaspora Interaction |
| [event](help/database/db_event) | Events |
| [fcontact](help/database/db_fcontact) | Diaspora compatible contacts - used in the Diaspora implementation |
| [fsuggest](help/database/db_fsuggest) | friend suggestion stuff |
| [group](help/database/db_group) | privacy groups, group info |
| [group_member](help/database/db_group_member) | privacy groups, member info |
| [gserver-tag](help/database/db_gserver-tag) | Tags that the server has subscribed |
| [hook](help/database/db_hook) | addon hook registry |
| [host](help/database/db_host) | Hostname |
| [inbox-status](help/database/db_inbox-status) | Status of ActivityPub inboxes |
| [intro](help/database/db_intro) | |
| [locks](help/database/db_locks) | |
| [mail](help/database/db_mail) | private messages |
| [mailacct](help/database/db_mailacct) | Mail account data for fetching mails |
| [manage](help/database/db_manage) | table of accounts that can manage each other |
| [notification](help/database/db_notification) | notifications |
| [notify](help/database/db_notify) | notifications |
| [notify-threads](help/database/db_notify-threads) | |
| [oembed](help/database/db_oembed) | cache for OEmbed queries |
| [openwebauth-token](help/database/db_openwebauth-token) | Store OpenWebAuth token to verify contacts |
| [parsed_url](help/database/db_parsed_url) | cache for 'parse_url' queries |
| [pconfig](help/database/db_pconfig) | personal (per user) configuration storage |
| [photo](help/database/db_photo) | photo storage |
| [post](help/database/db_post) | Structure for all posts |
| [post-category](help/database/db_post-category) | post relation to categories |
| [post-content](help/database/db_post-content) | Content for all posts |
| [post-delivery-data](help/database/db_post-delivery-data) | Delivery data for items |
| [post-media](help/database/db_post-media) | Attached media |
| [post-tag](help/database/db_post-tag) | post relation to tags |
| [post-thread](help/database/db_post-thread) | Thread related data |
| [post-user](help/database/db_post-user) | User specific post data |
| [post-thread-user](help/database/db_post-thread-user) | Thread related data per user |
| [post-user-notification](help/database/db_post-user-notification) | User post notifications |
| [process](help/database/db_process) | Currently running system processes |
| [profile](help/database/db_profile) | user profiles data |
| [profile_check](help/database/db_profile_check) | DFRN remote auth use |
| [profile_field](help/database/db_profile_field) | Custom profile fields |
| [push_subscriber](help/database/db_push_subscriber) | Used for OStatus: Contains feed subscribers |
| [register](help/database/db_register) | registrations requiring admin approval |
| [search](help/database/db_search) | |
| [session](help/database/db_session) | web session storage |
| [storage](help/database/db_storage) | Data stored by Database storage backend |
| [tokens](help/database/db_tokens) | OAuth usage |
| [userd](help/database/db_userd) | Deleted usernames |
| [user-contact](help/database/db_user-contact) | User specific public contact data |
| [worker-ipc](help/database/db_worker-ipc) | Inter process communication between the frontend and the worker |
| [workerqueue](help/database/db_workerqueue) | Background tasks queue entries |

View file

@ -0,0 +1,14 @@
Table 2fa_app_specific_password
===========
Two-factor app-specific _password
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | Password ID for revocation | mediumint unsigned | YES | PRI | | auto_increment |
| uid | User ID | mediumint unsigned | YES | | | |
| description | Description of the usage of the password | varchar(255) | NO | | | |
| hashed_password | Hashed password | varchar(255) | YES | | | |
| generated | Datetime the password was generated | datetime | YES | | | |
| last_used | Datetime the password was last used | datetime | NO | | | |
Return to [database documentation](help/database)

View file

@ -0,0 +1,12 @@
Table 2fa_recovery_codes
===========
Two-factor authentication recovery codes
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| uid | User ID | mediumint unsigned | YES | PRI | | |
| code | Recovery code string | varchar(50) | YES | PRI | | |
| generated | Datetime the code was generated | datetime | YES | | | |
| used | Datetime the code was used | datetime | NO | | | |
Return to [database documentation](help/database)

View file

@ -0,0 +1,13 @@
Table 2fa_trusted_browser
===========
Two-factor authentication trusted browsers
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| cookie_hash | Trusted cookie hash | varchar(80) | YES | PRI | | |
| uid | User ID | mediumint unsigned | YES | | | |
| user_agent | User agent string | text | NO | | | |
| created | Datetime the trusted browser was recorded | datetime | YES | | | |
| last_used | Datetime the trusted browser was last used | datetime | NO | | | |
Return to [database documentation](help/database)

View file

@ -1,17 +1,15 @@
Table addon
===========
registered addons
| Field | Description | Type | Null | Key | Default | Extra |
| ------------- | --------------------------------------------- | ---------- | ---- | --- | ------- | --------------- |
| id | | int(11) | NO | PRI | NULL | auto_increment |
| name | addon base (file)name | char(255) | NO | | | |
| version | currently unused | char(255) | NO | | | |
| installed | currently always 1 | tinyint(1) | NO | | 0 | |
| hidden | currently unused | tinyint(1) | NO | | 0 | |
| timestamp | file timestamp to check for reloads | bigint(20) | NO | | 0 | |
| plugin_admin | 1 = has admin config, 0 = has no admin config | tinyint(1) | NO | | 0 | |
Notes:
These are addons which have been enabled by the site administrator on the addon page
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | | int unsigned | YES | PRI | | auto_increment |
| name | addon base (file)name | varchar(50) | YES | | | |
| version | currently unused | varchar(50) | YES | | | |
| installed | currently always 1 | boolean | YES | | 0 | |
| hidden | currently unused | boolean | YES | | 0 | |
| timestamp | file timestamp to check for reloads | int unsigned | YES | | 0 | |
| plugin_admin | 1 = has admin config, 0 = has no admin config | boolean | YES | | 0 | |
Return to [database documentation](help/database)

View file

@ -0,0 +1,32 @@
Table apcontact
===========
ActivityPub compatible contacts - used in the ActivityPub implementation
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| url | URL of the contact | varbinary(255) | YES | PRI | | |
| uuid | | varchar(255) | NO | | | |
| type | | varchar(20) | YES | | | |
| following | | varchar(255) | NO | | | |
| followers | | varchar(255) | NO | | | |
| inbox | | varchar(255) | YES | | | |
| outbox | | varchar(255) | NO | | | |
| sharedinbox | | varchar(255) | NO | | | |
| manually-approve | | boolean | NO | | | |
| nick | | varchar(255) | YES | | | |
| name | | varchar(255) | NO | | | |
| about | | text | NO | | | |
| photo | | varchar(255) | NO | | | |
| addr | | varchar(255) | NO | | | |
| alias | | varchar(255) | NO | | | |
| pubkey | | text | NO | | | |
| subscribe | | varchar(255) | NO | | | |
| baseurl | baseurl of the ap contact | varchar(255) | NO | | | |
| gsid | Global Server ID | int unsigned | NO | | | |
| generator | Name of the contact's system | varchar(255) | NO | | | |
| following_count | Number of following contacts | int unsigned | NO | | 0 | |
| followers_count | Number of followers | int unsigned | NO | | 0 | |
| statuses_count | Number of posts | int unsigned | NO | | 0 | |
| updated | | datetime | YES | | 0001-01-01 00:00:00 | |
Return to [database documentation](help/database)

View file

@ -0,0 +1,18 @@
Table application-token
===========
OAuth user token
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| application-id | | int unsigned | YES | PRI | | |
| uid | Owner User id | mediumint unsigned | YES | PRI | | |
| code | | varchar(64) | YES | | | |
| access_token | | varchar(64) | YES | | | |
| created_at | creation time | datetime | YES | | | |
| scopes | | varchar(255) | NO | | | |
| read | Read scope | boolean | NO | | | |
| write | Write scope | boolean | NO | | | |
| follow | Follow scope | boolean | NO | | | |
| push | Push scope | boolean | NO | | | |
Return to [database documentation](help/database)

View file

@ -0,0 +1,19 @@
Table application
===========
OAuth application
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | generated index | int unsigned | YES | PRI | | auto_increment |
| client_id | | varchar(64) | YES | | | |
| client_secret | | varchar(64) | YES | | | |
| name | | varchar(255) | YES | | | |
| redirect_uri | | varchar(255) | YES | | | |
| website | | varchar(255) | NO | | | |
| scopes | | varchar(255) | NO | | | |
| read | Read scope | boolean | NO | | | |
| write | Write scope | boolean | NO | | | |
| follow | Follow scope | boolean | NO | | | |
| push | Push scope | boolean | NO | | | |
Return to [database documentation](help/database)

View file

@ -1,22 +1,23 @@
Table attach
============
===========
file attachments
| Field | Description | Type | Null | Key | Default | Extra |
| ---------- | ------------------------------------------------------| ------------ | ---- | --- | ------------------- | --------------- |
| id | generated index | int(11) | NO | PRI | NULL | auto_increment |
| uid | user_id of owner | int(11) | NO | | 0 | |
| hash | hash | varchar(64) | NO | | | |
| filename | filename of original | varchar(255) | NO | | | |
| filetype | mimetype | varchar(64) | NO | | | |
| filesize | size in bytes | int(11) | NO | | 0 | |
| data | file data | longblob | NO | | NULL | |
| created | creation time | datetime | NO | | 0001-01-01 00:00:00 | |
| edited | last edit time | datetime | NO | | 0001-01-01 00:00:00 | |
| allow_cid | Access Control - list of allowed contact.id '<19><78> | mediumtext | NO | | NULL | |
| allow_gid | Access Control - list of allowed groups | mediumtext | NO | | NULL | |
| deny_cid | Access Control - list of denied contact.id | mediumtext | NO | | NULL | |
| deny_gid | Access Control - list of denied groups | mediumtext | NO | | NULL | |
Notes: Permissions are surrounded by angle chars. e.g. <4>
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | generated index | int unsigned | YES | PRI | | auto_increment |
| uid | Owner User id | mediumint unsigned | YES | | 0 | |
| hash | hash | varchar(64) | YES | | | |
| filename | filename of original | varchar(255) | YES | | | |
| filetype | mimetype | varchar(64) | YES | | | |
| filesize | size in bytes | int unsigned | YES | | 0 | |
| data | file data | longblob | YES | | | |
| created | creation time | datetime | YES | | 0001-01-01 00:00:00 | |
| edited | last edit time | datetime | YES | | 0001-01-01 00:00:00 | |
| allow_cid | Access Control - list of allowed contact.id &#039;&lt;19&gt;&lt;78&gt; | mediumtext | NO | | | |
| allow_gid | Access Control - list of allowed groups | mediumtext | NO | | | |
| deny_cid | Access Control - list of denied contact.id | mediumtext | NO | | | |
| deny_gid | Access Control - list of denied groups | mediumtext | NO | | | |
| backend-class | Storage backend class | tinytext | NO | | | |
| backend-ref | Storage backend data reference | text | NO | | | |
Return to [database documentation](help/database)

View file

@ -1,14 +1,13 @@
Table auth_codes
================
===========
OAuth usage
OAuth2 authorisation register - currently implemented but unused
| Field | Description | Type | Null | Key | Default | Extra |
| ------------- | ----------- | ------------ | ---- | --- | ------- | ----- |
| id | | varchar(40) | NO | PRI | NULL | |
| client_id | | varchar(20) | NO | | | |
| redirect_uri | | varchar(200) | NO | | | |
| expires | | int(11) | NO | | 0 | |
| scope | | varchar(250) | NO | | | |
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | | varchar(40) | YES | PRI | | |
| client_id | | varchar(20) | YES | | | |
| redirect_uri | | varchar(200) | YES | | | |
| expires | | int | YES | | 0 | |
| scope | | varchar(250) | YES | | | |
Return to [database documentation](help/database)

View file

@ -1,13 +1,12 @@
Table cache
===========
Stores temporary data
| Field | Description | Type | Null | Key | Default | Extra |
| ------------ | ---------------------------------- | ------------ | ---- | --- | ------------------- | ----- |
| k | cache key | varchar(255) | NO | PRI | NULL | |
| v | cached serialized value | text | NO | | NULL | |
| expires | datetime of cache expiration | datetime | NO | MUL | 0001-01-01 00:00:00 | |
| updated | datetime of cache insertion | datetime | NO | MUL | 0001-01-01 00:00:00 | |
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| k | cache key | varbinary(255) | YES | PRI | | |
| v | cached serialized value | mediumtext | NO | | | |
| expires | datetime of cache expiration | datetime | YES | | 0001-01-01 00:00:00 | |
| updated | datetime of cache insertion | datetime | YES | | 0001-01-01 00:00:00 | |
Return to [database documentation](help/database)

View file

@ -1,13 +1,14 @@
Table challenge
===============
===========
| Field | Description | Type | Null | Key | Default | Extra |
|-------------|------------------|------------------|------|-----|---------|----------------|
| id | sequential ID | int(10) unsigned | NO | PRI | NULL | auto_increment |
| challenge | | varchar(255) | NO | | | |
| dfrn-id | | varchar(255) | NO | | | |
| expire | | int(11) | NO | | 0 | |
| type | | varchar(255) | NO | | | |
| last_update | | varchar(255) | NO | | | |
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
| challenge | | varchar(255) | YES | | | |
| dfrn-id | | varchar(255) | YES | | | |
| expire | | int unsigned | YES | | 0 | |
| type | | varchar(255) | YES | | | |
| last_update | | varchar(255) | YES | | | |
Return to [database documentation](help/database)

View file

@ -1,13 +1,14 @@
Table clients
=============
===========
OAuth usage
| Field | Description | Type | Null | Key | Default | Extra |
| ------------- | ----------- | ------------ | ---- | --- | ------- | ----- |
| client_id | | varchar(20) | NO | PRI | NULL | |
| pw | | varchar(20) | NO | | | |
| redirect_uri | | varchar(200) | NO | | | |
| name | | text | YES | | NULL | |
| icon | | text | YES | | NULL | |
| uid | | int(11) | NO | | 0 | |
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| client_id | | varchar(20) | YES | PRI | | |
| pw | | varchar(20) | YES | | | |
| redirect_uri | | varchar(200) | YES | | | |
| name | | text | NO | | | |
| icon | | text | NO | | | |
| uid | User id | mediumint unsigned | YES | | 0 | |
Return to [database documentation](help/database)

View file

@ -1,11 +1,12 @@
Table config
============
===========
main configuration storage
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---------------- | ---- | --- | ------- | --------------- |
| id | | int(10) unsigned | NO | PRI | NULL | auto_increment |
| cat | | char(255) | NO | MUL | | |
| k | | char(255) | NO | | | |
| v | | text | NO | | NULL | |
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | | int unsigned | YES | PRI | | auto_increment |
| cat | | varbinary(50) | YES | | | |
| k | | varbinary(50) | YES | | | |
| v | | mediumtext | NO | | | |
Return to [database documentation](help/database)

View file

@ -0,0 +1,13 @@
Table contact-relation
===========
Contact relations
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| cid | contact the related contact had interacted with | int unsigned | YES | PRI | 0 | |
| relation-cid | related contact who had interacted with the contact | int unsigned | YES | PRI | 0 | |
| last-interaction | Date of the last interaction | datetime | YES | | 0001-01-01 00:00:00 | |
| follow-updated | Date of the last update of the contact relationship | datetime | YES | | 0001-01-01 00:00:00 | |
| follows | | boolean | YES | | 0 | |
Return to [database documentation](help/database)

View file

@ -1,72 +1,88 @@
Table contact
=============
===========
contact table
| Field | Description | Type | Null | Key | Default | Extra |
|---------------------------|-----------------------------------------------------------|--------------|------|-----|---------------------|----------------|
| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment |
| uid | user.id of the owner of this data | int(11) | NO | MUL | 0 | |
| created | | datetime | NO | | 0001-01-01 00:00:00 | |
| self | 1 if the contact is the user him/her self | tinyint(1) | NO | | 0 | |
| remote_self | | tinyint(1) | NO | | 0 | |
| rel | The kind of the relation between the user and the contact | tinyint(1) | NO | | 0 | |
| duplex | | tinyint(1) | NO | | 0 | |
| network | Network protocol of the contact | varchar(255) | NO | | | |
| name | Name that this contact is known by | varchar(255) | NO | | | |
| nick | Nick- and user name of the contact | varchar(255) | NO | | | |
| location | | varchar(255) | NO | | | |
| about | | text | NO | | NULL | |
| keywords | public keywords (interests) of the contact | text | NO | | NULL | |
| gender | | varchar(32) | NO | | | |
| attag | | varchar(255) | NO | | | |
| photo | Link to the profile photo of the contact | text | NO | | NULL | |
| thumb | Link to the profile photo (thumb size) | text | NO | | NULL | |
| micro | Link to the profile photo (micro size) | text | NO | | NULL | |
| site-pubkey | | text | NO | | NULL | |
| issued-id | | varchar(255) | NO | | | |
| dfrn-id | | varchar(255) | NO | | | |
| url | | varchar(255) | NO | | | |
| nurl | | varchar(255) | NO | | | |
| addr | | varchar(255) | NO | | | |
| alias | | varchar(255) | NO | | | |
| pubkey | RSA public key 4096 bit | text | NO | | NULL | |
| prvkey | RSA private key 4096 bit | text | NO | | NULL | |
| batch | | varchar(255) | NO | | | |
| request | | text | NO | | NULL | |
| notify | | text | NO | | NULL | |
| poll | | text | NO | | NULL | |
| confirm | | text | NO | | NULL | |
| poco | | text | NO | | NULL | |
| aes_allow | | tinyint(1) | NO | | 0 | |
| ret-aes | | tinyint(1) | NO | | 0 | |
| usehub | | tinyint(1) | NO | | 0 | |
| subhub | | tinyint(1) | NO | | 0 | |
| hub-verify | | varchar(255) | NO | | | |
| last-update | Date of the last try to update the contact info | datetime | NO | | 0001-01-01 00:00:00 | |
| success_update | Date of the last successful contact update | datetime | NO | | 0001-01-01 00:00:00 | |
| failure_update | Date of the last failed update | datetime | NO | | 0001-01-01 00:00:00 | |
| name-date | | datetime | NO | | 0001-01-01 00:00:00 | |
| uri-date | | datetime | NO | | 0001-01-01 00:00:00 | |
| avatar-date | | datetime | NO | | 0001-01-01 00:00:00 | |
| term-date | | datetime | NO | | 0001-01-01 00:00:00 | |
| last-item | date of the last post | datetime | NO | | 0001-01-01 00:00:00 | |
| priority | | tinyint(3) | NO | | 0 | |
| blocked | | tinyint(1) | NO | | 1 | |
| readonly | posts of the contact are readonly | tinyint(1) | NO | | 0 | |
| writable | | tinyint(1) | NO | | 0 | |
| forum | contact is a forum | tinyint(1) | NO | | 0 | |
| prv | contact is a private group | tinyint(1) | NO | | 0 | |
| hidden | | tinyint(1) | NO | | 0 | |
| archive | | tinyint(1) | NO | | 0 | |
| pending | | tinyint(1) | NO | | 1 | |
| rating | | tinyint(1) | NO | | 0 | |
| reason | | text | NO | | NULL | |
| closeness | | tinyint(2) | NO | | 99 | |
| info | | mediumtext | NO | | NULL | |
| profile-id | | int(11) | NO | | 0 | |
| bdyear | | varchar(4) | NO | | | |
| bd | | date | NO | | 0001-01-01 | |
| notify_new_posts | | tinyint(1) | NO | | 0 | |
| fetch_further_information | | tinyint(1) | NO | | 0 | |
| ffi_keyword_denylist | | mediumtext | NO | | NULL | |
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
| uid | Owner User id | mediumint unsigned | YES | | 0 | |
| created | | datetime | YES | | 0001-01-01 00:00:00 | |
| updated | Date of last contact update | datetime | NO | | 0001-01-01 00:00:00 | |
| self | 1 if the contact is the user him/her self | boolean | YES | | 0 | |
| remote_self | | boolean | YES | | 0 | |
| rel | The kind of the relation between the user and the contact | tinyint unsigned | YES | | 0 | |
| duplex | | boolean | YES | | 0 | |
| network | Network of the contact | char(4) | YES | | | |
| protocol | Protocol of the contact | char(4) | YES | | | |
| name | Name that this contact is known by | varchar(255) | YES | | | |
| nick | Nick- and user name of the contact | varchar(255) | YES | | | |
| location | | varchar(255) | NO | | | |
| about | | text | NO | | | |
| keywords | public keywords (interests) of the contact | text | NO | | | |
| gender | Deprecated | varchar(32) | YES | | | |
| xmpp | | varchar(255) | YES | | | |
| attag | | varchar(255) | YES | | | |
| avatar | | varchar(255) | YES | | | |
| photo | Link to the profile photo of the contact | varchar(255) | NO | | | |
| thumb | Link to the profile photo (thumb size) | varchar(255) | NO | | | |
| micro | Link to the profile photo (micro size) | varchar(255) | NO | | | |
| site-pubkey | | text | NO | | | |
| issued-id | | varchar(255) | YES | | | |
| dfrn-id | | varchar(255) | YES | | | |
| url | | varchar(255) | YES | | | |
| nurl | | varchar(255) | YES | | | |
| addr | | varchar(255) | YES | | | |
| alias | | varchar(255) | YES | | | |
| pubkey | RSA public key 4096 bit | text | NO | | | |
| prvkey | RSA private key 4096 bit | text | NO | | | |
| batch | | varchar(255) | YES | | | |
| request | | varchar(255) | NO | | | |
| notify | | varchar(255) | NO | | | |
| poll | | varchar(255) | NO | | | |
| confirm | | varchar(255) | NO | | | |
| subscribe | | varchar(255) | NO | | | |
| poco | | varchar(255) | NO | | | |
| aes_allow | | boolean | YES | | 0 | |
| ret-aes | | boolean | YES | | 0 | |
| usehub | | boolean | YES | | 0 | |
| subhub | | boolean | YES | | 0 | |
| hub-verify | | varchar(255) | YES | | | |
| last-update | Date of the last try to update the contact info | datetime | YES | | 0001-01-01 00:00:00 | |
| success_update | Date of the last successful contact update | datetime | YES | | 0001-01-01 00:00:00 | |
| failure_update | Date of the last failed update | datetime | YES | | 0001-01-01 00:00:00 | |
| failed | Connection failed | boolean | NO | | | |
| name-date | | datetime | YES | | 0001-01-01 00:00:00 | |
| uri-date | | datetime | YES | | 0001-01-01 00:00:00 | |
| avatar-date | | datetime | YES | | 0001-01-01 00:00:00 | |
| term-date | | datetime | YES | | 0001-01-01 00:00:00 | |
| last-item | date of the last post | datetime | YES | | 0001-01-01 00:00:00 | |
| last-discovery | date of the last follower discovery | datetime | YES | | 0001-01-01 00:00:00 | |
| priority | | tinyint unsigned | YES | | 0 | |
| blocked | Node-wide block status | boolean | YES | | 1 | |
| block_reason | Node-wide block reason | text | NO | | | |
| readonly | posts of the contact are readonly | boolean | YES | | 0 | |
| writable | | boolean | YES | | 0 | |
| forum | contact is a forum | boolean | YES | | 0 | |
| prv | contact is a private group | boolean | YES | | 0 | |
| contact-type | | tinyint | YES | | 0 | |
| manually-approve | | boolean | NO | | | |
| hidden | | boolean | YES | | 0 | |
| archive | | boolean | YES | | 0 | |
| pending | | boolean | YES | | 1 | |
| deleted | Contact has been deleted | boolean | YES | | 0 | |
| rating | | tinyint | YES | | 0 | |
| unsearchable | Contact prefers to not be searchable | boolean | YES | | 0 | |
| sensitive | Contact posts sensitive content | boolean | YES | | 0 | |
| baseurl | baseurl of the contact | varchar(255) | NO | | | |
| gsid | Global Server ID | int unsigned | NO | | | |
| reason | | text | NO | | | |
| closeness | | tinyint unsigned | YES | | 99 | |
| info | | mediumtext | NO | | | |
| profile-id | Deprecated | int unsigned | NO | | | |
| bdyear | | varchar(4) | YES | | | |
| bd | | date | YES | | 0001-01-01 | |
| notify_new_posts | | boolean | YES | | 0 | |
| fetch_further_information | | tinyint unsigned | YES | | 0 | |
| ffi_keyword_denylist | | text | NO | | | |
Return to [database documentation](help/database)

View file

@ -1,15 +1,16 @@
Table conv
==========
===========
private messages
| Field | Description | Type | Null | Key | Default | Extra |
| ------- | ----------------------------------------- | ---------------- | ---- | --- | ------------------- | --------------- |
| id | sequential ID | int(10) unsigned | NO | PRI | NULL | auto_increment |
| guid | A unique identifier for this conversation | varchar(64) | NO | | | |
| recips | sender_handle;recipient_handle | mediumtext | NO | | NULL | |
| uid | user_id of the owner of this data | int(11) | NO | MUL | 0 | |
| creator | handle of creator | varchar(255) | NO | | | |
| created | creation timestamp | datetime | NO | | 0001-01-01 00:00:00 | |
| updated | edited timestamp | datetime | NO | | 0001-01-01 00:00:00 | |
| subject | subject of initial message | mediumtext | NO | | NULL | |
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
| guid | A unique identifier for this conversation | varchar(255) | YES | | | |
| recips | sender_handle;recipient_handle | text | NO | | | |
| uid | Owner User id | mediumint unsigned | YES | | 0 | |
| creator | handle of creator | varchar(255) | YES | | | |
| created | creation timestamp | datetime | YES | | 0001-01-01 00:00:00 | |
| updated | edited timestamp | datetime | YES | | 0001-01-01 00:00:00 | |
| subject | subject of initial message | text | NO | | | |
Return to [database documentation](help/database)

View file

@ -1,14 +1,16 @@
Table conversation
==================
===========
Raw data and structure information for messages
| Field | Description | Type | Null | Key | Default | Extra |
|-------------------| ---------------------------------- |---------------------|------|-----|---------------------|----------------|
| item-uri | URI of the item | varbinary(255) | NO | PRI | NULL | |
| reply-to-uri | URI to which this item is a reply | varbinary(255) | NO | | | |
| conversation-uri | GNU Social conversation URI | varbinary(255) | NO | | | |
| conversation-href | GNU Social conversation link | varbinary(255) | NO | | | |
| protocol | The protocol of the item | tinyint(1) unsigned | NO | | 0 | |
| source | Original source | mediumtext | NO | | | |
| received | Receiving date | datetime | NO | | 0001-01-01 | |
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| item-uri | Original URI of the item - unrelated to the table with the same name | varbinary(255) | YES | PRI | | |
| reply-to-uri | URI to which this item is a reply | varbinary(255) | YES | | | |
| conversation-uri | GNU Social conversation URI | varbinary(255) | YES | | | |
| conversation-href | GNU Social conversation link | varbinary(255) | YES | | | |
| protocol | The protocol of the item | tinyint unsigned | YES | | 255 | |
| direction | How the message arrived here: 1=push, 2=pull | tinyint unsigned | YES | | 0 | |
| source | Original source | mediumtext | NO | | | |
| received | Receiving date | datetime | YES | | 0001-01-01 00:00:00 | |
Return to [database documentation](help/database)

View file

@ -0,0 +1,12 @@
Table delayed-post
===========
Posts that are about to be distributed at a later time
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | | int unsigned | YES | PRI | | auto_increment |
| uri | URI of the post that will be distributed later | varchar(255) | NO | | | |
| uid | Owner User id | mediumint unsigned | NO | | | |
| delayed | delay time | datetime | NO | | | |
Return to [database documentation](help/database)

View file

@ -0,0 +1,10 @@
Table diaspora-interaction
===========
Signed Diaspora Interaction
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | PRI | | |
| interaction | The Diaspora interaction | mediumtext | NO | | | |
Return to [database documentation](help/database)

View file

@ -1,26 +1,28 @@
Table event
===========
Events
| Field | Description | Type | Null | Key | Default | Extra |
| ---------- | ----------------------------------------------- -------| ------------------- | ---- | --- | ------------------- | --------------- |
| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment |
| uid | user_id of the owner of this data | int(11) | NO | MUL | 0 | |
| cid | contact_id (ID of the contact in contact table) | int(11) | NO | | 0 | |
| uri | | varchar(255) | NO | | | |
| created | creation time | datetime | NO | | 0001-01-01 00:00:00 | |
| edited | last edit time | datetime | NO | | 0001-01-01 00:00:00 | |
| start | event start time | datetime | NO | | 0001-01-01 00:00:00 | |
| finish | event end time | datetime | NO | | 0001-01-01 00:00:00 | |
| summary | short description or title of the event | text | NO | | NULL | |
| desc | event description | text | NO | | NULL | |
| location | event location | text | NO | | NULL | |
| type | event or birthday | varchar(255) | NO | | | |
| nofinish | if event does have no end this is 1 | tinyint(1) | NO | | 0 | |
| adjust | adjust to timezone of the recipient (0 or 1) | tinyint(1) | NO | | 1 | |
| ignore | 0 or 1 | tinyint(1) unsigned | NO | | 0 | |
| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | NO | | NULL | |
| allow_gid | Access Control - list of allowed groups | mediumtext | NO | | NULL | |
| deny_cid | Access Control - list of denied contact.id | mediumtext | NO | | NULL | |
| deny_gid | Access Control - list of denied groups | mediumtext | NO | | NULL | |
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
| guid | | varchar(255) | YES | | | |
| uid | Owner User id | mediumint unsigned | YES | | 0 | |
| cid | contact_id (ID of the contact in contact table) | int unsigned | YES | | 0 | |
| uri | | varchar(255) | YES | | | |
| created | creation time | datetime | YES | | 0001-01-01 00:00:00 | |
| edited | last edit time | datetime | YES | | 0001-01-01 00:00:00 | |
| start | event start time | datetime | YES | | 0001-01-01 00:00:00 | |
| finish | event end time | datetime | YES | | 0001-01-01 00:00:00 | |
| summary | short description or title of the event | text | NO | | | |
| desc | event description | text | NO | | | |
| location | event location | text | NO | | | |
| type | event or birthday | varchar(20) | YES | | | |
| nofinish | if event does have no end this is 1 | boolean | YES | | 0 | |
| adjust | adjust to timezone of the recipient (0 or 1) | boolean | YES | | 1 | |
| ignore | 0 or 1 | boolean | YES | | 0 | |
| allow_cid | Access Control - list of allowed contact.id &#039;&lt;19&gt;&lt;78&gt;&#039; | mediumtext | NO | | | |
| allow_gid | Access Control - list of allowed groups | mediumtext | NO | | | |
| deny_cid | Access Control - list of denied contact.id | mediumtext | NO | | | |
| deny_gid | Access Control - list of denied groups | mediumtext | NO | | | |
Return to [database documentation](help/database)

View file

@ -1,24 +1,25 @@
Table fcontact
==============
===========
Diaspora compatible contacts - used in the Diaspora implementation
| Field | Description | Type | Null | Key | Default | Extra |
| -------- | ------------- | ---------------- | ---- | --- | ------------------- | --------------- |
| id | sequential ID | int(10) unsigned | NO | PRI | NULL | auto_increment |
| guid | unique id | varchar(64) | NO | | | |
| url | | varchar(255) | NO | | | |
| name | | varchar(255) | NO | | | |
| photo | | varchar(255) | NO | | | |
| request | | varchar(255) | NO | | | |
| nick | | varchar(255) | NO | | | |
| addr | | varchar(255) | NO | MUL | | |
| batch | | varchar(255) | NO | | | |
| notify | | varchar(255) | NO | | | |
| poll | | varchar(255) | NO | | | |
| confirm | | varchar(255) | NO | | | |
| priority | | tinyint(1) | NO | | 0 | |
| network | | varchar(32) | NO | | | |
| alias | | varchar(255) | NO | | | |
| pubkey | | text | NO | | NULL | |
| updated | | datetime | NO | | 0001-01-01 00:00:00 | |
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
| guid | unique id | varchar(255) | YES | | | |
| url | | varchar(255) | YES | | | |
| name | | varchar(255) | YES | | | |
| photo | | varchar(255) | YES | | | |
| request | | varchar(255) | YES | | | |
| nick | | varchar(255) | YES | | | |
| addr | | varchar(255) | YES | | | |
| batch | | varchar(255) | YES | | | |
| notify | | varchar(255) | YES | | | |
| poll | | varchar(255) | YES | | | |
| confirm | | varchar(255) | YES | | | |
| priority | | tinyint unsigned | YES | | 0 | |
| network | | char(4) | YES | | | |
| alias | | varchar(255) | YES | | | |
| pubkey | | text | NO | | | |
| updated | | datetime | YES | | 0001-01-01 00:00:00 | |
Return to [database documentation](help/database)

View file

@ -1,16 +1,17 @@
Table fsuggest
==============
===========
friend suggestion stuff
| Field | Description | Type | Null | Key | Default | Extra |
| ------- | ----------- | ------------ | ---- | --- | ------------------- | --------------- |
| id | | int(11) | NO | PRI | NULL | auto_increment |
| uid | | int(11) | NO | | 0 | |
| cid | | int(11) | NO | | 0 | |
| name | | varchar(255) | NO | | | |
| url | | varchar(255) | NO | | | |
| request | | varchar(255) | NO | | | |
| photo | | varchar(255) | NO | | | |
| note | | text | NO | | NULL | |
| created | | datetime | NO | | 0001-01-01 00:00:00 | |
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | | int unsigned | YES | PRI | | auto_increment |
| uid | User id | mediumint unsigned | YES | | 0 | |
| cid | | int unsigned | YES | | 0 | |
| name | | varchar(255) | YES | | | |
| url | | varchar(255) | YES | | | |
| request | | varchar(255) | YES | | | |
| photo | | varchar(255) | YES | | | |
| note | | text | NO | | | |
| created | | datetime | YES | | 0001-01-01 00:00:00 | |
Return to [database documentation](help/database)

View file

@ -1,12 +1,13 @@
Table group
===========
privacy groups, group info
| Field | Description | Type | Null | Key | Default | Extra |
| ------- | ------------------------------------------ | ---------------- | ---- | --- | ------- | --------------- |
| id | sequential ID | int(10) unsigned | NO | PRI | NULL | auto_increment |
| uid | user.id owning this data | int(10) unsigned | NO | MUL | 0 | |
| visible | 1 indicates the member list is not private | tinyint(1) | NO | | 0 | |
| deleted | 1 indicates the group has been deleted | tinyint(1) | NO | | 0 | |
| name | human readable name of group | varchar(255) | NO | | | |
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
| uid | Owner User id | mediumint unsigned | YES | | 0 | |
| visible | 1 indicates the member list is not private | boolean | YES | | 0 | |
| deleted | 1 indicates the group has been deleted | boolean | YES | | 0 | |
| name | human readable name of group | varchar(255) | YES | | | |
Return to [database documentation](help/database)

View file

@ -1,11 +1,11 @@
Table group_member
==================
===========
privacy groups, member info
| Field | Description | Type | Null | Key | Default | Extra |
| ---------- | ----------------------------------------------------------- | ---------------- | ---- | --- | ------- | --------------- |
| id | sequential ID | int(10) unsigned | NO | PRI | NULL | auto_increment |
| uid | user.id of the owner of this data | int(10) unsigned | NO | MUL | 0 | |
| gid | groups.id of the associated group | int(10) unsigned | NO | | 0 | |
| contact-id | contact.id of the member assigned to the associated group | int(10) unsigned | NO | | 0 | |
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
| gid | groups.id of the associated group | int unsigned | YES | | 0 | |
| contact-id | contact.id of the member assigned to the associated group | int unsigned | YES | | 0 | |
Return to [database documentation](help/database)

View file

@ -0,0 +1,10 @@
Table gserver-tag
===========
Tags that the server has subscribed
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| gserver-id | The id of the gserver | int unsigned | YES | PRI | 0 | |
| tag | Tag that the server has subscribed | varchar(100) | YES | PRI | | |
Return to [database documentation](help/database)

View file

@ -1,24 +1,31 @@
Table gserver
=============
| Field | Description | Type | Null | Key | Default | Extra |
|------------------|---------------------------|------------------|------|-----|---------------------|----------------|
| id | sequential ID | int(10) unsigned | NO | PRI | NULL | auto_increment |
| url | | varchar(255) | NO | | | |
| nurl | | varchar(255) | NO | MUL | | |
| version | | varchar(255) | NO | | | |
| site_name | | varchar(255) | NO | | | |
| info | | text | NO | | NULL | |
| register_policy | | tinyint(1) | NO | | 0 | |
| registered-users |Number of registered users | int(10) | NO | | 0 | |
| poco | | varchar(255) | NO | | | |
| noscrape | | varchar(255) | NO | | | |
| network | | varchar(32) | NO | | | |
| platform | | varchar(255) | NO | | | |
| created | | datetime | NO | | 0001-01-01 00:00:00 | |
| last_poco_query | | datetime | YES | | 0001-01-01 00:00:00 | |
| last_contact | | datetime | YES | | 0001-01-01 00:00:00 | |
| last_failure | | datetime | YES | | 0001-01-01 00:00:00 | |
===========
Global servers
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
| url | | varchar(255) | YES | | | |
| nurl | | varchar(255) | YES | | | |
| version | | varchar(255) | YES | | | |
| site_name | | varchar(255) | YES | | | |
| info | | text | NO | | | |
| register_policy | | tinyint | YES | | 0 | |
| registered-users | Number of registered users | int unsigned | YES | | 0 | |
| directory-type | Type of directory service (Poco, Mastodon) | tinyint | NO | | 0 | |
| poco | | varchar(255) | YES | | | |
| noscrape | | varchar(255) | YES | | | |
| network | | char(4) | YES | | | |
| protocol | The protocol of the server | tinyint unsigned | NO | | | |
| platform | | varchar(255) | YES | | | |
| relay-subscribe | Has the server subscribed to the relay system | boolean | YES | | 0 | |
| relay-scope | The scope of messages that the server wants to get | varchar(10) | YES | | | |
| detection-method | Method that had been used to detect that server | tinyint unsigned | NO | | | |
| created | | datetime | YES | | 0001-01-01 00:00:00 | |
| last_poco_query | | datetime | NO | | 0001-01-01 00:00:00 | |
| last_contact | Last successful connection request | datetime | NO | | 0001-01-01 00:00:00 | |
| last_failure | Last failed connection request | datetime | NO | | 0001-01-01 00:00:00 | |
| failed | Connection failed | boolean | NO | | | |
| next_contact | Next connection request | datetime | NO | | 0001-01-01 00:00:00 | |
Return to [database documentation](help/database)

View file

@ -1,12 +1,13 @@
Table hook
==========
===========
addon hook registry
| Field | Description | Type | Null | Key | Default | Extra |
| -------- | ---------------------------------------------------------------------------------------------------------- | ---------------- | ---- | --- | ------- | --------------- |
| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment |
| hook | name of hook | varchar(255) | NO | MUL | | |
| file | relative filename of hook handler | varchar(255) | NO | | | |
| function | function name of hook handler | varchar(255) | NO | | | |
| priority | not yet implemented - can be used to sort conflicts in hook handling by calling handlers in priority order | int(11) unsigned | NO | | 0 | |
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
| hook | name of hook | varbinary(100) | YES | | | |
| file | relative filename of hook handler | varbinary(200) | YES | | | |
| function | function name of hook handler | varbinary(200) | YES | | | |
| priority | not yet implemented - can be used to sort conflicts in hook handling by calling handlers in priority order | smallint unsigned | YES | | 0 | |
Return to [database documentation](help/database)

10
doc/database/db_host.md Normal file
View file

@ -0,0 +1,10 @@
Table host
===========
Hostname
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | sequential ID | tinyint unsigned | YES | PRI | | auto_increment |
| name | The hostname | varchar(128) | YES | | | |
Return to [database documentation](help/database)

View file

@ -0,0 +1,15 @@
Table inbox-status
===========
Status of ActivityPub inboxes
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| url | URL of the inbox | varbinary(255) | YES | PRI | | |
| created | Creation date of this entry | datetime | YES | | 0001-01-01 00:00:00 | |
| success | Date of the last successful delivery | datetime | YES | | 0001-01-01 00:00:00 | |
| failure | Date of the last failed delivery | datetime | YES | | 0001-01-01 00:00:00 | |
| previous | Previous delivery date | datetime | YES | | 0001-01-01 00:00:00 | |
| archive | Is the inbox archived? | boolean | YES | | 0 | |
| shared | Is it a shared inbox? | boolean | YES | | 0 | |
Return to [database documentation](help/database)

View file

@ -1,18 +1,19 @@
Table intro
===========
| Field | Description | Type | Null | Key | Default | Extra |
|------------|------------------|------------------|------|-----|---------------------|----------------|
| id | sequential ID | int(10) unsigned | NO | PRI | NULL | auto_increment |
| uid | | int(10) unsigned | NO | | 0 | |
| fid | | int(11) | NO | | 0 | |
| contact-id | | int(11) | NO | | 0 | |
| knowyou | | tinyint(1) | NO | | 0 | |
| duplex | | tinyint(1) | NO | | 0 | |
| note | | text | NO | | NULL | |
| hash | | varchar(255) | NO | | | |
| datetime | | datetime | NO | | 0001-01-01 00:00:00 | |
| blocked | | tinyint(1) | NO | | 1 | |
| ignore | | tinyint(1) | NO | | 0 | |
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
| uid | User id | mediumint unsigned | YES | | 0 | |
| fid | | int unsigned | NO | | | |
| contact-id | | int unsigned | YES | | 0 | |
| knowyou | | boolean | YES | | 0 | |
| duplex | | boolean | YES | | 0 | |
| note | | text | NO | | | |
| hash | | varchar(255) | YES | | | |
| datetime | | datetime | YES | | 0001-01-01 00:00:00 | |
| blocked | | boolean | YES | | 1 | |
| ignore | | boolean | YES | | 0 | |
Return to [database documentation](help/database)

View file

@ -0,0 +1,11 @@
Table item-uri
===========
URI and GUID for items
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | | int unsigned | YES | PRI | | auto_increment |
| uri | URI of an item | varbinary(255) | YES | | | |
| guid | A unique identifier for an item | varbinary(255) | NO | | | |
Return to [database documentation](help/database)

View file

@ -1,72 +0,0 @@
Table item
==========
| Field | Description | Type | Null | Key | Default | Extra |
|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|------|-----|---------------------|----------------|
| id | sequential ID | int(10) unsigned | NO | PRI | NULL | auto_increment |
| guid | A unique identifier for this item | varchar(255) | NO | MUL | | |
| uri | | varchar(255) | NO | MUL | | |
| uid | user.id which owns this copy of the item | int(10) unsigned | NO | MUL | 0 | |
| contact-id | contact.id | int(11) | NO | MUL | 0 | |
| gcontact-id | ID of the global contact | int(11) | NO | MUL | 0 | |
| type | | varchar(255) | NO | | | |
| wall | This item was posted to the wall of uid | tinyint(1) | NO | MUL | 0 | |
| gravity | | tinyint(1) | NO | | 0 | |
| parent | item.id of the parent to this item if it is a reply of some form; otherwise this must be set to the id of this item | int(10) unsigned | NO | MUL | 0 | |
| parent-uri | uri of the parent to this item | varchar(255) | NO | MUL | | |
| extid | | varchar(255 | NO | MUL | | |
| thr-parent | If the parent of this item is not the top-level item in the conversation, the uri of the immediate parent; otherwise set to parent-uri | varchar(255) | NO | | | |
| created | Creation timestamp. | datetime | NO | | 0001-01-01 00:00:00 | |
| edited | Date of last edit (default is created) | datetime | NO | | 0001-01-01 00:00:00 | |
| commented | Date of last comment/reply to this item | datetime | NO | | 0001-01-01 00:00:00 | |
| received | datetime | datetime | NO | | 0001-01-01 00:00:00 | |
| changed | Date that something in the conversation changed, indicating clients should fetch the conversation again | datetime | NO | | 0001-01-01 00:00:00 | |
| owner-name | Name of the owner of this item | varchar(255) | NO | | | |
| owner-link | Link to the profile page of the owner of this item | varchar(255) | NO | | | |
| owner-avatar | Link to the avatar picture of the owner of this item | varchar(255) | NO | | | |
| owner-id | Link to the contact table with uid=0 of the owner of this item | int(11) | NO | MUL | 0 | |
| author-name | Name of the author of this item | varchar(255) | NO | | | |
| author-link | Link to the profile page of the author of this item | varchar(255) | NO | | | |
| author-avatar | Link to the avatar picture of the author of this item | varchar(255) | NO | | | |
| author-id | Link to the contact table with uid=0 of the author of this item | int(11) | NO | MUL | 0 | |
| title | item title | varchar(255) | NO | | | |
| body | item body content | mediumtext | NO | | NULL | |
| app | application which generated this item | varchar(255) | NO | | | |
| verb | ActivityStreams verb | varchar(255) | NO | | | |
| object-type | ActivityStreams object type | varchar(255) | NO | | | |
| object | JSON encoded object structure unless it is an implied object (normal post) | text | NO | | NULL | |
| target-type | ActivityStreams target type if applicable (URI) | varchar(255) | NO | | | |
| target | JSON encoded target structure if used | text | NO | | NULL | |
| postopts | External post connectors add their network name to this comma-separated string to identify that they should be delivered to these networks during delivery | text | NO | | NULL | |
| plink | permalink or URL toa displayable copy of the message at its source | varchar(255) | NO | | | |
| resource-id | Used to link other tables to items, it identifies the linked resource (e.g. photo) and if set must also set resource_type | varchar(255) | NO | MUL | | |
| event-id | Used to link to the event.id | int(11) | NO | | 0 | |
| tag | | mediumtext | NO | | NULL | |
| attach | JSON structure representing attachments to this item | mediumtext | NO | | NULL | |
| inform | | mediumtext | NO | | NULL | |
| file | | mediumtext | NO | | NULL | |
| location | text location where this item originated | varchar(255) | NO | | | |
| coord | longitude/latitude pair representing location where this item originated | varchar(255) | NO | | | |
| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | NO | | NULL | |
| allow_gid | Access Control - list of allowed groups | mediumtext | NO | | NULL | |
| deny_cid | Access Control - list of denied contact.id | mediumtext | NO | | NULL | |
| deny_gid | Access Control - list of denied groups | mediumtext | NO | | NULL | |
| private | distribution is restricted | tinyint(1) | NO | | 0 | |
| pubmail | | tinyint(1) | NO | | 0 | |
| moderated | | tinyint(1) | NO | | 0 | |
| visible | | tinyint(1) | NO | | 0 | |
| spam | | tinyint(1) | NO | | 0 | |
| starred | item has been favourited | tinyint(1) | NO | | 0 | |
| bookmark | item has been bookmarked | tinyint(1) | NO | | 0 | |
| unseen | item has not been seen | tinyint(1) | NO | | 1 | |
| deleted | item has been deleted | tinyint(1) | NO | MUL | 0 | |
| origin | item originated at this site | tinyint(1) | NO | | 0 | |
| forum_mode | | tinyint(1) | NO | | 0 | |
| last-child | | tinyint(1) unsigned | NO | | 1 | |
| mention | The owner of this item was mentioned in it | tinyint(1) | NO | | 0 | |
| network | Network from where the item comes from | varchar(32) | NO | | | |
| rendered-hash | | varchar(32) | NO | | | |
| rendered-html | item.body converted to html | mediumtext | NO | | NULL | |
| global | | tinyint(1) | NO | | 0 | |
Return to [database documentation](help/database)

View file

@ -1,11 +1,13 @@
Table locks
===========
| Field | Description | Type | Null | Key | Default | Extra |
|---------|------------------|------------------|------|-----|---------------------|----------------|
| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment |
| name | | varchar(128) | NO | | | |
| locked | | tinyint(1) | NO | | 0 | |
| pid | Process ID | int(10) unsigned | NO | | 0 | |
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
| name | | varchar(128) | YES | | | |
| locked | | boolean | YES | | 0 | |
| pid | Process ID | int unsigned | YES | | 0 | |
| expires | datetime of cache expiration | datetime | YES | | 0001-01-01 00:00:00 | |
Return to [database documentation](help/database)

View file

@ -1,24 +1,30 @@
Table mail
==========
===========
private messages
| Field | Description | Type | Null | Key | Default | Extra |
| ---------- | -------------------------------------------- | ---------------- | ---- | --- | ------------------- | --------------- |
| id | sequential ID | int(10) unsigned | NO | PRI | NULL | auto_increment |
| uid | user.id of the owner of this data | int(10) unsigned | NO | MUL | 0 | |
| guid | A unique identifier for this private message | int(10) unsigned | NO | MUL | | |
| from-name | name of the sender | varchar(255) | NO | | | |
| from-photo | contact photo link of the sender | varchar(255) | NO | | | |
| from-url | profile linke of the sender | varchar(255) | NO | | | |
| contact-id | contact.id | varchar(255) | NO | | | |
| convid | conv.id | int(11) unsigned | NO | MUL | 0 | |
| title | | varchar(255) | NO | | | |
| body | | mediumtext | NO | | NULL | |
| seen | if message visited it is 1 | varchar(255) | NO | | 0 | |
| reply | | varchar(255) | NO | MUL | 0 | |
| replied | | varchar(255) | NO | | 0 | |
| unknown | if sender not in the contact table this is 1 | varchar(255) | NO | | 0 | |
| uri | | varchar(255) | NO | MUL | | |
| parent-uri | | varchar(255) | NO | MUL | | |
| created | creation time of the private message | datetime | NO | | 0001-01-01 00:00:00 | |
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
| uid | Owner User id | mediumint unsigned | YES | | 0 | |
| guid | A unique identifier for this private message | varchar(255) | YES | | | |
| from-name | name of the sender | varchar(255) | YES | | | |
| from-photo | contact photo link of the sender | varchar(255) | YES | | | |
| from-url | profile linke of the sender | varchar(255) | YES | | | |
| contact-id | contact.id | varchar(255) | NO | | | |
| author-id | Link to the contact table with uid=0 of the author of the mail | int unsigned | NO | | | |
| convid | conv.id | int unsigned | NO | | | |
| title | | varchar(255) | YES | | | |
| body | | mediumtext | NO | | | |
| seen | if message visited it is 1 | boolean | YES | | 0 | |
| reply | | boolean | YES | | 0 | |
| replied | | boolean | YES | | 0 | |
| unknown | if sender not in the contact table this is 1 | boolean | YES | | 0 | |
| uri | | varchar(255) | YES | | | |
| uri-id | Item-uri id of the related mail | int unsigned | NO | | | |
| parent-uri | | varchar(255) | YES | | | |
| parent-uri-id | Item-uri id of the parent of the related mail | int unsigned | NO | | | |
| thr-parent | | varchar(255) | NO | | | |
| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | NO | | | |
| created | creation time of the private message | datetime | YES | | 0001-01-01 00:00:00 | |
Return to [database documentation](help/database)

View file

@ -1,20 +1,21 @@
Table mailacct
==============
===========
Mail account data for fetching mails
| Field | Description | Type | Null | Key | Default | Extra |
|--------------|------------------|--------------|------|-----|---------------------|----------------|
| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment |
| uid | | int(11) | NO | | 0 | |
| server | | varchar(255) | NO | | | |
| port | | int(11) | NO | | 0 | |
| ssltype | | varchar(16) | NO | | | |
| mailbox | | varchar(255) | NO | | | |
| user | | varchar(255) | NO | | | |
| pass | | text | NO | | NULL | |
| reply_to | | varchar(255) | NO | | | |
| action | | int(11) | NO | | 0 | |
| movetofolder | | varchar(255) | NO | | | |
| pubmail | | tinyint(1) | NO | | 0 | |
| last_check | | datetime | NO | | 0001-01-01 00:00:00 | |
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
| uid | User id | mediumint unsigned | YES | | 0 | |
| server | | varchar(255) | YES | | | |
| port | | smallint unsigned | YES | | 0 | |
| ssltype | | varchar(16) | YES | | | |
| mailbox | | varchar(255) | YES | | | |
| user | | varchar(255) | YES | | | |
| pass | | text | NO | | | |
| reply_to | | varchar(255) | YES | | | |
| action | | tinyint unsigned | YES | | 0 | |
| movetofolder | | varchar(255) | YES | | | |
| pubmail | | boolean | YES | | 0 | |
| last_check | | datetime | YES | | 0001-01-01 00:00:00 | |
Return to [database documentation](help/database)

View file

@ -1,10 +1,11 @@
Table manage
============
===========
table of accounts that can manage each other
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ------------- | ------- | ---- | --- | ------- | --------------- |
| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment |
| uid | user.id | int(11) | NO | MUL | 0 | |
| mid | | int(11) | NO | | 0 | |
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
| uid | User id | mediumint unsigned | YES | | 0 | |
| mid | User id | mediumint unsigned | YES | | 0 | |
Return to [database documentation](help/database)

View file

@ -0,0 +1,17 @@
Table notification
===========
notifications
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
| uid | Owner User id | mediumint unsigned | NO | | | |
| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | NO | | | |
| type | | tinyint unsigned | NO | | | |
| actor-id | Link to the contact table with uid=0 of the actor that caused the notification | int unsigned | NO | | | |
| target-uri-id | Item-uri id of the related post | int unsigned | NO | | | |
| parent-uri-id | Item-uri id of the parent of the related post | int unsigned | NO | | | |
| created | | datetime | NO | | | |
| seen | | boolean | NO | | 0 | |
Return to [database documentation](help/database)

View file

@ -1,12 +1,14 @@
Table notify-threads
====================
===========
| Field | Description | Type | Null | Key | Default | Extra |
|--------------------|------------------|------------------|------|-----|---------|----------------|
| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment |
| notify-id | | int(11) | NO | | 0 | |
| master-parent-item | | int(10) unsigned | NO | MUL | 0 | |
| parent-item | | int(10) unsigned | NO | | 0 | |
| receiver-uid | | int(11) | NO | MUL | 0 | |
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
| notify-id | | int unsigned | YES | | 0 | |
| master-parent-item | Deprecated | int unsigned | NO | | | |
| master-parent-uri-id | Item-uri id of the parent of the related post | int unsigned | NO | | | |
| parent-item | | int unsigned | YES | | 0 | |
| receiver-uid | User id | mediumint unsigned | YES | | 0 | |
Return to [database documentation](help/database)

View file

@ -1,24 +1,26 @@
Table notify
============
===========
notifications
| Field | Description | Type | Null | Key | Default | Extra |
| ---------- | --------------------------------- | ------------ | ---- | --- | ------------------- | --------------- |
| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment |
| hash | | varchar(64) | NO | | | |
| type | | int(11) | NO | | 0 | |
| name | | varchar(255) | NO | | | |
| url | | varchar(255) | NO | | | |
| photo | | varchar(255) | NO | | | |
| date | | datetime | NO | | 0001-01-01 00:00:00 | |
| msg | | mediumtext | YES | | NULL | |
| uid | user.id of the owner of this data | int(11) | NO | MUL | 0 | |
| link | | varchar(255) | NO | | | |
| iid | item.id | int(11) | NO | | 0 | |
| parent | | int(11) | NO | | 0 | |
| seen | | tinyint(1) | NO | | 0 | |
| verb | | varchar(255) | NO | | | |
| otype | | varchar(16) | NO | | | |
| name_cache | Cached bbcode parsing of name | tinytext | YES | | NULL | |
| msg_cache | Cached bbcode parsing of msg | mediumtext | YES | | NULL | |
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
| type | | smallint unsigned | YES | | 0 | |
| name | | varchar(255) | YES | | | |
| url | | varchar(255) | YES | | | |
| photo | | varchar(255) | YES | | | |
| date | | datetime | YES | | 0001-01-01 00:00:00 | |
| msg | | mediumtext | NO | | | |
| uid | Owner User id | mediumint unsigned | YES | | 0 | |
| link | | varchar(255) | YES | | | |
| iid | | int unsigned | NO | | | |
| parent | | int unsigned | NO | | | |
| uri-id | Item-uri id of the related post | int unsigned | NO | | | |
| parent-uri-id | Item-uri id of the parent of the related post | int unsigned | NO | | | |
| seen | | boolean | YES | | 0 | |
| verb | | varchar(100) | YES | | | |
| otype | | varchar(10) | YES | | | |
| name_cache | Cached bbcode parsing of name | tinytext | NO | | | |
| msg_cache | Cached bbcode parsing of msg | mediumtext | NO | | | |
Return to [database documentation](help/database)

View file

@ -1,11 +1,12 @@
Table oembed
============
===========
cache for OEmbed queries
| Field | Description | Type | Null | Key | Default | Extra |
| ------------ | ---------------------------------- | ------------ | ---- | --- | ------------------- | ----- |
| url | page url | varchar(255) | NO | PRI | NULL | |
| maxwidth | Maximum width passed to Oembed | int(11) | NO | PRI | 0 | |
| content | OEmbed data of the page | text | NO | | NULL | |
| created | datetime of creation | datetime | NO | MUL | 0001-01-01 00:00:00 | |
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| url | page url | varbinary(255) | YES | PRI | | |
| maxwidth | Maximum width passed to Oembed | mediumint unsigned | YES | PRI | | |
| content | OEmbed data of the page | mediumtext | NO | | | |
| created | datetime of creation | datetime | YES | | 0001-01-01 00:00:00 | |
Return to [database documentation](help/database)

View file

@ -0,0 +1,14 @@
Table openwebauth-token
===========
Store OpenWebAuth token to verify contacts
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
| uid | User id - currently unused | mediumint unsigned | YES | | 0 | |
| type | Verify type | varchar(32) | YES | | | |
| token | A generated token | varchar(255) | YES | | | |
| meta | | varchar(255) | YES | | | |
| created | datetime of creation | datetime | YES | | 0001-01-01 00:00:00 | |
Return to [database documentation](help/database)

View file

@ -1,12 +1,15 @@
Table parsed_url
================
===========
cache for &#039;parse_url&#039; queries
| Field | Description | Type | Null | Key | Default | Extra |
| ------------ | ---------------------------------- | ------------ | ---- | --- | ------------------- | ----- |
| url | page url | varchar(255) | NO | PRI | NULL | |
| guessing | is the "guessing" mode active? | tinyint(1) | NO | PRI | 0 | |
| oembed | is the data the result of oembed? | tinyint(1) | NO | PRI | 0 | |
| content | page data | text | NO | | NULL | |
| created | datetime of creation | datetime | NO | MUL | 0001-01-01 00:00:00 | |
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| url_hash | page url hash | binary(64) | YES | PRI | | |
| guessing | is the &#039;guessing&#039; mode active? | boolean | YES | PRI | 0 | |
| oembed | is the data the result of oembed? | boolean | YES | PRI | 0 | |
| url | page url | text | YES | | | |
| content | page data | mediumtext | NO | | | |
| created | datetime of creation | datetime | YES | | 0001-01-01 00:00:00 | |
| expires | datetime of expiration | datetime | YES | | 0001-01-01 00:00:00 | |
Return to [database documentation](help/database)

View file

@ -1,12 +1,13 @@
Table pconfic
=============
Table pconfig
===========
personal (per user) configuration storage
| Field | Description | Type | Null | Key | Default | Extra |
|-------|-------------|------------|------|-----|---------|----------------|
| id | | int(11) | NO | PRI | NULL | auto_increment |
| uid | | int(11) | NO | MUL | 0 | |
| cat | | char(255) | NO | | | |
| k | | char(255) | NO | | | |
| v | | mediumtext | NO | | NULL | |
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | Primary key | int unsigned | YES | PRI | | auto_increment |
| uid | User id | mediumint unsigned | YES | | 0 | |
| cat | Category | varchar(50) | YES | | | |
| k | Key | varchar(100) | YES | | | |
| v | Value | mediumtext | NO | | | |
Return to [database documentation](help/database)

View file

@ -0,0 +1,14 @@
Table permissionset
===========
| Field | Description | Type | Null | Key | Default | Extra |
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
| uid | Owner id of this permission set | mediumint unsigned | YES | | 0 | |
| allow_cid | Access Control - list of allowed contact.id &#039;&lt;19&gt;&lt;78&gt;&#039; | mediumtext | NO | | | |
| allow_gid | Access Control - list of allowed groups | mediumtext | NO | | | |
| deny_cid | Access Control - list of denied contact.id | mediumtext | NO | | | |
| deny_gid | Access Control - list of denied groups | mediumtext | NO | | | |
Return to [database documentation](help/database)

View file

@ -1,29 +1,35 @@
Table photo
===========
photo storage
| Field | Description | Type | Null | Key | Default | Extra |
| ----------- | ------------------------------------------------------ | ---------------- | ---- | --- | ------------------- | --------------- |
| id | sequential ID | int(10) unsigned | NO | PRI | NULL | auto_increment |
| uid | user.id of the owner of this data | int(10) unsigned | NO | MUL | 0 | |
| contact-id | contact.id | int(10) unsigned | NO | | 0 | |
| guid | A unique identifier for this photo | varchar(64) | NO | MUL | | |
| resource-id | | varchar(255) | NO | MUL | | |
| created | creation date | datetime | NO | | 0001-01-01 00:00:00 | |
| edited | last edited date | datetime | NO | | 0001-01-01 00:00:00 | |
| title | | varchar(255) | NO | | | |
| desc | | text | NO | | NULL | |
| album | The name of the album to which the photo belongs | varchar(255) | NO | | | |
| filename | | varchar(255) | NO | | | |