From 84ab5d61594ed92e0e28415d6c33df267a3636c5 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 13 Jun 2021 20:33:50 +0000 Subject: [PATCH 01/12] Updates database structure documentation --- doc/database.md | 120 +++++++++------ doc/database/db_2fa_app_specific_password.md | 14 ++ doc/database/db_2fa_recovery_codes.md | 12 ++ doc/database/db_2fa_trusted_browser.md | 13 ++ doc/database/db_addon.md | 22 ++- doc/database/db_apcontact.md | 32 ++++ doc/database/db_application-token.md | 18 +++ doc/database/db_application.md | 19 +++ doc/database/db_attach.md | 37 ++--- doc/database/db_auth_codes.md | 19 ++- doc/database/db_cache.md | 13 +- doc/database/db_challenge.md | 19 +-- doc/database/db_clients.md | 19 +-- doc/database/db_config.md | 15 +- doc/database/db_contact-relation.md | 13 ++ doc/database/db_contact.md | 152 ++++++++++--------- doc/database/db_conv.md | 23 +-- doc/database/db_conversation.md | 22 +-- doc/database/db_delayed-post.md | 12 ++ doc/database/db_diaspora-interaction.md | 10 ++ doc/database/db_event.md | 44 +++--- doc/database/db_fcontact.md | 41 ++--- doc/database/db_fsuggest.md | 25 +-- doc/database/db_group.md | 15 +- doc/database/db_group_member.md | 14 +- doc/database/db_gserver-tag.md | 10 ++ doc/database/db_gserver.md | 47 +++--- doc/database/db_hook.md | 17 ++- doc/database/db_host.md | 10 ++ doc/database/db_inbox-status.md | 15 ++ doc/database/db_intro.md | 27 ++-- doc/database/db_item-uri.md | 11 ++ doc/database/db_item.md | 72 --------- doc/database/db_locks.md | 14 +- doc/database/db_mail.md | 46 +++--- doc/database/db_mailacct.md | 33 ++-- doc/database/db_manage.md | 13 +- doc/database/db_notification.md | 17 +++ doc/database/db_notify-threads.md | 18 ++- doc/database/db_notify.md | 42 ++--- doc/database/db_oembed.md | 15 +- doc/database/db_openwebauth-token.md | 14 ++ doc/database/db_parsed_url.md | 19 ++- doc/database/db_pconfig.md | 19 +-- doc/database/db_permissionset.md | 14 ++ doc/database/db_photo.md | 54 ++++--- doc/database/db_poll.md | 19 --- doc/database/db_poll_result.md | 10 -- doc/database/db_post-category.md | 12 ++ doc/database/db_post-content.md | 25 +++ doc/database/db_post-delivery-data.md | 19 +++ doc/database/db_post-media.md | 27 ++++ doc/database/db_post-tag.md | 12 ++ doc/database/db_post-thread-user.md | 31 ++++ doc/database/db_post-thread.md | 17 +++ doc/database/db_post-user-notification.md | 11 ++ doc/database/db_post-user.md | 38 +++++ doc/database/db_post.md | 26 ++++ doc/database/db_process.md | 11 ++ doc/database/db_profile.md | 90 +++++------ doc/database/db_profile_check.md | 19 +-- doc/database/db_profile_field.md | 16 ++ doc/database/db_push_subscriber.md | 20 ++- doc/database/db_queue.md | 14 -- doc/database/db_register.md | 20 +-- doc/database/db_search.md | 13 +- doc/database/db_session.md | 15 +- doc/database/db_sign.md | 12 -- doc/database/db_storage.md | 10 ++ doc/database/db_tag.md | 11 ++ doc/database/db_term.md | 19 --- doc/database/db_thread.md | 33 ---- doc/database/db_tokens.md | 19 +-- doc/database/db_user-contact.md | 13 ++ doc/database/db_user.md | 122 ++++++--------- doc/database/db_userd.md | 9 +- doc/database/db_verb.md | 10 ++ doc/database/db_worker-ipc.md | 10 ++ doc/database/db_workerqueue.md | 24 +-- src/Console/DatabaseStructure.php | 1 + src/Database/DBStructure.php | 36 +++++ view/templates/structure.tpl | 11 ++ view/templates/tables.tpl | 10 ++ 83 files changed, 1289 insertions(+), 796 deletions(-) create mode 100644 doc/database/db_2fa_app_specific_password.md create mode 100644 doc/database/db_2fa_recovery_codes.md create mode 100644 doc/database/db_2fa_trusted_browser.md create mode 100644 doc/database/db_apcontact.md create mode 100644 doc/database/db_application-token.md create mode 100644 doc/database/db_application.md create mode 100644 doc/database/db_contact-relation.md create mode 100644 doc/database/db_delayed-post.md create mode 100644 doc/database/db_diaspora-interaction.md create mode 100644 doc/database/db_gserver-tag.md create mode 100644 doc/database/db_host.md create mode 100644 doc/database/db_inbox-status.md create mode 100644 doc/database/db_item-uri.md delete mode 100644 doc/database/db_item.md create mode 100644 doc/database/db_notification.md create mode 100644 doc/database/db_openwebauth-token.md create mode 100644 doc/database/db_permissionset.md delete mode 100644 doc/database/db_poll.md delete mode 100644 doc/database/db_poll_result.md create mode 100644 doc/database/db_post-category.md create mode 100644 doc/database/db_post-content.md create mode 100644 doc/database/db_post-delivery-data.md create mode 100644 doc/database/db_post-media.md create mode 100644 doc/database/db_post-tag.md create mode 100644 doc/database/db_post-thread-user.md create mode 100644 doc/database/db_post-thread.md create mode 100644 doc/database/db_post-user-notification.md create mode 100644 doc/database/db_post-user.md create mode 100644 doc/database/db_post.md create mode 100644 doc/database/db_process.md create mode 100644 doc/database/db_profile_field.md delete mode 100644 doc/database/db_queue.md delete mode 100644 doc/database/db_sign.md create mode 100644 doc/database/db_storage.md create mode 100644 doc/database/db_tag.md delete mode 100644 doc/database/db_term.md delete mode 100644 doc/database/db_thread.md create mode 100644 doc/database/db_user-contact.md create mode 100644 doc/database/db_verb.md create mode 100644 doc/database/db_worker-ipc.md create mode 100644 view/templates/structure.tpl create mode 100644 view/templates/tables.tpl diff --git a/doc/database.md b/doc/database.md index 447607f8d..4e22add37 100644 --- a/doc/database.md +++ b/doc/database.md @@ -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 | diff --git a/doc/database/db_2fa_app_specific_password.md b/doc/database/db_2fa_app_specific_password.md new file mode 100644 index 000000000..9e3680b76 --- /dev/null +++ b/doc/database/db_2fa_app_specific_password.md @@ -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) diff --git a/doc/database/db_2fa_recovery_codes.md b/doc/database/db_2fa_recovery_codes.md new file mode 100644 index 000000000..7b3b9d649 --- /dev/null +++ b/doc/database/db_2fa_recovery_codes.md @@ -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) diff --git a/doc/database/db_2fa_trusted_browser.md b/doc/database/db_2fa_trusted_browser.md new file mode 100644 index 000000000..29be4646a --- /dev/null +++ b/doc/database/db_2fa_trusted_browser.md @@ -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) diff --git a/doc/database/db_addon.md b/doc/database/db_addon.md index cd8a3d44a..db3a5d44b 100644 --- a/doc/database/db_addon.md +++ b/doc/database/db_addon.md @@ -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) diff --git a/doc/database/db_apcontact.md b/doc/database/db_apcontact.md new file mode 100644 index 000000000..bea394bc2 --- /dev/null +++ b/doc/database/db_apcontact.md @@ -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) diff --git a/doc/database/db_application-token.md b/doc/database/db_application-token.md new file mode 100644 index 000000000..8b3d601ff --- /dev/null +++ b/doc/database/db_application-token.md @@ -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) diff --git a/doc/database/db_application.md b/doc/database/db_application.md new file mode 100644 index 000000000..26b923266 --- /dev/null +++ b/doc/database/db_application.md @@ -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) diff --git a/doc/database/db_attach.md b/doc/database/db_attach.md index 7dde8f860..e35003c36 100644 --- a/doc/database/db_attach.md +++ b/doc/database/db_attach.md @@ -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 '<19><78> | 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) diff --git a/doc/database/db_auth_codes.md b/doc/database/db_auth_codes.md index 1fec38500..6a33a30a1 100644 --- a/doc/database/db_auth_codes.md +++ b/doc/database/db_auth_codes.md @@ -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) diff --git a/doc/database/db_cache.md b/doc/database/db_cache.md index f5691d08a..328f485e0 100644 --- a/doc/database/db_cache.md +++ b/doc/database/db_cache.md @@ -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) diff --git a/doc/database/db_challenge.md b/doc/database/db_challenge.md index aa7b263fd..59534ba13 100644 --- a/doc/database/db_challenge.md +++ b/doc/database/db_challenge.md @@ -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) diff --git a/doc/database/db_clients.md b/doc/database/db_clients.md index 228b45cc2..89025d428 100644 --- a/doc/database/db_clients.md +++ b/doc/database/db_clients.md @@ -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) diff --git a/doc/database/db_config.md b/doc/database/db_config.md index 6bcb4bcf8..994b1a871 100644 --- a/doc/database/db_config.md +++ b/doc/database/db_config.md @@ -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) diff --git a/doc/database/db_contact-relation.md b/doc/database/db_contact-relation.md new file mode 100644 index 000000000..5077cd753 --- /dev/null +++ b/doc/database/db_contact-relation.md @@ -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) diff --git a/doc/database/db_contact.md b/doc/database/db_contact.md index 2963a1a2a..108157fc0 100644 --- a/doc/database/db_contact.md +++ b/doc/database/db_contact.md @@ -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) diff --git a/doc/database/db_conv.md b/doc/database/db_conv.md index f70191b88..bcea6012d 100644 --- a/doc/database/db_conv.md +++ b/doc/database/db_conv.md @@ -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) diff --git a/doc/database/db_conversation.md b/doc/database/db_conversation.md index 32d030cb1..e9ce96690 100644 --- a/doc/database/db_conversation.md +++ b/doc/database/db_conversation.md @@ -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) diff --git a/doc/database/db_delayed-post.md b/doc/database/db_delayed-post.md new file mode 100644 index 000000000..3f83f49c2 --- /dev/null +++ b/doc/database/db_delayed-post.md @@ -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) diff --git a/doc/database/db_diaspora-interaction.md b/doc/database/db_diaspora-interaction.md new file mode 100644 index 000000000..f2906e9d2 --- /dev/null +++ b/doc/database/db_diaspora-interaction.md @@ -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) diff --git a/doc/database/db_event.md b/doc/database/db_event.md index 2c0650a8d..9c46939f3 100644 --- a/doc/database/db_event.md +++ b/doc/database/db_event.md @@ -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 '<19><78>' | 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) diff --git a/doc/database/db_fcontact.md b/doc/database/db_fcontact.md index d9a786acc..ed468633d 100644 --- a/doc/database/db_fcontact.md +++ b/doc/database/db_fcontact.md @@ -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) diff --git a/doc/database/db_fsuggest.md b/doc/database/db_fsuggest.md index e461895c8..66865b506 100644 --- a/doc/database/db_fsuggest.md +++ b/doc/database/db_fsuggest.md @@ -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) diff --git a/doc/database/db_group.md b/doc/database/db_group.md index f27b9a75f..f4f60436c 100644 --- a/doc/database/db_group.md +++ b/doc/database/db_group.md @@ -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) diff --git a/doc/database/db_group_member.md b/doc/database/db_group_member.md index f8a402ef6..a4ecfdf7d 100644 --- a/doc/database/db_group_member.md +++ b/doc/database/db_group_member.md @@ -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) diff --git a/doc/database/db_gserver-tag.md b/doc/database/db_gserver-tag.md new file mode 100644 index 000000000..96a5f02f4 --- /dev/null +++ b/doc/database/db_gserver-tag.md @@ -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) diff --git a/doc/database/db_gserver.md b/doc/database/db_gserver.md index d9ec69a53..919363def 100644 --- a/doc/database/db_gserver.md +++ b/doc/database/db_gserver.md @@ -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) diff --git a/doc/database/db_hook.md b/doc/database/db_hook.md index 06eb84a18..71be258f3 100644 --- a/doc/database/db_hook.md +++ b/doc/database/db_hook.md @@ -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) diff --git a/doc/database/db_host.md b/doc/database/db_host.md new file mode 100644 index 000000000..0ce293228 --- /dev/null +++ b/doc/database/db_host.md @@ -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) diff --git a/doc/database/db_inbox-status.md b/doc/database/db_inbox-status.md new file mode 100644 index 000000000..93e99dc5d --- /dev/null +++ b/doc/database/db_inbox-status.md @@ -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) diff --git a/doc/database/db_intro.md b/doc/database/db_intro.md index a71154a4f..a05494de5 100644 --- a/doc/database/db_intro.md +++ b/doc/database/db_intro.md @@ -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) diff --git a/doc/database/db_item-uri.md b/doc/database/db_item-uri.md new file mode 100644 index 000000000..5f1d44714 --- /dev/null +++ b/doc/database/db_item-uri.md @@ -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) diff --git a/doc/database/db_item.md b/doc/database/db_item.md deleted file mode 100644 index d24d92bad..000000000 --- a/doc/database/db_item.md +++ /dev/null @@ -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) diff --git a/doc/database/db_locks.md b/doc/database/db_locks.md index 4de6fbf96..3c219c2cc 100644 --- a/doc/database/db_locks.md +++ b/doc/database/db_locks.md @@ -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) diff --git a/doc/database/db_mail.md b/doc/database/db_mail.md index 623b8c9c8..43c9baf33 100644 --- a/doc/database/db_mail.md +++ b/doc/database/db_mail.md @@ -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) diff --git a/doc/database/db_mailacct.md b/doc/database/db_mailacct.md index 9f6484f81..2c2b4e7af 100644 --- a/doc/database/db_mailacct.md +++ b/doc/database/db_mailacct.md @@ -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) diff --git a/doc/database/db_manage.md b/doc/database/db_manage.md index 4cfc1d0a1..94994ec9b 100644 --- a/doc/database/db_manage.md +++ b/doc/database/db_manage.md @@ -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) diff --git a/doc/database/db_notification.md b/doc/database/db_notification.md new file mode 100644 index 000000000..f4e524d73 --- /dev/null +++ b/doc/database/db_notification.md @@ -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) diff --git a/doc/database/db_notify-threads.md b/doc/database/db_notify-threads.md index 5c196628d..a788e8224 100644 --- a/doc/database/db_notify-threads.md +++ b/doc/database/db_notify-threads.md @@ -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) diff --git a/doc/database/db_notify.md b/doc/database/db_notify.md index fbf0db770..360e93ba2 100644 --- a/doc/database/db_notify.md +++ b/doc/database/db_notify.md @@ -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) diff --git a/doc/database/db_oembed.md b/doc/database/db_oembed.md index 651a52e74..e08af5f01 100644 --- a/doc/database/db_oembed.md +++ b/doc/database/db_oembed.md @@ -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) diff --git a/doc/database/db_openwebauth-token.md b/doc/database/db_openwebauth-token.md new file mode 100644 index 000000000..98fa7b6a4 --- /dev/null +++ b/doc/database/db_openwebauth-token.md @@ -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) diff --git a/doc/database/db_parsed_url.md b/doc/database/db_parsed_url.md index 343e5a8be..9b2912cce 100644 --- a/doc/database/db_parsed_url.md +++ b/doc/database/db_parsed_url.md @@ -1,12 +1,15 @@ Table parsed_url -================ +=========== +cache for 'parse_url' 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 'guessing' 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) diff --git a/doc/database/db_pconfig.md b/doc/database/db_pconfig.md index a4ed10a35..2bffcff5a 100644 --- a/doc/database/db_pconfig.md +++ b/doc/database/db_pconfig.md @@ -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) diff --git a/doc/database/db_permissionset.md b/doc/database/db_permissionset.md new file mode 100644 index 000000000..0e60ff380 --- /dev/null +++ b/doc/database/db_permissionset.md @@ -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 '<19><78>' | 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) diff --git a/doc/database/db_photo.md b/doc/database/db_photo.md index 2bb7473e2..ef8f2b182 100644 --- a/doc/database/db_photo.md +++ b/doc/database/db_photo.md @@ -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 | | | | -| type | image type | varchar(128) | NO | | image/jpeg | | -| height | | smallint(6) | NO | | 0 | | -| width | | smallint(6) | NO | | 0 | | -| size | | int(10) unsigned | NO | | 0 | | -| data | | mediumblob | NO | | NULL | | -| scale | | tinyint(3) | NO | | 0 | | -| profile | | tinyint(1) | 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 | +| uid | Owner User id | mediumint unsigned | YES | | 0 | | +| contact-id | contact.id | int unsigned | YES | | 0 | | +| guid | A unique identifier for this photo | char(16) | YES | | | | +| resource-id | | char(32) | YES | | | | +| hash | hash value of the photo | char(32) | NO | | | | +| created | creation date | datetime | YES | | 0001-01-01 00:00:00 | | +| edited | last edited date | datetime | YES | | 0001-01-01 00:00:00 | | +| title | | varchar(255) | YES | | | | +| desc | | text | NO | | | | +| album | The name of the album to which the photo belongs | varchar(255) | YES | | | | +| filename | | varchar(255) | YES | | | | +| type | | varchar(30) | YES | | image/jpeg | | +| height | | smallint unsigned | YES | | 0 | | +| width | | smallint unsigned | YES | | 0 | | +| datasize | | int unsigned | YES | | 0 | | +| data | | mediumblob | YES | | | | +| scale | | tinyint unsigned | YES | | 0 | | +| profile | | boolean | YES | | 0 | | +| allow_cid | Access Control - list of allowed contact.id '<19><78>' | 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 | | | | +| accessible | Make photo publicly accessible, ignoring permissions | boolean | YES | | 0 | | +| backend-class | Storage backend class | tinytext | NO | | | | +| backend-ref | Storage backend data reference | text | NO | | | | +| updated | | datetime | YES | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_poll.md b/doc/database/db_poll.md deleted file mode 100644 index fd89b345c..000000000 --- a/doc/database/db_poll.md +++ /dev/null @@ -1,19 +0,0 @@ -Table poll -========== - -| Field | Description | Type | Null | Key | Default | Extra | -|-------|-------------|------------|------|-----|---------|----------------| -| id | | int(11) | NO | PRI | NULL | auto_increment | -| uid | | int(11) | NO | MUL | 0 | | -| q0 | | mediumtext | NO | | NULL | | -| q1 | | mediumtext | NO | | NULL | | -| q2 | | mediumtext | NO | | NULL | | -| q3 | | mediumtext | NO | | NULL | | -| q4 | | mediumtext | NO | | NULL | | -| q5 | | mediumtext | NO | | NULL | | -| q6 | | mediumtext | NO | | NULL | | -| q7 | | mediumtext | NO | | NULL | | -| q8 | | mediumtext | NO | | NULL | | -| q9 | | mediumtext | NO | | NULL | | - -Return to [database documentation](help/database) diff --git a/doc/database/db_poll_result.md b/doc/database/db_poll_result.md deleted file mode 100644 index 5a732d0ad..000000000 --- a/doc/database/db_poll_result.md +++ /dev/null @@ -1,10 +0,0 @@ -Table poll_result -================= - -| Field | Description | Type | Null | Key | Default | Extra | -|---------|------------------|---------|------|-----|---------|----------------| -| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment | -| poll_id | | int(11) | NO | MUL | 0 | | -| choice | | int(11) | NO | MUL | 0 | | - -Return to [database documentation](help/database) diff --git a/doc/database/db_post-category.md b/doc/database/db_post-category.md new file mode 100644 index 000000000..3765072d0 --- /dev/null +++ b/doc/database/db_post-category.md @@ -0,0 +1,12 @@ +Table post-category +=========== +post relation to categories + +| 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 | | | +| uid | User id | mediumint unsigned | YES | PRI | 0 | | +| type | | tinyint unsigned | YES | PRI | 0 | | +| tid | | int unsigned | YES | PRI | 0 | | + +Return to [database documentation](help/database) diff --git a/doc/database/db_post-content.md b/doc/database/db_post-content.md new file mode 100644 index 000000000..65e051cbd --- /dev/null +++ b/doc/database/db_post-content.md @@ -0,0 +1,25 @@ +Table post-content +=========== +Content for all posts + +| 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 | | | +| title | item title | varchar(255) | YES | | | | +| content-warning | | varchar(255) | YES | | | | +| body | item body content | mediumtext | NO | | | | +| raw-body | Body without embedded media links | mediumtext | NO | | | | +| location | text location where this item originated | varchar(255) | YES | | | | +| coord | longitude/latitude pair representing location where this item originated | varchar(255) | YES | | | | +| language | Language information about this post | text | NO | | | | +| app | application which generated this item | varchar(255) | YES | | | | +| rendered-hash | | varchar(32) | YES | | | | +| rendered-html | item.body converted to html | mediumtext | NO | | | | +| object-type | ActivityStreams object type | varchar(100) | YES | | | | +| object | JSON encoded object structure unless it is an implied object (normal post) | text | NO | | | | +| target-type | ActivityStreams target type if applicable (URI) | varchar(100) | YES | | | | +| target | JSON encoded target structure if used | text | 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(32) | YES | | | | +| plink | permalink or URL to a displayable copy of the message at its source | varchar(255) | YES | | | | + +Return to [database documentation](help/database) diff --git a/doc/database/db_post-delivery-data.md b/doc/database/db_post-delivery-data.md new file mode 100644 index 000000000..d9efbe180 --- /dev/null +++ b/doc/database/db_post-delivery-data.md @@ -0,0 +1,19 @@ +Table post-delivery-data +=========== +Delivery data for items + +| 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 | | | +| 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 | | | | +| inform | Additional receivers of the linked item | mediumtext | NO | | | | +| queue_count | Initial number of delivery recipients, used as item.delivery_queue_count | mediumint | YES | | 0 | | +| queue_done | Number of successful deliveries, used as item.delivery_queue_done | mediumint | YES | | 0 | | +| queue_failed | Number of unsuccessful deliveries, used as item.delivery_queue_failed | mediumint | YES | | 0 | | +| activitypub | Number of successful deliveries via ActivityPub | mediumint | YES | | 0 | | +| dfrn | Number of successful deliveries via DFRN | mediumint | YES | | 0 | | +| legacy_dfrn | Number of successful deliveries via legacy DFRN | mediumint | YES | | 0 | | +| diaspora | Number of successful deliveries via Diaspora | mediumint | YES | | 0 | | +| ostatus | Number of successful deliveries via OStatus | mediumint | YES | | 0 | | + +Return to [database documentation](help/database) diff --git a/doc/database/db_post-media.md b/doc/database/db_post-media.md new file mode 100644 index 000000000..4115301c0 --- /dev/null +++ b/doc/database/db_post-media.md @@ -0,0 +1,27 @@ +Table post-media +=========== +Attached media + +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | ---- | ---- | --- | ------- | ----- | +| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | | | | +| url | Media URL | varbinary(511) | YES | | | | +| type | Media type | tinyint unsigned | YES | | 0 | | +| mimetype | | varchar(60) | NO | | | | +| height | Height of the media | smallint unsigned | NO | | | | +| width | Width of the media | smallint unsigned | NO | | | | +| size | Media size | int unsigned | NO | | | | +| preview | Preview URL | varbinary(255) | NO | | | | +| preview-height | Height of the preview picture | smallint unsigned | NO | | | | +| preview-width | Width of the preview picture | smallint unsigned | NO | | | | +| description | | text | NO | | | | +| name | Name of the media | varchar(255) | NO | | | | +| author-url | URL of the author of the media | varbinary(255) | NO | | | | +| author-name | Name of the author of the media | varchar(255) | NO | | | | +| author-image | Image of the author of the media | varbinary(255) | NO | | | | +| publisher-url | URL of the publisher of the media | varbinary(255) | NO | | | | +| publisher-name | Name of the publisher of the media | varchar(255) | NO | | | | +| publisher-image | Image of the publisher of the media | varbinary(255) | NO | | | | + +Return to [database documentation](help/database) diff --git a/doc/database/db_post-tag.md b/doc/database/db_post-tag.md new file mode 100644 index 000000000..6beccad70 --- /dev/null +++ b/doc/database/db_post-tag.md @@ -0,0 +1,12 @@ +Table post-tag +=========== +post relation to tags + +| 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 | | | +| type | | tinyint unsigned | YES | PRI | 0 | | +| tid | | int unsigned | YES | PRI | 0 | | +| cid | Contact id of the mentioned public contact | int unsigned | YES | PRI | 0 | | + +Return to [database documentation](help/database) diff --git a/doc/database/db_post-thread-user.md b/doc/database/db_post-thread-user.md new file mode 100644 index 000000000..375728050 --- /dev/null +++ b/doc/database/db_post-thread-user.md @@ -0,0 +1,31 @@ +Table post-thread-user +=========== +Thread related data per user + +| 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 | | | +| owner-id | Item owner | int unsigned | YES | | 0 | | +| author-id | Item author | int unsigned | YES | | 0 | | +| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | NO | | | | +| network | | char(4) | YES | | | | +| created | | datetime | YES | | 0001-01-01 00:00:00 | | +| received | | datetime | YES | | 0001-01-01 00:00:00 | | +| changed | Date that something in the conversation changed, indicating clients should fetch the conversation again | datetime | YES | | 0001-01-01 00:00:00 | | +| commented | | datetime | YES | | 0001-01-01 00:00:00 | | +| uid | Owner id which owns this copy of the item | mediumint unsigned | YES | PRI | 0 | | +| pinned | The thread is pinned on the profile page | boolean | YES | | 0 | | +| starred | | boolean | YES | | 0 | | +| ignored | Ignore updates for this thread | boolean | YES | | 0 | | +| wall | This item was posted to the wall of uid | boolean | YES | | 0 | | +| mention | | boolean | YES | | 0 | | +| pubmail | | boolean | YES | | 0 | | +| forum_mode | | tinyint unsigned | YES | | 0 | | +| contact-id | contact.id | int unsigned | YES | | 0 | | +| unseen | post has not been seen | boolean | YES | | 1 | | +| hidden | Marker to hide the post from the user | boolean | YES | | 0 | | +| origin | item originated at this site | boolean | YES | | 0 | | +| psid | ID of the permission set of this post | int unsigned | NO | | | | +| post-user-id | Id of the post-user table | int unsigned | NO | | | | + +Return to [database documentation](help/database) diff --git a/doc/database/db_post-thread.md b/doc/database/db_post-thread.md new file mode 100644 index 000000000..301a16a66 --- /dev/null +++ b/doc/database/db_post-thread.md @@ -0,0 +1,17 @@ +Table post-thread +=========== +Thread related data + +| 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 | | | +| owner-id | Item owner | int unsigned | YES | | 0 | | +| author-id | Item author | int unsigned | YES | | 0 | | +| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | NO | | | | +| network | | char(4) | YES | | | | +| created | | datetime | YES | | 0001-01-01 00:00:00 | | +| received | | datetime | YES | | 0001-01-01 00:00:00 | | +| changed | Date that something in the conversation changed, indicating clients should fetch the conversation again | datetime | YES | | 0001-01-01 00:00:00 | | +| commented | | datetime | YES | | 0001-01-01 00:00:00 | | + +Return to [database documentation](help/database) diff --git a/doc/database/db_post-user-notification.md b/doc/database/db_post-user-notification.md new file mode 100644 index 000000000..4ceea2a68 --- /dev/null +++ b/doc/database/db_post-user-notification.md @@ -0,0 +1,11 @@ +Table post-user-notification +=========== +User post notifications + +| 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 | | | +| uid | Owner id which owns this copy of the item | mediumint unsigned | YES | PRI | | | +| notification-type | | tinyint unsigned | YES | | 0 | | + +Return to [database documentation](help/database) diff --git a/doc/database/db_post-user.md b/doc/database/db_post-user.md new file mode 100644 index 000000000..da6312b1d --- /dev/null +++ b/doc/database/db_post-user.md @@ -0,0 +1,38 @@ +Table post-user +=========== +User specific post data + +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | ---- | ---- | --- | ------- | ----- | +| id | | int unsigned | YES | PRI | | auto_increment | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | | | | +| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | NO | | | | +| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | NO | | | | +| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | NO | | | | +| created | Creation timestamp. | datetime | YES | | 0001-01-01 00:00:00 | | +| edited | Date of last edit (default is created) | datetime | YES | | 0001-01-01 00:00:00 | | +| received | datetime | datetime | YES | | 0001-01-01 00:00:00 | | +| gravity | | tinyint unsigned | YES | | 0 | | +| network | Network from where the item comes from | char(4) | YES | | | | +| owner-id | Link to the contact table with uid=0 of the owner of this item | int unsigned | YES | | 0 | | +| author-id | Link to the contact table with uid=0 of the author of this item | int unsigned | YES | | 0 | | +| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | NO | | | | +| post-type | Post type (personal note, image, article, ...) | tinyint unsigned | YES | | 0 | | +| post-reason | Reason why the post arrived at the user | tinyint unsigned | YES | | 0 | | +| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | NO | | | | +| private | 0=public, 1=private, 2=unlisted | tinyint unsigned | YES | | 0 | | +| global | | boolean | YES | | 0 | | +| visible | | boolean | YES | | 0 | | +| deleted | item has been marked for deletion | boolean | YES | | 0 | | +| uid | Owner id which owns this copy of the item | mediumint unsigned | YES | | | | +| protocol | Protocol used to deliver the item for this user | tinyint unsigned | NO | | | | +| contact-id | contact.id | int unsigned | YES | | 0 | | +| event-id | Used to link to the event.id | int unsigned | NO | | | | +| unseen | post has not been seen | boolean | YES | | 1 | | +| hidden | Marker to hide the post from the user | boolean | YES | | 0 | | +| notification-type | | tinyint unsigned | YES | | 0 | | +| wall | This item was posted to the wall of uid | boolean | YES | | 0 | | +| origin | item originated at this site | boolean | YES | | 0 | | +| psid | ID of the permission set of this post | int unsigned | NO | | | | + +Return to [database documentation](help/database) diff --git a/doc/database/db_post.md b/doc/database/db_post.md new file mode 100644 index 000000000..f8e09b05b --- /dev/null +++ b/doc/database/db_post.md @@ -0,0 +1,26 @@ +Table post +=========== +Structure for all posts + +| 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 | | | +| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | NO | | | | +| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | NO | | | | +| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | NO | | | | +| created | Creation timestamp. | datetime | YES | | 0001-01-01 00:00:00 | | +| edited | Date of last edit (default is created) | datetime | YES | | 0001-01-01 00:00:00 | | +| received | datetime | datetime | YES | | 0001-01-01 00:00:00 | | +| gravity | | tinyint unsigned | YES | | 0 | | +| network | Network from where the item comes from | char(4) | YES | | | | +| owner-id | Link to the contact table with uid=0 of the owner of this item | int unsigned | YES | | 0 | | +| author-id | Link to the contact table with uid=0 of the author of this item | int unsigned | YES | | 0 | | +| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | NO | | | | +| post-type | Post type (personal note, image, article, ...) | tinyint unsigned | YES | | 0 | | +| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | NO | | | | +| private | 0=public, 1=private, 2=unlisted | tinyint unsigned | YES | | 0 | | +| global | | boolean | YES | | 0 | | +| visible | | boolean | YES | | 0 | | +| deleted | item has been marked for deletion | boolean | YES | | 0 | | + +Return to [database documentation](help/database) diff --git a/doc/database/db_process.md b/doc/database/db_process.md new file mode 100644 index 000000000..8a2ad1ac8 --- /dev/null +++ b/doc/database/db_process.md @@ -0,0 +1,11 @@ +Table process +=========== +Currently running system processes + +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | ---- | ---- | --- | ------- | ----- | +| pid | | int unsigned | YES | PRI | | | +| command | | varbinary(32) | YES | | | | +| created | | datetime | YES | | 0001-01-01 00:00:00 | | + +Return to [database documentation](help/database) diff --git a/doc/database/db_profile.md b/doc/database/db_profile.md index 375e06635..eb2297023 100644 --- a/doc/database/db_profile.md +++ b/doc/database/db_profile.md @@ -1,48 +1,50 @@ Table profile -============= +=========== +user profiles data -| 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 | | 0 | | -| profile-name | Name of the profile | varchar(255) | NO | | | | -| is-default | Mark this profile as default profile | tinyint(1) | NO | | 0 | | -| hide-friends | Hide friend list from viewers of this profile | tinyint(1) | NO | | 0 | | -| name | | varchar(255) | NO | | | | -| pdesc | Deprecated | varchar(255) | NO | | | | -| dob | Day of birth | varchar(32) | NO | | 0001-01-01 | | -| address | | varchar(255) | NO | | | | -| locality | | varchar(255) | NO | | | | -| region | | varchar(255) | NO | | | | -| postal-code | | varchar(32) | NO | | | | -| country-name | | varchar(255) | NO | | | | -| hometown | Deprecated | varchar(255) | NO | MUL | | | -| gender | Deprecated | varchar(32) | NO | | | | -| marital | Deprecated | varchar(255) | NO | | | | -| with | Deprecated | text | NO | | NULL | | -| howlong | Deprecated | datetime | NO | | 0001-01-01 00:00:00 | | -| sexual | Deprecated | varchar(255) | NO | | | | -| politic | Deprecated | varchar(255) | NO | | | | -| religion | Deprecated | varchar(255) | NO | | | | -| pub_keywords | | text | NO | | NULL | | -| prv_keywords | | text | NO | | NULL | | -| likes | Deprecated | text | NO | | NULL | | -| dislikes | Deprecated | text | NO | | NULL | | -| about | Profile description | text | NO | | | | -| summary | Deprecated | varchar(255) | NO | | | | -| music | Deprecated | text | NO | | NULL | | -| book | Deprecated | text | NO | | NULL | | -| tv | Deprecated | text | NO | | NULL | | -| film | Deprecated | text | NO | | NULL | | -| interest | Deprecated | text | NO | | NULL | | -| romance | Deprecated | text | NO | | NULL | | -| work | Deprecated | text | NO | | NULL | | -| education | Deprecated | text | NO | | NULL | | -| contact | Deprecated | text | NO | | NULL | | -| homepage | | varchar(255) | NO | | | | -| photo | | varchar(255) | NO | | | | -| thumb | | varchar(255) | NO | | | | -| publish | publish default profile in local directory | tinyint(1) | NO | | 0 | | -| net-publish | publish profile in global directory | tinyint(1) | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | ---- | ---- | --- | ------- | ----- | +| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| uid | Owner User id | mediumint unsigned | YES | | 0 | | +| profile-name | Deprecated | varchar(255) | NO | | | | +| is-default | Deprecated | boolean | NO | | | | +| hide-friends | Hide friend list from viewers of this profile | boolean | YES | | 0 | | +| name | | varchar(255) | YES | | | | +| pdesc | Deprecated | varchar(255) | NO | | | | +| dob | Day of birth | varchar(32) | YES | | 0000-00-00 | | +| address | | varchar(255) | YES | | | | +| locality | | varchar(255) | YES | | | | +| region | | varchar(255) | YES | | | | +| postal-code | | varchar(32) | YES | | | | +| country-name | | varchar(255) | YES | | | | +| hometown | Deprecated | varchar(255) | NO | | | | +| gender | Deprecated | varchar(32) | NO | | | | +| marital | Deprecated | varchar(255) | NO | | | | +| with | Deprecated | text | NO | | | | +| howlong | Deprecated | datetime | NO | | | | +| sexual | Deprecated | varchar(255) | NO | | | | +| politic | Deprecated | varchar(255) | NO | | | | +| religion | Deprecated | varchar(255) | NO | | | | +| pub_keywords | | text | NO | | | | +| prv_keywords | | text | NO | | | | +| likes | Deprecated | text | NO | | | | +| dislikes | Deprecated | text | NO | | | | +| about | Profile description | text | NO | | | | +| summary | Deprecated | varchar(255) | NO | | | | +| music | Deprecated | text | NO | | | | +| book | Deprecated | text | NO | | | | +| tv | Deprecated | text | NO | | | | +| film | Deprecated | text | NO | | | | +| interest | Deprecated | text | NO | | | | +| romance | Deprecated | text | NO | | | | +| work | Deprecated | text | NO | | | | +| education | Deprecated | text | NO | | | | +| contact | Deprecated | text | NO | | | | +| homepage | | varchar(255) | YES | | | | +| xmpp | | varchar(255) | YES | | | | +| photo | | varchar(255) | YES | | | | +| thumb | | varchar(255) | YES | | | | +| publish | publish default profile in local directory | boolean | YES | | 0 | | +| net-publish | publish profile in global directory | boolean | YES | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_profile_check.md b/doc/database/db_profile_check.md index 411da06d3..ed8c936fc 100644 --- a/doc/database/db_profile_check.md +++ b/doc/database/db_profile_check.md @@ -1,13 +1,14 @@ Table profile_check -=================== +=========== +DFRN remote auth use -| Field | Description | Type | Null | Key | Default | Extra | -| -------- | ------------- | ---------------- | ---- | --- | ------- | --------------- | -| id | sequential ID | int(10) unsigned | NO | PRI | NULL | auto_increment | -| uid | user.id | int(10) unsigned | NO | | 0 | | -| cid | contact.id | int(10) unsigned | NO | | 0 | | -| dfrn_id | | varchar(255) | NO | | | | -| sec | | varchar(255) | NO | | 0 | | -| expire | | int(11) | NO | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | ---- | ---- | --- | ------- | ----- | +| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| uid | User id | mediumint unsigned | YES | | 0 | | +| cid | contact.id | int unsigned | YES | | 0 | | +| dfrn_id | | varchar(255) | YES | | | | +| sec | | varchar(255) | YES | | | | +| expire | | int unsigned | YES | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_profile_field.md b/doc/database/db_profile_field.md new file mode 100644 index 000000000..9a0b9fda1 --- /dev/null +++ b/doc/database/db_profile_field.md @@ -0,0 +1,16 @@ +Table profile_field +=========== +Custom profile fields + +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | ---- | ---- | --- | ------- | ----- | +| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| uid | Owner user id | mediumint unsigned | YES | | 0 | | +| order | Field ordering per user | mediumint unsigned | YES | | 1 | | +| psid | ID of the permission set of this profile field - 0 = public | int unsigned | NO | | | | +| label | Label of the field | varchar(255) | YES | | | | +| value | Value of the field | text | NO | | | | +| created | creation time | datetime | YES | | 0001-01-01 00:00:00 | | +| edited | last edit time | datetime | YES | | 0001-01-01 00:00:00 | | + +Return to [database documentation](help/database) diff --git a/doc/database/db_push_subscriber.md b/doc/database/db_push_subscriber.md index b766ccb46..97b3f0fc0 100644 --- a/doc/database/db_push_subscriber.md +++ b/doc/database/db_push_subscriber.md @@ -1,10 +1,18 @@ Table push_subscriber -===================== +=========== +Used for OStatus: Contains feed subscribers -| Field | Description | Type | Null | Key | Default | Extra | -|---------|------------------|---------|------|-----|---------|----------------| -| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment | -| poll_id | | int(11) | NO | MUL | 0 | | -| choice | | int(11) | NO | MUL | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | ---- | ---- | --- | ------- | ----- | +| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| uid | User id | mediumint unsigned | YES | | 0 | | +| callback_url | | varchar(255) | YES | | | | +| topic | | varchar(255) | YES | | | | +| nickname | | varchar(255) | YES | | | | +| push | Retrial counter | tinyint | YES | | 0 | | +| last_update | Date of last successful trial | datetime | YES | | 0001-01-01 00:00:00 | | +| next_try | Next retrial date | datetime | YES | | 0001-01-01 00:00:00 | | +| renewed | Date of last subscription renewal | datetime | YES | | 0001-01-01 00:00:00 | | +| secret | | varchar(255) | YES | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_queue.md b/doc/database/db_queue.md deleted file mode 100644 index 6b19f02f2..000000000 --- a/doc/database/db_queue.md +++ /dev/null @@ -1,14 +0,0 @@ -Table queue -=========== - -| Field | Description | Type | Null | Key | Default | Extra | -|---------|------------------|-------------|------|-----|---------------------|----------------| -| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment | -| cid | | int(11) | NO | MUL | 0 | | -| network | | varchar(32) | NO | MUL | | | -| created | | datetime | NO | MUL | 0001-01-01 00:00:00 | | -| last | | datetime | NO | MUL | 0001-01-01 00:00:00 | | -| content | | mediumtext | NO | | NULL | | -| batch | | tinyint(1) | NO | MUL | 0 | | - -Return to [database documentation](help/database) diff --git a/doc/database/db_register.md b/doc/database/db_register.md index 974a2dc67..f2bc2c28d 100644 --- a/doc/database/db_register.md +++ b/doc/database/db_register.md @@ -1,13 +1,15 @@ Table register -============== +=========== +registrations requiring admin approval -| Field | Description | Type | Null | Key | Default | Extra | -| -------- | ------------- | ---------------- | ---- | --- | ------------------- | --------------- | -| id | sequential ID | int(11) unsigned | NO | PRI | NULL | auto_increment | -| hash | | varchar(255) | NO | | | | -| created | | datetime | NO | | 0001-01-01 00:00:00 | | -| uid | user.id | int(11) unsigned | NO | | | | -| password | | varchar(255) | NO | | | | -| language | | varchar(16) | NO | | | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | ---- | ---- | --- | ------- | ----- | +| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| hash | | varchar(255) | YES | | | | +| created | | datetime | YES | | 0001-01-01 00:00:00 | | +| uid | User id | mediumint unsigned | YES | | 0 | | +| password | | varchar(255) | YES | | | | +| language | | varchar(16) | YES | | | | +| note | | text | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_search.md b/doc/database/db_search.md index 63d0a46b4..a5f5e11f2 100644 --- a/doc/database/db_search.md +++ b/doc/database/db_search.md @@ -1,10 +1,11 @@ Table search -============ +=========== -| Field | Description | Type | Null | Key | Default | Extra | -|-------|------------------|--------------|------|-----|---------|----------------| -| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment | -| uid | | int(11) | NO | MUL | 0 | | -| term | | varchar(255) | NO | MUL | | | + +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | ---- | ---- | --- | ------- | ----- | +| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| uid | User id | mediumint unsigned | YES | | 0 | | +| term | | varchar(255) | YES | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_session.md b/doc/database/db_session.md index 1e87c24d0..1e3e1f377 100644 --- a/doc/database/db_session.md +++ b/doc/database/db_session.md @@ -1,11 +1,12 @@ Table session -============= +=========== +web session storage -| Field | Description | Type | Null | Key | Default | Extra | -| ------ | ------------- | ------------------- | ---- | --- | ------- | --------------- | -| id | sequential ID | bigint(20) unsigned | NO | PRI | NULL | auto_increment | -| sid | | varchar(255) | NO | MUL | | | -| data | | text | NO | | NULL | | -| expire | | int(10) unsigned | NO | MUL | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | ---- | ---- | --- | ------- | ----- | +| id | sequential ID | bigint unsigned | YES | PRI | | auto_increment | +| sid | | varbinary(255) | YES | | | | +| data | | text | NO | | | | +| expire | | int unsigned | YES | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_sign.md b/doc/database/db_sign.md deleted file mode 100644 index 6986613e5..000000000 --- a/doc/database/db_sign.md +++ /dev/null @@ -1,12 +0,0 @@ -Table sign -========== - -| Field | Description | Type | Null | Key | Default | Extra | -| ------------ | ------------- | ---------------- | ---- | --- | ------- | --------------- | -| id | sequential ID | int(10) unsigned | NO | PRI | NULL | auto_increment | -| iid | item.id | int(10) unsigned | NO | MUL | 0 | | -| signed_text | | mediumtext | NO | | NULL | | -| signature | | text | NO | | NULL | | -| signer | | varchar(255) | NO | | | | - -Return to [database documentation](help/database) diff --git a/doc/database/db_storage.md b/doc/database/db_storage.md new file mode 100644 index 000000000..77795196b --- /dev/null +++ b/doc/database/db_storage.md @@ -0,0 +1,10 @@ +Table storage +=========== +Data stored by Database storage backend + +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | ---- | ---- | --- | ------- | ----- | +| id | Auto incremented image data id | int unsigned | YES | PRI | | auto_increment | +| data | file data | longblob | YES | | | | + +Return to [database documentation](help/database) diff --git a/doc/database/db_tag.md b/doc/database/db_tag.md new file mode 100644 index 000000000..bc7cfa4f5 --- /dev/null +++ b/doc/database/db_tag.md @@ -0,0 +1,11 @@ +Table tag +=========== +tags and mentions + +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | ---- | ---- | --- | ------- | ----- | +| id | | int unsigned | YES | PRI | | auto_increment | +| name | | varchar(96) | YES | | | | +| url | | varbinary(255) | YES | | | | + +Return to [database documentation](help/database) diff --git a/doc/database/db_term.md b/doc/database/db_term.md deleted file mode 100644 index d18bf1c3b..000000000 --- a/doc/database/db_term.md +++ /dev/null @@ -1,19 +0,0 @@ -Table term -========== - -| Field | Description | Type | Null | Key | Default | Extra | -|----------| ------------- |---------------------|------|-----|---------------------|----------------| -| tid | | int(10) unsigned | NO | PRI | NULL | auto_increment | -| oid | | int(10) unsigned | NO | MUL | 0 | | -| otype | | tinyint(3) unsigned | NO | MUL | 0 | | -| type | | tinyint(3) unsigned | NO | MUL | 0 | | -| term | | varchar(255) | NO | | | | -| url | | varchar(255) | NO | | | | -| aid | | int(10) unsigned | NO | | 0 | | -| uid | | int(10) unsigned | NO | MUL | 0 | | -| guid | | varchar(255) | NO | MUL | | | -| created | | datetime | NO | | 0001-01-01 00:00:00 | | -| received | | datetime | NO | | 0001-01-01 00:00:00 | | -| global | | tinyint(1) | NO | | 0 | | - -Return to [database documentation](help/database) diff --git a/doc/database/db_thread.md b/doc/database/db_thread.md deleted file mode 100644 index 13b70b451..000000000 --- a/doc/database/db_thread.md +++ /dev/null @@ -1,33 +0,0 @@ -Table thread -============ - -| Field | Description | Type | Null | Key | Default | Extra | -|-------------|------------------|------------------|------|-----|---------------------|-------| -| iid | sequential ID | int(10) unsigned | NO | PRI | 0 | | -| uid | | int(10) unsigned | NO | MUL | 0 | | -| contact-id | | int(11) unsigned | NO | | 0 | | -| gcontact-id | Global Contact | int(11) unsigned | NO | | 0 | | -| owner-id | Item owner | int(11) unsigned | NO | MUL | 0 | | -| author-id | Item author | int(11) unsigned | NO | MUL | 0 | | -| created | | datetime | NO | MUL | 0001-01-01 00:00:00 | | -| edited | | datetime | NO | | 0001-01-01 00:00:00 | | -| commented | | datetime | NO | MUL | 0001-01-01 00:00:00 | | -| received | | datetime | NO | | 0001-01-01 00:00:00 | | -| changed | | datetime | NO | | 0001-01-01 00:00:00 | | -| wall | | tinyint(1) | NO | MUL | 0 | | -| private | | 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 | | tinyint(1) | NO | | 0 | | -| ignored | | tinyint(1) | NO | | 0 | | -| bookmark | | tinyint(1) | NO | | 0 | | -| unseen | | tinyint(1) | NO | | 1 | | -| deleted | | tinyint(1) | NO | | 0 | | -| origin | | tinyint(1) | NO | | 0 | | -| forum_mode | | tinyint(1) | NO | | 0 | | -| mention | | tinyint(1) | NO | | 0 | | -| network | | varchar(32) | NO | | | | - -Return to [database documentation](help/database) diff --git a/doc/database/db_tokens.md b/doc/database/db_tokens.md index 3b3778d68..ade654366 100644 --- a/doc/database/db_tokens.md +++ b/doc/database/db_tokens.md @@ -1,13 +1,14 @@ Table tokens -============ +=========== +OAuth usage -| Field | Description | Type | Null | Key | Default | Extra | -| ---------- | ----------- | ------------ | ---- | --- | ------- | ----- | -| id | | varchar(40) | NO | PRI | NULL | | -| secret | | text | NO | | NULL | | -| client_id | | varchar(20) | NO | | | | -| expires | | int(11) | NO | | 0 | | -| scope | | varchar(200) | NO | | | | -| uid | | int(11) | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | ---- | ---- | --- | ------- | ----- | +| id | | varchar(40) | YES | PRI | | | +| secret | | text | NO | | | | +| client_id | | varchar(20) | YES | | | | +| expires | | int | YES | | 0 | | +| scope | | varchar(200) | YES | | | | +| uid | User id | mediumint unsigned | YES | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_user-contact.md b/doc/database/db_user-contact.md new file mode 100644 index 000000000..a08cf3153 --- /dev/null +++ b/doc/database/db_user-contact.md @@ -0,0 +1,13 @@ +Table user-contact +=========== +User specific public contact data + +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | ---- | ---- | --- | ------- | ----- | +| cid | Contact id of the linked public contact | int unsigned | YES | PRI | 0 | | +| uid | User id | mediumint unsigned | YES | PRI | 0 | | +| blocked | Contact is completely blocked for this user | boolean | NO | | | | +| ignored | Posts from this contact are ignored | boolean | NO | | | | +| collapsed | Posts from this contact are collapsed | boolean | NO | | | | + +Return to [database documentation](help/database) diff --git a/doc/database/db_user.md b/doc/database/db_user.md index 7033bcc89..03c6820ea 100644 --- a/doc/database/db_user.md +++ b/doc/database/db_user.md @@ -1,77 +1,53 @@ Table user -========== +=========== +The local users -| Field | Description | Type | Null | Key | Default | Extra | -|--------------------------|-----------------------------------------------------------------------------------------|---------------------|------|-----|---------------------|----------------| -| uid | sequential ID | int(11) | NO | PRI | NULL | auto_increment | -| guid | A unique identifier for this user | varchar(64) | NO | | | | -| username | Name that this user is known by | varchar(255) | NO | | | | -| password | encrypted password | varchar(255) | NO | | | | -| nickname | nick- and user name | varchar(255) | NO | MUL | | | -| email | the users email address | varchar(255) | NO | | | | -| openid | | varchar(255) | NO | | | | -| timezone | PHP-legal timezone | varchar(128) | NO | | | | -| language | default language | varchar(32) | NO | | en | | -| register_date | timestamp of registration | datetime | NO | | 0001-01-01 00:00:00 | | -| login_date | timestamp of last login | datetime | NO | | 0001-01-01 00:00:00 | | -| default-location | Default for item.location | varchar(255) | NO | | | | -| allow_location | 1 allows to display the location | tinyint(1) | NO | | 0 | | -| theme | user theme preference | varchar(255) | NO | | | | -| pubkey | RSA public key 4096 bit | text | NO | | NULL | | -| prvkey | RSA private key 4096 bit | text | NO | | NULL | | -| spubkey | | text | NO | | NULL | | -| sprvkey | | text | NO | | NULL | | -| verified | user is verified through email | tinyint(1) unsigned | NO | | 0 | | -| blocked | 1 for user is blocked | tinyint(1) unsigned | NO | | 0 | | -| blockwall | Prohibit contacts to post to the profile page of the user | tinyint(1) unsigned | NO | | 0 | | -| hidewall | Hide profile details from unkown viewers | tinyint(1) unsigned | NO | | 0 | | -| blocktags | Prohibit contacts to tag the post of this user | tinyint(1) unsigned | NO | | 0 | | -| unkmail | Permit unknown people to send private mails to this user | tinyint(1) | NO | | 0 | | -| cntunkmail | | int(11) | NO | | 10 | | -| notify-flags | email notification options | int(11) unsigned | NO | | 65535 | | -| page-flags | page/profile type | int(11) unsigned | NO | | 0 | | -| prvnets | | tinyint(1) | NO | | 0 | | -| pwdreset | | varchar(255) | NO | | | | -| maxreq | | int(11) | NO | | 10 | | -| expire | | int(11) unsigned | NO | | 0 | | -| account_removed | if 1 the account is removed | tinyint(1) | NO | | 0 | | -| account_expired | | tinyint(1) | NO | | 0 | | -| account_expires_on | timestamp when account expires and will be deleted | datetime | NO | | 0001-01-01 00:00:00 | | -| expire_notification_sent | timestamp of last warning of account expiration | datetime | NO | | 0001-01-01 00:00:00 | | -| def_gid | | int(11) | NO | | 0 | | -| allow_cid | default permission for this user | mediumtext | NO | | NULL | | -| allow_gid | default permission for this user | mediumtext | NO | | NULL | | -| deny_cid | default permission for this user | mediumtext | NO | | NULL | | -| deny_gid | default permission for this user | mediumtext | NO | | NULL | | -| openidserver | | text | NO | | NULL | | - -``` -/** -* page-flags -*/ -define ( 'PAGE_NORMAL', 0 ); -define ( 'PAGE_SOAPBOX', 1 ); -define ( 'PAGE_COMMUNITY', 2 ); -define ( 'PAGE_FREELOVE', 3 ); -define ( 'PAGE_BLOG', 4 ); -define ( 'PAGE_PRVGROUP', 5 ); - -/** -* notify-flags -*/ -define ( 'NOTIFY_INTRO', 0x0001 ); -define ( 'NOTIFY_CONFIRM', 0x0002 ); -define ( 'NOTIFY_WALL', 0x0004 ); -define ( 'NOTIFY_COMMENT', 0x0008 ); -define ( 'NOTIFY_MAIL', 0x0010 ); -define ( 'NOTIFY_SUGGEST', 0x0020 ); -define ( 'NOTIFY_PROFILE', 0x0040 ); -define ( 'NOTIFY_TAGSELF', 0x0080 ); -define ( 'NOTIFY_TAGSHARE', 0x0100 ); -define ( 'NOTIFY_POKE', 0x0200 ); -define ( 'NOTIFY_SHARE', 0x0400 ); - -define ( 'NOTIFY_SYSTEM', 0x8000 ); -``` +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | ---- | ---- | --- | ------- | ----- | +| uid | sequential ID | mediumint unsigned | YES | PRI | | auto_increment | +| parent-uid | The parent user that has full control about this user | mediumint unsigned | NO | | | | +| guid | A unique identifier for this user | varchar(64) | YES | | | | +| username | Name that this user is known by | varchar(255) | YES | | | | +| password | encrypted password | varchar(255) | YES | | | | +| legacy_password | Is the password hash double-hashed? | boolean | YES | | 0 | | +| nickname | nick- and user name | varchar(255) | YES | | | | +| email | the users email address | varchar(255) | YES | | | | +| openid | | varchar(255) | YES | | | | +| timezone | PHP-legal timezone | varchar(128) | YES | | | | +| language | default language | varchar(32) | YES | | en | | +| register_date | timestamp of registration | datetime | YES | | 0001-01-01 00:00:00 | | +| login_date | timestamp of last login | datetime | YES | | 0001-01-01 00:00:00 | | +| default-location | Default for item.location | varchar(255) | YES | | | | +| allow_location | 1 allows to display the location | boolean | YES | | 0 | | +| theme | user theme preference | varchar(255) | YES | | | | +| pubkey | RSA public key 4096 bit | text | NO | | | | +| prvkey | RSA private key 4096 bit | text | NO | | | | +| spubkey | | text | NO | | | | +| sprvkey | | text | NO | | | | +| verified | user is verified through email | boolean | YES | | 0 | | +| blocked | 1 for user is blocked | boolean | YES | | 0 | | +| blockwall | Prohibit contacts to post to the profile page of the user | boolean | YES | | 0 | | +| hidewall | Hide profile details from unkown viewers | boolean | YES | | 0 | | +| blocktags | Prohibit contacts to tag the post of this user | boolean | YES | | 0 | | +| unkmail | Permit unknown people to send private mails to this user | boolean | YES | | 0 | | +| cntunkmail | | int unsigned | YES | | 10 | | +| notify-flags | email notification options | smallint unsigned | YES | | 65535 | | +| page-flags | page/profile type | tinyint unsigned | YES | | 0 | | +| account-type | | tinyint unsigned | YES | | 0 | | +| prvnets | | boolean | YES | | 0 | | +| pwdreset | Password reset request token | varchar(255) | NO | | | | +| pwdreset_time | Timestamp of the last password reset request | datetime | NO | | | | +| maxreq | | int unsigned | YES | | 10 | | +| expire | | int unsigned | YES | | 0 | | +| account_removed | if 1 the account is removed | boolean | YES | | 0 | | +| account_expired | | boolean | YES | | 0 | | +| account_expires_on | timestamp when account expires and will be deleted | datetime | YES | | 0001-01-01 00:00:00 | | +| expire_notification_sent | timestamp of last warning of account expiration | datetime | YES | | 0001-01-01 00:00:00 | | +| def_gid | | int unsigned | YES | | 0 | | +| allow_cid | default permission for this user | mediumtext | NO | | | | +| allow_gid | default permission for this user | mediumtext | NO | | | | +| deny_cid | default permission for this user | mediumtext | NO | | | | +| deny_gid | default permission for this user | mediumtext | NO | | | | +| openidserver | | text | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_userd.md b/doc/database/db_userd.md index 80e308475..99baabcc6 100644 --- a/doc/database/db_userd.md +++ b/doc/database/db_userd.md @@ -1,9 +1,10 @@ Table userd =========== +Deleted usernames -| Field | Description | Type | Null | Key | Default | Extra | -|----------|------------------|--------------|------|-----|---------|----------------| -| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment | -| username | | varchar(255) | NO | MUL | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | ---- | ---- | --- | ------- | ----- | +| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| username | | varchar(255) | YES | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_verb.md b/doc/database/db_verb.md new file mode 100644 index 000000000..7e01f1f8e --- /dev/null +++ b/doc/database/db_verb.md @@ -0,0 +1,10 @@ +Table verb +=========== +Activity Verbs + +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | ---- | ---- | --- | ------- | ----- | +| id | | smallint unsigned | YES | PRI | | auto_increment | +| name | | varchar(100) | YES | | | | + +Return to [database documentation](help/database) diff --git a/doc/database/db_worker-ipc.md b/doc/database/db_worker-ipc.md new file mode 100644 index 000000000..ef8c97301 --- /dev/null +++ b/doc/database/db_worker-ipc.md @@ -0,0 +1,10 @@ +Table worker-ipc +=========== +Inter process communication between the frontend and the worker + +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | ---- | ---- | --- | ------- | ----- | +| key | | int | YES | PRI | | | +| jobs | Flag for outstanding jobs | boolean | NO | | | | + +Return to [database documentation](help/database) diff --git a/doc/database/db_workerqueue.md b/doc/database/db_workerqueue.md index 182358a4c..0a14e0aec 100644 --- a/doc/database/db_workerqueue.md +++ b/doc/database/db_workerqueue.md @@ -1,14 +1,18 @@ Table workerqueue -================= +=========== +Background tasks queue entries -| Field | Description | Type | Null | Key | Default | Extra | -|-----------|------------------|---------------------|------|-----|---------------------|----------------| -| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment | -| parameter | | text | NO | | NULL | | -| priority | | tinyint(3) unsigned | NO | | 0 | | -| created | | datetime | NO | MUL | 0001-01-01 00:00:00 | | -| pid | | int(11) | NO | | 0 | | -| executed | | datetime | NO | | 0001-01-01 00:00:00 | | -| done | set to 1 if done | tinyint(1) | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | ---- | ---- | --- | ------- | ----- | +| id | Auto incremented worker task id | int unsigned | YES | PRI | | auto_increment | +| command | Task command | varchar(100) | NO | | | | +| parameter | Task parameter | mediumtext | NO | | | | +| priority | Task priority | tinyint unsigned | YES | | 0 | | +| created | Creation date | datetime | YES | | 0001-01-01 00:00:00 | | +| pid | Process id of the worker | int unsigned | YES | | 0 | | +| executed | Execution date | datetime | YES | | 0001-01-01 00:00:00 | | +| next_try | Next retrial date | datetime | YES | | 0001-01-01 00:00:00 | | +| retrial | Retrial counter | tinyint | YES | | 0 | | +| done | Marked 1 when the task was done - will be deleted later | boolean | YES | | 0 | | Return to [database documentation](help/database) diff --git a/src/Console/DatabaseStructure.php b/src/Console/DatabaseStructure.php index c6d708eb7..b44400c01 100644 --- a/src/Console/DatabaseStructure.php +++ b/src/Console/DatabaseStructure.php @@ -120,6 +120,7 @@ HELP; $output = ob_get_clean(); break; case "dumpsql": + DBStructure::writeStructure(); ob_start(); DBStructure::printStructure($basePath); $output = ob_get_clean(); diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index 914846590..f7a5963c7 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -24,6 +24,7 @@ namespace Friendica\Database; use Exception; use Friendica\Core\Hook; use Friendica\Core\Logger; +use Friendica\Core\Renderer; use Friendica\DI; use Friendica\Model\Item; use Friendica\Model\User; @@ -159,6 +160,41 @@ class DBStructure return DI::l10n()->t('Errors encountered performing database changes: ') . $message . EOL; } + public static function writeStructure() + { + Renderer::registerTemplateEngine('Friendica\Render\FriendicaSmartyEngine'); + + $tables = []; + foreach (self::definition(null) as $name => $definition) { + $fields = []; + foreach ($definition['fields'] as $key => $value) { + $field = []; + $field['name'] = $key; + $field['comment'] = $value['comment'] ?? ''; + $field['type'] = $value['type']; + $field['notnull'] = ($value['not null'] ?? false) ? 'YES' : 'NO'; + $field['primary'] = ($value['primary'] ?? false) ? 'PRI' : ''; + $field['default'] = $value['default'] ?? ''; + $field['extra'] = $value['extra'] ?? ''; + + $fields[] = $field; + } + $tables[] = ['name' => $name, 'comment' => $definition['comment']]; + $content = Renderer::replaceMacros(Renderer::getMarkupTemplate('structure.tpl'), [ + '$name' => $name, + '$comment' => $definition['comment'], + '$fields' => $fields, + ]); + $filename = DI::basePath() . '/doc/database/db_' . $name . '.md'; + file_put_contents($filename, $content); + } + $content = Renderer::replaceMacros(Renderer::getMarkupTemplate('tables.tpl'), [ + '$tables' => $tables, + ]); + $filename = DI::basePath() . '/doc/database.md'; + file_put_contents($filename, $content); + } + public static function printStructure($basePath) { $database = self::definition($basePath, false); diff --git a/view/templates/structure.tpl b/view/templates/structure.tpl new file mode 100644 index 000000000..91ba2eb31 --- /dev/null +++ b/view/templates/structure.tpl @@ -0,0 +1,11 @@ +Table {{$name}} +=========== +{{$comment}} + +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | ---- | ---- | --- | ------- | ----- | +{{foreach $fields as $field}} +| {{$field.name}} | {{$field.comment}} | {{$field.type}} | {{$field.notnull}} | {{$field.primary}} | {{$field.default}} | {{$field.extra}} | +{{/foreach}} + +Return to [database documentation](help/database) diff --git a/view/templates/tables.tpl b/view/templates/tables.tpl new file mode 100644 index 000000000..8fdd12a37 --- /dev/null +++ b/view/templates/tables.tpl @@ -0,0 +1,10 @@ +Database Tables +=============== + +* [Home](help) + +| Table | Description | +|-------|-------------| +{{foreach $tables as $table}} +| [{{$table.name}}](help/database/db_{{$table.name}}) | {{$table.comment}} | +{{/foreach}} From bb5e6d248b384192ab070108afbfb58acbee3fc3 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 13 Jun 2021 20:56:14 +0000 Subject: [PATCH 02/12] Added sort order --- doc/database.md | 20 ++++++++++---------- src/Database/DBStructure.php | 1 + 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/doc/database.md b/doc/database.md index 4e22add37..5e5413916 100644 --- a/doc/database.md +++ b/doc/database.md @@ -5,14 +5,6 @@ Database Tables | 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 | @@ -24,7 +16,9 @@ Database Tables | [auth_codes](help/database/db_auth_codes) | OAuth usage | | [cache](help/database/db_cache) | Stores temporary data | | [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 | | [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 | @@ -35,11 +29,13 @@ Database Tables | [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) | Global servers | | [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) | | +| [item-uri](help/database/db_item-uri) | URI and GUID for items | | [locks](help/database/db_locks) | | | [mail](help/database/db_mail) | private messages | | [mailacct](help/database/db_mailacct) | Mail account data for fetching mails | @@ -51,6 +47,7 @@ Database Tables | [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 | +| [permissionset](help/database/db_permissionset) | | | [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 | @@ -59,8 +56,8 @@ Database Tables | [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](help/database/db_post-user) | User specific post data | | [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 | @@ -71,8 +68,11 @@ Database Tables | [search](help/database/db_search) | | | [session](help/database/db_session) | web session storage | | [storage](help/database/db_storage) | Data stored by Database storage backend | +| [tag](help/database/db_tag) | tags and mentions | | [tokens](help/database/db_tokens) | OAuth usage | -| [userd](help/database/db_userd) | Deleted usernames | +| [user](help/database/db_user) | The local users | | [user-contact](help/database/db_user-contact) | User specific public contact data | +| [userd](help/database/db_userd) | Deleted usernames | +| [verb](help/database/db_verb) | Activity Verbs | | [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 | diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index f7a5963c7..d1975f504 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -188,6 +188,7 @@ class DBStructure $filename = DI::basePath() . '/doc/database/db_' . $name . '.md'; file_put_contents($filename, $content); } + asort($tables); $content = Renderer::replaceMacros(Renderer::getMarkupTemplate('tables.tpl'), [ '$tables' => $tables, ]); From 31db9dbef7f6a4f98a6c29d15493bcffb0c39929 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 14 Jun 2021 05:08:01 +0000 Subject: [PATCH 03/12] Added default value "NULL" --- doc/database/db_2fa_app_specific_password.md | 12 ++--- doc/database/db_2fa_recovery_codes.md | 8 +-- doc/database/db_2fa_trusted_browser.md | 10 ++-- doc/database/db_addon.md | 2 +- doc/database/db_apcontact.md | 38 +++++++------- doc/database/db_application-token.md | 20 ++++---- doc/database/db_application.md | 22 ++++---- doc/database/db_attach.md | 16 +++--- doc/database/db_auth_codes.md | 2 +- doc/database/db_cache.md | 4 +- doc/database/db_challenge.md | 2 +- doc/database/db_clients.md | 6 +-- doc/database/db_config.md | 4 +- doc/database/db_contact.md | 40 +++++++-------- doc/database/db_conv.md | 6 +-- doc/database/db_conversation.md | 4 +- doc/database/db_delayed-post.md | 8 +-- doc/database/db_diaspora-interaction.md | 4 +- doc/database/db_event.md | 16 +++--- doc/database/db_fcontact.md | 4 +- doc/database/db_fsuggest.md | 4 +- doc/database/db_group.md | 2 +- doc/database/db_group_member.md | 2 +- doc/database/db_gserver.md | 10 ++-- doc/database/db_hook.md | 2 +- doc/database/db_host.md | 2 +- doc/database/db_inbox-status.md | 2 +- doc/database/db_intro.md | 6 +-- doc/database/db_item-uri.md | 6 +-- doc/database/db_locks.md | 2 +- doc/database/db_mail.md | 18 +++---- doc/database/db_mailacct.md | 4 +- doc/database/db_manage.md | 2 +- doc/database/db_notification.md | 16 +++--- doc/database/db_notify-threads.md | 6 +-- doc/database/db_notify.md | 16 +++--- doc/database/db_oembed.md | 6 +-- doc/database/db_openwebauth-token.md | 2 +- doc/database/db_parsed_url.md | 6 +-- doc/database/db_pconfig.md | 4 +- doc/database/db_permissionset.md | 10 ++-- doc/database/db_photo.md | 20 ++++---- doc/database/db_post-category.md | 2 +- doc/database/db_post-content.md | 14 ++--- doc/database/db_post-delivery-data.md | 6 +-- doc/database/db_post-media.md | 36 ++++++------- doc/database/db_post-tag.md | 2 +- doc/database/db_post-thread-user.md | 8 +-- doc/database/db_post-thread.md | 4 +- doc/database/db_post-user-notification.md | 4 +- doc/database/db_post-user.md | 22 ++++---- doc/database/db_post.md | 12 ++--- doc/database/db_process.md | 2 +- doc/database/db_profile.md | 54 ++++++++++---------- doc/database/db_profile_check.md | 2 +- doc/database/db_profile_field.md | 6 +-- doc/database/db_push_subscriber.md | 2 +- doc/database/db_register.md | 4 +- doc/database/db_search.md | 2 +- doc/database/db_session.md | 4 +- doc/database/db_storage.md | 4 +- doc/database/db_tag.md | 2 +- doc/database/db_tokens.md | 4 +- doc/database/db_user-contact.md | 6 +-- doc/database/db_user.md | 26 +++++----- doc/database/db_userd.md | 4 +- doc/database/db_verb.md | 2 +- doc/database/db_worker-ipc.md | 4 +- doc/database/db_workerqueue.md | 6 +-- src/Database/DBStructure.php | 2 +- 70 files changed, 311 insertions(+), 311 deletions(-) diff --git a/doc/database/db_2fa_app_specific_password.md b/doc/database/db_2fa_app_specific_password.md index 9e3680b76..660319e04 100644 --- a/doc/database/db_2fa_app_specific_password.md +++ b/doc/database/db_2fa_app_specific_password.md @@ -4,11 +4,11 @@ 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 | | | | +| id | Password ID for revocation | mediumint unsigned | YES | PRI | NULL | auto_increment | +| uid | User ID | mediumint unsigned | YES | | NULL | | +| description | Description of the usage of the password | varchar(255) | NO | | NULL | | +| hashed_password | Hashed password | varchar(255) | YES | | NULL | | +| generated | Datetime the password was generated | datetime | YES | | NULL | | +| last_used | Datetime the password was last used | datetime | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_2fa_recovery_codes.md b/doc/database/db_2fa_recovery_codes.md index 7b3b9d649..aec9bbd55 100644 --- a/doc/database/db_2fa_recovery_codes.md +++ b/doc/database/db_2fa_recovery_codes.md @@ -4,9 +4,9 @@ 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 | | | | +| uid | User ID | mediumint unsigned | YES | PRI | NULL | | +| code | Recovery code string | varchar(50) | YES | PRI | NULL | | +| generated | Datetime the code was generated | datetime | YES | | NULL | | +| used | Datetime the code was used | datetime | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_2fa_trusted_browser.md b/doc/database/db_2fa_trusted_browser.md index 29be4646a..f3b336562 100644 --- a/doc/database/db_2fa_trusted_browser.md +++ b/doc/database/db_2fa_trusted_browser.md @@ -4,10 +4,10 @@ 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 | | | | +| cookie_hash | Trusted cookie hash | varchar(80) | YES | PRI | NULL | | +| uid | User ID | mediumint unsigned | YES | | NULL | | +| user_agent | User agent string | text | NO | | NULL | | +| created | Datetime the trusted browser was recorded | datetime | YES | | NULL | | +| last_used | Datetime the trusted browser was last used | datetime | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_addon.md b/doc/database/db_addon.md index db3a5d44b..91918adef 100644 --- a/doc/database/db_addon.md +++ b/doc/database/db_addon.md @@ -4,7 +4,7 @@ registered addons | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | int unsigned | YES | PRI | | auto_increment | +| id | | int unsigned | YES | PRI | NULL | auto_increment | | name | addon base (file)name | varchar(50) | YES | | | | | version | currently unused | varchar(50) | YES | | | | | installed | currently always 1 | boolean | YES | | 0 | | diff --git a/doc/database/db_apcontact.md b/doc/database/db_apcontact.md index bea394bc2..69d33fe6c 100644 --- a/doc/database/db_apcontact.md +++ b/doc/database/db_apcontact.md @@ -4,26 +4,26 @@ 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 | | | | +| url | URL of the contact | varbinary(255) | YES | PRI | NULL | | +| uuid | | varchar(255) | NO | | NULL | | +| type | | varchar(20) | YES | | NULL | | +| following | | varchar(255) | NO | | NULL | | +| followers | | varchar(255) | NO | | NULL | | +| inbox | | varchar(255) | YES | | NULL | | +| outbox | | varchar(255) | NO | | NULL | | +| sharedinbox | | varchar(255) | NO | | NULL | | +| manually-approve | | boolean | NO | | NULL | | | 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 | | | | +| name | | varchar(255) | NO | | NULL | | +| about | | text | NO | | NULL | | +| photo | | varchar(255) | NO | | NULL | | +| addr | | varchar(255) | NO | | NULL | | +| alias | | varchar(255) | NO | | NULL | | +| pubkey | | text | NO | | NULL | | +| subscribe | | varchar(255) | NO | | NULL | | +| baseurl | baseurl of the ap contact | varchar(255) | NO | | NULL | | +| gsid | Global Server ID | int unsigned | NO | | NULL | | +| generator | Name of the contact's system | varchar(255) | NO | | NULL | | | 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 | | diff --git a/doc/database/db_application-token.md b/doc/database/db_application-token.md index 8b3d601ff..af2b8d661 100644 --- a/doc/database/db_application-token.md +++ b/doc/database/db_application-token.md @@ -4,15 +4,15 @@ 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 | | | | +| application-id | | int unsigned | YES | PRI | NULL | | +| uid | Owner User id | mediumint unsigned | YES | PRI | NULL | | +| code | | varchar(64) | YES | | NULL | | +| access_token | | varchar(64) | YES | | NULL | | +| created_at | creation time | datetime | YES | | NULL | | +| scopes | | varchar(255) | NO | | NULL | | +| read | Read scope | boolean | NO | | NULL | | +| write | Write scope | boolean | NO | | NULL | | +| follow | Follow scope | boolean | NO | | NULL | | +| push | Push scope | boolean | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_application.md b/doc/database/db_application.md index 26b923266..799b01fa1 100644 --- a/doc/database/db_application.md +++ b/doc/database/db_application.md @@ -4,16 +4,16 @@ 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 | | | | +| id | generated index | int unsigned | YES | PRI | NULL | auto_increment | +| client_id | | varchar(64) | YES | | NULL | | +| client_secret | | varchar(64) | YES | | NULL | | +| name | | varchar(255) | YES | | NULL | | +| redirect_uri | | varchar(255) | YES | | NULL | | +| website | | varchar(255) | NO | | NULL | | +| scopes | | varchar(255) | NO | | NULL | | +| read | Read scope | boolean | NO | | NULL | | +| write | Write scope | boolean | NO | | NULL | | +| follow | Follow scope | boolean | NO | | NULL | | +| push | Push scope | boolean | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_attach.md b/doc/database/db_attach.md index e35003c36..ee546d54e 100644 --- a/doc/database/db_attach.md +++ b/doc/database/db_attach.md @@ -4,20 +4,20 @@ file attachments | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | generated index | int unsigned | YES | PRI | | auto_increment | +| id | generated index | int unsigned | YES | PRI | NULL | 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 | | | | +| data | file data | longblob | YES | | NULL | | | 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 '<19><78> | 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 | | | | +| 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 | | +| backend-class | Storage backend class | tinytext | NO | | NULL | | +| backend-ref | Storage backend data reference | text | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_auth_codes.md b/doc/database/db_auth_codes.md index 6a33a30a1..51d78aa5a 100644 --- a/doc/database/db_auth_codes.md +++ b/doc/database/db_auth_codes.md @@ -4,7 +4,7 @@ OAuth usage | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | varchar(40) | YES | PRI | | | +| id | | varchar(40) | YES | PRI | NULL | | | client_id | | varchar(20) | YES | | | | | redirect_uri | | varchar(200) | YES | | | | | expires | | int | YES | | 0 | | diff --git a/doc/database/db_cache.md b/doc/database/db_cache.md index 328f485e0..1d1d552c3 100644 --- a/doc/database/db_cache.md +++ b/doc/database/db_cache.md @@ -4,8 +4,8 @@ Stores temporary data | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| k | cache key | varbinary(255) | YES | PRI | | | -| v | cached serialized value | mediumtext | NO | | | | +| k | cache key | varbinary(255) | YES | PRI | NULL | | +| v | cached serialized value | mediumtext | NO | | NULL | | | 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 | | diff --git a/doc/database/db_challenge.md b/doc/database/db_challenge.md index 59534ba13..d3633f186 100644 --- a/doc/database/db_challenge.md +++ b/doc/database/db_challenge.md @@ -4,7 +4,7 @@ Table challenge | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | | challenge | | varchar(255) | YES | | | | | dfrn-id | | varchar(255) | YES | | | | | expire | | int unsigned | YES | | 0 | | diff --git a/doc/database/db_clients.md b/doc/database/db_clients.md index 89025d428..acbcaea2c 100644 --- a/doc/database/db_clients.md +++ b/doc/database/db_clients.md @@ -4,11 +4,11 @@ OAuth usage | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| client_id | | varchar(20) | YES | PRI | | | +| client_id | | varchar(20) | YES | PRI | NULL | | | pw | | varchar(20) | YES | | | | | redirect_uri | | varchar(200) | YES | | | | -| name | | text | NO | | | | -| icon | | text | NO | | | | +| name | | text | NO | | NULL | | +| icon | | text | NO | | NULL | | | uid | User id | mediumint unsigned | YES | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_config.md b/doc/database/db_config.md index 994b1a871..e2fb6149f 100644 --- a/doc/database/db_config.md +++ b/doc/database/db_config.md @@ -4,9 +4,9 @@ main configuration storage | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | int unsigned | YES | PRI | | auto_increment | +| id | | int unsigned | YES | PRI | NULL | auto_increment | | cat | | varbinary(50) | YES | | | | | k | | varbinary(50) | YES | | | | -| v | | mediumtext | NO | | | | +| v | | mediumtext | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_contact.md b/doc/database/db_contact.md index 108157fc0..e362e3345 100644 --- a/doc/database/db_contact.md +++ b/doc/database/db_contact.md @@ -4,7 +4,7 @@ contact table | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| id | sequential ID | int unsigned | YES | PRI | NULL | 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 | | @@ -17,8 +17,8 @@ contact table | 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 | | | | +| about | | text | NO | | NULL | | +| keywords | public keywords (interests) of the contact | text | NO | | NULL | | | gender | Deprecated | varchar(32) | YES | | | | | xmpp | | varchar(255) | YES | | | | | attag | | varchar(255) | YES | | | | @@ -26,22 +26,22 @@ contact table | 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 | | | | +| site-pubkey | | text | NO | | NULL | | | 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 | | | | +| pubkey | RSA public key 4096 bit | text | NO | | NULL | | +| prvkey | RSA private key 4096 bit | text | NO | | NULL | | | 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 | | | | +| request | | varchar(255) | NO | | NULL | | +| notify | | varchar(255) | NO | | NULL | | +| poll | | varchar(255) | NO | | NULL | | +| confirm | | varchar(255) | NO | | NULL | | +| subscribe | | varchar(255) | NO | | NULL | | +| poco | | varchar(255) | NO | | NULL | | | aes_allow | | boolean | YES | | 0 | | | ret-aes | | boolean | YES | | 0 | | | usehub | | boolean | YES | | 0 | | @@ -50,7 +50,7 @@ contact table | 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 | | | | +| failed | Connection failed | boolean | NO | | NULL | | | 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 | | @@ -59,13 +59,13 @@ contact table | 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 | | | | +| block_reason | Node-wide block reason | text | NO | | NULL | | | 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 | | | | +| manually-approve | | boolean | NO | | NULL | | | hidden | | boolean | YES | | 0 | | | archive | | boolean | YES | | 0 | | | pending | | boolean | YES | | 1 | | @@ -74,15 +74,15 @@ contact table | 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 | | | | +| gsid | Global Server ID | int unsigned | NO | | NULL | | +| reason | | text | NO | | NULL | | | closeness | | tinyint unsigned | YES | | 99 | | -| info | | mediumtext | NO | | | | -| profile-id | Deprecated | int unsigned | NO | | | | +| info | | mediumtext | NO | | NULL | | +| profile-id | Deprecated | int unsigned | NO | | NULL | | | 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 | | | | +| ffi_keyword_denylist | | text | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_conv.md b/doc/database/db_conv.md index bcea6012d..d3e40ebbe 100644 --- a/doc/database/db_conv.md +++ b/doc/database/db_conv.md @@ -4,13 +4,13 @@ private messages | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | | guid | A unique identifier for this conversation | varchar(255) | YES | | | | -| recips | sender_handle;recipient_handle | text | NO | | | | +| recips | sender_handle;recipient_handle | text | NO | | NULL | | | 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 | | | | +| subject | subject of initial message | text | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_conversation.md b/doc/database/db_conversation.md index e9ce96690..6c1d5d8ce 100644 --- a/doc/database/db_conversation.md +++ b/doc/database/db_conversation.md @@ -4,13 +4,13 @@ Raw data and structure information for messages | 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 | | | +| item-uri | Original URI of the item - unrelated to the table with the same name | varbinary(255) | YES | PRI | NULL | | | 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 | | | | +| source | Original source | mediumtext | NO | | NULL | | | received | Receiving date | datetime | YES | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_delayed-post.md b/doc/database/db_delayed-post.md index 3f83f49c2..732131a60 100644 --- a/doc/database/db_delayed-post.md +++ b/doc/database/db_delayed-post.md @@ -4,9 +4,9 @@ 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 | | | | +| id | | int unsigned | YES | PRI | NULL | auto_increment | +| uri | URI of the post that will be distributed later | varchar(255) | NO | | NULL | | +| uid | Owner User id | mediumint unsigned | NO | | NULL | | +| delayed | delay time | datetime | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_diaspora-interaction.md b/doc/database/db_diaspora-interaction.md index f2906e9d2..f8435b71d 100644 --- a/doc/database/db_diaspora-interaction.md +++ b/doc/database/db_diaspora-interaction.md @@ -4,7 +4,7 @@ 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 | | | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | PRI | NULL | | +| interaction | The Diaspora interaction | mediumtext | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_event.md b/doc/database/db_event.md index 9c46939f3..d7ef08fcd 100644 --- a/doc/database/db_event.md +++ b/doc/database/db_event.md @@ -4,7 +4,7 @@ Events | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| id | sequential ID | int unsigned | YES | PRI | NULL | 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 | | @@ -13,16 +13,16 @@ Events | 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 | | | | +| 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(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 '<19><78>' | 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 | | | | +| 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 | | Return to [database documentation](help/database) diff --git a/doc/database/db_fcontact.md b/doc/database/db_fcontact.md index ed468633d..c38df0a04 100644 --- a/doc/database/db_fcontact.md +++ b/doc/database/db_fcontact.md @@ -4,7 +4,7 @@ Diaspora compatible contacts - used in the Diaspora implementation | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | | guid | unique id | varchar(255) | YES | | | | | url | | varchar(255) | YES | | | | | name | | varchar(255) | YES | | | | @@ -19,7 +19,7 @@ Diaspora compatible contacts - used in the Diaspora implementation | priority | | tinyint unsigned | YES | | 0 | | | network | | char(4) | YES | | | | | alias | | varchar(255) | YES | | | | -| pubkey | | text | NO | | | | +| pubkey | | text | NO | | NULL | | | updated | | datetime | YES | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_fsuggest.md b/doc/database/db_fsuggest.md index 66865b506..8b37f268e 100644 --- a/doc/database/db_fsuggest.md +++ b/doc/database/db_fsuggest.md @@ -4,14 +4,14 @@ friend suggestion stuff | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | int unsigned | YES | PRI | | auto_increment | +| id | | int unsigned | YES | PRI | NULL | 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 | | | | +| note | | text | NO | | NULL | | | created | | datetime | YES | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_group.md b/doc/database/db_group.md index f4f60436c..d9eb2a4dd 100644 --- a/doc/database/db_group.md +++ b/doc/database/db_group.md @@ -4,7 +4,7 @@ privacy groups, group info | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| id | sequential ID | int unsigned | YES | PRI | NULL | 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 | | diff --git a/doc/database/db_group_member.md b/doc/database/db_group_member.md index a4ecfdf7d..db53bb567 100644 --- a/doc/database/db_group_member.md +++ b/doc/database/db_group_member.md @@ -4,7 +4,7 @@ privacy groups, member info | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| id | sequential ID | int unsigned | YES | PRI | NULL | 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 | | diff --git a/doc/database/db_gserver.md b/doc/database/db_gserver.md index 919363def..6efc2a9f9 100644 --- a/doc/database/db_gserver.md +++ b/doc/database/db_gserver.md @@ -4,28 +4,28 @@ Global servers | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | | url | | varchar(255) | YES | | | | | nurl | | varchar(255) | YES | | | | | version | | varchar(255) | YES | | | | | site_name | | varchar(255) | YES | | | | -| info | | text | NO | | | | +| info | | text | NO | | NULL | | | 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 | | | | +| protocol | The protocol of the server | tinyint unsigned | NO | | NULL | | | 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 | | | | +| detection-method | Method that had been used to detect that server | tinyint unsigned | NO | | NULL | | | 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 | | | | +| failed | Connection failed | boolean | NO | | NULL | | | next_contact | Next connection request | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_hook.md b/doc/database/db_hook.md index 71be258f3..44fcf5668 100644 --- a/doc/database/db_hook.md +++ b/doc/database/db_hook.md @@ -4,7 +4,7 @@ addon hook registry | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| id | sequential ID | int unsigned | YES | PRI | NULL | 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 | | | | diff --git a/doc/database/db_host.md b/doc/database/db_host.md index 0ce293228..befb04d60 100644 --- a/doc/database/db_host.md +++ b/doc/database/db_host.md @@ -4,7 +4,7 @@ Hostname | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | tinyint unsigned | YES | PRI | | auto_increment | +| id | sequential ID | tinyint unsigned | YES | PRI | NULL | auto_increment | | name | The hostname | varchar(128) | YES | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_inbox-status.md b/doc/database/db_inbox-status.md index 93e99dc5d..81dbb8493 100644 --- a/doc/database/db_inbox-status.md +++ b/doc/database/db_inbox-status.md @@ -4,7 +4,7 @@ Status of ActivityPub inboxes | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| url | URL of the inbox | varbinary(255) | YES | PRI | | | +| url | URL of the inbox | varbinary(255) | YES | PRI | NULL | | | 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 | | diff --git a/doc/database/db_intro.md b/doc/database/db_intro.md index a05494de5..34444303d 100644 --- a/doc/database/db_intro.md +++ b/doc/database/db_intro.md @@ -4,13 +4,13 @@ Table intro | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | | uid | User id | mediumint unsigned | YES | | 0 | | -| fid | | int unsigned | NO | | | | +| fid | | int unsigned | NO | | NULL | | | contact-id | | int unsigned | YES | | 0 | | | knowyou | | boolean | YES | | 0 | | | duplex | | boolean | YES | | 0 | | -| note | | text | NO | | | | +| note | | text | NO | | NULL | | | hash | | varchar(255) | YES | | | | | datetime | | datetime | YES | | 0001-01-01 00:00:00 | | | blocked | | boolean | YES | | 1 | | diff --git a/doc/database/db_item-uri.md b/doc/database/db_item-uri.md index 5f1d44714..1fb4f9b95 100644 --- a/doc/database/db_item-uri.md +++ b/doc/database/db_item-uri.md @@ -4,8 +4,8 @@ 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 | | | | +| id | | int unsigned | YES | PRI | NULL | auto_increment | +| uri | URI of an item | varbinary(255) | YES | | NULL | | +| guid | A unique identifier for an item | varbinary(255) | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_locks.md b/doc/database/db_locks.md index 3c219c2cc..774e9ed9b 100644 --- a/doc/database/db_locks.md +++ b/doc/database/db_locks.md @@ -4,7 +4,7 @@ Table locks | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | | name | | varchar(128) | YES | | | | | locked | | boolean | YES | | 0 | | | pid | Process ID | int unsigned | YES | | 0 | | diff --git a/doc/database/db_mail.md b/doc/database/db_mail.md index 43c9baf33..75ecf6a9f 100644 --- a/doc/database/db_mail.md +++ b/doc/database/db_mail.md @@ -4,27 +4,27 @@ private messages | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| id | sequential ID | int unsigned | YES | PRI | NULL | 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 | | | | +| contact-id | contact.id | varchar(255) | NO | | NULL | | +| author-id | Link to the contact table with uid=0 of the author of the mail | int unsigned | NO | | NULL | | +| convid | conv.id | int unsigned | NO | | NULL | | | title | | varchar(255) | YES | | | | -| body | | mediumtext | NO | | | | +| body | | mediumtext | NO | | NULL | | | 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 | | | | +| uri-id | Item-uri id of the related mail | int unsigned | NO | | NULL | | | 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 | | | | +| parent-uri-id | Item-uri id of the parent of the related mail | int unsigned | NO | | NULL | | +| thr-parent | | varchar(255) | NO | | NULL | | +| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | NO | | NULL | | | created | creation time of the private message | datetime | YES | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_mailacct.md b/doc/database/db_mailacct.md index 2c2b4e7af..898116fd0 100644 --- a/doc/database/db_mailacct.md +++ b/doc/database/db_mailacct.md @@ -4,14 +4,14 @@ Mail account data for fetching mails | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| id | sequential ID | int unsigned | YES | PRI | NULL | 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 | | | | +| pass | | text | NO | | NULL | | | reply_to | | varchar(255) | YES | | | | | action | | tinyint unsigned | YES | | 0 | | | movetofolder | | varchar(255) | YES | | | | diff --git a/doc/database/db_manage.md b/doc/database/db_manage.md index 94994ec9b..53d44a4d4 100644 --- a/doc/database/db_manage.md +++ b/doc/database/db_manage.md @@ -4,7 +4,7 @@ table of accounts that can manage each other | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | | uid | User id | mediumint unsigned | YES | | 0 | | | mid | User id | mediumint unsigned | YES | | 0 | | diff --git a/doc/database/db_notification.md b/doc/database/db_notification.md index f4e524d73..51240b493 100644 --- a/doc/database/db_notification.md +++ b/doc/database/db_notification.md @@ -4,14 +4,14 @@ 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 | | | | +| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | NO | | NULL | | +| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | NO | | NULL | | +| type | | tinyint unsigned | NO | | NULL | | +| actor-id | Link to the contact table with uid=0 of the actor that caused the notification | int unsigned | NO | | NULL | | +| target-uri-id | Item-uri id of the related post | int unsigned | NO | | NULL | | +| parent-uri-id | Item-uri id of the parent of the related post | int unsigned | NO | | NULL | | +| created | | datetime | NO | | NULL | | | seen | | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_notify-threads.md b/doc/database/db_notify-threads.md index a788e8224..18c443444 100644 --- a/doc/database/db_notify-threads.md +++ b/doc/database/db_notify-threads.md @@ -4,10 +4,10 @@ Table notify-threads | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| id | sequential ID | int unsigned | YES | PRI | NULL | 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 | | | | +| master-parent-item | Deprecated | int unsigned | NO | | NULL | | +| master-parent-uri-id | Item-uri id of the parent of the related post | int unsigned | NO | | NULL | | | parent-item | | int unsigned | YES | | 0 | | | receiver-uid | User id | mediumint unsigned | YES | | 0 | | diff --git a/doc/database/db_notify.md b/doc/database/db_notify.md index 360e93ba2..58d4d923d 100644 --- a/doc/database/db_notify.md +++ b/doc/database/db_notify.md @@ -4,23 +4,23 @@ notifications | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| id | sequential ID | int unsigned | YES | PRI | NULL | 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 | | | | +| msg | | mediumtext | NO | | NULL | | | 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 | | | | +| iid | | int unsigned | NO | | NULL | | +| parent | | int unsigned | NO | | NULL | | +| uri-id | Item-uri id of the related post | int unsigned | NO | | NULL | | +| parent-uri-id | Item-uri id of the parent of the related post | int unsigned | NO | | NULL | | | 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 | | | | +| name_cache | Cached bbcode parsing of name | tinytext | NO | | NULL | | +| msg_cache | Cached bbcode parsing of msg | mediumtext | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_oembed.md b/doc/database/db_oembed.md index e08af5f01..e74bfb710 100644 --- a/doc/database/db_oembed.md +++ b/doc/database/db_oembed.md @@ -4,9 +4,9 @@ cache for OEmbed queries | 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 | | | | +| url | page url | varbinary(255) | YES | PRI | NULL | | +| maxwidth | Maximum width passed to Oembed | mediumint unsigned | YES | PRI | NULL | | +| content | OEmbed data of the page | mediumtext | NO | | NULL | | | created | datetime of creation | datetime | YES | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_openwebauth-token.md b/doc/database/db_openwebauth-token.md index 98fa7b6a4..3b2cab372 100644 --- a/doc/database/db_openwebauth-token.md +++ b/doc/database/db_openwebauth-token.md @@ -4,7 +4,7 @@ Store OpenWebAuth token to verify contacts | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | | uid | User id - currently unused | mediumint unsigned | YES | | 0 | | | type | Verify type | varchar(32) | YES | | | | | token | A generated token | varchar(255) | YES | | | | diff --git a/doc/database/db_parsed_url.md b/doc/database/db_parsed_url.md index 9b2912cce..bf4b7117f 100644 --- a/doc/database/db_parsed_url.md +++ b/doc/database/db_parsed_url.md @@ -4,11 +4,11 @@ cache for 'parse_url' queries | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| url_hash | page url hash | binary(64) | YES | PRI | | | +| url_hash | page url hash | binary(64) | YES | PRI | NULL | | | guessing | is the 'guessing' 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 | | | | +| url | page url | text | YES | | NULL | | +| content | page data | mediumtext | NO | | NULL | | | created | datetime of creation | datetime | YES | | 0001-01-01 00:00:00 | | | expires | datetime of expiration | datetime | YES | | 0001-01-01 00:00:00 | | diff --git a/doc/database/db_pconfig.md b/doc/database/db_pconfig.md index 2bffcff5a..7c71d5305 100644 --- a/doc/database/db_pconfig.md +++ b/doc/database/db_pconfig.md @@ -4,10 +4,10 @@ personal (per user) configuration storage | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | Primary key | int unsigned | YES | PRI | | auto_increment | +| id | Primary key | int unsigned | YES | PRI | NULL | auto_increment | | uid | User id | mediumint unsigned | YES | | 0 | | | cat | Category | varchar(50) | YES | | | | | k | Key | varchar(100) | YES | | | | -| v | Value | mediumtext | NO | | | | +| v | Value | mediumtext | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_permissionset.md b/doc/database/db_permissionset.md index 0e60ff380..3086d8a94 100644 --- a/doc/database/db_permissionset.md +++ b/doc/database/db_permissionset.md @@ -4,11 +4,11 @@ Table permissionset | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | | uid | Owner id of this permission set | mediumint unsigned | YES | | 0 | | -| allow_cid | Access Control - list of allowed contact.id '<19><78>' | 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 | | | | +| 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 | | Return to [database documentation](help/database) diff --git a/doc/database/db_photo.md b/doc/database/db_photo.md index ef8f2b182..3834e72a4 100644 --- a/doc/database/db_photo.md +++ b/doc/database/db_photo.md @@ -4,32 +4,32 @@ photo storage | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | | uid | Owner User id | mediumint unsigned | YES | | 0 | | | contact-id | contact.id | int unsigned | YES | | 0 | | | guid | A unique identifier for this photo | char(16) | YES | | | | | resource-id | | char(32) | YES | | | | -| hash | hash value of the photo | char(32) | NO | | | | +| hash | hash value of the photo | char(32) | NO | | NULL | | | created | creation date | datetime | YES | | 0001-01-01 00:00:00 | | | edited | last edited date | datetime | YES | | 0001-01-01 00:00:00 | | | title | | varchar(255) | YES | | | | -| desc | | text | NO | | | | +| desc | | text | NO | | NULL | | | album | The name of the album to which the photo belongs | varchar(255) | YES | | | | | filename | | varchar(255) | YES | | | | | type | | varchar(30) | YES | | image/jpeg | | | height | | smallint unsigned | YES | | 0 | | | width | | smallint unsigned | YES | | 0 | | | datasize | | int unsigned | YES | | 0 | | -| data | | mediumblob | YES | | | | +| data | | mediumblob | YES | | NULL | | | scale | | tinyint unsigned | YES | | 0 | | | profile | | boolean | YES | | 0 | | -| allow_cid | Access Control - list of allowed contact.id '<19><78>' | 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 | | | | +| 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 | | | accessible | Make photo publicly accessible, ignoring permissions | boolean | YES | | 0 | | -| backend-class | Storage backend class | tinytext | NO | | | | -| backend-ref | Storage backend data reference | text | NO | | | | +| backend-class | Storage backend class | tinytext | NO | | NULL | | +| backend-ref | Storage backend data reference | text | NO | | NULL | | | updated | | datetime | YES | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-category.md b/doc/database/db_post-category.md index 3765072d0..9be89de45 100644 --- a/doc/database/db_post-category.md +++ b/doc/database/db_post-category.md @@ -4,7 +4,7 @@ post relation to categories | 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 | | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | PRI | NULL | | | uid | User id | mediumint unsigned | YES | PRI | 0 | | | type | | tinyint unsigned | YES | PRI | 0 | | | tid | | int unsigned | YES | PRI | 0 | | diff --git a/doc/database/db_post-content.md b/doc/database/db_post-content.md index 65e051cbd..c75c41722 100644 --- a/doc/database/db_post-content.md +++ b/doc/database/db_post-content.md @@ -4,21 +4,21 @@ Content for all posts | 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 | | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | PRI | NULL | | | title | item title | varchar(255) | YES | | | | | content-warning | | varchar(255) | YES | | | | -| body | item body content | mediumtext | NO | | | | -| raw-body | Body without embedded media links | mediumtext | NO | | | | +| body | item body content | mediumtext | NO | | NULL | | +| raw-body | Body without embedded media links | mediumtext | NO | | NULL | | | location | text location where this item originated | varchar(255) | YES | | | | | coord | longitude/latitude pair representing location where this item originated | varchar(255) | YES | | | | -| language | Language information about this post | text | NO | | | | +| language | Language information about this post | text | NO | | NULL | | | app | application which generated this item | varchar(255) | YES | | | | | rendered-hash | | varchar(32) | YES | | | | -| rendered-html | item.body converted to html | mediumtext | NO | | | | +| rendered-html | item.body converted to html | mediumtext | NO | | NULL | | | object-type | ActivityStreams object type | varchar(100) | YES | | | | -| object | JSON encoded object structure unless it is an implied object (normal post) | text | 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(100) | YES | | | | -| target | JSON encoded target structure if used | text | NO | | | | +| target | JSON encoded target structure if used | text | NO | | NULL | | | 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(32) | YES | | | | | plink | permalink or URL to a displayable copy of the message at its source | varchar(255) | YES | | | | diff --git a/doc/database/db_post-delivery-data.md b/doc/database/db_post-delivery-data.md index d9efbe180..bf3289e26 100644 --- a/doc/database/db_post-delivery-data.md +++ b/doc/database/db_post-delivery-data.md @@ -4,9 +4,9 @@ Delivery data for items | 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 | | | -| 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 | | | | -| inform | Additional receivers of the linked item | mediumtext | NO | | | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | PRI | 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 | | +| inform | Additional receivers of the linked item | mediumtext | NO | | NULL | | | queue_count | Initial number of delivery recipients, used as item.delivery_queue_count | mediumint | YES | | 0 | | | queue_done | Number of successful deliveries, used as item.delivery_queue_done | mediumint | YES | | 0 | | | queue_failed | Number of unsuccessful deliveries, used as item.delivery_queue_failed | mediumint | YES | | 0 | | diff --git a/doc/database/db_post-media.md b/doc/database/db_post-media.md index 4115301c0..58f1ed703 100644 --- a/doc/database/db_post-media.md +++ b/doc/database/db_post-media.md @@ -4,24 +4,24 @@ Attached media | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | | auto_increment | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | | | | -| url | Media URL | varbinary(511) | YES | | | | +| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | | NULL | | +| url | Media URL | varbinary(511) | YES | | NULL | | | type | Media type | tinyint unsigned | YES | | 0 | | -| mimetype | | varchar(60) | NO | | | | -| height | Height of the media | smallint unsigned | NO | | | | -| width | Width of the media | smallint unsigned | NO | | | | -| size | Media size | int unsigned | NO | | | | -| preview | Preview URL | varbinary(255) | NO | | | | -| preview-height | Height of the preview picture | smallint unsigned | NO | | | | -| preview-width | Width of the preview picture | smallint unsigned | NO | | | | -| description | | text | NO | | | | -| name | Name of the media | varchar(255) | NO | | | | -| author-url | URL of the author of the media | varbinary(255) | NO | | | | -| author-name | Name of the author of the media | varchar(255) | NO | | | | -| author-image | Image of the author of the media | varbinary(255) | NO | | | | -| publisher-url | URL of the publisher of the media | varbinary(255) | NO | | | | -| publisher-name | Name of the publisher of the media | varchar(255) | NO | | | | -| publisher-image | Image of the publisher of the media | varbinary(255) | NO | | | | +| mimetype | | varchar(60) | NO | | NULL | | +| height | Height of the media | smallint unsigned | NO | | NULL | | +| width | Width of the media | smallint unsigned | NO | | NULL | | +| size | Media size | int unsigned | NO | | NULL | | +| preview | Preview URL | varbinary(255) | NO | | NULL | | +| preview-height | Height of the preview picture | smallint unsigned | NO | | NULL | | +| preview-width | Width of the preview picture | smallint unsigned | NO | | NULL | | +| description | | text | NO | | NULL | | +| name | Name of the media | varchar(255) | NO | | NULL | | +| author-url | URL of the author of the media | varbinary(255) | NO | | NULL | | +| author-name | Name of the author of the media | varchar(255) | NO | | NULL | | +| author-image | Image of the author of the media | varbinary(255) | NO | | NULL | | +| publisher-url | URL of the publisher of the media | varbinary(255) | NO | | NULL | | +| publisher-name | Name of the publisher of the media | varchar(255) | NO | | NULL | | +| publisher-image | Image of the publisher of the media | varbinary(255) | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-tag.md b/doc/database/db_post-tag.md index 6beccad70..9c33ec2ae 100644 --- a/doc/database/db_post-tag.md +++ b/doc/database/db_post-tag.md @@ -4,7 +4,7 @@ post relation to tags | 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 | | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | PRI | NULL | | | type | | tinyint unsigned | YES | PRI | 0 | | | tid | | int unsigned | YES | PRI | 0 | | | cid | Contact id of the mentioned public contact | int unsigned | YES | PRI | 0 | | diff --git a/doc/database/db_post-thread-user.md b/doc/database/db_post-thread-user.md index 375728050..9a3a996fc 100644 --- a/doc/database/db_post-thread-user.md +++ b/doc/database/db_post-thread-user.md @@ -4,10 +4,10 @@ Thread related data per user | 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 | | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | PRI | NULL | | | owner-id | Item owner | int unsigned | YES | | 0 | | | author-id | Item author | int unsigned | YES | | 0 | | -| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | NO | | | | +| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | NO | | NULL | | | network | | char(4) | YES | | | | | created | | datetime | YES | | 0001-01-01 00:00:00 | | | received | | datetime | YES | | 0001-01-01 00:00:00 | | @@ -25,7 +25,7 @@ Thread related data per user | unseen | post has not been seen | boolean | YES | | 1 | | | hidden | Marker to hide the post from the user | boolean | YES | | 0 | | | origin | item originated at this site | boolean | YES | | 0 | | -| psid | ID of the permission set of this post | int unsigned | NO | | | | -| post-user-id | Id of the post-user table | int unsigned | NO | | | | +| psid | ID of the permission set of this post | int unsigned | NO | | NULL | | +| post-user-id | Id of the post-user table | int unsigned | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-thread.md b/doc/database/db_post-thread.md index 301a16a66..49fac4fd9 100644 --- a/doc/database/db_post-thread.md +++ b/doc/database/db_post-thread.md @@ -4,10 +4,10 @@ Thread related data | 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 | | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | PRI | NULL | | | owner-id | Item owner | int unsigned | YES | | 0 | | | author-id | Item author | int unsigned | YES | | 0 | | -| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | NO | | | | +| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | NO | | NULL | | | network | | char(4) | YES | | | | | created | | datetime | YES | | 0001-01-01 00:00:00 | | | received | | datetime | YES | | 0001-01-01 00:00:00 | | diff --git a/doc/database/db_post-user-notification.md b/doc/database/db_post-user-notification.md index 4ceea2a68..01727e266 100644 --- a/doc/database/db_post-user-notification.md +++ b/doc/database/db_post-user-notification.md @@ -4,8 +4,8 @@ User post notifications | 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 | | | -| uid | Owner id which owns this copy of the item | mediumint unsigned | YES | PRI | | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | PRI | NULL | | +| uid | Owner id which owns this copy of the item | mediumint unsigned | YES | PRI | NULL | | | notification-type | | tinyint unsigned | YES | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-user.md b/doc/database/db_post-user.md index da6312b1d..58fa6f902 100644 --- a/doc/database/db_post-user.md +++ b/doc/database/db_post-user.md @@ -4,11 +4,11 @@ User specific post data | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | int unsigned | YES | PRI | | auto_increment | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | | | | -| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | NO | | | | -| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | NO | | | | -| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | NO | | | | +| id | | int unsigned | YES | PRI | NULL | auto_increment | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | | NULL | | +| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | NO | | NULL | | +| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | NO | | NULL | | +| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | NO | | NULL | | | created | Creation timestamp. | datetime | YES | | 0001-01-01 00:00:00 | | | edited | Date of last edit (default is created) | datetime | YES | | 0001-01-01 00:00:00 | | | received | datetime | datetime | YES | | 0001-01-01 00:00:00 | | @@ -16,23 +16,23 @@ User specific post data | network | Network from where the item comes from | char(4) | YES | | | | | owner-id | Link to the contact table with uid=0 of the owner of this item | int unsigned | YES | | 0 | | | author-id | Link to the contact table with uid=0 of the author of this item | int unsigned | YES | | 0 | | -| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | NO | | | | +| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | NO | | NULL | | | post-type | Post type (personal note, image, article, ...) | tinyint unsigned | YES | | 0 | | | post-reason | Reason why the post arrived at the user | tinyint unsigned | YES | | 0 | | -| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | NO | | | | +| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | NO | | NULL | | | private | 0=public, 1=private, 2=unlisted | tinyint unsigned | YES | | 0 | | | global | | boolean | YES | | 0 | | | visible | | boolean | YES | | 0 | | | deleted | item has been marked for deletion | boolean | YES | | 0 | | -| uid | Owner id which owns this copy of the item | mediumint unsigned | YES | | | | -| protocol | Protocol used to deliver the item for this user | tinyint unsigned | NO | | | | +| uid | Owner id which owns this copy of the item | mediumint unsigned | YES | | NULL | | +| protocol | Protocol used to deliver the item for this user | tinyint unsigned | NO | | NULL | | | contact-id | contact.id | int unsigned | YES | | 0 | | -| event-id | Used to link to the event.id | int unsigned | NO | | | | +| event-id | Used to link to the event.id | int unsigned | NO | | NULL | | | unseen | post has not been seen | boolean | YES | | 1 | | | hidden | Marker to hide the post from the user | boolean | YES | | 0 | | | notification-type | | tinyint unsigned | YES | | 0 | | | wall | This item was posted to the wall of uid | boolean | YES | | 0 | | | origin | item originated at this site | boolean | YES | | 0 | | -| psid | ID of the permission set of this post | int unsigned | NO | | | | +| psid | ID of the permission set of this post | int unsigned | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_post.md b/doc/database/db_post.md index f8e09b05b..020e5e9c9 100644 --- a/doc/database/db_post.md +++ b/doc/database/db_post.md @@ -4,10 +4,10 @@ Structure for all posts | 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 | | | -| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | NO | | | | -| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | NO | | | | -| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | NO | | | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | PRI | NULL | | +| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | NO | | NULL | | +| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | NO | | NULL | | +| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | NO | | NULL | | | created | Creation timestamp. | datetime | YES | | 0001-01-01 00:00:00 | | | edited | Date of last edit (default is created) | datetime | YES | | 0001-01-01 00:00:00 | | | received | datetime | datetime | YES | | 0001-01-01 00:00:00 | | @@ -15,9 +15,9 @@ Structure for all posts | network | Network from where the item comes from | char(4) | YES | | | | | owner-id | Link to the contact table with uid=0 of the owner of this item | int unsigned | YES | | 0 | | | author-id | Link to the contact table with uid=0 of the author of this item | int unsigned | YES | | 0 | | -| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | NO | | | | +| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | NO | | NULL | | | post-type | Post type (personal note, image, article, ...) | tinyint unsigned | YES | | 0 | | -| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | NO | | | | +| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | NO | | NULL | | | private | 0=public, 1=private, 2=unlisted | tinyint unsigned | YES | | 0 | | | global | | boolean | YES | | 0 | | | visible | | boolean | YES | | 0 | | diff --git a/doc/database/db_process.md b/doc/database/db_process.md index 8a2ad1ac8..2c92fc84d 100644 --- a/doc/database/db_process.md +++ b/doc/database/db_process.md @@ -4,7 +4,7 @@ Currently running system processes | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| pid | | int unsigned | YES | PRI | | | +| pid | | int unsigned | YES | PRI | NULL | | | command | | varbinary(32) | YES | | | | | created | | datetime | YES | | 0001-01-01 00:00:00 | | diff --git a/doc/database/db_profile.md b/doc/database/db_profile.md index eb2297023..aa0e36066 100644 --- a/doc/database/db_profile.md +++ b/doc/database/db_profile.md @@ -4,42 +4,42 @@ user profiles data | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | | uid | Owner User id | mediumint unsigned | YES | | 0 | | -| profile-name | Deprecated | varchar(255) | NO | | | | -| is-default | Deprecated | boolean | NO | | | | +| profile-name | Deprecated | varchar(255) | NO | | NULL | | +| is-default | Deprecated | boolean | NO | | NULL | | | hide-friends | Hide friend list from viewers of this profile | boolean | YES | | 0 | | | name | | varchar(255) | YES | | | | -| pdesc | Deprecated | varchar(255) | NO | | | | +| pdesc | Deprecated | varchar(255) | NO | | NULL | | | dob | Day of birth | varchar(32) | YES | | 0000-00-00 | | | address | | varchar(255) | YES | | | | | locality | | varchar(255) | YES | | | | | region | | varchar(255) | YES | | | | | postal-code | | varchar(32) | YES | | | | | country-name | | varchar(255) | YES | | | | -| hometown | Deprecated | varchar(255) | NO | | | | -| gender | Deprecated | varchar(32) | NO | | | | -| marital | Deprecated | varchar(255) | NO | | | | -| with | Deprecated | text | NO | | | | -| howlong | Deprecated | datetime | NO | | | | -| sexual | Deprecated | varchar(255) | NO | | | | -| politic | Deprecated | varchar(255) | NO | | | | -| religion | Deprecated | varchar(255) | NO | | | | -| pub_keywords | | text | NO | | | | -| prv_keywords | | text | NO | | | | -| likes | Deprecated | text | NO | | | | -| dislikes | Deprecated | text | NO | | | | -| about | Profile description | text | NO | | | | -| summary | Deprecated | varchar(255) | NO | | | | -| music | Deprecated | text | NO | | | | -| book | Deprecated | text | NO | | | | -| tv | Deprecated | text | NO | | | | -| film | Deprecated | text | NO | | | | -| interest | Deprecated | text | NO | | | | -| romance | Deprecated | text | NO | | | | -| work | Deprecated | text | NO | | | | -| education | Deprecated | text | NO | | | | -| contact | Deprecated | text | NO | | | | +| hometown | Deprecated | varchar(255) | NO | | NULL | | +| gender | Deprecated | varchar(32) | NO | | NULL | | +| marital | Deprecated | varchar(255) | NO | | NULL | | +| with | Deprecated | text | NO | | NULL | | +| howlong | Deprecated | datetime | NO | | NULL | | +| sexual | Deprecated | varchar(255) | NO | | NULL | | +| politic | Deprecated | varchar(255) | NO | | NULL | | +| religion | Deprecated | varchar(255) | NO | | NULL | | +| pub_keywords | | text | NO | | NULL | | +| prv_keywords | | text | NO | | NULL | | +| likes | Deprecated | text | NO | | NULL | | +| dislikes | Deprecated | text | NO | | NULL | | +| about | Profile description | text | NO | | NULL | | +| summary | Deprecated | varchar(255) | NO | | NULL | | +| music | Deprecated | text | NO | | NULL | | +| book | Deprecated | text | NO | | NULL | | +| tv | Deprecated | text | NO | | NULL | | +| film | Deprecated | text | NO | | NULL | | +| interest | Deprecated | text | NO | | NULL | | +| romance | Deprecated | text | NO | | NULL | | +| work | Deprecated | text | NO | | NULL | | +| education | Deprecated | text | NO | | NULL | | +| contact | Deprecated | text | NO | | NULL | | | homepage | | varchar(255) | YES | | | | | xmpp | | varchar(255) | YES | | | | | photo | | varchar(255) | YES | | | | diff --git a/doc/database/db_profile_check.md b/doc/database/db_profile_check.md index ed8c936fc..b41a10273 100644 --- a/doc/database/db_profile_check.md +++ b/doc/database/db_profile_check.md @@ -4,7 +4,7 @@ DFRN remote auth use | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | | uid | User id | mediumint unsigned | YES | | 0 | | | cid | contact.id | int unsigned | YES | | 0 | | | dfrn_id | | varchar(255) | YES | | | | diff --git a/doc/database/db_profile_field.md b/doc/database/db_profile_field.md index 9a0b9fda1..4018f1256 100644 --- a/doc/database/db_profile_field.md +++ b/doc/database/db_profile_field.md @@ -4,12 +4,12 @@ Custom profile fields | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | | uid | Owner user id | mediumint unsigned | YES | | 0 | | | order | Field ordering per user | mediumint unsigned | YES | | 1 | | -| psid | ID of the permission set of this profile field - 0 = public | int unsigned | NO | | | | +| psid | ID of the permission set of this profile field - 0 = public | int unsigned | NO | | NULL | | | label | Label of the field | varchar(255) | YES | | | | -| value | Value of the field | text | NO | | | | +| value | Value of the field | text | NO | | NULL | | | created | creation time | datetime | YES | | 0001-01-01 00:00:00 | | | edited | last edit time | datetime | YES | | 0001-01-01 00:00:00 | | diff --git a/doc/database/db_push_subscriber.md b/doc/database/db_push_subscriber.md index 97b3f0fc0..d745db6d2 100644 --- a/doc/database/db_push_subscriber.md +++ b/doc/database/db_push_subscriber.md @@ -4,7 +4,7 @@ Used for OStatus: Contains feed subscribers | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | | uid | User id | mediumint unsigned | YES | | 0 | | | callback_url | | varchar(255) | YES | | | | | topic | | varchar(255) | YES | | | | diff --git a/doc/database/db_register.md b/doc/database/db_register.md index f2bc2c28d..fe2f18ba8 100644 --- a/doc/database/db_register.md +++ b/doc/database/db_register.md @@ -4,12 +4,12 @@ registrations requiring admin approval | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | | hash | | varchar(255) | YES | | | | | created | | datetime | YES | | 0001-01-01 00:00:00 | | | uid | User id | mediumint unsigned | YES | | 0 | | | password | | varchar(255) | YES | | | | | language | | varchar(16) | YES | | | | -| note | | text | NO | | | | +| note | | text | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_search.md b/doc/database/db_search.md index a5f5e11f2..994a3ffbf 100644 --- a/doc/database/db_search.md +++ b/doc/database/db_search.md @@ -4,7 +4,7 @@ Table search | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | | auto_increment | +| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | | uid | User id | mediumint unsigned | YES | | 0 | | | term | | varchar(255) | YES | | | | diff --git a/doc/database/db_session.md b/doc/database/db_session.md index 1e3e1f377..80916366a 100644 --- a/doc/database/db_session.md +++ b/doc/database/db_session.md @@ -4,9 +4,9 @@ web session storage | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | bigint unsigned | YES | PRI | | auto_increment | +| id | sequential ID | bigint unsigned | YES | PRI | NULL | auto_increment | | sid | | varbinary(255) | YES | | | | -| data | | text | NO | | | | +| data | | text | NO | | NULL | | | expire | | int unsigned | YES | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_storage.md b/doc/database/db_storage.md index 77795196b..376f0cb22 100644 --- a/doc/database/db_storage.md +++ b/doc/database/db_storage.md @@ -4,7 +4,7 @@ Data stored by Database storage backend | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | Auto incremented image data id | int unsigned | YES | PRI | | auto_increment | -| data | file data | longblob | YES | | | | +| id | Auto incremented image data id | int unsigned | YES | PRI | NULL | auto_increment | +| data | file data | longblob | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_tag.md b/doc/database/db_tag.md index bc7cfa4f5..3fb7d7d8f 100644 --- a/doc/database/db_tag.md +++ b/doc/database/db_tag.md @@ -4,7 +4,7 @@ tags and mentions | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | int unsigned | YES | PRI | | auto_increment | +| id | | int unsigned | YES | PRI | NULL | auto_increment | | name | | varchar(96) | YES | | | | | url | | varbinary(255) | YES | | | | diff --git a/doc/database/db_tokens.md b/doc/database/db_tokens.md index ade654366..93510a16e 100644 --- a/doc/database/db_tokens.md +++ b/doc/database/db_tokens.md @@ -4,8 +4,8 @@ OAuth usage | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | varchar(40) | YES | PRI | | | -| secret | | text | NO | | | | +| id | | varchar(40) | YES | PRI | NULL | | +| secret | | text | NO | | NULL | | | client_id | | varchar(20) | YES | | | | | expires | | int | YES | | 0 | | | scope | | varchar(200) | YES | | | | diff --git a/doc/database/db_user-contact.md b/doc/database/db_user-contact.md index a08cf3153..2c208735a 100644 --- a/doc/database/db_user-contact.md +++ b/doc/database/db_user-contact.md @@ -6,8 +6,8 @@ User specific public contact data | ----- | ----------- | ---- | ---- | --- | ------- | ----- | | cid | Contact id of the linked public contact | int unsigned | YES | PRI | 0 | | | uid | User id | mediumint unsigned | YES | PRI | 0 | | -| blocked | Contact is completely blocked for this user | boolean | NO | | | | -| ignored | Posts from this contact are ignored | boolean | NO | | | | -| collapsed | Posts from this contact are collapsed | boolean | NO | | | | +| blocked | Contact is completely blocked for this user | boolean | NO | | NULL | | +| ignored | Posts from this contact are ignored | boolean | NO | | NULL | | +| collapsed | Posts from this contact are collapsed | boolean | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_user.md b/doc/database/db_user.md index 03c6820ea..8f055b1bc 100644 --- a/doc/database/db_user.md +++ b/doc/database/db_user.md @@ -4,8 +4,8 @@ The local users | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| uid | sequential ID | mediumint unsigned | YES | PRI | | auto_increment | -| parent-uid | The parent user that has full control about this user | mediumint unsigned | NO | | | | +| uid | sequential ID | mediumint unsigned | YES | PRI | NULL | auto_increment | +| parent-uid | The parent user that has full control about this user | mediumint unsigned | NO | | NULL | | | guid | A unique identifier for this user | varchar(64) | YES | | | | | username | Name that this user is known by | varchar(255) | YES | | | | | password | encrypted password | varchar(255) | YES | | | | @@ -20,10 +20,10 @@ The local users | default-location | Default for item.location | varchar(255) | YES | | | | | allow_location | 1 allows to display the location | boolean | YES | | 0 | | | theme | user theme preference | varchar(255) | YES | | | | -| pubkey | RSA public key 4096 bit | text | NO | | | | -| prvkey | RSA private key 4096 bit | text | NO | | | | -| spubkey | | text | NO | | | | -| sprvkey | | text | NO | | | | +| pubkey | RSA public key 4096 bit | text | NO | | NULL | | +| prvkey | RSA private key 4096 bit | text | NO | | NULL | | +| spubkey | | text | NO | | NULL | | +| sprvkey | | text | NO | | NULL | | | verified | user is verified through email | boolean | YES | | 0 | | | blocked | 1 for user is blocked | boolean | YES | | 0 | | | blockwall | Prohibit contacts to post to the profile page of the user | boolean | YES | | 0 | | @@ -35,8 +35,8 @@ The local users | page-flags | page/profile type | tinyint unsigned | YES | | 0 | | | account-type | | tinyint unsigned | YES | | 0 | | | prvnets | | boolean | YES | | 0 | | -| pwdreset | Password reset request token | varchar(255) | NO | | | | -| pwdreset_time | Timestamp of the last password reset request | datetime | NO | | | | +| pwdreset | Password reset request token | varchar(255) | NO | | NULL | | +| pwdreset_time | Timestamp of the last password reset request | datetime | NO | | NULL | | | maxreq | | int unsigned | YES | | 10 | | | expire | | int unsigned | YES | | 0 | | | account_removed | if 1 the account is removed | boolean | YES | | 0 | | @@ -44,10 +44,10 @@ The local users | account_expires_on | timestamp when account expires and will be deleted | datetime | YES | | 0001-01-01 00:00:00 | | | expire_notification_sent | timestamp of last warning of account expiration | datetime | YES | | 0001-01-01 00:00:00 | | | def_gid | | int unsigned | YES | | 0 | | -| allow_cid | default permission for this user | mediumtext | NO | | | | -| allow_gid | default permission for this user | mediumtext | NO | | | | -| deny_cid | default permission for this user | mediumtext | NO | | | | -| deny_gid | default permission for this user | mediumtext | NO | | | | -| openidserver | | text | NO | | | | +| allow_cid | default permission for this user | mediumtext | NO | | NULL | | +| allow_gid | default permission for this user | mediumtext | NO | | NULL | | +| deny_cid | default permission for this user | mediumtext | NO | | NULL | | +| deny_gid | default permission for this user | mediumtext | NO | | NULL | | +| openidserver | | text | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_userd.md b/doc/database/db_userd.md index 99baabcc6..42cc72c3c 100644 --- a/doc/database/db_userd.md +++ b/doc/database/db_userd.md @@ -4,7 +4,7 @@ Deleted usernames | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | | auto_increment | -| username | | varchar(255) | YES | | | | +| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | +| username | | varchar(255) | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_verb.md b/doc/database/db_verb.md index 7e01f1f8e..73871a07c 100644 --- a/doc/database/db_verb.md +++ b/doc/database/db_verb.md @@ -4,7 +4,7 @@ Activity Verbs | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | smallint unsigned | YES | PRI | | auto_increment | +| id | | smallint unsigned | YES | PRI | NULL | auto_increment | | name | | varchar(100) | YES | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_worker-ipc.md b/doc/database/db_worker-ipc.md index ef8c97301..5246974f5 100644 --- a/doc/database/db_worker-ipc.md +++ b/doc/database/db_worker-ipc.md @@ -4,7 +4,7 @@ Inter process communication between the frontend and the worker | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| key | | int | YES | PRI | | | -| jobs | Flag for outstanding jobs | boolean | NO | | | | +| key | | int | YES | PRI | NULL | | +| jobs | Flag for outstanding jobs | boolean | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_workerqueue.md b/doc/database/db_workerqueue.md index 0a14e0aec..ec10ba549 100644 --- a/doc/database/db_workerqueue.md +++ b/doc/database/db_workerqueue.md @@ -4,9 +4,9 @@ Background tasks queue entries | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | Auto incremented worker task id | int unsigned | YES | PRI | | auto_increment | -| command | Task command | varchar(100) | NO | | | | -| parameter | Task parameter | mediumtext | NO | | | | +| id | Auto incremented worker task id | int unsigned | YES | PRI | NULL | auto_increment | +| command | Task command | varchar(100) | NO | | NULL | | +| parameter | Task parameter | mediumtext | NO | | NULL | | | priority | Task priority | tinyint unsigned | YES | | 0 | | | created | Creation date | datetime | YES | | 0001-01-01 00:00:00 | | | pid | Process id of the worker | int unsigned | YES | | 0 | | diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index d1975f504..888ac73e6 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -174,7 +174,7 @@ class DBStructure $field['type'] = $value['type']; $field['notnull'] = ($value['not null'] ?? false) ? 'YES' : 'NO'; $field['primary'] = ($value['primary'] ?? false) ? 'PRI' : ''; - $field['default'] = $value['default'] ?? ''; + $field['default'] = $value['default'] ?? 'NULL'; $field['extra'] = $value['extra'] ?? ''; $fields[] = $field; From a827f948c867ceebf60d82b0740032512be23302 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 14 Jun 2021 05:14:09 +0000 Subject: [PATCH 04/12] Reversed "null" --- doc/database/db_2fa_app_specific_password.md | 12 +- doc/database/db_2fa_recovery_codes.md | 8 +- doc/database/db_2fa_trusted_browser.md | 10 +- doc/database/db_addon.md | 14 +- doc/database/db_apcontact.md | 48 +++--- doc/database/db_application-token.md | 20 +-- doc/database/db_application.md | 22 +-- doc/database/db_attach.md | 30 ++-- doc/database/db_auth_codes.md | 10 +- doc/database/db_cache.md | 8 +- doc/database/db_challenge.md | 12 +- doc/database/db_clients.md | 12 +- doc/database/db_config.md | 8 +- doc/database/db_contact-relation.md | 10 +- doc/database/db_contact.md | 160 +++++++++---------- doc/database/db_conv.md | 16 +- doc/database/db_conversation.md | 16 +- doc/database/db_delayed-post.md | 8 +- doc/database/db_diaspora-interaction.md | 4 +- doc/database/db_event.md | 40 ++--- doc/database/db_fcontact.md | 34 ++-- doc/database/db_fsuggest.md | 18 +-- doc/database/db_group.md | 10 +- doc/database/db_group_member.md | 6 +- doc/database/db_gserver-tag.md | 4 +- doc/database/db_gserver.md | 46 +++--- doc/database/db_hook.md | 10 +- doc/database/db_host.md | 4 +- doc/database/db_inbox-status.md | 14 +- doc/database/db_intro.md | 22 +-- doc/database/db_item-uri.md | 6 +- doc/database/db_locks.md | 10 +- doc/database/db_mail.md | 44 ++--- doc/database/db_mailacct.md | 26 +-- doc/database/db_manage.md | 6 +- doc/database/db_notification.md | 18 +-- doc/database/db_notify-threads.md | 12 +- doc/database/db_notify.md | 36 ++--- doc/database/db_oembed.md | 8 +- doc/database/db_openwebauth-token.md | 12 +- doc/database/db_parsed_url.md | 14 +- doc/database/db_pconfig.md | 10 +- doc/database/db_permissionset.md | 12 +- doc/database/db_photo.md | 54 +++---- doc/database/db_post-category.md | 8 +- doc/database/db_post-content.md | 34 ++-- doc/database/db_post-delivery-data.md | 22 +-- doc/database/db_post-media.md | 38 ++--- doc/database/db_post-tag.md | 8 +- doc/database/db_post-thread-user.md | 46 +++--- doc/database/db_post-thread.md | 18 +-- doc/database/db_post-user-notification.md | 6 +- doc/database/db_post-user.md | 60 +++---- doc/database/db_post.md | 36 ++--- doc/database/db_process.md | 6 +- doc/database/db_profile.md | 84 +++++----- doc/database/db_profile_check.md | 12 +- doc/database/db_profile_field.md | 16 +- doc/database/db_push_subscriber.md | 20 +-- doc/database/db_register.md | 14 +- doc/database/db_search.md | 6 +- doc/database/db_session.md | 8 +- doc/database/db_storage.md | 4 +- doc/database/db_tag.md | 6 +- doc/database/db_tokens.md | 12 +- doc/database/db_user-contact.md | 10 +- doc/database/db_user.md | 90 +++++------ doc/database/db_userd.md | 4 +- doc/database/db_verb.md | 4 +- doc/database/db_worker-ipc.md | 4 +- doc/database/db_workerqueue.md | 20 +-- src/Database/DBStructure.php | 2 +- view/templates/structure.tpl | 2 +- 73 files changed, 752 insertions(+), 752 deletions(-) diff --git a/doc/database/db_2fa_app_specific_password.md b/doc/database/db_2fa_app_specific_password.md index 660319e04..654de9a6e 100644 --- a/doc/database/db_2fa_app_specific_password.md +++ b/doc/database/db_2fa_app_specific_password.md @@ -4,11 +4,11 @@ Two-factor app-specific _password | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | Password ID for revocation | mediumint unsigned | YES | PRI | NULL | auto_increment | -| uid | User ID | mediumint unsigned | YES | | NULL | | -| description | Description of the usage of the password | varchar(255) | NO | | NULL | | -| hashed_password | Hashed password | varchar(255) | YES | | NULL | | -| generated | Datetime the password was generated | datetime | YES | | NULL | | -| last_used | Datetime the password was last used | datetime | NO | | NULL | | +| id | Password ID for revocation | mediumint unsigned | NO | PRI | NULL | auto_increment | +| uid | User ID | mediumint unsigned | NO | | NULL | | +| description | Description of the usage of the password | varchar(255) | YES | | NULL | | +| hashed_password | Hashed password | varchar(255) | NO | | NULL | | +| generated | Datetime the password was generated | datetime | NO | | NULL | | +| last_used | Datetime the password was last used | datetime | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_2fa_recovery_codes.md b/doc/database/db_2fa_recovery_codes.md index aec9bbd55..61bd520d9 100644 --- a/doc/database/db_2fa_recovery_codes.md +++ b/doc/database/db_2fa_recovery_codes.md @@ -4,9 +4,9 @@ Two-factor authentication recovery codes | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| uid | User ID | mediumint unsigned | YES | PRI | NULL | | -| code | Recovery code string | varchar(50) | YES | PRI | NULL | | -| generated | Datetime the code was generated | datetime | YES | | NULL | | -| used | Datetime the code was used | datetime | NO | | NULL | | +| uid | User ID | mediumint unsigned | NO | PRI | NULL | | +| code | Recovery code string | varchar(50) | NO | PRI | NULL | | +| generated | Datetime the code was generated | datetime | NO | | NULL | | +| used | Datetime the code was used | datetime | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_2fa_trusted_browser.md b/doc/database/db_2fa_trusted_browser.md index f3b336562..ccb426880 100644 --- a/doc/database/db_2fa_trusted_browser.md +++ b/doc/database/db_2fa_trusted_browser.md @@ -4,10 +4,10 @@ Two-factor authentication trusted browsers | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| cookie_hash | Trusted cookie hash | varchar(80) | YES | PRI | NULL | | -| uid | User ID | mediumint unsigned | YES | | NULL | | -| user_agent | User agent string | text | NO | | NULL | | -| created | Datetime the trusted browser was recorded | datetime | YES | | NULL | | -| last_used | Datetime the trusted browser was last used | datetime | NO | | NULL | | +| cookie_hash | Trusted cookie hash | varchar(80) | NO | PRI | NULL | | +| uid | User ID | mediumint unsigned | NO | | NULL | | +| user_agent | User agent string | text | YES | | NULL | | +| created | Datetime the trusted browser was recorded | datetime | NO | | NULL | | +| last_used | Datetime the trusted browser was last used | datetime | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_addon.md b/doc/database/db_addon.md index 91918adef..ae8507af0 100644 --- a/doc/database/db_addon.md +++ b/doc/database/db_addon.md @@ -4,12 +4,12 @@ registered addons | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | int unsigned | YES | PRI | NULL | 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 | | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| name | addon base (file)name | varchar(50) | NO | | | | +| version | currently unused | varchar(50) | NO | | | | +| installed | currently always 1 | boolean | NO | | 0 | | +| hidden | currently unused | boolean | NO | | 0 | | +| timestamp | file timestamp to check for reloads | int unsigned | NO | | 0 | | +| plugin_admin | 1 = has admin config, 0 = has no admin config | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_apcontact.md b/doc/database/db_apcontact.md index 69d33fe6c..9cff3af0c 100644 --- a/doc/database/db_apcontact.md +++ b/doc/database/db_apcontact.md @@ -4,29 +4,29 @@ ActivityPub compatible contacts - used in the ActivityPub implementation | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| url | URL of the contact | varbinary(255) | YES | PRI | NULL | | -| uuid | | varchar(255) | NO | | NULL | | -| type | | varchar(20) | YES | | NULL | | -| following | | varchar(255) | NO | | NULL | | -| followers | | varchar(255) | NO | | NULL | | -| inbox | | varchar(255) | YES | | NULL | | -| outbox | | varchar(255) | NO | | NULL | | -| sharedinbox | | varchar(255) | NO | | NULL | | -| manually-approve | | boolean | NO | | NULL | | -| nick | | varchar(255) | YES | | | | -| name | | varchar(255) | NO | | NULL | | -| about | | text | NO | | NULL | | -| photo | | varchar(255) | NO | | NULL | | -| addr | | varchar(255) | NO | | NULL | | -| alias | | varchar(255) | NO | | NULL | | -| pubkey | | text | NO | | NULL | | -| subscribe | | varchar(255) | NO | | NULL | | -| baseurl | baseurl of the ap contact | varchar(255) | NO | | NULL | | -| gsid | Global Server ID | int unsigned | NO | | NULL | | -| generator | Name of the contact's system | varchar(255) | NO | | NULL | | -| 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 | | +| url | URL of the contact | varbinary(255) | NO | PRI | NULL | | +| uuid | | varchar(255) | YES | | NULL | | +| type | | varchar(20) | NO | | NULL | | +| following | | varchar(255) | YES | | NULL | | +| followers | | varchar(255) | YES | | NULL | | +| inbox | | varchar(255) | NO | | NULL | | +| outbox | | varchar(255) | YES | | NULL | | +| sharedinbox | | varchar(255) | YES | | NULL | | +| manually-approve | | boolean | YES | | NULL | | +| nick | | varchar(255) | NO | | | | +| name | | varchar(255) | YES | | NULL | | +| about | | text | YES | | NULL | | +| photo | | varchar(255) | YES | | NULL | | +| addr | | varchar(255) | YES | | NULL | | +| alias | | varchar(255) | YES | | NULL | | +| pubkey | | text | YES | | NULL | | +| subscribe | | varchar(255) | YES | | NULL | | +| baseurl | baseurl of the ap contact | varchar(255) | YES | | NULL | | +| gsid | Global Server ID | int unsigned | YES | | NULL | | +| generator | Name of the contact's system | varchar(255) | YES | | NULL | | +| following_count | Number of following contacts | int unsigned | YES | | 0 | | +| followers_count | Number of followers | int unsigned | YES | | 0 | | +| statuses_count | Number of posts | int unsigned | YES | | 0 | | +| updated | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_application-token.md b/doc/database/db_application-token.md index af2b8d661..c847c3218 100644 --- a/doc/database/db_application-token.md +++ b/doc/database/db_application-token.md @@ -4,15 +4,15 @@ OAuth user token | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| application-id | | int unsigned | YES | PRI | NULL | | -| uid | Owner User id | mediumint unsigned | YES | PRI | NULL | | -| code | | varchar(64) | YES | | NULL | | -| access_token | | varchar(64) | YES | | NULL | | -| created_at | creation time | datetime | YES | | NULL | | -| scopes | | varchar(255) | NO | | NULL | | -| read | Read scope | boolean | NO | | NULL | | -| write | Write scope | boolean | NO | | NULL | | -| follow | Follow scope | boolean | NO | | NULL | | -| push | Push scope | boolean | NO | | NULL | | +| application-id | | int unsigned | NO | PRI | NULL | | +| uid | Owner User id | mediumint unsigned | NO | PRI | NULL | | +| code | | varchar(64) | NO | | NULL | | +| access_token | | varchar(64) | NO | | NULL | | +| created_at | creation time | datetime | NO | | NULL | | +| scopes | | varchar(255) | YES | | NULL | | +| read | Read scope | boolean | YES | | NULL | | +| write | Write scope | boolean | YES | | NULL | | +| follow | Follow scope | boolean | YES | | NULL | | +| push | Push scope | boolean | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_application.md b/doc/database/db_application.md index 799b01fa1..261c98204 100644 --- a/doc/database/db_application.md +++ b/doc/database/db_application.md @@ -4,16 +4,16 @@ OAuth application | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | generated index | int unsigned | YES | PRI | NULL | auto_increment | -| client_id | | varchar(64) | YES | | NULL | | -| client_secret | | varchar(64) | YES | | NULL | | -| name | | varchar(255) | YES | | NULL | | -| redirect_uri | | varchar(255) | YES | | NULL | | -| website | | varchar(255) | NO | | NULL | | -| scopes | | varchar(255) | NO | | NULL | | -| read | Read scope | boolean | NO | | NULL | | -| write | Write scope | boolean | NO | | NULL | | -| follow | Follow scope | boolean | NO | | NULL | | -| push | Push scope | boolean | NO | | NULL | | +| id | generated index | int unsigned | NO | PRI | NULL | auto_increment | +| client_id | | varchar(64) | NO | | NULL | | +| client_secret | | varchar(64) | NO | | NULL | | +| name | | varchar(255) | NO | | NULL | | +| redirect_uri | | varchar(255) | NO | | NULL | | +| website | | varchar(255) | YES | | NULL | | +| scopes | | varchar(255) | YES | | NULL | | +| read | Read scope | boolean | YES | | NULL | | +| write | Write scope | boolean | YES | | NULL | | +| follow | Follow scope | boolean | YES | | NULL | | +| push | Push scope | boolean | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_attach.md b/doc/database/db_attach.md index ee546d54e..fec3f8b24 100644 --- a/doc/database/db_attach.md +++ b/doc/database/db_attach.md @@ -4,20 +4,20 @@ file attachments | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | generated index | int unsigned | YES | PRI | NULL | 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 | | NULL | | -| 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 '<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 | | -| backend-class | Storage backend class | tinytext | NO | | NULL | | -| backend-ref | Storage backend data reference | text | NO | | NULL | | +| id | generated index | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| hash | hash | varchar(64) | NO | | | | +| filename | filename of original | varchar(255) | NO | | | | +| filetype | mimetype | varchar(64) | NO | | | | +| filesize | size in bytes | int unsigned | 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 | YES | | NULL | | +| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | +| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | +| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | +| backend-class | Storage backend class | tinytext | YES | | NULL | | +| backend-ref | Storage backend data reference | text | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_auth_codes.md b/doc/database/db_auth_codes.md index 51d78aa5a..51cad7595 100644 --- a/doc/database/db_auth_codes.md +++ b/doc/database/db_auth_codes.md @@ -4,10 +4,10 @@ OAuth usage | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | varchar(40) | YES | PRI | NULL | | -| client_id | | varchar(20) | YES | | | | -| redirect_uri | | varchar(200) | YES | | | | -| expires | | int | YES | | 0 | | -| scope | | varchar(250) | YES | | | | +| id | | varchar(40) | NO | PRI | NULL | | +| client_id | | varchar(20) | NO | | | | +| redirect_uri | | varchar(200) | NO | | | | +| expires | | int | NO | | 0 | | +| scope | | varchar(250) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_cache.md b/doc/database/db_cache.md index 1d1d552c3..403fbf864 100644 --- a/doc/database/db_cache.md +++ b/doc/database/db_cache.md @@ -4,9 +4,9 @@ Stores temporary data | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| k | cache key | varbinary(255) | YES | PRI | NULL | | -| v | cached serialized value | mediumtext | NO | | NULL | | -| 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 | | +| k | cache key | varbinary(255) | NO | PRI | NULL | | +| v | cached serialized value | mediumtext | YES | | NULL | | +| expires | datetime of cache expiration | datetime | NO | | 0001-01-01 00:00:00 | | +| updated | datetime of cache insertion | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_challenge.md b/doc/database/db_challenge.md index d3633f186..54ffd252c 100644 --- a/doc/database/db_challenge.md +++ b/doc/database/db_challenge.md @@ -4,11 +4,11 @@ Table challenge | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | 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 | | | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| challenge | | varchar(255) | NO | | | | +| dfrn-id | | varchar(255) | NO | | | | +| expire | | int unsigned | NO | | 0 | | +| type | | varchar(255) | NO | | | | +| last_update | | varchar(255) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_clients.md b/doc/database/db_clients.md index acbcaea2c..8f7282484 100644 --- a/doc/database/db_clients.md +++ b/doc/database/db_clients.md @@ -4,11 +4,11 @@ OAuth usage | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| client_id | | varchar(20) | YES | PRI | NULL | | -| pw | | varchar(20) | YES | | | | -| redirect_uri | | varchar(200) | YES | | | | -| name | | text | NO | | NULL | | -| icon | | text | NO | | NULL | | -| uid | User id | mediumint unsigned | YES | | 0 | | +| 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 | User id | mediumint unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_config.md b/doc/database/db_config.md index e2fb6149f..0eba8f11a 100644 --- a/doc/database/db_config.md +++ b/doc/database/db_config.md @@ -4,9 +4,9 @@ main configuration storage | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | int unsigned | YES | PRI | NULL | auto_increment | -| cat | | varbinary(50) | YES | | | | -| k | | varbinary(50) | YES | | | | -| v | | mediumtext | NO | | NULL | | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| cat | | varbinary(50) | NO | | | | +| k | | varbinary(50) | NO | | | | +| v | | mediumtext | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_contact-relation.md b/doc/database/db_contact-relation.md index 5077cd753..4fe92a775 100644 --- a/doc/database/db_contact-relation.md +++ b/doc/database/db_contact-relation.md @@ -4,10 +4,10 @@ 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 | | +| cid | contact the related contact had interacted with | int unsigned | NO | PRI | 0 | | +| relation-cid | related contact who had interacted with the contact | int unsigned | NO | PRI | 0 | | +| last-interaction | Date of the last interaction | datetime | NO | | 0001-01-01 00:00:00 | | +| follow-updated | Date of the last update of the contact relationship | datetime | NO | | 0001-01-01 00:00:00 | | +| follows | | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_contact.md b/doc/database/db_contact.md index e362e3345..35b94cdd7 100644 --- a/doc/database/db_contact.md +++ b/doc/database/db_contact.md @@ -4,85 +4,85 @@ contact table | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | 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 | | NULL | | -| keywords | public keywords (interests) of the contact | text | NO | | NULL | | -| 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 | | NULL | | -| 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 | | NULL | | -| prvkey | RSA private key 4096 bit | text | NO | | NULL | | -| batch | | varchar(255) | YES | | | | -| request | | varchar(255) | NO | | NULL | | -| notify | | varchar(255) | NO | | NULL | | -| poll | | varchar(255) | NO | | NULL | | -| confirm | | varchar(255) | NO | | NULL | | -| subscribe | | varchar(255) | NO | | NULL | | -| poco | | varchar(255) | NO | | NULL | | -| 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 | | NULL | | -| 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 | | NULL | | -| 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 | | NULL | | -| 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 | | NULL | | -| reason | | text | NO | | NULL | | -| closeness | | tinyint unsigned | YES | | 99 | | -| info | | mediumtext | NO | | NULL | | -| profile-id | Deprecated | int unsigned | NO | | NULL | | -| 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 | | NULL | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | +| updated | Date of last contact update | datetime | YES | | 0001-01-01 00:00:00 | | +| self | 1 if the contact is the user him/her self | boolean | NO | | 0 | | +| remote_self | | boolean | NO | | 0 | | +| rel | The kind of the relation between the user and the contact | tinyint unsigned | NO | | 0 | | +| duplex | | boolean | NO | | 0 | | +| network | Network of the contact | char(4) | NO | | | | +| protocol | Protocol of the contact | char(4) | 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) | YES | | | | +| about | | text | YES | | NULL | | +| keywords | public keywords (interests) of the contact | text | YES | | NULL | | +| gender | Deprecated | varchar(32) | NO | | | | +| xmpp | | varchar(255) | NO | | | | +| attag | | varchar(255) | NO | | | | +| avatar | | varchar(255) | NO | | | | +| photo | Link to the profile photo of the contact | varchar(255) | YES | | | | +| thumb | Link to the profile photo (thumb size) | varchar(255) | YES | | | | +| micro | Link to the profile photo (micro size) | varchar(255) | YES | | | | +| site-pubkey | | text | YES | | 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 | YES | | NULL | | +| prvkey | RSA private key 4096 bit | text | YES | | NULL | | +| batch | | varchar(255) | NO | | | | +| request | | varchar(255) | YES | | NULL | | +| notify | | varchar(255) | YES | | NULL | | +| poll | | varchar(255) | YES | | NULL | | +| confirm | | varchar(255) | YES | | NULL | | +| subscribe | | varchar(255) | YES | | NULL | | +| poco | | varchar(255) | YES | | NULL | | +| aes_allow | | boolean | NO | | 0 | | +| ret-aes | | boolean | NO | | 0 | | +| usehub | | boolean | NO | | 0 | | +| subhub | | boolean | 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 | | +| failed | Connection failed | boolean | YES | | NULL | | +| 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 | | +| last-discovery | date of the last follower discovery | datetime | NO | | 0001-01-01 00:00:00 | | +| priority | | tinyint unsigned | NO | | 0 | | +| blocked | Node-wide block status | boolean | NO | | 1 | | +| block_reason | Node-wide block reason | text | YES | | NULL | | +| readonly | posts of the contact are readonly | boolean | NO | | 0 | | +| writable | | boolean | NO | | 0 | | +| forum | contact is a forum | boolean | NO | | 0 | | +| prv | contact is a private group | boolean | NO | | 0 | | +| contact-type | | tinyint | NO | | 0 | | +| manually-approve | | boolean | YES | | NULL | | +| hidden | | boolean | NO | | 0 | | +| archive | | boolean | NO | | 0 | | +| pending | | boolean | NO | | 1 | | +| deleted | Contact has been deleted | boolean | NO | | 0 | | +| rating | | tinyint | NO | | 0 | | +| unsearchable | Contact prefers to not be searchable | boolean | NO | | 0 | | +| sensitive | Contact posts sensitive content | boolean | NO | | 0 | | +| baseurl | baseurl of the contact | varchar(255) | YES | | | | +| gsid | Global Server ID | int unsigned | YES | | NULL | | +| reason | | text | YES | | NULL | | +| closeness | | tinyint unsigned | NO | | 99 | | +| info | | mediumtext | YES | | NULL | | +| profile-id | Deprecated | int unsigned | YES | | NULL | | +| bdyear | | varchar(4) | NO | | | | +| bd | | date | NO | | 0001-01-01 | | +| notify_new_posts | | boolean | NO | | 0 | | +| fetch_further_information | | tinyint unsigned | NO | | 0 | | +| ffi_keyword_denylist | | text | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_conv.md b/doc/database/db_conv.md index d3e40ebbe..e07ee4484 100644 --- a/doc/database/db_conv.md +++ b/doc/database/db_conv.md @@ -4,13 +4,13 @@ private messages | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | -| guid | A unique identifier for this conversation | varchar(255) | YES | | | | -| recips | sender_handle;recipient_handle | text | NO | | NULL | | -| 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 | | NULL | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| guid | A unique identifier for this conversation | varchar(255) | NO | | | | +| recips | sender_handle;recipient_handle | text | YES | | NULL | | +| uid | Owner User id | mediumint unsigned | NO | | 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 | text | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_conversation.md b/doc/database/db_conversation.md index 6c1d5d8ce..bcc531a49 100644 --- a/doc/database/db_conversation.md +++ b/doc/database/db_conversation.md @@ -4,13 +4,13 @@ Raw data and structure information for messages | 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 | NULL | | -| 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 | | NULL | | -| received | Receiving date | datetime | YES | | 0001-01-01 00:00:00 | | +| item-uri | Original URI of the item - unrelated to the table with the same name | 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 unsigned | NO | | 255 | | +| direction | How the message arrived here: 1=push, 2=pull | tinyint unsigned | NO | | 0 | | +| source | Original source | mediumtext | YES | | NULL | | +| received | Receiving date | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_delayed-post.md b/doc/database/db_delayed-post.md index 732131a60..40e644ec4 100644 --- a/doc/database/db_delayed-post.md +++ b/doc/database/db_delayed-post.md @@ -4,9 +4,9 @@ Posts that are about to be distributed at a later time | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | int unsigned | YES | PRI | NULL | auto_increment | -| uri | URI of the post that will be distributed later | varchar(255) | NO | | NULL | | -| uid | Owner User id | mediumint unsigned | NO | | NULL | | -| delayed | delay time | datetime | NO | | NULL | | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| uri | URI of the post that will be distributed later | varchar(255) | YES | | NULL | | +| uid | Owner User id | mediumint unsigned | YES | | NULL | | +| delayed | delay time | datetime | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_diaspora-interaction.md b/doc/database/db_diaspora-interaction.md index f8435b71d..8a971cd3d 100644 --- a/doc/database/db_diaspora-interaction.md +++ b/doc/database/db_diaspora-interaction.md @@ -4,7 +4,7 @@ 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 | NULL | | -| interaction | The Diaspora interaction | mediumtext | NO | | NULL | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| interaction | The Diaspora interaction | mediumtext | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_event.md b/doc/database/db_event.md index d7ef08fcd..e8c55a5b3 100644 --- a/doc/database/db_event.md +++ b/doc/database/db_event.md @@ -4,25 +4,25 @@ Events | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | 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 | | NULL | | -| desc | event description | text | NO | | NULL | | -| location | event location | text | NO | | NULL | | -| 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 '<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 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| guid | | varchar(255) | NO | | | | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| cid | contact_id (ID of the contact in contact table) | int unsigned | 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 | YES | | NULL | | +| desc | event description | text | YES | | NULL | | +| location | event location | text | YES | | NULL | | +| type | event or birthday | varchar(20) | NO | | | | +| nofinish | if event does have no end this is 1 | boolean | NO | | 0 | | +| adjust | adjust to timezone of the recipient (0 or 1) | boolean | NO | | 1 | | +| ignore | 0 or 1 | boolean | NO | | 0 | | +| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | +| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | +| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | +| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_fcontact.md b/doc/database/db_fcontact.md index c38df0a04..d78d55fe4 100644 --- a/doc/database/db_fcontact.md +++ b/doc/database/db_fcontact.md @@ -4,22 +4,22 @@ Diaspora compatible contacts - used in the Diaspora implementation | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | 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 | | NULL | | -| updated | | datetime | YES | | 0001-01-01 00:00:00 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| guid | unique id | varchar(255) | 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 | | | | +| batch | | varchar(255) | NO | | | | +| notify | | varchar(255) | NO | | | | +| poll | | varchar(255) | NO | | | | +| confirm | | varchar(255) | NO | | | | +| priority | | tinyint unsigned | NO | | 0 | | +| network | | char(4) | NO | | | | +| alias | | varchar(255) | NO | | | | +| pubkey | | text | YES | | NULL | | +| updated | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_fsuggest.md b/doc/database/db_fsuggest.md index 8b37f268e..11325b647 100644 --- a/doc/database/db_fsuggest.md +++ b/doc/database/db_fsuggest.md @@ -4,14 +4,14 @@ friend suggestion stuff | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | int unsigned | YES | PRI | NULL | 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 | | NULL | | -| created | | datetime | YES | | 0001-01-01 00:00:00 | | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| cid | | int unsigned | NO | | 0 | | +| name | | varchar(255) | NO | | | | +| url | | varchar(255) | NO | | | | +| request | | varchar(255) | NO | | | | +| photo | | varchar(255) | NO | | | | +| note | | text | YES | | NULL | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_group.md b/doc/database/db_group.md index d9eb2a4dd..1f4d0e588 100644 --- a/doc/database/db_group.md +++ b/doc/database/db_group.md @@ -4,10 +4,10 @@ privacy groups, group info | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | 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 | | | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| visible | 1 indicates the member list is not private | boolean | NO | | 0 | | +| deleted | 1 indicates the group has been deleted | boolean | NO | | 0 | | +| name | human readable name of group | varchar(255) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_group_member.md b/doc/database/db_group_member.md index db53bb567..fa1c64d2e 100644 --- a/doc/database/db_group_member.md +++ b/doc/database/db_group_member.md @@ -4,8 +4,8 @@ privacy groups, member info | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | 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 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| gid | groups.id of the associated group | int unsigned | NO | | 0 | | +| contact-id | contact.id of the member assigned to the associated group | int unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_gserver-tag.md b/doc/database/db_gserver-tag.md index 96a5f02f4..985845c43 100644 --- a/doc/database/db_gserver-tag.md +++ b/doc/database/db_gserver-tag.md @@ -4,7 +4,7 @@ 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 | | | +| gserver-id | The id of the gserver | int unsigned | NO | PRI | 0 | | +| tag | Tag that the server has subscribed | varchar(100) | NO | PRI | | | Return to [database documentation](help/database) diff --git a/doc/database/db_gserver.md b/doc/database/db_gserver.md index 6efc2a9f9..bfbf4ec85 100644 --- a/doc/database/db_gserver.md +++ b/doc/database/db_gserver.md @@ -4,28 +4,28 @@ Global servers | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | -| url | | varchar(255) | YES | | | | -| nurl | | varchar(255) | YES | | | | -| version | | varchar(255) | YES | | | | -| site_name | | varchar(255) | YES | | | | -| info | | text | NO | | NULL | | -| 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 | | NULL | | -| 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 | | NULL | | -| 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 | | NULL | | -| next_contact | Next connection request | datetime | NO | | 0001-01-01 00:00:00 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| url | | varchar(255) | NO | | | | +| nurl | | varchar(255) | NO | | | | +| version | | varchar(255) | NO | | | | +| site_name | | varchar(255) | NO | | | | +| info | | text | YES | | NULL | | +| register_policy | | tinyint | NO | | 0 | | +| registered-users | Number of registered users | int unsigned | NO | | 0 | | +| directory-type | Type of directory service (Poco, Mastodon) | tinyint | YES | | 0 | | +| poco | | varchar(255) | NO | | | | +| noscrape | | varchar(255) | NO | | | | +| network | | char(4) | NO | | | | +| protocol | The protocol of the server | tinyint unsigned | YES | | NULL | | +| platform | | varchar(255) | NO | | | | +| relay-subscribe | Has the server subscribed to the relay system | boolean | NO | | 0 | | +| relay-scope | The scope of messages that the server wants to get | varchar(10) | NO | | | | +| detection-method | Method that had been used to detect that server | tinyint unsigned | YES | | NULL | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | +| last_poco_query | | datetime | YES | | 0001-01-01 00:00:00 | | +| last_contact | Last successful connection request | datetime | YES | | 0001-01-01 00:00:00 | | +| last_failure | Last failed connection request | datetime | YES | | 0001-01-01 00:00:00 | | +| failed | Connection failed | boolean | YES | | NULL | | +| next_contact | Next connection request | datetime | YES | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_hook.md b/doc/database/db_hook.md index 44fcf5668..dbf4f7901 100644 --- a/doc/database/db_hook.md +++ b/doc/database/db_hook.md @@ -4,10 +4,10 @@ addon hook registry | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | 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 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| hook | name of hook | varbinary(100) | NO | | | | +| file | relative filename of hook handler | varbinary(200) | NO | | | | +| function | function name of hook handler | varbinary(200) | NO | | | | +| priority | not yet implemented - can be used to sort conflicts in hook handling by calling handlers in priority order | smallint unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_host.md b/doc/database/db_host.md index befb04d60..586f2b450 100644 --- a/doc/database/db_host.md +++ b/doc/database/db_host.md @@ -4,7 +4,7 @@ Hostname | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | tinyint unsigned | YES | PRI | NULL | auto_increment | -| name | The hostname | varchar(128) | YES | | | | +| id | sequential ID | tinyint unsigned | NO | PRI | NULL | auto_increment | +| name | The hostname | varchar(128) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_inbox-status.md b/doc/database/db_inbox-status.md index 81dbb8493..19b3c43e5 100644 --- a/doc/database/db_inbox-status.md +++ b/doc/database/db_inbox-status.md @@ -4,12 +4,12 @@ Status of ActivityPub inboxes | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| url | URL of the inbox | varbinary(255) | YES | PRI | NULL | | -| 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 | | +| url | URL of the inbox | varbinary(255) | NO | PRI | NULL | | +| created | Creation date of this entry | datetime | NO | | 0001-01-01 00:00:00 | | +| success | Date of the last successful delivery | datetime | NO | | 0001-01-01 00:00:00 | | +| failure | Date of the last failed delivery | datetime | NO | | 0001-01-01 00:00:00 | | +| previous | Previous delivery date | datetime | NO | | 0001-01-01 00:00:00 | | +| archive | Is the inbox archived? | boolean | NO | | 0 | | +| shared | Is it a shared inbox? | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_intro.md b/doc/database/db_intro.md index 34444303d..7aa162bdd 100644 --- a/doc/database/db_intro.md +++ b/doc/database/db_intro.md @@ -4,16 +4,16 @@ Table intro | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | YES | | 0 | | -| fid | | int unsigned | NO | | NULL | | -| contact-id | | int unsigned | YES | | 0 | | -| knowyou | | boolean | YES | | 0 | | -| duplex | | boolean | YES | | 0 | | -| note | | text | NO | | NULL | | -| hash | | varchar(255) | YES | | | | -| datetime | | datetime | YES | | 0001-01-01 00:00:00 | | -| blocked | | boolean | YES | | 1 | | -| ignore | | boolean | YES | | 0 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| fid | | int unsigned | YES | | NULL | | +| contact-id | | int unsigned | NO | | 0 | | +| knowyou | | boolean | NO | | 0 | | +| duplex | | boolean | NO | | 0 | | +| note | | text | YES | | NULL | | +| hash | | varchar(255) | NO | | | | +| datetime | | datetime | NO | | 0001-01-01 00:00:00 | | +| blocked | | boolean | NO | | 1 | | +| ignore | | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_item-uri.md b/doc/database/db_item-uri.md index 1fb4f9b95..85c7a40b3 100644 --- a/doc/database/db_item-uri.md +++ b/doc/database/db_item-uri.md @@ -4,8 +4,8 @@ URI and GUID for items | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | int unsigned | YES | PRI | NULL | auto_increment | -| uri | URI of an item | varbinary(255) | YES | | NULL | | -| guid | A unique identifier for an item | varbinary(255) | NO | | NULL | | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| uri | URI of an item | varbinary(255) | NO | | NULL | | +| guid | A unique identifier for an item | varbinary(255) | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_locks.md b/doc/database/db_locks.md index 774e9ed9b..cf56a0071 100644 --- a/doc/database/db_locks.md +++ b/doc/database/db_locks.md @@ -4,10 +4,10 @@ Table locks | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | 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 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| name | | varchar(128) | NO | | | | +| locked | | boolean | NO | | 0 | | +| pid | Process ID | int unsigned | NO | | 0 | | +| expires | datetime of cache expiration | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_mail.md b/doc/database/db_mail.md index 75ecf6a9f..2f96d639d 100644 --- a/doc/database/db_mail.md +++ b/doc/database/db_mail.md @@ -4,27 +4,27 @@ private messages | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | 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 | | NULL | | -| author-id | Link to the contact table with uid=0 of the author of the mail | int unsigned | NO | | NULL | | -| convid | conv.id | int unsigned | NO | | NULL | | -| title | | varchar(255) | YES | | | | -| body | | mediumtext | NO | | NULL | | -| 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 | | NULL | | -| parent-uri | | varchar(255) | YES | | | | -| parent-uri-id | Item-uri id of the parent of the related mail | int unsigned | NO | | NULL | | -| thr-parent | | varchar(255) | NO | | NULL | | -| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | NO | | NULL | | -| created | creation time of the private message | datetime | YES | | 0001-01-01 00:00:00 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| guid | A unique identifier for this private message | varchar(255) | NO | | | | +| 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) | YES | | NULL | | +| author-id | Link to the contact table with uid=0 of the author of the mail | int unsigned | YES | | NULL | | +| convid | conv.id | int unsigned | YES | | NULL | | +| title | | varchar(255) | NO | | | | +| body | | mediumtext | YES | | NULL | | +| seen | if message visited it is 1 | boolean | NO | | 0 | | +| reply | | boolean | NO | | 0 | | +| replied | | boolean | NO | | 0 | | +| unknown | if sender not in the contact table this is 1 | boolean | NO | | 0 | | +| uri | | varchar(255) | NO | | | | +| uri-id | Item-uri id of the related mail | int unsigned | YES | | NULL | | +| parent-uri | | varchar(255) | NO | | | | +| parent-uri-id | Item-uri id of the parent of the related mail | int unsigned | YES | | NULL | | +| thr-parent | | varchar(255) | YES | | NULL | | +| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | YES | | NULL | | +| created | creation time of the private message | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_mailacct.md b/doc/database/db_mailacct.md index 898116fd0..ec2f5cb54 100644 --- a/doc/database/db_mailacct.md +++ b/doc/database/db_mailacct.md @@ -4,18 +4,18 @@ Mail account data for fetching mails | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | 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 | | NULL | | -| 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 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| server | | varchar(255) | NO | | | | +| port | | smallint unsigned | NO | | 0 | | +| ssltype | | varchar(16) | NO | | | | +| mailbox | | varchar(255) | NO | | | | +| user | | varchar(255) | NO | | | | +| pass | | text | YES | | NULL | | +| reply_to | | varchar(255) | NO | | | | +| action | | tinyint unsigned | NO | | 0 | | +| movetofolder | | varchar(255) | NO | | | | +| pubmail | | boolean | NO | | 0 | | +| last_check | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_manage.md b/doc/database/db_manage.md index 53d44a4d4..645bba492 100644 --- a/doc/database/db_manage.md +++ b/doc/database/db_manage.md @@ -4,8 +4,8 @@ table of accounts that can manage each other | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | YES | | 0 | | -| mid | User id | mediumint unsigned | YES | | 0 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| mid | User id | mediumint unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_notification.md b/doc/database/db_notification.md index 51240b493..6a6f0c81d 100644 --- a/doc/database/db_notification.md +++ b/doc/database/db_notification.md @@ -4,14 +4,14 @@ notifications | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | -| uid | Owner User id | mediumint unsigned | NO | | NULL | | -| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | NO | | NULL | | -| type | | tinyint unsigned | NO | | NULL | | -| actor-id | Link to the contact table with uid=0 of the actor that caused the notification | int unsigned | NO | | NULL | | -| target-uri-id | Item-uri id of the related post | int unsigned | NO | | NULL | | -| parent-uri-id | Item-uri id of the parent of the related post | int unsigned | NO | | NULL | | -| created | | datetime | NO | | NULL | | -| seen | | boolean | NO | | 0 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | YES | | NULL | | +| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | YES | | NULL | | +| type | | tinyint unsigned | YES | | NULL | | +| actor-id | Link to the contact table with uid=0 of the actor that caused the notification | int unsigned | YES | | NULL | | +| target-uri-id | Item-uri id of the related post | int unsigned | YES | | NULL | | +| parent-uri-id | Item-uri id of the parent of the related post | int unsigned | YES | | NULL | | +| created | | datetime | YES | | NULL | | +| seen | | boolean | YES | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_notify-threads.md b/doc/database/db_notify-threads.md index 18c443444..11d98b4c0 100644 --- a/doc/database/db_notify-threads.md +++ b/doc/database/db_notify-threads.md @@ -4,11 +4,11 @@ Table notify-threads | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | -| notify-id | | int unsigned | YES | | 0 | | -| master-parent-item | Deprecated | int unsigned | NO | | NULL | | -| master-parent-uri-id | Item-uri id of the parent of the related post | int unsigned | NO | | NULL | | -| parent-item | | int unsigned | YES | | 0 | | -| receiver-uid | User id | mediumint unsigned | YES | | 0 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| notify-id | | int unsigned | NO | | 0 | | +| master-parent-item | Deprecated | int unsigned | YES | | NULL | | +| master-parent-uri-id | Item-uri id of the parent of the related post | int unsigned | YES | | NULL | | +| parent-item | | int unsigned | NO | | 0 | | +| receiver-uid | User id | mediumint unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_notify.md b/doc/database/db_notify.md index 58d4d923d..07263ab4d 100644 --- a/doc/database/db_notify.md +++ b/doc/database/db_notify.md @@ -4,23 +4,23 @@ notifications | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | 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 | | NULL | | -| uid | Owner User id | mediumint unsigned | YES | | 0 | | -| link | | varchar(255) | YES | | | | -| iid | | int unsigned | NO | | NULL | | -| parent | | int unsigned | NO | | NULL | | -| uri-id | Item-uri id of the related post | int unsigned | NO | | NULL | | -| parent-uri-id | Item-uri id of the parent of the related post | int unsigned | NO | | NULL | | -| seen | | boolean | YES | | 0 | | -| verb | | varchar(100) | YES | | | | -| otype | | varchar(10) | YES | | | | -| name_cache | Cached bbcode parsing of name | tinytext | NO | | NULL | | -| msg_cache | Cached bbcode parsing of msg | mediumtext | NO | | NULL | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| type | | smallint unsigned | 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 | Owner User id | mediumint unsigned | NO | | 0 | | +| link | | varchar(255) | NO | | | | +| iid | | int unsigned | YES | | NULL | | +| parent | | int unsigned | YES | | NULL | | +| uri-id | Item-uri id of the related post | int unsigned | YES | | NULL | | +| parent-uri-id | Item-uri id of the parent of the related post | int unsigned | YES | | NULL | | +| seen | | boolean | NO | | 0 | | +| verb | | varchar(100) | NO | | | | +| otype | | varchar(10) | NO | | | | +| name_cache | Cached bbcode parsing of name | tinytext | YES | | NULL | | +| msg_cache | Cached bbcode parsing of msg | mediumtext | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_oembed.md b/doc/database/db_oembed.md index e74bfb710..09b9fbbf4 100644 --- a/doc/database/db_oembed.md +++ b/doc/database/db_oembed.md @@ -4,9 +4,9 @@ cache for OEmbed queries | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| url | page url | varbinary(255) | YES | PRI | NULL | | -| maxwidth | Maximum width passed to Oembed | mediumint unsigned | YES | PRI | NULL | | -| content | OEmbed data of the page | mediumtext | NO | | NULL | | -| created | datetime of creation | datetime | YES | | 0001-01-01 00:00:00 | | +| url | page url | varbinary(255) | NO | PRI | NULL | | +| maxwidth | Maximum width passed to Oembed | mediumint unsigned | NO | PRI | NULL | | +| content | OEmbed data of the page | mediumtext | YES | | NULL | | +| created | datetime of creation | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_openwebauth-token.md b/doc/database/db_openwebauth-token.md index 3b2cab372..71a04b0d1 100644 --- a/doc/database/db_openwebauth-token.md +++ b/doc/database/db_openwebauth-token.md @@ -4,11 +4,11 @@ Store OpenWebAuth token to verify contacts | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | 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 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id - currently unused | mediumint unsigned | NO | | 0 | | +| type | Verify type | varchar(32) | NO | | | | +| token | A generated token | varchar(255) | NO | | | | +| meta | | varchar(255) | NO | | | | +| created | datetime of creation | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_parsed_url.md b/doc/database/db_parsed_url.md index bf4b7117f..8f8bd7bdd 100644 --- a/doc/database/db_parsed_url.md +++ b/doc/database/db_parsed_url.md @@ -4,12 +4,12 @@ cache for 'parse_url' queries | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| url_hash | page url hash | binary(64) | YES | PRI | NULL | | -| guessing | is the 'guessing' mode active? | boolean | YES | PRI | 0 | | -| oembed | is the data the result of oembed? | boolean | YES | PRI | 0 | | -| url | page url | text | YES | | NULL | | -| content | page data | mediumtext | NO | | NULL | | -| created | datetime of creation | datetime | YES | | 0001-01-01 00:00:00 | | -| expires | datetime of expiration | datetime | YES | | 0001-01-01 00:00:00 | | +| url_hash | page url hash | binary(64) | NO | PRI | NULL | | +| guessing | is the 'guessing' mode active? | boolean | NO | PRI | 0 | | +| oembed | is the data the result of oembed? | boolean | NO | PRI | 0 | | +| url | page url | text | NO | | NULL | | +| content | page data | mediumtext | YES | | NULL | | +| created | datetime of creation | datetime | NO | | 0001-01-01 00:00:00 | | +| expires | datetime of expiration | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_pconfig.md b/doc/database/db_pconfig.md index 7c71d5305..c92709378 100644 --- a/doc/database/db_pconfig.md +++ b/doc/database/db_pconfig.md @@ -4,10 +4,10 @@ personal (per user) configuration storage | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | Primary key | int unsigned | YES | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | YES | | 0 | | -| cat | Category | varchar(50) | YES | | | | -| k | Key | varchar(100) | YES | | | | -| v | Value | mediumtext | NO | | NULL | | +| id | Primary key | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| cat | Category | varchar(50) | NO | | | | +| k | Key | varchar(100) | NO | | | | +| v | Value | mediumtext | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_permissionset.md b/doc/database/db_permissionset.md index 3086d8a94..3bcbef86e 100644 --- a/doc/database/db_permissionset.md +++ b/doc/database/db_permissionset.md @@ -4,11 +4,11 @@ Table permissionset | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | -| uid | Owner id of this permission set | mediumint unsigned | YES | | 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 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner id of this permission set | mediumint unsigned | NO | | 0 | | +| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | +| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | +| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | +| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_photo.md b/doc/database/db_photo.md index 3834e72a4..80b74b6d2 100644 --- a/doc/database/db_photo.md +++ b/doc/database/db_photo.md @@ -4,32 +4,32 @@ photo storage | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | -| uid | Owner User id | mediumint unsigned | YES | | 0 | | -| contact-id | contact.id | int unsigned | YES | | 0 | | -| guid | A unique identifier for this photo | char(16) | YES | | | | -| resource-id | | char(32) | YES | | | | -| hash | hash value of the photo | char(32) | NO | | NULL | | -| created | creation date | datetime | YES | | 0001-01-01 00:00:00 | | -| edited | last edited date | datetime | YES | | 0001-01-01 00:00:00 | | -| title | | varchar(255) | YES | | | | -| desc | | text | NO | | NULL | | -| album | The name of the album to which the photo belongs | varchar(255) | YES | | | | -| filename | | varchar(255) | YES | | | | -| type | | varchar(30) | YES | | image/jpeg | | -| height | | smallint unsigned | YES | | 0 | | -| width | | smallint unsigned | YES | | 0 | | -| datasize | | int unsigned | YES | | 0 | | -| data | | mediumblob | YES | | NULL | | -| scale | | tinyint unsigned | YES | | 0 | | -| profile | | boolean | YES | | 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 | | -| accessible | Make photo publicly accessible, ignoring permissions | boolean | YES | | 0 | | -| backend-class | Storage backend class | tinytext | NO | | NULL | | -| backend-ref | Storage backend data reference | text | NO | | NULL | | -| updated | | datetime | YES | | 0001-01-01 00:00:00 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| contact-id | contact.id | int unsigned | NO | | 0 | | +| guid | A unique identifier for this photo | char(16) | NO | | | | +| resource-id | | char(32) | NO | | | | +| hash | hash value of the photo | char(32) | YES | | NULL | | +| 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 | YES | | NULL | | +| album | The name of the album to which the photo belongs | varchar(255) | NO | | | | +| filename | | varchar(255) | NO | | | | +| type | | varchar(30) | NO | | image/jpeg | | +| height | | smallint unsigned | NO | | 0 | | +| width | | smallint unsigned | NO | | 0 | | +| datasize | | int unsigned | NO | | 0 | | +| data | | mediumblob | NO | | NULL | | +| scale | | tinyint unsigned | NO | | 0 | | +| profile | | boolean | NO | | 0 | | +| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | +| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | +| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | +| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | +| accessible | Make photo publicly accessible, ignoring permissions | boolean | NO | | 0 | | +| backend-class | Storage backend class | tinytext | YES | | NULL | | +| backend-ref | Storage backend data reference | text | YES | | NULL | | +| updated | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-category.md b/doc/database/db_post-category.md index 9be89de45..ecb0793c5 100644 --- a/doc/database/db_post-category.md +++ b/doc/database/db_post-category.md @@ -4,9 +4,9 @@ post relation to categories | 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 | NULL | | -| uid | User id | mediumint unsigned | YES | PRI | 0 | | -| type | | tinyint unsigned | YES | PRI | 0 | | -| tid | | int unsigned | YES | PRI | 0 | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| uid | User id | mediumint unsigned | NO | PRI | 0 | | +| type | | tinyint unsigned | NO | PRI | 0 | | +| tid | | int unsigned | NO | PRI | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-content.md b/doc/database/db_post-content.md index c75c41722..69aa06c4b 100644 --- a/doc/database/db_post-content.md +++ b/doc/database/db_post-content.md @@ -4,22 +4,22 @@ Content for all posts | 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 | NULL | | -| title | item title | varchar(255) | YES | | | | -| content-warning | | varchar(255) | YES | | | | -| body | item body content | mediumtext | NO | | NULL | | -| raw-body | Body without embedded media links | mediumtext | NO | | NULL | | -| location | text location where this item originated | varchar(255) | YES | | | | -| coord | longitude/latitude pair representing location where this item originated | varchar(255) | YES | | | | -| language | Language information about this post | text | NO | | NULL | | -| app | application which generated this item | varchar(255) | YES | | | | -| rendered-hash | | varchar(32) | YES | | | | -| rendered-html | item.body converted to html | mediumtext | NO | | NULL | | -| object-type | ActivityStreams object type | varchar(100) | YES | | | | -| 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(100) | YES | | | | -| target | JSON encoded target structure if used | text | NO | | NULL | | -| 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(32) | YES | | | | -| plink | permalink or URL to a displayable copy of the message at its source | varchar(255) | YES | | | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| title | item title | varchar(255) | NO | | | | +| content-warning | | varchar(255) | NO | | | | +| body | item body content | mediumtext | YES | | NULL | | +| raw-body | Body without embedded media links | mediumtext | YES | | NULL | | +| location | text location where this item originated | varchar(255) | NO | | | | +| coord | longitude/latitude pair representing location where this item originated | varchar(255) | NO | | | | +| language | Language information about this post | text | YES | | NULL | | +| app | application which generated this item | varchar(255) | NO | | | | +| rendered-hash | | varchar(32) | NO | | | | +| rendered-html | item.body converted to html | mediumtext | YES | | NULL | | +| object-type | ActivityStreams object type | varchar(100) | NO | | | | +| object | JSON encoded object structure unless it is an implied object (normal post) | text | YES | | NULL | | +| target-type | ActivityStreams target type if applicable (URI) | varchar(100) | NO | | | | +| target | JSON encoded target structure if used | text | YES | | NULL | | +| 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(32) | NO | | | | +| plink | permalink or URL to a displayable copy of the message at its source | varchar(255) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-delivery-data.md b/doc/database/db_post-delivery-data.md index bf3289e26..8a333dada 100644 --- a/doc/database/db_post-delivery-data.md +++ b/doc/database/db_post-delivery-data.md @@ -4,16 +4,16 @@ Delivery data for items | 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 | 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 | | -| inform | Additional receivers of the linked item | mediumtext | NO | | NULL | | -| queue_count | Initial number of delivery recipients, used as item.delivery_queue_count | mediumint | YES | | 0 | | -| queue_done | Number of successful deliveries, used as item.delivery_queue_done | mediumint | YES | | 0 | | -| queue_failed | Number of unsuccessful deliveries, used as item.delivery_queue_failed | mediumint | YES | | 0 | | -| activitypub | Number of successful deliveries via ActivityPub | mediumint | YES | | 0 | | -| dfrn | Number of successful deliveries via DFRN | mediumint | YES | | 0 | | -| legacy_dfrn | Number of successful deliveries via legacy DFRN | mediumint | YES | | 0 | | -| diaspora | Number of successful deliveries via Diaspora | mediumint | YES | | 0 | | -| ostatus | Number of successful deliveries via OStatus | mediumint | YES | | 0 | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | 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 | YES | | NULL | | +| inform | Additional receivers of the linked item | mediumtext | YES | | NULL | | +| queue_count | Initial number of delivery recipients, used as item.delivery_queue_count | mediumint | NO | | 0 | | +| queue_done | Number of successful deliveries, used as item.delivery_queue_done | mediumint | NO | | 0 | | +| queue_failed | Number of unsuccessful deliveries, used as item.delivery_queue_failed | mediumint | NO | | 0 | | +| activitypub | Number of successful deliveries via ActivityPub | mediumint | NO | | 0 | | +| dfrn | Number of successful deliveries via DFRN | mediumint | NO | | 0 | | +| legacy_dfrn | Number of successful deliveries via legacy DFRN | mediumint | NO | | 0 | | +| diaspora | Number of successful deliveries via Diaspora | mediumint | NO | | 0 | | +| ostatus | Number of successful deliveries via OStatus | mediumint | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-media.md b/doc/database/db_post-media.md index 58f1ed703..bf5f1dfe5 100644 --- a/doc/database/db_post-media.md +++ b/doc/database/db_post-media.md @@ -4,24 +4,24 @@ Attached media | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | | NULL | | -| url | Media URL | varbinary(511) | YES | | NULL | | -| type | Media type | tinyint unsigned | YES | | 0 | | -| mimetype | | varchar(60) | NO | | NULL | | -| height | Height of the media | smallint unsigned | NO | | NULL | | -| width | Width of the media | smallint unsigned | NO | | NULL | | -| size | Media size | int unsigned | NO | | NULL | | -| preview | Preview URL | varbinary(255) | NO | | NULL | | -| preview-height | Height of the preview picture | smallint unsigned | NO | | NULL | | -| preview-width | Width of the preview picture | smallint unsigned | NO | | NULL | | -| description | | text | NO | | NULL | | -| name | Name of the media | varchar(255) | NO | | NULL | | -| author-url | URL of the author of the media | varbinary(255) | NO | | NULL | | -| author-name | Name of the author of the media | varchar(255) | NO | | NULL | | -| author-image | Image of the author of the media | varbinary(255) | NO | | NULL | | -| publisher-url | URL of the publisher of the media | varbinary(255) | NO | | NULL | | -| publisher-name | Name of the publisher of the media | varchar(255) | NO | | NULL | | -| publisher-image | Image of the publisher of the media | varbinary(255) | NO | | NULL | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | | NULL | | +| url | Media URL | varbinary(511) | NO | | NULL | | +| type | Media type | tinyint unsigned | NO | | 0 | | +| mimetype | | varchar(60) | YES | | NULL | | +| height | Height of the media | smallint unsigned | YES | | NULL | | +| width | Width of the media | smallint unsigned | YES | | NULL | | +| size | Media size | int unsigned | YES | | NULL | | +| preview | Preview URL | varbinary(255) | YES | | NULL | | +| preview-height | Height of the preview picture | smallint unsigned | YES | | NULL | | +| preview-width | Width of the preview picture | smallint unsigned | YES | | NULL | | +| description | | text | YES | | NULL | | +| name | Name of the media | varchar(255) | YES | | NULL | | +| author-url | URL of the author of the media | varbinary(255) | YES | | NULL | | +| author-name | Name of the author of the media | varchar(255) | YES | | NULL | | +| author-image | Image of the author of the media | varbinary(255) | YES | | NULL | | +| publisher-url | URL of the publisher of the media | varbinary(255) | YES | | NULL | | +| publisher-name | Name of the publisher of the media | varchar(255) | YES | | NULL | | +| publisher-image | Image of the publisher of the media | varbinary(255) | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-tag.md b/doc/database/db_post-tag.md index 9c33ec2ae..5223ef9f4 100644 --- a/doc/database/db_post-tag.md +++ b/doc/database/db_post-tag.md @@ -4,9 +4,9 @@ post relation to tags | 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 | NULL | | -| type | | tinyint unsigned | YES | PRI | 0 | | -| tid | | int unsigned | YES | PRI | 0 | | -| cid | Contact id of the mentioned public contact | int unsigned | YES | PRI | 0 | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| type | | tinyint unsigned | NO | PRI | 0 | | +| tid | | int unsigned | NO | PRI | 0 | | +| cid | Contact id of the mentioned public contact | int unsigned | NO | PRI | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-thread-user.md b/doc/database/db_post-thread-user.md index 9a3a996fc..02b7b22d5 100644 --- a/doc/database/db_post-thread-user.md +++ b/doc/database/db_post-thread-user.md @@ -4,28 +4,28 @@ Thread related data per user | 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 | NULL | | -| owner-id | Item owner | int unsigned | YES | | 0 | | -| author-id | Item author | int unsigned | YES | | 0 | | -| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | NO | | NULL | | -| network | | char(4) | YES | | | | -| created | | datetime | YES | | 0001-01-01 00:00:00 | | -| received | | datetime | YES | | 0001-01-01 00:00:00 | | -| changed | Date that something in the conversation changed, indicating clients should fetch the conversation again | datetime | YES | | 0001-01-01 00:00:00 | | -| commented | | datetime | YES | | 0001-01-01 00:00:00 | | -| uid | Owner id which owns this copy of the item | mediumint unsigned | YES | PRI | 0 | | -| pinned | The thread is pinned on the profile page | boolean | YES | | 0 | | -| starred | | boolean | YES | | 0 | | -| ignored | Ignore updates for this thread | boolean | YES | | 0 | | -| wall | This item was posted to the wall of uid | boolean | YES | | 0 | | -| mention | | boolean | YES | | 0 | | -| pubmail | | boolean | YES | | 0 | | -| forum_mode | | tinyint unsigned | YES | | 0 | | -| contact-id | contact.id | int unsigned | YES | | 0 | | -| unseen | post has not been seen | boolean | YES | | 1 | | -| hidden | Marker to hide the post from the user | boolean | YES | | 0 | | -| origin | item originated at this site | boolean | YES | | 0 | | -| psid | ID of the permission set of this post | int unsigned | NO | | NULL | | -| post-user-id | Id of the post-user table | int unsigned | NO | | NULL | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| owner-id | Item owner | int unsigned | NO | | 0 | | +| author-id | Item author | int unsigned | NO | | 0 | | +| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | +| network | | char(4) | NO | | | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | +| received | | 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 | | +| commented | | datetime | NO | | 0001-01-01 00:00:00 | | +| uid | Owner id which owns this copy of the item | mediumint unsigned | NO | PRI | 0 | | +| pinned | The thread is pinned on the profile page | boolean | NO | | 0 | | +| starred | | boolean | NO | | 0 | | +| ignored | Ignore updates for this thread | boolean | NO | | 0 | | +| wall | This item was posted to the wall of uid | boolean | NO | | 0 | | +| mention | | boolean | NO | | 0 | | +| pubmail | | boolean | NO | | 0 | | +| forum_mode | | tinyint unsigned | NO | | 0 | | +| contact-id | contact.id | int unsigned | NO | | 0 | | +| unseen | post has not been seen | boolean | NO | | 1 | | +| hidden | Marker to hide the post from the user | boolean | NO | | 0 | | +| origin | item originated at this site | boolean | NO | | 0 | | +| psid | ID of the permission set of this post | int unsigned | YES | | NULL | | +| post-user-id | Id of the post-user table | int unsigned | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-thread.md b/doc/database/db_post-thread.md index 49fac4fd9..af0124b16 100644 --- a/doc/database/db_post-thread.md +++ b/doc/database/db_post-thread.md @@ -4,14 +4,14 @@ Thread related data | 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 | NULL | | -| owner-id | Item owner | int unsigned | YES | | 0 | | -| author-id | Item author | int unsigned | YES | | 0 | | -| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | NO | | NULL | | -| network | | char(4) | YES | | | | -| created | | datetime | YES | | 0001-01-01 00:00:00 | | -| received | | datetime | YES | | 0001-01-01 00:00:00 | | -| changed | Date that something in the conversation changed, indicating clients should fetch the conversation again | datetime | YES | | 0001-01-01 00:00:00 | | -| commented | | datetime | YES | | 0001-01-01 00:00:00 | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| owner-id | Item owner | int unsigned | NO | | 0 | | +| author-id | Item author | int unsigned | NO | | 0 | | +| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | +| network | | char(4) | NO | | | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | +| received | | 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 | | +| commented | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-user-notification.md b/doc/database/db_post-user-notification.md index 01727e266..6696fc3ac 100644 --- a/doc/database/db_post-user-notification.md +++ b/doc/database/db_post-user-notification.md @@ -4,8 +4,8 @@ User post notifications | 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 | NULL | | -| uid | Owner id which owns this copy of the item | mediumint unsigned | YES | PRI | NULL | | -| notification-type | | tinyint unsigned | YES | | 0 | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| uid | Owner id which owns this copy of the item | mediumint unsigned | NO | PRI | NULL | | +| notification-type | | tinyint unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-user.md b/doc/database/db_post-user.md index 58fa6f902..964ccf45c 100644 --- a/doc/database/db_post-user.md +++ b/doc/database/db_post-user.md @@ -4,35 +4,35 @@ User specific post data | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | int unsigned | YES | PRI | NULL | auto_increment | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | | NULL | | -| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | NO | | NULL | | -| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | NO | | NULL | | -| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | NO | | NULL | | -| created | Creation timestamp. | datetime | YES | | 0001-01-01 00:00:00 | | -| edited | Date of last edit (default is created) | datetime | YES | | 0001-01-01 00:00:00 | | -| received | datetime | datetime | YES | | 0001-01-01 00:00:00 | | -| gravity | | tinyint unsigned | YES | | 0 | | -| network | Network from where the item comes from | char(4) | YES | | | | -| owner-id | Link to the contact table with uid=0 of the owner of this item | int unsigned | YES | | 0 | | -| author-id | Link to the contact table with uid=0 of the author of this item | int unsigned | YES | | 0 | | -| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | NO | | NULL | | -| post-type | Post type (personal note, image, article, ...) | tinyint unsigned | YES | | 0 | | -| post-reason | Reason why the post arrived at the user | tinyint unsigned | YES | | 0 | | -| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | NO | | NULL | | -| private | 0=public, 1=private, 2=unlisted | tinyint unsigned | YES | | 0 | | -| global | | boolean | YES | | 0 | | -| visible | | boolean | YES | | 0 | | -| deleted | item has been marked for deletion | boolean | YES | | 0 | | -| uid | Owner id which owns this copy of the item | mediumint unsigned | YES | | NULL | | -| protocol | Protocol used to deliver the item for this user | tinyint unsigned | NO | | NULL | | -| contact-id | contact.id | int unsigned | YES | | 0 | | -| event-id | Used to link to the event.id | int unsigned | NO | | NULL | | -| unseen | post has not been seen | boolean | YES | | 1 | | -| hidden | Marker to hide the post from the user | boolean | YES | | 0 | | -| notification-type | | tinyint unsigned | YES | | 0 | | -| wall | This item was posted to the wall of uid | boolean | YES | | 0 | | -| origin | item originated at this site | boolean | YES | | 0 | | -| psid | ID of the permission set of this post | int unsigned | NO | | NULL | | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | | NULL | | +| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | YES | | NULL | | +| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | YES | | NULL | | +| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | YES | | NULL | | +| 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 | | +| received | datetime | datetime | NO | | 0001-01-01 00:00:00 | | +| gravity | | tinyint unsigned | NO | | 0 | | +| network | Network from where the item comes from | char(4) | NO | | | | +| owner-id | Link to the contact table with uid=0 of the owner of this item | int unsigned | NO | | 0 | | +| author-id | Link to the contact table with uid=0 of the author of this item | int unsigned | NO | | 0 | | +| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | +| post-type | Post type (personal note, image, article, ...) | tinyint unsigned | NO | | 0 | | +| post-reason | Reason why the post arrived at the user | tinyint unsigned | NO | | 0 | | +| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | YES | | NULL | | +| private | 0=public, 1=private, 2=unlisted | tinyint unsigned | NO | | 0 | | +| global | | boolean | NO | | 0 | | +| visible | | boolean | NO | | 0 | | +| deleted | item has been marked for deletion | boolean | NO | | 0 | | +| uid | Owner id which owns this copy of the item | mediumint unsigned | NO | | NULL | | +| protocol | Protocol used to deliver the item for this user | tinyint unsigned | YES | | NULL | | +| contact-id | contact.id | int unsigned | NO | | 0 | | +| event-id | Used to link to the event.id | int unsigned | YES | | NULL | | +| unseen | post has not been seen | boolean | NO | | 1 | | +| hidden | Marker to hide the post from the user | boolean | NO | | 0 | | +| notification-type | | tinyint unsigned | NO | | 0 | | +| wall | This item was posted to the wall of uid | boolean | NO | | 0 | | +| origin | item originated at this site | boolean | NO | | 0 | | +| psid | ID of the permission set of this post | int unsigned | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_post.md b/doc/database/db_post.md index 020e5e9c9..1367bcb77 100644 --- a/doc/database/db_post.md +++ b/doc/database/db_post.md @@ -4,23 +4,23 @@ Structure for all posts | 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 | NULL | | -| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | NO | | NULL | | -| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | NO | | NULL | | -| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | NO | | NULL | | -| created | Creation timestamp. | datetime | YES | | 0001-01-01 00:00:00 | | -| edited | Date of last edit (default is created) | datetime | YES | | 0001-01-01 00:00:00 | | -| received | datetime | datetime | YES | | 0001-01-01 00:00:00 | | -| gravity | | tinyint unsigned | YES | | 0 | | -| network | Network from where the item comes from | char(4) | YES | | | | -| owner-id | Link to the contact table with uid=0 of the owner of this item | int unsigned | YES | | 0 | | -| author-id | Link to the contact table with uid=0 of the author of this item | int unsigned | YES | | 0 | | -| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | NO | | NULL | | -| post-type | Post type (personal note, image, article, ...) | tinyint unsigned | YES | | 0 | | -| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | NO | | NULL | | -| private | 0=public, 1=private, 2=unlisted | tinyint unsigned | YES | | 0 | | -| global | | boolean | YES | | 0 | | -| visible | | boolean | YES | | 0 | | -| deleted | item has been marked for deletion | boolean | YES | | 0 | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | YES | | NULL | | +| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | YES | | NULL | | +| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | YES | | NULL | | +| 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 | | +| received | datetime | datetime | NO | | 0001-01-01 00:00:00 | | +| gravity | | tinyint unsigned | NO | | 0 | | +| network | Network from where the item comes from | char(4) | NO | | | | +| owner-id | Link to the contact table with uid=0 of the owner of this item | int unsigned | NO | | 0 | | +| author-id | Link to the contact table with uid=0 of the author of this item | int unsigned | NO | | 0 | | +| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | +| post-type | Post type (personal note, image, article, ...) | tinyint unsigned | NO | | 0 | | +| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | YES | | NULL | | +| private | 0=public, 1=private, 2=unlisted | tinyint unsigned | NO | | 0 | | +| global | | boolean | NO | | 0 | | +| visible | | boolean | NO | | 0 | | +| deleted | item has been marked for deletion | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_process.md b/doc/database/db_process.md index 2c92fc84d..9284130b5 100644 --- a/doc/database/db_process.md +++ b/doc/database/db_process.md @@ -4,8 +4,8 @@ Currently running system processes | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| pid | | int unsigned | YES | PRI | NULL | | -| command | | varbinary(32) | YES | | | | -| created | | datetime | YES | | 0001-01-01 00:00:00 | | +| pid | | int unsigned | NO | PRI | NULL | | +| command | | varbinary(32) | NO | | | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_profile.md b/doc/database/db_profile.md index aa0e36066..c7ee65569 100644 --- a/doc/database/db_profile.md +++ b/doc/database/db_profile.md @@ -4,47 +4,47 @@ user profiles data | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | -| uid | Owner User id | mediumint unsigned | YES | | 0 | | -| profile-name | Deprecated | varchar(255) | NO | | NULL | | -| is-default | Deprecated | boolean | NO | | NULL | | -| hide-friends | Hide friend list from viewers of this profile | boolean | YES | | 0 | | -| name | | varchar(255) | YES | | | | -| pdesc | Deprecated | varchar(255) | NO | | NULL | | -| dob | Day of birth | varchar(32) | YES | | 0000-00-00 | | -| address | | varchar(255) | YES | | | | -| locality | | varchar(255) | YES | | | | -| region | | varchar(255) | YES | | | | -| postal-code | | varchar(32) | YES | | | | -| country-name | | varchar(255) | YES | | | | -| hometown | Deprecated | varchar(255) | NO | | NULL | | -| gender | Deprecated | varchar(32) | NO | | NULL | | -| marital | Deprecated | varchar(255) | NO | | NULL | | -| with | Deprecated | text | NO | | NULL | | -| howlong | Deprecated | datetime | NO | | NULL | | -| sexual | Deprecated | varchar(255) | NO | | NULL | | -| politic | Deprecated | varchar(255) | NO | | NULL | | -| religion | Deprecated | varchar(255) | NO | | NULL | | -| pub_keywords | | text | NO | | NULL | | -| prv_keywords | | text | NO | | NULL | | -| likes | Deprecated | text | NO | | NULL | | -| dislikes | Deprecated | text | NO | | NULL | | -| about | Profile description | text | NO | | NULL | | -| summary | Deprecated | varchar(255) | NO | | NULL | | -| music | Deprecated | text | NO | | NULL | | -| book | Deprecated | text | NO | | NULL | | -| tv | Deprecated | text | NO | | NULL | | -| film | Deprecated | text | NO | | NULL | | -| interest | Deprecated | text | NO | | NULL | | -| romance | Deprecated | text | NO | | NULL | | -| work | Deprecated | text | NO | | NULL | | -| education | Deprecated | text | NO | | NULL | | -| contact | Deprecated | text | NO | | NULL | | -| homepage | | varchar(255) | YES | | | | -| xmpp | | varchar(255) | YES | | | | -| photo | | varchar(255) | YES | | | | -| thumb | | varchar(255) | YES | | | | -| publish | publish default profile in local directory | boolean | YES | | 0 | | -| net-publish | publish profile in global directory | boolean | YES | | 0 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| profile-name | Deprecated | varchar(255) | YES | | NULL | | +| is-default | Deprecated | boolean | YES | | NULL | | +| hide-friends | Hide friend list from viewers of this profile | boolean | NO | | 0 | | +| name | | varchar(255) | NO | | | | +| pdesc | Deprecated | varchar(255) | YES | | NULL | | +| dob | Day of birth | varchar(32) | NO | | 0000-00-00 | | +| address | | varchar(255) | NO | | | | +| locality | | varchar(255) | NO | | | | +| region | | varchar(255) | NO | | | | +| postal-code | | varchar(32) | NO | | | | +| country-name | | varchar(255) | NO | | | | +| hometown | Deprecated | varchar(255) | YES | | NULL | | +| gender | Deprecated | varchar(32) | YES | | NULL | | +| marital | Deprecated | varchar(255) | YES | | NULL | | +| with | Deprecated | text | YES | | NULL | | +| howlong | Deprecated | datetime | YES | | NULL | | +| sexual | Deprecated | varchar(255) | YES | | NULL | | +| politic | Deprecated | varchar(255) | YES | | NULL | | +| religion | Deprecated | varchar(255) | YES | | NULL | | +| pub_keywords | | text | YES | | NULL | | +| prv_keywords | | text | YES | | NULL | | +| likes | Deprecated | text | YES | | NULL | | +| dislikes | Deprecated | text | YES | | NULL | | +| about | Profile description | text | YES | | NULL | | +| summary | Deprecated | varchar(255) | YES | | NULL | | +| music | Deprecated | text | YES | | NULL | | +| book | Deprecated | text | YES | | NULL | | +| tv | Deprecated | text | YES | | NULL | | +| film | Deprecated | text | YES | | NULL | | +| interest | Deprecated | text | YES | | NULL | | +| romance | Deprecated | text | YES | | NULL | | +| work | Deprecated | text | YES | | NULL | | +| education | Deprecated | text | YES | | NULL | | +| contact | Deprecated | text | YES | | NULL | | +| homepage | | varchar(255) | NO | | | | +| xmpp | | varchar(255) | NO | | | | +| photo | | varchar(255) | NO | | | | +| thumb | | varchar(255) | NO | | | | +| publish | publish default profile in local directory | boolean | NO | | 0 | | +| net-publish | publish profile in global directory | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_profile_check.md b/doc/database/db_profile_check.md index b41a10273..b2eea14ae 100644 --- a/doc/database/db_profile_check.md +++ b/doc/database/db_profile_check.md @@ -4,11 +4,11 @@ DFRN remote auth use | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | YES | | 0 | | -| cid | contact.id | int unsigned | YES | | 0 | | -| dfrn_id | | varchar(255) | YES | | | | -| sec | | varchar(255) | YES | | | | -| expire | | int unsigned | YES | | 0 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| cid | contact.id | int unsigned | NO | | 0 | | +| dfrn_id | | varchar(255) | NO | | | | +| sec | | varchar(255) | NO | | | | +| expire | | int unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_profile_field.md b/doc/database/db_profile_field.md index 4018f1256..34a683cfb 100644 --- a/doc/database/db_profile_field.md +++ b/doc/database/db_profile_field.md @@ -4,13 +4,13 @@ Custom profile fields | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | -| uid | Owner user id | mediumint unsigned | YES | | 0 | | -| order | Field ordering per user | mediumint unsigned | YES | | 1 | | -| psid | ID of the permission set of this profile field - 0 = public | int unsigned | NO | | NULL | | -| label | Label of the field | varchar(255) | YES | | | | -| value | Value of the field | text | NO | | NULL | | -| created | creation time | datetime | YES | | 0001-01-01 00:00:00 | | -| edited | last edit time | datetime | YES | | 0001-01-01 00:00:00 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner user id | mediumint unsigned | NO | | 0 | | +| order | Field ordering per user | mediumint unsigned | NO | | 1 | | +| psid | ID of the permission set of this profile field - 0 = public | int unsigned | YES | | NULL | | +| label | Label of the field | varchar(255) | NO | | | | +| value | Value of the field | text | YES | | NULL | | +| created | creation time | datetime | NO | | 0001-01-01 00:00:00 | | +| edited | last edit time | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_push_subscriber.md b/doc/database/db_push_subscriber.md index d745db6d2..73af99b9e 100644 --- a/doc/database/db_push_subscriber.md +++ b/doc/database/db_push_subscriber.md @@ -4,15 +4,15 @@ Used for OStatus: Contains feed subscribers | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | YES | | 0 | | -| callback_url | | varchar(255) | YES | | | | -| topic | | varchar(255) | YES | | | | -| nickname | | varchar(255) | YES | | | | -| push | Retrial counter | tinyint | YES | | 0 | | -| last_update | Date of last successful trial | datetime | YES | | 0001-01-01 00:00:00 | | -| next_try | Next retrial date | datetime | YES | | 0001-01-01 00:00:00 | | -| renewed | Date of last subscription renewal | datetime | YES | | 0001-01-01 00:00:00 | | -| secret | | varchar(255) | YES | | | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| callback_url | | varchar(255) | NO | | | | +| topic | | varchar(255) | NO | | | | +| nickname | | varchar(255) | NO | | | | +| push | Retrial counter | tinyint | NO | | 0 | | +| last_update | Date of last successful trial | datetime | NO | | 0001-01-01 00:00:00 | | +| next_try | Next retrial date | datetime | NO | | 0001-01-01 00:00:00 | | +| renewed | Date of last subscription renewal | datetime | NO | | 0001-01-01 00:00:00 | | +| secret | | varchar(255) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_register.md b/doc/database/db_register.md index fe2f18ba8..675139011 100644 --- a/doc/database/db_register.md +++ b/doc/database/db_register.md @@ -4,12 +4,12 @@ registrations requiring admin approval | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | -| hash | | varchar(255) | YES | | | | -| created | | datetime | YES | | 0001-01-01 00:00:00 | | -| uid | User id | mediumint unsigned | YES | | 0 | | -| password | | varchar(255) | YES | | | | -| language | | varchar(16) | YES | | | | -| note | | text | NO | | NULL | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| hash | | varchar(255) | NO | | | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | +| uid | User id | mediumint unsigned | NO | | 0 | | +| password | | varchar(255) | NO | | | | +| language | | varchar(16) | NO | | | | +| note | | text | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_search.md b/doc/database/db_search.md index 994a3ffbf..10deb6c18 100644 --- a/doc/database/db_search.md +++ b/doc/database/db_search.md @@ -4,8 +4,8 @@ Table search | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | YES | | 0 | | -| term | | varchar(255) | YES | | | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| term | | varchar(255) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_session.md b/doc/database/db_session.md index 80916366a..d607f74e7 100644 --- a/doc/database/db_session.md +++ b/doc/database/db_session.md @@ -4,9 +4,9 @@ web session storage | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | bigint unsigned | YES | PRI | NULL | auto_increment | -| sid | | varbinary(255) | YES | | | | -| data | | text | NO | | NULL | | -| expire | | int unsigned | YES | | 0 | | +| id | sequential ID | bigint unsigned | NO | PRI | NULL | auto_increment | +| sid | | varbinary(255) | NO | | | | +| data | | text | YES | | NULL | | +| expire | | int unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_storage.md b/doc/database/db_storage.md index 376f0cb22..198443626 100644 --- a/doc/database/db_storage.md +++ b/doc/database/db_storage.md @@ -4,7 +4,7 @@ Data stored by Database storage backend | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | Auto incremented image data id | int unsigned | YES | PRI | NULL | auto_increment | -| data | file data | longblob | YES | | NULL | | +| id | Auto incremented image data id | int unsigned | NO | PRI | NULL | auto_increment | +| data | file data | longblob | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_tag.md b/doc/database/db_tag.md index 3fb7d7d8f..8d7ae354f 100644 --- a/doc/database/db_tag.md +++ b/doc/database/db_tag.md @@ -4,8 +4,8 @@ tags and mentions | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | int unsigned | YES | PRI | NULL | auto_increment | -| name | | varchar(96) | YES | | | | -| url | | varbinary(255) | YES | | | | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| name | | varchar(96) | NO | | | | +| url | | varbinary(255) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_tokens.md b/doc/database/db_tokens.md index 93510a16e..712bb05fd 100644 --- a/doc/database/db_tokens.md +++ b/doc/database/db_tokens.md @@ -4,11 +4,11 @@ OAuth usage | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | varchar(40) | YES | PRI | NULL | | -| secret | | text | NO | | NULL | | -| client_id | | varchar(20) | YES | | | | -| expires | | int | YES | | 0 | | -| scope | | varchar(200) | YES | | | | -| uid | User id | mediumint unsigned | YES | | 0 | | +| id | | varchar(40) | NO | PRI | NULL | | +| secret | | text | YES | | NULL | | +| client_id | | varchar(20) | NO | | | | +| expires | | int | NO | | 0 | | +| scope | | varchar(200) | NO | | | | +| uid | User id | mediumint unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_user-contact.md b/doc/database/db_user-contact.md index 2c208735a..762c35039 100644 --- a/doc/database/db_user-contact.md +++ b/doc/database/db_user-contact.md @@ -4,10 +4,10 @@ User specific public contact data | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| cid | Contact id of the linked public contact | int unsigned | YES | PRI | 0 | | -| uid | User id | mediumint unsigned | YES | PRI | 0 | | -| blocked | Contact is completely blocked for this user | boolean | NO | | NULL | | -| ignored | Posts from this contact are ignored | boolean | NO | | NULL | | -| collapsed | Posts from this contact are collapsed | boolean | NO | | NULL | | +| cid | Contact id of the linked public contact | int unsigned | NO | PRI | 0 | | +| uid | User id | mediumint unsigned | NO | PRI | 0 | | +| blocked | Contact is completely blocked for this user | boolean | YES | | NULL | | +| ignored | Posts from this contact are ignored | boolean | YES | | NULL | | +| collapsed | Posts from this contact are collapsed | boolean | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_user.md b/doc/database/db_user.md index 8f055b1bc..0794b7bcb 100644 --- a/doc/database/db_user.md +++ b/doc/database/db_user.md @@ -4,50 +4,50 @@ The local users | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| uid | sequential ID | mediumint unsigned | YES | PRI | NULL | auto_increment | -| parent-uid | The parent user that has full control about this user | mediumint unsigned | NO | | NULL | | -| guid | A unique identifier for this user | varchar(64) | YES | | | | -| username | Name that this user is known by | varchar(255) | YES | | | | -| password | encrypted password | varchar(255) | YES | | | | -| legacy_password | Is the password hash double-hashed? | boolean | YES | | 0 | | -| nickname | nick- and user name | varchar(255) | YES | | | | -| email | the users email address | varchar(255) | YES | | | | -| openid | | varchar(255) | YES | | | | -| timezone | PHP-legal timezone | varchar(128) | YES | | | | -| language | default language | varchar(32) | YES | | en | | -| register_date | timestamp of registration | datetime | YES | | 0001-01-01 00:00:00 | | -| login_date | timestamp of last login | datetime | YES | | 0001-01-01 00:00:00 | | -| default-location | Default for item.location | varchar(255) | YES | | | | -| allow_location | 1 allows to display the location | boolean | YES | | 0 | | -| theme | user theme preference | varchar(255) | YES | | | | -| pubkey | RSA public key 4096 bit | text | NO | | NULL | | -| prvkey | RSA private key 4096 bit | text | NO | | NULL | | -| spubkey | | text | NO | | NULL | | -| sprvkey | | text | NO | | NULL | | -| verified | user is verified through email | boolean | YES | | 0 | | -| blocked | 1 for user is blocked | boolean | YES | | 0 | | -| blockwall | Prohibit contacts to post to the profile page of the user | boolean | YES | | 0 | | -| hidewall | Hide profile details from unkown viewers | boolean | YES | | 0 | | -| blocktags | Prohibit contacts to tag the post of this user | boolean | YES | | 0 | | -| unkmail | Permit unknown people to send private mails to this user | boolean | YES | | 0 | | -| cntunkmail | | int unsigned | YES | | 10 | | -| notify-flags | email notification options | smallint unsigned | YES | | 65535 | | -| page-flags | page/profile type | tinyint unsigned | YES | | 0 | | -| account-type | | tinyint unsigned | YES | | 0 | | -| prvnets | | boolean | YES | | 0 | | -| pwdreset | Password reset request token | varchar(255) | NO | | NULL | | -| pwdreset_time | Timestamp of the last password reset request | datetime | NO | | NULL | | -| maxreq | | int unsigned | YES | | 10 | | -| expire | | int unsigned | YES | | 0 | | -| account_removed | if 1 the account is removed | boolean | YES | | 0 | | -| account_expired | | boolean | YES | | 0 | | -| account_expires_on | timestamp when account expires and will be deleted | datetime | YES | | 0001-01-01 00:00:00 | | -| expire_notification_sent | timestamp of last warning of account expiration | datetime | YES | | 0001-01-01 00:00:00 | | -| def_gid | | int unsigned | YES | | 0 | | -| allow_cid | default permission for this user | mediumtext | NO | | NULL | | -| allow_gid | default permission for this user | mediumtext | NO | | NULL | | -| deny_cid | default permission for this user | mediumtext | NO | | NULL | | -| deny_gid | default permission for this user | mediumtext | NO | | NULL | | -| openidserver | | text | NO | | NULL | | +| uid | sequential ID | mediumint unsigned | NO | PRI | NULL | auto_increment | +| parent-uid | The parent user that has full control about this user | mediumint unsigned | YES | | NULL | | +| guid | A unique identifier for this user | varchar(64) | NO | | | | +| username | Name that this user is known by | varchar(255) | NO | | | | +| password | encrypted password | varchar(255) | NO | | | | +| legacy_password | Is the password hash double-hashed? | boolean | NO | | 0 | | +| nickname | nick- and user name | varchar(255) | NO | | | | +| email | the users email address | varchar(255) | NO | | | | +| openid | | varchar(255) | NO | | | | +| timezone | PHP-legal timezone | varchar(128) | NO | | | | +| language | default language | varchar(32) | NO | | en | | +| register_date | timestamp of registration | datetime | NO | | 0001-01-01 00:00:00 | | +| login_date | timestamp of last login | datetime | NO | | 0001-01-01 00:00:00 | | +| default-location | Default for item.location | varchar(255) | NO | | | | +| allow_location | 1 allows to display the location | boolean | NO | | 0 | | +| theme | user theme preference | varchar(255) | NO | | | | +| pubkey | RSA public key 4096 bit | text | YES | | NULL | | +| prvkey | RSA private key 4096 bit | text | YES | | NULL | | +| spubkey | | text | YES | | NULL | | +| sprvkey | | text | YES | | NULL | | +| verified | user is verified through email | boolean | NO | | 0 | | +| blocked | 1 for user is blocked | boolean | NO | | 0 | | +| blockwall | Prohibit contacts to post to the profile page of the user | boolean | NO | | 0 | | +| hidewall | Hide profile details from unkown viewers | boolean | NO | | 0 | | +| blocktags | Prohibit contacts to tag the post of this user | boolean | NO | | 0 | | +| unkmail | Permit unknown people to send private mails to this user | boolean | NO | | 0 | | +| cntunkmail | | int unsigned | NO | | 10 | | +| notify-flags | email notification options | smallint unsigned | NO | | 65535 | | +| page-flags | page/profile type | tinyint unsigned | NO | | 0 | | +| account-type | | tinyint unsigned | NO | | 0 | | +| prvnets | | boolean | NO | | 0 | | +| pwdreset | Password reset request token | varchar(255) | YES | | NULL | | +| pwdreset_time | Timestamp of the last password reset request | datetime | YES | | NULL | | +| maxreq | | int unsigned | NO | | 10 | | +| expire | | int unsigned | NO | | 0 | | +| account_removed | if 1 the account is removed | boolean | NO | | 0 | | +| account_expired | | boolean | NO | | 0 | | +| account_expires_on | timestamp when account expires and will be deleted | datetime | NO | | 0001-01-01 00:00:00 | | +| expire_notification_sent | timestamp of last warning of account expiration | datetime | NO | | 0001-01-01 00:00:00 | | +| def_gid | | int unsigned | NO | | 0 | | +| allow_cid | default permission for this user | mediumtext | YES | | NULL | | +| allow_gid | default permission for this user | mediumtext | YES | | NULL | | +| deny_cid | default permission for this user | mediumtext | YES | | NULL | | +| deny_gid | default permission for this user | mediumtext | YES | | NULL | | +| openidserver | | text | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_userd.md b/doc/database/db_userd.md index 42cc72c3c..5006033e9 100644 --- a/doc/database/db_userd.md +++ b/doc/database/db_userd.md @@ -4,7 +4,7 @@ Deleted usernames | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | YES | PRI | NULL | auto_increment | -| username | | varchar(255) | YES | | NULL | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| username | | varchar(255) | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_verb.md b/doc/database/db_verb.md index 73871a07c..4aa171f30 100644 --- a/doc/database/db_verb.md +++ b/doc/database/db_verb.md @@ -4,7 +4,7 @@ Activity Verbs | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | smallint unsigned | YES | PRI | NULL | auto_increment | -| name | | varchar(100) | YES | | | | +| id | | smallint unsigned | NO | PRI | NULL | auto_increment | +| name | | varchar(100) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_worker-ipc.md b/doc/database/db_worker-ipc.md index 5246974f5..2da8021e4 100644 --- a/doc/database/db_worker-ipc.md +++ b/doc/database/db_worker-ipc.md @@ -4,7 +4,7 @@ Inter process communication between the frontend and the worker | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| key | | int | YES | PRI | NULL | | -| jobs | Flag for outstanding jobs | boolean | NO | | NULL | | +| key | | int | NO | PRI | NULL | | +| jobs | Flag for outstanding jobs | boolean | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_workerqueue.md b/doc/database/db_workerqueue.md index ec10ba549..00768c3b5 100644 --- a/doc/database/db_workerqueue.md +++ b/doc/database/db_workerqueue.md @@ -4,15 +4,15 @@ Background tasks queue entries | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | Auto incremented worker task id | int unsigned | YES | PRI | NULL | auto_increment | -| command | Task command | varchar(100) | NO | | NULL | | -| parameter | Task parameter | mediumtext | NO | | NULL | | -| priority | Task priority | tinyint unsigned | YES | | 0 | | -| created | Creation date | datetime | YES | | 0001-01-01 00:00:00 | | -| pid | Process id of the worker | int unsigned | YES | | 0 | | -| executed | Execution date | datetime | YES | | 0001-01-01 00:00:00 | | -| next_try | Next retrial date | datetime | YES | | 0001-01-01 00:00:00 | | -| retrial | Retrial counter | tinyint | YES | | 0 | | -| done | Marked 1 when the task was done - will be deleted later | boolean | YES | | 0 | | +| id | Auto incremented worker task id | int unsigned | NO | PRI | NULL | auto_increment | +| command | Task command | varchar(100) | YES | | NULL | | +| parameter | Task parameter | mediumtext | YES | | NULL | | +| priority | Task priority | tinyint unsigned | NO | | 0 | | +| created | Creation date | datetime | NO | | 0001-01-01 00:00:00 | | +| pid | Process id of the worker | int unsigned | NO | | 0 | | +| executed | Execution date | datetime | NO | | 0001-01-01 00:00:00 | | +| next_try | Next retrial date | datetime | NO | | 0001-01-01 00:00:00 | | +| retrial | Retrial counter | tinyint | NO | | 0 | | +| done | Marked 1 when the task was done - will be deleted later | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index 888ac73e6..bb66bcb3f 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -172,7 +172,7 @@ class DBStructure $field['name'] = $key; $field['comment'] = $value['comment'] ?? ''; $field['type'] = $value['type']; - $field['notnull'] = ($value['not null'] ?? false) ? 'YES' : 'NO'; + $field['null'] = ($value['not null'] ?? false) ? 'NO' : 'YES'; $field['primary'] = ($value['primary'] ?? false) ? 'PRI' : ''; $field['default'] = $value['default'] ?? 'NULL'; $field['extra'] = $value['extra'] ?? ''; diff --git a/view/templates/structure.tpl b/view/templates/structure.tpl index 91ba2eb31..15049ab57 100644 --- a/view/templates/structure.tpl +++ b/view/templates/structure.tpl @@ -5,7 +5,7 @@ Table {{$name}} | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | {{foreach $fields as $field}} -| {{$field.name}} | {{$field.comment}} | {{$field.type}} | {{$field.notnull}} | {{$field.primary}} | {{$field.default}} | {{$field.extra}} | +| {{$field.name}} | {{$field.comment}} | {{$field.type}} | {{$field.null}} | {{$field.primary}} | {{$field.default}} | {{$field.extra}} | {{/foreach}} Return to [database documentation](help/database) From 4095e6c9be01943c3b074d9a9061a01ff5fafcee Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 14 Jun 2021 05:33:47 +0000 Subject: [PATCH 05/12] Pad the lengths of the columns --- doc/database/db_2fa_app_specific_password.md | 12 +- doc/database/db_2fa_recovery_codes.md | 8 +- doc/database/db_2fa_trusted_browser.md | 10 +- doc/database/db_addon.md | 14 +- doc/database/db_apcontact.md | 48 +++--- doc/database/db_application-token.md | 20 +-- doc/database/db_application.md | 22 +-- doc/database/db_attach.md | 30 ++-- doc/database/db_auth_codes.md | 10 +- doc/database/db_cache.md | 8 +- doc/database/db_challenge.md | 12 +- doc/database/db_clients.md | 12 +- doc/database/db_config.md | 8 +- doc/database/db_contact-relation.md | 10 +- doc/database/db_contact.md | 160 +++++++++---------- doc/database/db_conv.md | 16 +- doc/database/db_conversation.md | 16 +- doc/database/db_delayed-post.md | 8 +- doc/database/db_diaspora-interaction.md | 4 +- doc/database/db_event.md | 40 ++--- doc/database/db_fcontact.md | 34 ++-- doc/database/db_fsuggest.md | 18 +-- doc/database/db_group.md | 10 +- doc/database/db_group_member.md | 6 +- doc/database/db_gserver-tag.md | 4 +- doc/database/db_gserver.md | 46 +++--- doc/database/db_hook.md | 10 +- doc/database/db_host.md | 4 +- doc/database/db_inbox-status.md | 14 +- doc/database/db_intro.md | 22 +-- doc/database/db_item-uri.md | 6 +- doc/database/db_locks.md | 10 +- doc/database/db_mail.md | 44 ++--- doc/database/db_mailacct.md | 26 +-- doc/database/db_manage.md | 6 +- doc/database/db_notification.md | 18 +-- doc/database/db_notify-threads.md | 12 +- doc/database/db_notify.md | 36 ++--- doc/database/db_oembed.md | 8 +- doc/database/db_openwebauth-token.md | 12 +- doc/database/db_parsed_url.md | 14 +- doc/database/db_pconfig.md | 10 +- doc/database/db_permissionset.md | 12 +- doc/database/db_photo.md | 54 +++---- doc/database/db_post-category.md | 8 +- doc/database/db_post-content.md | 34 ++-- doc/database/db_post-delivery-data.md | 22 +-- doc/database/db_post-media.md | 38 ++--- doc/database/db_post-tag.md | 8 +- doc/database/db_post-thread-user.md | 46 +++--- doc/database/db_post-thread.md | 18 +-- doc/database/db_post-user-notification.md | 6 +- doc/database/db_post-user.md | 60 +++---- doc/database/db_post.md | 36 ++--- doc/database/db_process.md | 6 +- doc/database/db_profile.md | 84 +++++----- doc/database/db_profile_check.md | 12 +- doc/database/db_profile_field.md | 16 +- doc/database/db_push_subscriber.md | 20 +-- doc/database/db_register.md | 14 +- doc/database/db_search.md | 6 +- doc/database/db_session.md | 8 +- doc/database/db_storage.md | 4 +- doc/database/db_tag.md | 6 +- doc/database/db_tokens.md | 12 +- doc/database/db_user-contact.md | 10 +- doc/database/db_user.md | 90 +++++------ doc/database/db_userd.md | 4 +- doc/database/db_verb.md | 4 +- doc/database/db_worker-ipc.md | 4 +- doc/database/db_workerqueue.md | 20 +-- src/Database/DBStructure.php | 12 +- 72 files changed, 761 insertions(+), 751 deletions(-) diff --git a/doc/database/db_2fa_app_specific_password.md b/doc/database/db_2fa_app_specific_password.md index 654de9a6e..f34716329 100644 --- a/doc/database/db_2fa_app_specific_password.md +++ b/doc/database/db_2fa_app_specific_password.md @@ -4,11 +4,11 @@ Two-factor app-specific _password | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | Password ID for revocation | mediumint unsigned | NO | PRI | NULL | auto_increment | -| uid | User ID | mediumint unsigned | NO | | NULL | | -| description | Description of the usage of the password | varchar(255) | YES | | NULL | | -| hashed_password | Hashed password | varchar(255) | NO | | NULL | | -| generated | Datetime the password was generated | datetime | NO | | NULL | | -| last_used | Datetime the password was last used | datetime | YES | | NULL | | +| id | Password ID for revocation | mediumint unsigned | NO | PRI | NULL | auto_increment | +| uid | User ID | mediumint unsigned | NO | | NULL | | +| description | Description of the usage of the password | varchar(255) | YES | | NULL | | +| hashed_password | Hashed password | varchar(255) | NO | | NULL | | +| generated | Datetime the password was generated | datetime | NO | | NULL | | +| last_used | Datetime the password was last used | datetime | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_2fa_recovery_codes.md b/doc/database/db_2fa_recovery_codes.md index 61bd520d9..22c4d85e3 100644 --- a/doc/database/db_2fa_recovery_codes.md +++ b/doc/database/db_2fa_recovery_codes.md @@ -4,9 +4,9 @@ Two-factor authentication recovery codes | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| uid | User ID | mediumint unsigned | NO | PRI | NULL | | -| code | Recovery code string | varchar(50) | NO | PRI | NULL | | -| generated | Datetime the code was generated | datetime | NO | | NULL | | -| used | Datetime the code was used | datetime | YES | | NULL | | +| uid | User ID | mediumint unsigned | NO | PRI | NULL | | +| code | Recovery code string | varchar(50) | NO | PRI | NULL | | +| generated | Datetime the code was generated | datetime | NO | | NULL | | +| used | Datetime the code was used | datetime | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_2fa_trusted_browser.md b/doc/database/db_2fa_trusted_browser.md index ccb426880..0067ce41c 100644 --- a/doc/database/db_2fa_trusted_browser.md +++ b/doc/database/db_2fa_trusted_browser.md @@ -4,10 +4,10 @@ Two-factor authentication trusted browsers | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| cookie_hash | Trusted cookie hash | varchar(80) | NO | PRI | NULL | | -| uid | User ID | mediumint unsigned | NO | | NULL | | -| user_agent | User agent string | text | YES | | NULL | | -| created | Datetime the trusted browser was recorded | datetime | NO | | NULL | | -| last_used | Datetime the trusted browser was last used | datetime | YES | | NULL | | +| cookie_hash | Trusted cookie hash | varchar(80) | NO | PRI | NULL | | +| uid | User ID | mediumint unsigned | NO | | NULL | | +| user_agent | User agent string | text | YES | | NULL | | +| created | Datetime the trusted browser was recorded | datetime | NO | | NULL | | +| last_used | Datetime the trusted browser was last used | datetime | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_addon.md b/doc/database/db_addon.md index ae8507af0..14853cd44 100644 --- a/doc/database/db_addon.md +++ b/doc/database/db_addon.md @@ -4,12 +4,12 @@ registered addons | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | int unsigned | NO | PRI | NULL | auto_increment | -| name | addon base (file)name | varchar(50) | NO | | | | -| version | currently unused | varchar(50) | NO | | | | -| installed | currently always 1 | boolean | NO | | 0 | | -| hidden | currently unused | boolean | NO | | 0 | | -| timestamp | file timestamp to check for reloads | int unsigned | NO | | 0 | | -| plugin_admin | 1 = has admin config, 0 = has no admin config | boolean | NO | | 0 | | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| name | addon base (file)name | varchar(50) | NO | | | | +| version | currently unused | varchar(50) | NO | | | | +| installed | currently always 1 | boolean | NO | | 0 | | +| hidden | currently unused | boolean | NO | | 0 | | +| timestamp | file timestamp to check for reloads | int unsigned | NO | | 0 | | +| plugin_admin | 1 = has admin config, 0 = has no admin config | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_apcontact.md b/doc/database/db_apcontact.md index 9cff3af0c..b22a15f8b 100644 --- a/doc/database/db_apcontact.md +++ b/doc/database/db_apcontact.md @@ -4,29 +4,29 @@ ActivityPub compatible contacts - used in the ActivityPub implementation | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| url | URL of the contact | varbinary(255) | NO | PRI | NULL | | -| uuid | | varchar(255) | YES | | NULL | | -| type | | varchar(20) | NO | | NULL | | -| following | | varchar(255) | YES | | NULL | | -| followers | | varchar(255) | YES | | NULL | | -| inbox | | varchar(255) | NO | | NULL | | -| outbox | | varchar(255) | YES | | NULL | | -| sharedinbox | | varchar(255) | YES | | NULL | | -| manually-approve | | boolean | YES | | NULL | | -| nick | | varchar(255) | NO | | | | -| name | | varchar(255) | YES | | NULL | | -| about | | text | YES | | NULL | | -| photo | | varchar(255) | YES | | NULL | | -| addr | | varchar(255) | YES | | NULL | | -| alias | | varchar(255) | YES | | NULL | | -| pubkey | | text | YES | | NULL | | -| subscribe | | varchar(255) | YES | | NULL | | -| baseurl | baseurl of the ap contact | varchar(255) | YES | | NULL | | -| gsid | Global Server ID | int unsigned | YES | | NULL | | -| generator | Name of the contact's system | varchar(255) | YES | | NULL | | -| following_count | Number of following contacts | int unsigned | YES | | 0 | | -| followers_count | Number of followers | int unsigned | YES | | 0 | | -| statuses_count | Number of posts | int unsigned | YES | | 0 | | -| updated | | datetime | NO | | 0001-01-01 00:00:00 | | +| url | URL of the contact | varbinary(255) | NO | PRI | NULL | | +| uuid | | varchar(255) | YES | | NULL | | +| type | | varchar(20) | NO | | NULL | | +| following | | varchar(255) | YES | | NULL | | +| followers | | varchar(255) | YES | | NULL | | +| inbox | | varchar(255) | NO | | NULL | | +| outbox | | varchar(255) | YES | | NULL | | +| sharedinbox | | varchar(255) | YES | | NULL | | +| manually-approve | | boolean | YES | | NULL | | +| nick | | varchar(255) | NO | | | | +| name | | varchar(255) | YES | | NULL | | +| about | | text | YES | | NULL | | +| photo | | varchar(255) | YES | | NULL | | +| addr | | varchar(255) | YES | | NULL | | +| alias | | varchar(255) | YES | | NULL | | +| pubkey | | text | YES | | NULL | | +| subscribe | | varchar(255) | YES | | NULL | | +| baseurl | baseurl of the ap contact | varchar(255) | YES | | NULL | | +| gsid | Global Server ID | int unsigned | YES | | NULL | | +| generator | Name of the contact's system | varchar(255) | YES | | NULL | | +| following_count | Number of following contacts | int unsigned | YES | | 0 | | +| followers_count | Number of followers | int unsigned | YES | | 0 | | +| statuses_count | Number of posts | int unsigned | YES | | 0 | | +| updated | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_application-token.md b/doc/database/db_application-token.md index c847c3218..ed9fb6d26 100644 --- a/doc/database/db_application-token.md +++ b/doc/database/db_application-token.md @@ -4,15 +4,15 @@ OAuth user token | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| application-id | | int unsigned | NO | PRI | NULL | | -| uid | Owner User id | mediumint unsigned | NO | PRI | NULL | | -| code | | varchar(64) | NO | | NULL | | -| access_token | | varchar(64) | NO | | NULL | | -| created_at | creation time | datetime | NO | | NULL | | -| scopes | | varchar(255) | YES | | NULL | | -| read | Read scope | boolean | YES | | NULL | | -| write | Write scope | boolean | YES | | NULL | | -| follow | Follow scope | boolean | YES | | NULL | | -| push | Push scope | boolean | YES | | NULL | | +| application-id | | int unsigned | NO | PRI | NULL | | +| uid | Owner User id | mediumint unsigned | NO | PRI | NULL | | +| code | | varchar(64) | NO | | NULL | | +| access_token | | varchar(64) | NO | | NULL | | +| created_at | creation time | datetime | NO | | NULL | | +| scopes | | varchar(255) | YES | | NULL | | +| read | Read scope | boolean | YES | | NULL | | +| write | Write scope | boolean | YES | | NULL | | +| follow | Follow scope | boolean | YES | | NULL | | +| push | Push scope | boolean | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_application.md b/doc/database/db_application.md index 261c98204..65281f394 100644 --- a/doc/database/db_application.md +++ b/doc/database/db_application.md @@ -4,16 +4,16 @@ OAuth application | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | generated index | int unsigned | NO | PRI | NULL | auto_increment | -| client_id | | varchar(64) | NO | | NULL | | -| client_secret | | varchar(64) | NO | | NULL | | -| name | | varchar(255) | NO | | NULL | | -| redirect_uri | | varchar(255) | NO | | NULL | | -| website | | varchar(255) | YES | | NULL | | -| scopes | | varchar(255) | YES | | NULL | | -| read | Read scope | boolean | YES | | NULL | | -| write | Write scope | boolean | YES | | NULL | | -| follow | Follow scope | boolean | YES | | NULL | | -| push | Push scope | boolean | YES | | NULL | | +| id | generated index | int unsigned | NO | PRI | NULL | auto_increment | +| client_id | | varchar(64) | NO | | NULL | | +| client_secret | | varchar(64) | NO | | NULL | | +| name | | varchar(255) | NO | | NULL | | +| redirect_uri | | varchar(255) | NO | | NULL | | +| website | | varchar(255) | YES | | NULL | | +| scopes | | varchar(255) | YES | | NULL | | +| read | Read scope | boolean | YES | | NULL | | +| write | Write scope | boolean | YES | | NULL | | +| follow | Follow scope | boolean | YES | | NULL | | +| push | Push scope | boolean | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_attach.md b/doc/database/db_attach.md index fec3f8b24..4e02b599e 100644 --- a/doc/database/db_attach.md +++ b/doc/database/db_attach.md @@ -4,20 +4,20 @@ file attachments | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | generated index | int unsigned | NO | PRI | NULL | auto_increment | -| uid | Owner User id | mediumint unsigned | NO | | 0 | | -| hash | hash | varchar(64) | NO | | | | -| filename | filename of original | varchar(255) | NO | | | | -| filetype | mimetype | varchar(64) | NO | | | | -| filesize | size in bytes | int unsigned | 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 | YES | | NULL | | -| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | -| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | -| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | -| backend-class | Storage backend class | tinytext | YES | | NULL | | -| backend-ref | Storage backend data reference | text | YES | | NULL | | +| id | generated index | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| hash | hash | varchar(64) | NO | | | | +| filename | filename of original | varchar(255) | NO | | | | +| filetype | mimetype | varchar(64) | NO | | | | +| filesize | size in bytes | int unsigned | 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 | YES | | NULL | | +| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | +| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | +| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | +| backend-class | Storage backend class | tinytext | YES | | NULL | | +| backend-ref | Storage backend data reference | text | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_auth_codes.md b/doc/database/db_auth_codes.md index 51cad7595..d7ab8640b 100644 --- a/doc/database/db_auth_codes.md +++ b/doc/database/db_auth_codes.md @@ -4,10 +4,10 @@ OAuth usage | 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 | NO | | 0 | | -| scope | | varchar(250) | NO | | | | +| id | | varchar(40) | NO | PRI | NULL | | +| client_id | | varchar(20) | NO | | | | +| redirect_uri | | varchar(200) | NO | | | | +| expires | | int | NO | | 0 | | +| scope | | varchar(250) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_cache.md b/doc/database/db_cache.md index 403fbf864..08ef1479b 100644 --- a/doc/database/db_cache.md +++ b/doc/database/db_cache.md @@ -4,9 +4,9 @@ Stores temporary data | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| k | cache key | varbinary(255) | NO | PRI | NULL | | -| v | cached serialized value | mediumtext | YES | | NULL | | -| expires | datetime of cache expiration | datetime | NO | | 0001-01-01 00:00:00 | | -| updated | datetime of cache insertion | datetime | NO | | 0001-01-01 00:00:00 | | +| k | cache key | varbinary(255) | NO | PRI | NULL | | +| v | cached serialized value | mediumtext | YES | | NULL | | +| expires | datetime of cache expiration | datetime | NO | | 0001-01-01 00:00:00 | | +| updated | datetime of cache insertion | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_challenge.md b/doc/database/db_challenge.md index 54ffd252c..12746056e 100644 --- a/doc/database/db_challenge.md +++ b/doc/database/db_challenge.md @@ -4,11 +4,11 @@ Table challenge | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| challenge | | varchar(255) | NO | | | | -| dfrn-id | | varchar(255) | NO | | | | -| expire | | int unsigned | NO | | 0 | | -| type | | varchar(255) | NO | | | | -| last_update | | varchar(255) | NO | | | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| challenge | | varchar(255) | NO | | | | +| dfrn-id | | varchar(255) | NO | | | | +| expire | | int unsigned | NO | | 0 | | +| type | | varchar(255) | NO | | | | +| last_update | | varchar(255) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_clients.md b/doc/database/db_clients.md index 8f7282484..631cb6539 100644 --- a/doc/database/db_clients.md +++ b/doc/database/db_clients.md @@ -4,11 +4,11 @@ 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 | User id | mediumint unsigned | NO | | 0 | | +| 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 | User id | mediumint unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_config.md b/doc/database/db_config.md index 0eba8f11a..ce4fe4624 100644 --- a/doc/database/db_config.md +++ b/doc/database/db_config.md @@ -4,9 +4,9 @@ main configuration storage | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | int unsigned | NO | PRI | NULL | auto_increment | -| cat | | varbinary(50) | NO | | | | -| k | | varbinary(50) | NO | | | | -| v | | mediumtext | YES | | NULL | | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| cat | | varbinary(50) | NO | | | | +| k | | varbinary(50) | NO | | | | +| v | | mediumtext | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_contact-relation.md b/doc/database/db_contact-relation.md index 4fe92a775..80cd9db1f 100644 --- a/doc/database/db_contact-relation.md +++ b/doc/database/db_contact-relation.md @@ -4,10 +4,10 @@ Contact relations | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| cid | contact the related contact had interacted with | int unsigned | NO | PRI | 0 | | -| relation-cid | related contact who had interacted with the contact | int unsigned | NO | PRI | 0 | | -| last-interaction | Date of the last interaction | datetime | NO | | 0001-01-01 00:00:00 | | -| follow-updated | Date of the last update of the contact relationship | datetime | NO | | 0001-01-01 00:00:00 | | -| follows | | boolean | NO | | 0 | | +| cid | contact the related contact had interacted with | int unsigned | NO | PRI | 0 | | +| relation-cid | related contact who had interacted with the contact | int unsigned | NO | PRI | 0 | | +| last-interaction | Date of the last interaction | datetime | NO | | 0001-01-01 00:00:00 | | +| follow-updated | Date of the last update of the contact relationship | datetime | NO | | 0001-01-01 00:00:00 | | +| follows | | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_contact.md b/doc/database/db_contact.md index 35b94cdd7..134348879 100644 --- a/doc/database/db_contact.md +++ b/doc/database/db_contact.md @@ -4,85 +4,85 @@ contact table | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | Owner User id | mediumint unsigned | NO | | 0 | | -| created | | datetime | NO | | 0001-01-01 00:00:00 | | -| updated | Date of last contact update | datetime | YES | | 0001-01-01 00:00:00 | | -| self | 1 if the contact is the user him/her self | boolean | NO | | 0 | | -| remote_self | | boolean | NO | | 0 | | -| rel | The kind of the relation between the user and the contact | tinyint unsigned | NO | | 0 | | -| duplex | | boolean | NO | | 0 | | -| network | Network of the contact | char(4) | NO | | | | -| protocol | Protocol of the contact | char(4) | 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) | YES | | | | -| about | | text | YES | | NULL | | -| keywords | public keywords (interests) of the contact | text | YES | | NULL | | -| gender | Deprecated | varchar(32) | NO | | | | -| xmpp | | varchar(255) | NO | | | | -| attag | | varchar(255) | NO | | | | -| avatar | | varchar(255) | NO | | | | -| photo | Link to the profile photo of the contact | varchar(255) | YES | | | | -| thumb | Link to the profile photo (thumb size) | varchar(255) | YES | | | | -| micro | Link to the profile photo (micro size) | varchar(255) | YES | | | | -| site-pubkey | | text | YES | | 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 | YES | | NULL | | -| prvkey | RSA private key 4096 bit | text | YES | | NULL | | -| batch | | varchar(255) | NO | | | | -| request | | varchar(255) | YES | | NULL | | -| notify | | varchar(255) | YES | | NULL | | -| poll | | varchar(255) | YES | | NULL | | -| confirm | | varchar(255) | YES | | NULL | | -| subscribe | | varchar(255) | YES | | NULL | | -| poco | | varchar(255) | YES | | NULL | | -| aes_allow | | boolean | NO | | 0 | | -| ret-aes | | boolean | NO | | 0 | | -| usehub | | boolean | NO | | 0 | | -| subhub | | boolean | 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 | | -| failed | Connection failed | boolean | YES | | NULL | | -| 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 | | -| last-discovery | date of the last follower discovery | datetime | NO | | 0001-01-01 00:00:00 | | -| priority | | tinyint unsigned | NO | | 0 | | -| blocked | Node-wide block status | boolean | NO | | 1 | | -| block_reason | Node-wide block reason | text | YES | | NULL | | -| readonly | posts of the contact are readonly | boolean | NO | | 0 | | -| writable | | boolean | NO | | 0 | | -| forum | contact is a forum | boolean | NO | | 0 | | -| prv | contact is a private group | boolean | NO | | 0 | | -| contact-type | | tinyint | NO | | 0 | | -| manually-approve | | boolean | YES | | NULL | | -| hidden | | boolean | NO | | 0 | | -| archive | | boolean | NO | | 0 | | -| pending | | boolean | NO | | 1 | | -| deleted | Contact has been deleted | boolean | NO | | 0 | | -| rating | | tinyint | NO | | 0 | | -| unsearchable | Contact prefers to not be searchable | boolean | NO | | 0 | | -| sensitive | Contact posts sensitive content | boolean | NO | | 0 | | -| baseurl | baseurl of the contact | varchar(255) | YES | | | | -| gsid | Global Server ID | int unsigned | YES | | NULL | | -| reason | | text | YES | | NULL | | -| closeness | | tinyint unsigned | NO | | 99 | | -| info | | mediumtext | YES | | NULL | | -| profile-id | Deprecated | int unsigned | YES | | NULL | | -| bdyear | | varchar(4) | NO | | | | -| bd | | date | NO | | 0001-01-01 | | -| notify_new_posts | | boolean | NO | | 0 | | -| fetch_further_information | | tinyint unsigned | NO | | 0 | | -| ffi_keyword_denylist | | text | YES | | NULL | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | +| updated | Date of last contact update | datetime | YES | | 0001-01-01 00:00:00 | | +| self | 1 if the contact is the user him/her self | boolean | NO | | 0 | | +| remote_self | | boolean | NO | | 0 | | +| rel | The kind of the relation between the user and the contact | tinyint unsigned | NO | | 0 | | +| duplex | | boolean | NO | | 0 | | +| network | Network of the contact | char(4) | NO | | | | +| protocol | Protocol of the contact | char(4) | 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) | YES | | | | +| about | | text | YES | | NULL | | +| keywords | public keywords (interests) of the contact | text | YES | | NULL | | +| gender | Deprecated | varchar(32) | NO | | | | +| xmpp | | varchar(255) | NO | | | | +| attag | | varchar(255) | NO | | | | +| avatar | | varchar(255) | NO | | | | +| photo | Link to the profile photo of the contact | varchar(255) | YES | | | | +| thumb | Link to the profile photo (thumb size) | varchar(255) | YES | | | | +| micro | Link to the profile photo (micro size) | varchar(255) | YES | | | | +| site-pubkey | | text | YES | | 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 | YES | | NULL | | +| prvkey | RSA private key 4096 bit | text | YES | | NULL | | +| batch | | varchar(255) | NO | | | | +| request | | varchar(255) | YES | | NULL | | +| notify | | varchar(255) | YES | | NULL | | +| poll | | varchar(255) | YES | | NULL | | +| confirm | | varchar(255) | YES | | NULL | | +| subscribe | | varchar(255) | YES | | NULL | | +| poco | | varchar(255) | YES | | NULL | | +| aes_allow | | boolean | NO | | 0 | | +| ret-aes | | boolean | NO | | 0 | | +| usehub | | boolean | NO | | 0 | | +| subhub | | boolean | 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 | | +| failed | Connection failed | boolean | YES | | NULL | | +| 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 | | +| last-discovery | date of the last follower discovery | datetime | NO | | 0001-01-01 00:00:00 | | +| priority | | tinyint unsigned | NO | | 0 | | +| blocked | Node-wide block status | boolean | NO | | 1 | | +| block_reason | Node-wide block reason | text | YES | | NULL | | +| readonly | posts of the contact are readonly | boolean | NO | | 0 | | +| writable | | boolean | NO | | 0 | | +| forum | contact is a forum | boolean | NO | | 0 | | +| prv | contact is a private group | boolean | NO | | 0 | | +| contact-type | | tinyint | NO | | 0 | | +| manually-approve | | boolean | YES | | NULL | | +| hidden | | boolean | NO | | 0 | | +| archive | | boolean | NO | | 0 | | +| pending | | boolean | NO | | 1 | | +| deleted | Contact has been deleted | boolean | NO | | 0 | | +| rating | | tinyint | NO | | 0 | | +| unsearchable | Contact prefers to not be searchable | boolean | NO | | 0 | | +| sensitive | Contact posts sensitive content | boolean | NO | | 0 | | +| baseurl | baseurl of the contact | varchar(255) | YES | | | | +| gsid | Global Server ID | int unsigned | YES | | NULL | | +| reason | | text | YES | | NULL | | +| closeness | | tinyint unsigned | NO | | 99 | | +| info | | mediumtext | YES | | NULL | | +| profile-id | Deprecated | int unsigned | YES | | NULL | | +| bdyear | | varchar(4) | NO | | | | +| bd | | date | NO | | 0001-01-01 | | +| notify_new_posts | | boolean | NO | | 0 | | +| fetch_further_information | | tinyint unsigned | NO | | 0 | | +| ffi_keyword_denylist | | text | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_conv.md b/doc/database/db_conv.md index e07ee4484..72ea49590 100644 --- a/doc/database/db_conv.md +++ b/doc/database/db_conv.md @@ -4,13 +4,13 @@ private messages | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| guid | A unique identifier for this conversation | varchar(255) | NO | | | | -| recips | sender_handle;recipient_handle | text | YES | | NULL | | -| uid | Owner User id | mediumint unsigned | NO | | 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 | text | YES | | NULL | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| guid | A unique identifier for this conversation | varchar(255) | NO | | | | +| recips | sender_handle;recipient_handle | text | YES | | NULL | | +| uid | Owner User id | mediumint unsigned | NO | | 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 | text | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_conversation.md b/doc/database/db_conversation.md index bcc531a49..212d2a76e 100644 --- a/doc/database/db_conversation.md +++ b/doc/database/db_conversation.md @@ -4,13 +4,13 @@ Raw data and structure information for messages | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| item-uri | Original URI of the item - unrelated to the table with the same name | 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 unsigned | NO | | 255 | | -| direction | How the message arrived here: 1=push, 2=pull | tinyint unsigned | NO | | 0 | | -| source | Original source | mediumtext | YES | | NULL | | -| received | Receiving date | datetime | NO | | 0001-01-01 00:00:00 | | +| item-uri | Original URI of the item - unrelated to the table with the same name | 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 unsigned | NO | | 255 | | +| direction | How the message arrived here: 1=push, 2=pull | tinyint unsigned | NO | | 0 | | +| source | Original source | mediumtext | YES | | NULL | | +| received | Receiving date | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_delayed-post.md b/doc/database/db_delayed-post.md index 40e644ec4..ab79f557a 100644 --- a/doc/database/db_delayed-post.md +++ b/doc/database/db_delayed-post.md @@ -4,9 +4,9 @@ Posts that are about to be distributed at a later time | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | int unsigned | NO | PRI | NULL | auto_increment | -| uri | URI of the post that will be distributed later | varchar(255) | YES | | NULL | | -| uid | Owner User id | mediumint unsigned | YES | | NULL | | -| delayed | delay time | datetime | YES | | NULL | | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| uri | URI of the post that will be distributed later | varchar(255) | YES | | NULL | | +| uid | Owner User id | mediumint unsigned | YES | | NULL | | +| delayed | delay time | datetime | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_diaspora-interaction.md b/doc/database/db_diaspora-interaction.md index 8a971cd3d..80bd5f196 100644 --- a/doc/database/db_diaspora-interaction.md +++ b/doc/database/db_diaspora-interaction.md @@ -4,7 +4,7 @@ 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 | NO | PRI | NULL | | -| interaction | The Diaspora interaction | mediumtext | YES | | NULL | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| interaction | The Diaspora interaction | mediumtext | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_event.md b/doc/database/db_event.md index e8c55a5b3..a227b78db 100644 --- a/doc/database/db_event.md +++ b/doc/database/db_event.md @@ -4,25 +4,25 @@ Events | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| guid | | varchar(255) | NO | | | | -| uid | Owner User id | mediumint unsigned | NO | | 0 | | -| cid | contact_id (ID of the contact in contact table) | int unsigned | 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 | YES | | NULL | | -| desc | event description | text | YES | | NULL | | -| location | event location | text | YES | | NULL | | -| type | event or birthday | varchar(20) | NO | | | | -| nofinish | if event does have no end this is 1 | boolean | NO | | 0 | | -| adjust | adjust to timezone of the recipient (0 or 1) | boolean | NO | | 1 | | -| ignore | 0 or 1 | boolean | NO | | 0 | | -| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | -| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | -| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | -| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| guid | | varchar(255) | NO | | | | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| cid | contact_id (ID of the contact in contact table) | int unsigned | 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 | YES | | NULL | | +| desc | event description | text | YES | | NULL | | +| location | event location | text | YES | | NULL | | +| type | event or birthday | varchar(20) | NO | | | | +| nofinish | if event does have no end this is 1 | boolean | NO | | 0 | | +| adjust | adjust to timezone of the recipient (0 or 1) | boolean | NO | | 1 | | +| ignore | 0 or 1 | boolean | NO | | 0 | | +| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | +| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | +| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | +| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_fcontact.md b/doc/database/db_fcontact.md index d78d55fe4..b1b622a21 100644 --- a/doc/database/db_fcontact.md +++ b/doc/database/db_fcontact.md @@ -4,22 +4,22 @@ Diaspora compatible contacts - used in the Diaspora implementation | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| guid | unique id | varchar(255) | 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 | | | | -| batch | | varchar(255) | NO | | | | -| notify | | varchar(255) | NO | | | | -| poll | | varchar(255) | NO | | | | -| confirm | | varchar(255) | NO | | | | -| priority | | tinyint unsigned | NO | | 0 | | -| network | | char(4) | NO | | | | -| alias | | varchar(255) | NO | | | | -| pubkey | | text | YES | | NULL | | -| updated | | datetime | NO | | 0001-01-01 00:00:00 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| guid | unique id | varchar(255) | 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 | | | | +| batch | | varchar(255) | NO | | | | +| notify | | varchar(255) | NO | | | | +| poll | | varchar(255) | NO | | | | +| confirm | | varchar(255) | NO | | | | +| priority | | tinyint unsigned | NO | | 0 | | +| network | | char(4) | NO | | | | +| alias | | varchar(255) | NO | | | | +| pubkey | | text | YES | | NULL | | +| updated | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_fsuggest.md b/doc/database/db_fsuggest.md index 11325b647..206410ad9 100644 --- a/doc/database/db_fsuggest.md +++ b/doc/database/db_fsuggest.md @@ -4,14 +4,14 @@ friend suggestion stuff | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | int unsigned | NO | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | NO | | 0 | | -| cid | | int unsigned | NO | | 0 | | -| name | | varchar(255) | NO | | | | -| url | | varchar(255) | NO | | | | -| request | | varchar(255) | NO | | | | -| photo | | varchar(255) | NO | | | | -| note | | text | YES | | NULL | | -| created | | datetime | NO | | 0001-01-01 00:00:00 | | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| cid | | int unsigned | NO | | 0 | | +| name | | varchar(255) | NO | | | | +| url | | varchar(255) | NO | | | | +| request | | varchar(255) | NO | | | | +| photo | | varchar(255) | NO | | | | +| note | | text | YES | | NULL | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_group.md b/doc/database/db_group.md index 1f4d0e588..11e6d667c 100644 --- a/doc/database/db_group.md +++ b/doc/database/db_group.md @@ -4,10 +4,10 @@ privacy groups, group info | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | Owner User id | mediumint unsigned | NO | | 0 | | -| visible | 1 indicates the member list is not private | boolean | NO | | 0 | | -| deleted | 1 indicates the group has been deleted | boolean | NO | | 0 | | -| name | human readable name of group | varchar(255) | NO | | | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| visible | 1 indicates the member list is not private | boolean | NO | | 0 | | +| deleted | 1 indicates the group has been deleted | boolean | NO | | 0 | | +| name | human readable name of group | varchar(255) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_group_member.md b/doc/database/db_group_member.md index fa1c64d2e..0169d276b 100644 --- a/doc/database/db_group_member.md +++ b/doc/database/db_group_member.md @@ -4,8 +4,8 @@ privacy groups, member info | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| gid | groups.id of the associated group | int unsigned | NO | | 0 | | -| contact-id | contact.id of the member assigned to the associated group | int unsigned | NO | | 0 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| gid | groups.id of the associated group | int unsigned | NO | | 0 | | +| contact-id | contact.id of the member assigned to the associated group | int unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_gserver-tag.md b/doc/database/db_gserver-tag.md index 985845c43..9631f293e 100644 --- a/doc/database/db_gserver-tag.md +++ b/doc/database/db_gserver-tag.md @@ -4,7 +4,7 @@ Tags that the server has subscribed | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| gserver-id | The id of the gserver | int unsigned | NO | PRI | 0 | | -| tag | Tag that the server has subscribed | varchar(100) | NO | PRI | | | +| gserver-id | The id of the gserver | int unsigned | NO | PRI | 0 | | +| tag | Tag that the server has subscribed | varchar(100) | NO | PRI | | | Return to [database documentation](help/database) diff --git a/doc/database/db_gserver.md b/doc/database/db_gserver.md index bfbf4ec85..220a8a17c 100644 --- a/doc/database/db_gserver.md +++ b/doc/database/db_gserver.md @@ -4,28 +4,28 @@ Global servers | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| url | | varchar(255) | NO | | | | -| nurl | | varchar(255) | NO | | | | -| version | | varchar(255) | NO | | | | -| site_name | | varchar(255) | NO | | | | -| info | | text | YES | | NULL | | -| register_policy | | tinyint | NO | | 0 | | -| registered-users | Number of registered users | int unsigned | NO | | 0 | | -| directory-type | Type of directory service (Poco, Mastodon) | tinyint | YES | | 0 | | -| poco | | varchar(255) | NO | | | | -| noscrape | | varchar(255) | NO | | | | -| network | | char(4) | NO | | | | -| protocol | The protocol of the server | tinyint unsigned | YES | | NULL | | -| platform | | varchar(255) | NO | | | | -| relay-subscribe | Has the server subscribed to the relay system | boolean | NO | | 0 | | -| relay-scope | The scope of messages that the server wants to get | varchar(10) | NO | | | | -| detection-method | Method that had been used to detect that server | tinyint unsigned | YES | | NULL | | -| created | | datetime | NO | | 0001-01-01 00:00:00 | | -| last_poco_query | | datetime | YES | | 0001-01-01 00:00:00 | | -| last_contact | Last successful connection request | datetime | YES | | 0001-01-01 00:00:00 | | -| last_failure | Last failed connection request | datetime | YES | | 0001-01-01 00:00:00 | | -| failed | Connection failed | boolean | YES | | NULL | | -| next_contact | Next connection request | datetime | YES | | 0001-01-01 00:00:00 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| url | | varchar(255) | NO | | | | +| nurl | | varchar(255) | NO | | | | +| version | | varchar(255) | NO | | | | +| site_name | | varchar(255) | NO | | | | +| info | | text | YES | | NULL | | +| register_policy | | tinyint | NO | | 0 | | +| registered-users | Number of registered users | int unsigned | NO | | 0 | | +| directory-type | Type of directory service (Poco, Mastodon) | tinyint | YES | | 0 | | +| poco | | varchar(255) | NO | | | | +| noscrape | | varchar(255) | NO | | | | +| network | | char(4) | NO | | | | +| protocol | The protocol of the server | tinyint unsigned | YES | | NULL | | +| platform | | varchar(255) | NO | | | | +| relay-subscribe | Has the server subscribed to the relay system | boolean | NO | | 0 | | +| relay-scope | The scope of messages that the server wants to get | varchar(10) | NO | | | | +| detection-method | Method that had been used to detect that server | tinyint unsigned | YES | | NULL | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | +| last_poco_query | | datetime | YES | | 0001-01-01 00:00:00 | | +| last_contact | Last successful connection request | datetime | YES | | 0001-01-01 00:00:00 | | +| last_failure | Last failed connection request | datetime | YES | | 0001-01-01 00:00:00 | | +| failed | Connection failed | boolean | YES | | NULL | | +| next_contact | Next connection request | datetime | YES | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_hook.md b/doc/database/db_hook.md index dbf4f7901..c6b6cf9d0 100644 --- a/doc/database/db_hook.md +++ b/doc/database/db_hook.md @@ -4,10 +4,10 @@ addon hook registry | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| hook | name of hook | varbinary(100) | NO | | | | -| file | relative filename of hook handler | varbinary(200) | NO | | | | -| function | function name of hook handler | varbinary(200) | NO | | | | -| priority | not yet implemented - can be used to sort conflicts in hook handling by calling handlers in priority order | smallint unsigned | NO | | 0 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| hook | name of hook | varbinary(100) | NO | | | | +| file | relative filename of hook handler | varbinary(200) | NO | | | | +| function | function name of hook handler | varbinary(200) | NO | | | | +| priority | not yet implemented - can be used to sort conflicts in hook handling by calling handlers in priority order | smallint unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_host.md b/doc/database/db_host.md index 586f2b450..97c3bb5fe 100644 --- a/doc/database/db_host.md +++ b/doc/database/db_host.md @@ -4,7 +4,7 @@ Hostname | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | tinyint unsigned | NO | PRI | NULL | auto_increment | -| name | The hostname | varchar(128) | NO | | | | +| id | sequential ID | tinyint unsigned | NO | PRI | NULL | auto_increment | +| name | The hostname | varchar(128) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_inbox-status.md b/doc/database/db_inbox-status.md index 19b3c43e5..882f601b2 100644 --- a/doc/database/db_inbox-status.md +++ b/doc/database/db_inbox-status.md @@ -4,12 +4,12 @@ Status of ActivityPub inboxes | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| url | URL of the inbox | varbinary(255) | NO | PRI | NULL | | -| created | Creation date of this entry | datetime | NO | | 0001-01-01 00:00:00 | | -| success | Date of the last successful delivery | datetime | NO | | 0001-01-01 00:00:00 | | -| failure | Date of the last failed delivery | datetime | NO | | 0001-01-01 00:00:00 | | -| previous | Previous delivery date | datetime | NO | | 0001-01-01 00:00:00 | | -| archive | Is the inbox archived? | boolean | NO | | 0 | | -| shared | Is it a shared inbox? | boolean | NO | | 0 | | +| url | URL of the inbox | varbinary(255) | NO | PRI | NULL | | +| created | Creation date of this entry | datetime | NO | | 0001-01-01 00:00:00 | | +| success | Date of the last successful delivery | datetime | NO | | 0001-01-01 00:00:00 | | +| failure | Date of the last failed delivery | datetime | NO | | 0001-01-01 00:00:00 | | +| previous | Previous delivery date | datetime | NO | | 0001-01-01 00:00:00 | | +| archive | Is the inbox archived? | boolean | NO | | 0 | | +| shared | Is it a shared inbox? | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_intro.md b/doc/database/db_intro.md index 7aa162bdd..698fbe918 100644 --- a/doc/database/db_intro.md +++ b/doc/database/db_intro.md @@ -4,16 +4,16 @@ Table intro | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | NO | | 0 | | -| fid | | int unsigned | YES | | NULL | | -| contact-id | | int unsigned | NO | | 0 | | -| knowyou | | boolean | NO | | 0 | | -| duplex | | boolean | NO | | 0 | | -| note | | text | YES | | NULL | | -| hash | | varchar(255) | NO | | | | -| datetime | | datetime | NO | | 0001-01-01 00:00:00 | | -| blocked | | boolean | NO | | 1 | | -| ignore | | boolean | NO | | 0 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| fid | | int unsigned | YES | | NULL | | +| contact-id | | int unsigned | NO | | 0 | | +| knowyou | | boolean | NO | | 0 | | +| duplex | | boolean | NO | | 0 | | +| note | | text | YES | | NULL | | +| hash | | varchar(255) | NO | | | | +| datetime | | datetime | NO | | 0001-01-01 00:00:00 | | +| blocked | | boolean | NO | | 1 | | +| ignore | | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_item-uri.md b/doc/database/db_item-uri.md index 85c7a40b3..cc7a28e3a 100644 --- a/doc/database/db_item-uri.md +++ b/doc/database/db_item-uri.md @@ -4,8 +4,8 @@ URI and GUID for items | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | int unsigned | NO | PRI | NULL | auto_increment | -| uri | URI of an item | varbinary(255) | NO | | NULL | | -| guid | A unique identifier for an item | varbinary(255) | YES | | NULL | | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| uri | URI of an item | varbinary(255) | NO | | NULL | | +| guid | A unique identifier for an item | varbinary(255) | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_locks.md b/doc/database/db_locks.md index cf56a0071..94e39dee7 100644 --- a/doc/database/db_locks.md +++ b/doc/database/db_locks.md @@ -4,10 +4,10 @@ Table locks | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| name | | varchar(128) | NO | | | | -| locked | | boolean | NO | | 0 | | -| pid | Process ID | int unsigned | NO | | 0 | | -| expires | datetime of cache expiration | datetime | NO | | 0001-01-01 00:00:00 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| name | | varchar(128) | NO | | | | +| locked | | boolean | NO | | 0 | | +| pid | Process ID | int unsigned | NO | | 0 | | +| expires | datetime of cache expiration | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_mail.md b/doc/database/db_mail.md index 2f96d639d..7ee802255 100644 --- a/doc/database/db_mail.md +++ b/doc/database/db_mail.md @@ -4,27 +4,27 @@ private messages | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | Owner User id | mediumint unsigned | NO | | 0 | | -| guid | A unique identifier for this private message | varchar(255) | NO | | | | -| 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) | YES | | NULL | | -| author-id | Link to the contact table with uid=0 of the author of the mail | int unsigned | YES | | NULL | | -| convid | conv.id | int unsigned | YES | | NULL | | -| title | | varchar(255) | NO | | | | -| body | | mediumtext | YES | | NULL | | -| seen | if message visited it is 1 | boolean | NO | | 0 | | -| reply | | boolean | NO | | 0 | | -| replied | | boolean | NO | | 0 | | -| unknown | if sender not in the contact table this is 1 | boolean | NO | | 0 | | -| uri | | varchar(255) | NO | | | | -| uri-id | Item-uri id of the related mail | int unsigned | YES | | NULL | | -| parent-uri | | varchar(255) | NO | | | | -| parent-uri-id | Item-uri id of the parent of the related mail | int unsigned | YES | | NULL | | -| thr-parent | | varchar(255) | YES | | NULL | | -| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | YES | | NULL | | -| created | creation time of the private message | datetime | NO | | 0001-01-01 00:00:00 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| guid | A unique identifier for this private message | varchar(255) | NO | | | | +| 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) | YES | | NULL | | +| author-id | Link to the contact table with uid=0 of the author of the mail | int unsigned | YES | | NULL | | +| convid | conv.id | int unsigned | YES | | NULL | | +| title | | varchar(255) | NO | | | | +| body | | mediumtext | YES | | NULL | | +| seen | if message visited it is 1 | boolean | NO | | 0 | | +| reply | | boolean | NO | | 0 | | +| replied | | boolean | NO | | 0 | | +| unknown | if sender not in the contact table this is 1 | boolean | NO | | 0 | | +| uri | | varchar(255) | NO | | | | +| uri-id | Item-uri id of the related mail | int unsigned | YES | | NULL | | +| parent-uri | | varchar(255) | NO | | | | +| parent-uri-id | Item-uri id of the parent of the related mail | int unsigned | YES | | NULL | | +| thr-parent | | varchar(255) | YES | | NULL | | +| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | YES | | NULL | | +| created | creation time of the private message | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_mailacct.md b/doc/database/db_mailacct.md index ec2f5cb54..cd3808d84 100644 --- a/doc/database/db_mailacct.md +++ b/doc/database/db_mailacct.md @@ -4,18 +4,18 @@ Mail account data for fetching mails | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | NO | | 0 | | -| server | | varchar(255) | NO | | | | -| port | | smallint unsigned | NO | | 0 | | -| ssltype | | varchar(16) | NO | | | | -| mailbox | | varchar(255) | NO | | | | -| user | | varchar(255) | NO | | | | -| pass | | text | YES | | NULL | | -| reply_to | | varchar(255) | NO | | | | -| action | | tinyint unsigned | NO | | 0 | | -| movetofolder | | varchar(255) | NO | | | | -| pubmail | | boolean | NO | | 0 | | -| last_check | | datetime | NO | | 0001-01-01 00:00:00 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| server | | varchar(255) | NO | | | | +| port | | smallint unsigned | NO | | 0 | | +| ssltype | | varchar(16) | NO | | | | +| mailbox | | varchar(255) | NO | | | | +| user | | varchar(255) | NO | | | | +| pass | | text | YES | | NULL | | +| reply_to | | varchar(255) | NO | | | | +| action | | tinyint unsigned | NO | | 0 | | +| movetofolder | | varchar(255) | NO | | | | +| pubmail | | boolean | NO | | 0 | | +| last_check | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_manage.md b/doc/database/db_manage.md index 645bba492..42b255354 100644 --- a/doc/database/db_manage.md +++ b/doc/database/db_manage.md @@ -4,8 +4,8 @@ table of accounts that can manage each other | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | NO | | 0 | | -| mid | User id | mediumint unsigned | NO | | 0 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| mid | User id | mediumint unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_notification.md b/doc/database/db_notification.md index 6a6f0c81d..5858151a3 100644 --- a/doc/database/db_notification.md +++ b/doc/database/db_notification.md @@ -4,14 +4,14 @@ notifications | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | Owner User id | mediumint unsigned | YES | | NULL | | -| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | YES | | NULL | | -| type | | tinyint unsigned | YES | | NULL | | -| actor-id | Link to the contact table with uid=0 of the actor that caused the notification | int unsigned | YES | | NULL | | -| target-uri-id | Item-uri id of the related post | int unsigned | YES | | NULL | | -| parent-uri-id | Item-uri id of the parent of the related post | int unsigned | YES | | NULL | | -| created | | datetime | YES | | NULL | | -| seen | | boolean | YES | | 0 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | YES | | NULL | | +| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | YES | | NULL | | +| type | | tinyint unsigned | YES | | NULL | | +| actor-id | Link to the contact table with uid=0 of the actor that caused the notification | int unsigned | YES | | NULL | | +| target-uri-id | Item-uri id of the related post | int unsigned | YES | | NULL | | +| parent-uri-id | Item-uri id of the parent of the related post | int unsigned | YES | | NULL | | +| created | | datetime | YES | | NULL | | +| seen | | boolean | YES | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_notify-threads.md b/doc/database/db_notify-threads.md index 11d98b4c0..24aba8093 100644 --- a/doc/database/db_notify-threads.md +++ b/doc/database/db_notify-threads.md @@ -4,11 +4,11 @@ Table notify-threads | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| notify-id | | int unsigned | NO | | 0 | | -| master-parent-item | Deprecated | int unsigned | YES | | NULL | | -| master-parent-uri-id | Item-uri id of the parent of the related post | int unsigned | YES | | NULL | | -| parent-item | | int unsigned | NO | | 0 | | -| receiver-uid | User id | mediumint unsigned | NO | | 0 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| notify-id | | int unsigned | NO | | 0 | | +| master-parent-item | Deprecated | int unsigned | YES | | NULL | | +| master-parent-uri-id | Item-uri id of the parent of the related post | int unsigned | YES | | NULL | | +| parent-item | | int unsigned | NO | | 0 | | +| receiver-uid | User id | mediumint unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_notify.md b/doc/database/db_notify.md index 07263ab4d..79c1c7359 100644 --- a/doc/database/db_notify.md +++ b/doc/database/db_notify.md @@ -4,23 +4,23 @@ notifications | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| type | | smallint unsigned | 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 | Owner User id | mediumint unsigned | NO | | 0 | | -| link | | varchar(255) | NO | | | | -| iid | | int unsigned | YES | | NULL | | -| parent | | int unsigned | YES | | NULL | | -| uri-id | Item-uri id of the related post | int unsigned | YES | | NULL | | -| parent-uri-id | Item-uri id of the parent of the related post | int unsigned | YES | | NULL | | -| seen | | boolean | NO | | 0 | | -| verb | | varchar(100) | NO | | | | -| otype | | varchar(10) | NO | | | | -| name_cache | Cached bbcode parsing of name | tinytext | YES | | NULL | | -| msg_cache | Cached bbcode parsing of msg | mediumtext | YES | | NULL | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| type | | smallint unsigned | 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 | Owner User id | mediumint unsigned | NO | | 0 | | +| link | | varchar(255) | NO | | | | +| iid | | int unsigned | YES | | NULL | | +| parent | | int unsigned | YES | | NULL | | +| uri-id | Item-uri id of the related post | int unsigned | YES | | NULL | | +| parent-uri-id | Item-uri id of the parent of the related post | int unsigned | YES | | NULL | | +| seen | | boolean | NO | | 0 | | +| verb | | varchar(100) | NO | | | | +| otype | | varchar(10) | NO | | | | +| name_cache | Cached bbcode parsing of name | tinytext | YES | | NULL | | +| msg_cache | Cached bbcode parsing of msg | mediumtext | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_oembed.md b/doc/database/db_oembed.md index 09b9fbbf4..3a264d7da 100644 --- a/doc/database/db_oembed.md +++ b/doc/database/db_oembed.md @@ -4,9 +4,9 @@ cache for OEmbed queries | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| url | page url | varbinary(255) | NO | PRI | NULL | | -| maxwidth | Maximum width passed to Oembed | mediumint unsigned | NO | PRI | NULL | | -| content | OEmbed data of the page | mediumtext | YES | | NULL | | -| created | datetime of creation | datetime | NO | | 0001-01-01 00:00:00 | | +| url | page url | varbinary(255) | NO | PRI | NULL | | +| maxwidth | Maximum width passed to Oembed | mediumint unsigned | NO | PRI | NULL | | +| content | OEmbed data of the page | mediumtext | YES | | NULL | | +| created | datetime of creation | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_openwebauth-token.md b/doc/database/db_openwebauth-token.md index 71a04b0d1..ce30bbacf 100644 --- a/doc/database/db_openwebauth-token.md +++ b/doc/database/db_openwebauth-token.md @@ -4,11 +4,11 @@ Store OpenWebAuth token to verify contacts | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | User id - currently unused | mediumint unsigned | NO | | 0 | | -| type | Verify type | varchar(32) | NO | | | | -| token | A generated token | varchar(255) | NO | | | | -| meta | | varchar(255) | NO | | | | -| created | datetime of creation | datetime | NO | | 0001-01-01 00:00:00 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id - currently unused | mediumint unsigned | NO | | 0 | | +| type | Verify type | varchar(32) | NO | | | | +| token | A generated token | varchar(255) | NO | | | | +| meta | | varchar(255) | NO | | | | +| created | datetime of creation | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_parsed_url.md b/doc/database/db_parsed_url.md index 8f8bd7bdd..757b8c0ab 100644 --- a/doc/database/db_parsed_url.md +++ b/doc/database/db_parsed_url.md @@ -4,12 +4,12 @@ cache for 'parse_url' queries | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| url_hash | page url hash | binary(64) | NO | PRI | NULL | | -| guessing | is the 'guessing' mode active? | boolean | NO | PRI | 0 | | -| oembed | is the data the result of oembed? | boolean | NO | PRI | 0 | | -| url | page url | text | NO | | NULL | | -| content | page data | mediumtext | YES | | NULL | | -| created | datetime of creation | datetime | NO | | 0001-01-01 00:00:00 | | -| expires | datetime of expiration | datetime | NO | | 0001-01-01 00:00:00 | | +| url_hash | page url hash | binary(64) | NO | PRI | NULL | | +| guessing | is the 'guessing' mode active? | boolean | NO | PRI | 0 | | +| oembed | is the data the result of oembed? | boolean | NO | PRI | 0 | | +| url | page url | text | NO | | NULL | | +| content | page data | mediumtext | YES | | NULL | | +| created | datetime of creation | datetime | NO | | 0001-01-01 00:00:00 | | +| expires | datetime of expiration | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_pconfig.md b/doc/database/db_pconfig.md index c92709378..99f905877 100644 --- a/doc/database/db_pconfig.md +++ b/doc/database/db_pconfig.md @@ -4,10 +4,10 @@ personal (per user) configuration storage | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | Primary key | int unsigned | NO | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | NO | | 0 | | -| cat | Category | varchar(50) | NO | | | | -| k | Key | varchar(100) | NO | | | | -| v | Value | mediumtext | YES | | NULL | | +| id | Primary key | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| cat | Category | varchar(50) | NO | | | | +| k | Key | varchar(100) | NO | | | | +| v | Value | mediumtext | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_permissionset.md b/doc/database/db_permissionset.md index 3bcbef86e..e49245524 100644 --- a/doc/database/db_permissionset.md +++ b/doc/database/db_permissionset.md @@ -4,11 +4,11 @@ Table permissionset | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | Owner id of this permission set | mediumint unsigned | NO | | 0 | | -| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | -| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | -| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | -| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner id of this permission set | mediumint unsigned | NO | | 0 | | +| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | +| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | +| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | +| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_photo.md b/doc/database/db_photo.md index 80b74b6d2..10ae06f09 100644 --- a/doc/database/db_photo.md +++ b/doc/database/db_photo.md @@ -4,32 +4,32 @@ photo storage | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | Owner User id | mediumint unsigned | NO | | 0 | | -| contact-id | contact.id | int unsigned | NO | | 0 | | -| guid | A unique identifier for this photo | char(16) | NO | | | | -| resource-id | | char(32) | NO | | | | -| hash | hash value of the photo | char(32) | YES | | NULL | | -| 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 | YES | | NULL | | -| album | The name of the album to which the photo belongs | varchar(255) | NO | | | | -| filename | | varchar(255) | NO | | | | -| type | | varchar(30) | NO | | image/jpeg | | -| height | | smallint unsigned | NO | | 0 | | -| width | | smallint unsigned | NO | | 0 | | -| datasize | | int unsigned | NO | | 0 | | -| data | | mediumblob | NO | | NULL | | -| scale | | tinyint unsigned | NO | | 0 | | -| profile | | boolean | NO | | 0 | | -| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | -| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | -| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | -| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | -| accessible | Make photo publicly accessible, ignoring permissions | boolean | NO | | 0 | | -| backend-class | Storage backend class | tinytext | YES | | NULL | | -| backend-ref | Storage backend data reference | text | YES | | NULL | | -| updated | | datetime | NO | | 0001-01-01 00:00:00 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| contact-id | contact.id | int unsigned | NO | | 0 | | +| guid | A unique identifier for this photo | char(16) | NO | | | | +| resource-id | | char(32) | NO | | | | +| hash | hash value of the photo | char(32) | YES | | NULL | | +| 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 | YES | | NULL | | +| album | The name of the album to which the photo belongs | varchar(255) | NO | | | | +| filename | | varchar(255) | NO | | | | +| type | | varchar(30) | NO | | image/jpeg | | +| height | | smallint unsigned | NO | | 0 | | +| width | | smallint unsigned | NO | | 0 | | +| datasize | | int unsigned | NO | | 0 | | +| data | | mediumblob | NO | | NULL | | +| scale | | tinyint unsigned | NO | | 0 | | +| profile | | boolean | NO | | 0 | | +| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | +| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | +| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | +| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | +| accessible | Make photo publicly accessible, ignoring permissions | boolean | NO | | 0 | | +| backend-class | Storage backend class | tinytext | YES | | NULL | | +| backend-ref | Storage backend data reference | text | YES | | NULL | | +| updated | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-category.md b/doc/database/db_post-category.md index ecb0793c5..a4b847493 100644 --- a/doc/database/db_post-category.md +++ b/doc/database/db_post-category.md @@ -4,9 +4,9 @@ post relation to categories | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | -| uid | User id | mediumint unsigned | NO | PRI | 0 | | -| type | | tinyint unsigned | NO | PRI | 0 | | -| tid | | int unsigned | NO | PRI | 0 | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| uid | User id | mediumint unsigned | NO | PRI | 0 | | +| type | | tinyint unsigned | NO | PRI | 0 | | +| tid | | int unsigned | NO | PRI | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-content.md b/doc/database/db_post-content.md index 69aa06c4b..232753223 100644 --- a/doc/database/db_post-content.md +++ b/doc/database/db_post-content.md @@ -4,22 +4,22 @@ Content for all posts | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | -| title | item title | varchar(255) | NO | | | | -| content-warning | | varchar(255) | NO | | | | -| body | item body content | mediumtext | YES | | NULL | | -| raw-body | Body without embedded media links | mediumtext | YES | | NULL | | -| location | text location where this item originated | varchar(255) | NO | | | | -| coord | longitude/latitude pair representing location where this item originated | varchar(255) | NO | | | | -| language | Language information about this post | text | YES | | NULL | | -| app | application which generated this item | varchar(255) | NO | | | | -| rendered-hash | | varchar(32) | NO | | | | -| rendered-html | item.body converted to html | mediumtext | YES | | NULL | | -| object-type | ActivityStreams object type | varchar(100) | NO | | | | -| object | JSON encoded object structure unless it is an implied object (normal post) | text | YES | | NULL | | -| target-type | ActivityStreams target type if applicable (URI) | varchar(100) | NO | | | | -| target | JSON encoded target structure if used | text | YES | | NULL | | -| 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(32) | NO | | | | -| plink | permalink or URL to a displayable copy of the message at its source | varchar(255) | NO | | | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| title | item title | varchar(255) | NO | | | | +| content-warning | | varchar(255) | NO | | | | +| body | item body content | mediumtext | YES | | NULL | | +| raw-body | Body without embedded media links | mediumtext | YES | | NULL | | +| location | text location where this item originated | varchar(255) | NO | | | | +| coord | longitude/latitude pair representing location where this item originated | varchar(255) | NO | | | | +| language | Language information about this post | text | YES | | NULL | | +| app | application which generated this item | varchar(255) | NO | | | | +| rendered-hash | | varchar(32) | NO | | | | +| rendered-html | item.body converted to html | mediumtext | YES | | NULL | | +| object-type | ActivityStreams object type | varchar(100) | NO | | | | +| object | JSON encoded object structure unless it is an implied object (normal post) | text | YES | | NULL | | +| target-type | ActivityStreams target type if applicable (URI) | varchar(100) | NO | | | | +| target | JSON encoded target structure if used | text | YES | | NULL | | +| 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(32) | NO | | | | +| plink | permalink or URL to a displayable copy of the message at its source | varchar(255) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-delivery-data.md b/doc/database/db_post-delivery-data.md index 8a333dada..30a91193a 100644 --- a/doc/database/db_post-delivery-data.md +++ b/doc/database/db_post-delivery-data.md @@ -4,16 +4,16 @@ Delivery data for items | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | 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 | YES | | NULL | | -| inform | Additional receivers of the linked item | mediumtext | YES | | NULL | | -| queue_count | Initial number of delivery recipients, used as item.delivery_queue_count | mediumint | NO | | 0 | | -| queue_done | Number of successful deliveries, used as item.delivery_queue_done | mediumint | NO | | 0 | | -| queue_failed | Number of unsuccessful deliveries, used as item.delivery_queue_failed | mediumint | NO | | 0 | | -| activitypub | Number of successful deliveries via ActivityPub | mediumint | NO | | 0 | | -| dfrn | Number of successful deliveries via DFRN | mediumint | NO | | 0 | | -| legacy_dfrn | Number of successful deliveries via legacy DFRN | mediumint | NO | | 0 | | -| diaspora | Number of successful deliveries via Diaspora | mediumint | NO | | 0 | | -| ostatus | Number of successful deliveries via OStatus | mediumint | NO | | 0 | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | 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 | YES | | NULL | | +| inform | Additional receivers of the linked item | mediumtext | YES | | NULL | | +| queue_count | Initial number of delivery recipients, used as item.delivery_queue_count | mediumint | NO | | 0 | | +| queue_done | Number of successful deliveries, used as item.delivery_queue_done | mediumint | NO | | 0 | | +| queue_failed | Number of unsuccessful deliveries, used as item.delivery_queue_failed | mediumint | NO | | 0 | | +| activitypub | Number of successful deliveries via ActivityPub | mediumint | NO | | 0 | | +| dfrn | Number of successful deliveries via DFRN | mediumint | NO | | 0 | | +| legacy_dfrn | Number of successful deliveries via legacy DFRN | mediumint | NO | | 0 | | +| diaspora | Number of successful deliveries via Diaspora | mediumint | NO | | 0 | | +| ostatus | Number of successful deliveries via OStatus | mediumint | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-media.md b/doc/database/db_post-media.md index bf5f1dfe5..de3b0e43c 100644 --- a/doc/database/db_post-media.md +++ b/doc/database/db_post-media.md @@ -4,24 +4,24 @@ Attached media | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | | NULL | | -| url | Media URL | varbinary(511) | NO | | NULL | | -| type | Media type | tinyint unsigned | NO | | 0 | | -| mimetype | | varchar(60) | YES | | NULL | | -| height | Height of the media | smallint unsigned | YES | | NULL | | -| width | Width of the media | smallint unsigned | YES | | NULL | | -| size | Media size | int unsigned | YES | | NULL | | -| preview | Preview URL | varbinary(255) | YES | | NULL | | -| preview-height | Height of the preview picture | smallint unsigned | YES | | NULL | | -| preview-width | Width of the preview picture | smallint unsigned | YES | | NULL | | -| description | | text | YES | | NULL | | -| name | Name of the media | varchar(255) | YES | | NULL | | -| author-url | URL of the author of the media | varbinary(255) | YES | | NULL | | -| author-name | Name of the author of the media | varchar(255) | YES | | NULL | | -| author-image | Image of the author of the media | varbinary(255) | YES | | NULL | | -| publisher-url | URL of the publisher of the media | varbinary(255) | YES | | NULL | | -| publisher-name | Name of the publisher of the media | varchar(255) | YES | | NULL | | -| publisher-image | Image of the publisher of the media | varbinary(255) | YES | | NULL | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | | NULL | | +| url | Media URL | varbinary(511) | NO | | NULL | | +| type | Media type | tinyint unsigned | NO | | 0 | | +| mimetype | | varchar(60) | YES | | NULL | | +| height | Height of the media | smallint unsigned | YES | | NULL | | +| width | Width of the media | smallint unsigned | YES | | NULL | | +| size | Media size | int unsigned | YES | | NULL | | +| preview | Preview URL | varbinary(255) | YES | | NULL | | +| preview-height | Height of the preview picture | smallint unsigned | YES | | NULL | | +| preview-width | Width of the preview picture | smallint unsigned | YES | | NULL | | +| description | | text | YES | | NULL | | +| name | Name of the media | varchar(255) | YES | | NULL | | +| author-url | URL of the author of the media | varbinary(255) | YES | | NULL | | +| author-name | Name of the author of the media | varchar(255) | YES | | NULL | | +| author-image | Image of the author of the media | varbinary(255) | YES | | NULL | | +| publisher-url | URL of the publisher of the media | varbinary(255) | YES | | NULL | | +| publisher-name | Name of the publisher of the media | varchar(255) | YES | | NULL | | +| publisher-image | Image of the publisher of the media | varbinary(255) | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-tag.md b/doc/database/db_post-tag.md index 5223ef9f4..ae65cf983 100644 --- a/doc/database/db_post-tag.md +++ b/doc/database/db_post-tag.md @@ -4,9 +4,9 @@ post relation to tags | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | -| type | | tinyint unsigned | NO | PRI | 0 | | -| tid | | int unsigned | NO | PRI | 0 | | -| cid | Contact id of the mentioned public contact | int unsigned | NO | PRI | 0 | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| type | | tinyint unsigned | NO | PRI | 0 | | +| tid | | int unsigned | NO | PRI | 0 | | +| cid | Contact id of the mentioned public contact | int unsigned | NO | PRI | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-thread-user.md b/doc/database/db_post-thread-user.md index 02b7b22d5..abb1ed8bd 100644 --- a/doc/database/db_post-thread-user.md +++ b/doc/database/db_post-thread-user.md @@ -4,28 +4,28 @@ Thread related data per user | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | -| owner-id | Item owner | int unsigned | NO | | 0 | | -| author-id | Item author | int unsigned | NO | | 0 | | -| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | -| network | | char(4) | NO | | | | -| created | | datetime | NO | | 0001-01-01 00:00:00 | | -| received | | 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 | | -| commented | | datetime | NO | | 0001-01-01 00:00:00 | | -| uid | Owner id which owns this copy of the item | mediumint unsigned | NO | PRI | 0 | | -| pinned | The thread is pinned on the profile page | boolean | NO | | 0 | | -| starred | | boolean | NO | | 0 | | -| ignored | Ignore updates for this thread | boolean | NO | | 0 | | -| wall | This item was posted to the wall of uid | boolean | NO | | 0 | | -| mention | | boolean | NO | | 0 | | -| pubmail | | boolean | NO | | 0 | | -| forum_mode | | tinyint unsigned | NO | | 0 | | -| contact-id | contact.id | int unsigned | NO | | 0 | | -| unseen | post has not been seen | boolean | NO | | 1 | | -| hidden | Marker to hide the post from the user | boolean | NO | | 0 | | -| origin | item originated at this site | boolean | NO | | 0 | | -| psid | ID of the permission set of this post | int unsigned | YES | | NULL | | -| post-user-id | Id of the post-user table | int unsigned | YES | | NULL | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| owner-id | Item owner | int unsigned | NO | | 0 | | +| author-id | Item author | int unsigned | NO | | 0 | | +| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | +| network | | char(4) | NO | | | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | +| received | | 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 | | +| commented | | datetime | NO | | 0001-01-01 00:00:00 | | +| uid | Owner id which owns this copy of the item | mediumint unsigned | NO | PRI | 0 | | +| pinned | The thread is pinned on the profile page | boolean | NO | | 0 | | +| starred | | boolean | NO | | 0 | | +| ignored | Ignore updates for this thread | boolean | NO | | 0 | | +| wall | This item was posted to the wall of uid | boolean | NO | | 0 | | +| mention | | boolean | NO | | 0 | | +| pubmail | | boolean | NO | | 0 | | +| forum_mode | | tinyint unsigned | NO | | 0 | | +| contact-id | contact.id | int unsigned | NO | | 0 | | +| unseen | post has not been seen | boolean | NO | | 1 | | +| hidden | Marker to hide the post from the user | boolean | NO | | 0 | | +| origin | item originated at this site | boolean | NO | | 0 | | +| psid | ID of the permission set of this post | int unsigned | YES | | NULL | | +| post-user-id | Id of the post-user table | int unsigned | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-thread.md b/doc/database/db_post-thread.md index af0124b16..aca05c1e2 100644 --- a/doc/database/db_post-thread.md +++ b/doc/database/db_post-thread.md @@ -4,14 +4,14 @@ Thread related data | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | -| owner-id | Item owner | int unsigned | NO | | 0 | | -| author-id | Item author | int unsigned | NO | | 0 | | -| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | -| network | | char(4) | NO | | | | -| created | | datetime | NO | | 0001-01-01 00:00:00 | | -| received | | 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 | | -| commented | | datetime | NO | | 0001-01-01 00:00:00 | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| owner-id | Item owner | int unsigned | NO | | 0 | | +| author-id | Item author | int unsigned | NO | | 0 | | +| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | +| network | | char(4) | NO | | | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | +| received | | 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 | | +| commented | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-user-notification.md b/doc/database/db_post-user-notification.md index 6696fc3ac..8a93d7a56 100644 --- a/doc/database/db_post-user-notification.md +++ b/doc/database/db_post-user-notification.md @@ -4,8 +4,8 @@ User post notifications | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | -| uid | Owner id which owns this copy of the item | mediumint unsigned | NO | PRI | NULL | | -| notification-type | | tinyint unsigned | NO | | 0 | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| uid | Owner id which owns this copy of the item | mediumint unsigned | NO | PRI | NULL | | +| notification-type | | tinyint unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-user.md b/doc/database/db_post-user.md index 964ccf45c..247787f58 100644 --- a/doc/database/db_post-user.md +++ b/doc/database/db_post-user.md @@ -4,35 +4,35 @@ User specific post data | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | int unsigned | NO | PRI | NULL | auto_increment | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | | NULL | | -| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | YES | | NULL | | -| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | YES | | NULL | | -| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | YES | | NULL | | -| 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 | | -| received | datetime | datetime | NO | | 0001-01-01 00:00:00 | | -| gravity | | tinyint unsigned | NO | | 0 | | -| network | Network from where the item comes from | char(4) | NO | | | | -| owner-id | Link to the contact table with uid=0 of the owner of this item | int unsigned | NO | | 0 | | -| author-id | Link to the contact table with uid=0 of the author of this item | int unsigned | NO | | 0 | | -| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | -| post-type | Post type (personal note, image, article, ...) | tinyint unsigned | NO | | 0 | | -| post-reason | Reason why the post arrived at the user | tinyint unsigned | NO | | 0 | | -| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | YES | | NULL | | -| private | 0=public, 1=private, 2=unlisted | tinyint unsigned | NO | | 0 | | -| global | | boolean | NO | | 0 | | -| visible | | boolean | NO | | 0 | | -| deleted | item has been marked for deletion | boolean | NO | | 0 | | -| uid | Owner id which owns this copy of the item | mediumint unsigned | NO | | NULL | | -| protocol | Protocol used to deliver the item for this user | tinyint unsigned | YES | | NULL | | -| contact-id | contact.id | int unsigned | NO | | 0 | | -| event-id | Used to link to the event.id | int unsigned | YES | | NULL | | -| unseen | post has not been seen | boolean | NO | | 1 | | -| hidden | Marker to hide the post from the user | boolean | NO | | 0 | | -| notification-type | | tinyint unsigned | NO | | 0 | | -| wall | This item was posted to the wall of uid | boolean | NO | | 0 | | -| origin | item originated at this site | boolean | NO | | 0 | | -| psid | ID of the permission set of this post | int unsigned | YES | | NULL | | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | | NULL | | +| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | YES | | NULL | | +| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | YES | | NULL | | +| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | YES | | NULL | | +| 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 | | +| received | datetime | datetime | NO | | 0001-01-01 00:00:00 | | +| gravity | | tinyint unsigned | NO | | 0 | | +| network | Network from where the item comes from | char(4) | NO | | | | +| owner-id | Link to the contact table with uid=0 of the owner of this item | int unsigned | NO | | 0 | | +| author-id | Link to the contact table with uid=0 of the author of this item | int unsigned | NO | | 0 | | +| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | +| post-type | Post type (personal note, image, article, ...) | tinyint unsigned | NO | | 0 | | +| post-reason | Reason why the post arrived at the user | tinyint unsigned | NO | | 0 | | +| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | YES | | NULL | | +| private | 0=public, 1=private, 2=unlisted | tinyint unsigned | NO | | 0 | | +| global | | boolean | NO | | 0 | | +| visible | | boolean | NO | | 0 | | +| deleted | item has been marked for deletion | boolean | NO | | 0 | | +| uid | Owner id which owns this copy of the item | mediumint unsigned | NO | | NULL | | +| protocol | Protocol used to deliver the item for this user | tinyint unsigned | YES | | NULL | | +| contact-id | contact.id | int unsigned | NO | | 0 | | +| event-id | Used to link to the event.id | int unsigned | YES | | NULL | | +| unseen | post has not been seen | boolean | NO | | 1 | | +| hidden | Marker to hide the post from the user | boolean | NO | | 0 | | +| notification-type | | tinyint unsigned | NO | | 0 | | +| wall | This item was posted to the wall of uid | boolean | NO | | 0 | | +| origin | item originated at this site | boolean | NO | | 0 | | +| psid | ID of the permission set of this post | int unsigned | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_post.md b/doc/database/db_post.md index 1367bcb77..ac3cdf34d 100644 --- a/doc/database/db_post.md +++ b/doc/database/db_post.md @@ -4,23 +4,23 @@ Structure for all posts | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | -| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | YES | | NULL | | -| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | YES | | NULL | | -| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | YES | | NULL | | -| 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 | | -| received | datetime | datetime | NO | | 0001-01-01 00:00:00 | | -| gravity | | tinyint unsigned | NO | | 0 | | -| network | Network from where the item comes from | char(4) | NO | | | | -| owner-id | Link to the contact table with uid=0 of the owner of this item | int unsigned | NO | | 0 | | -| author-id | Link to the contact table with uid=0 of the author of this item | int unsigned | NO | | 0 | | -| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | -| post-type | Post type (personal note, image, article, ...) | tinyint unsigned | NO | | 0 | | -| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | YES | | NULL | | -| private | 0=public, 1=private, 2=unlisted | tinyint unsigned | NO | | 0 | | -| global | | boolean | NO | | 0 | | -| visible | | boolean | NO | | 0 | | -| deleted | item has been marked for deletion | boolean | NO | | 0 | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | YES | | NULL | | +| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | YES | | NULL | | +| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | YES | | NULL | | +| 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 | | +| received | datetime | datetime | NO | | 0001-01-01 00:00:00 | | +| gravity | | tinyint unsigned | NO | | 0 | | +| network | Network from where the item comes from | char(4) | NO | | | | +| owner-id | Link to the contact table with uid=0 of the owner of this item | int unsigned | NO | | 0 | | +| author-id | Link to the contact table with uid=0 of the author of this item | int unsigned | NO | | 0 | | +| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | +| post-type | Post type (personal note, image, article, ...) | tinyint unsigned | NO | | 0 | | +| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | YES | | NULL | | +| private | 0=public, 1=private, 2=unlisted | tinyint unsigned | NO | | 0 | | +| global | | boolean | NO | | 0 | | +| visible | | boolean | NO | | 0 | | +| deleted | item has been marked for deletion | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_process.md b/doc/database/db_process.md index 9284130b5..732aa001b 100644 --- a/doc/database/db_process.md +++ b/doc/database/db_process.md @@ -4,8 +4,8 @@ Currently running system processes | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| pid | | int unsigned | NO | PRI | NULL | | -| command | | varbinary(32) | NO | | | | -| created | | datetime | NO | | 0001-01-01 00:00:00 | | +| pid | | int unsigned | NO | PRI | NULL | | +| command | | varbinary(32) | NO | | | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_profile.md b/doc/database/db_profile.md index c7ee65569..c8e27ddc0 100644 --- a/doc/database/db_profile.md +++ b/doc/database/db_profile.md @@ -4,47 +4,47 @@ user profiles data | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | Owner User id | mediumint unsigned | NO | | 0 | | -| profile-name | Deprecated | varchar(255) | YES | | NULL | | -| is-default | Deprecated | boolean | YES | | NULL | | -| hide-friends | Hide friend list from viewers of this profile | boolean | NO | | 0 | | -| name | | varchar(255) | NO | | | | -| pdesc | Deprecated | varchar(255) | YES | | NULL | | -| dob | Day of birth | varchar(32) | NO | | 0000-00-00 | | -| address | | varchar(255) | NO | | | | -| locality | | varchar(255) | NO | | | | -| region | | varchar(255) | NO | | | | -| postal-code | | varchar(32) | NO | | | | -| country-name | | varchar(255) | NO | | | | -| hometown | Deprecated | varchar(255) | YES | | NULL | | -| gender | Deprecated | varchar(32) | YES | | NULL | | -| marital | Deprecated | varchar(255) | YES | | NULL | | -| with | Deprecated | text | YES | | NULL | | -| howlong | Deprecated | datetime | YES | | NULL | | -| sexual | Deprecated | varchar(255) | YES | | NULL | | -| politic | Deprecated | varchar(255) | YES | | NULL | | -| religion | Deprecated | varchar(255) | YES | | NULL | | -| pub_keywords | | text | YES | | NULL | | -| prv_keywords | | text | YES | | NULL | | -| likes | Deprecated | text | YES | | NULL | | -| dislikes | Deprecated | text | YES | | NULL | | -| about | Profile description | text | YES | | NULL | | -| summary | Deprecated | varchar(255) | YES | | NULL | | -| music | Deprecated | text | YES | | NULL | | -| book | Deprecated | text | YES | | NULL | | -| tv | Deprecated | text | YES | | NULL | | -| film | Deprecated | text | YES | | NULL | | -| interest | Deprecated | text | YES | | NULL | | -| romance | Deprecated | text | YES | | NULL | | -| work | Deprecated | text | YES | | NULL | | -| education | Deprecated | text | YES | | NULL | | -| contact | Deprecated | text | YES | | NULL | | -| homepage | | varchar(255) | NO | | | | -| xmpp | | varchar(255) | NO | | | | -| photo | | varchar(255) | NO | | | | -| thumb | | varchar(255) | NO | | | | -| publish | publish default profile in local directory | boolean | NO | | 0 | | -| net-publish | publish profile in global directory | boolean | NO | | 0 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| profile-name | Deprecated | varchar(255) | YES | | NULL | | +| is-default | Deprecated | boolean | YES | | NULL | | +| hide-friends | Hide friend list from viewers of this profile | boolean | NO | | 0 | | +| name | | varchar(255) | NO | | | | +| pdesc | Deprecated | varchar(255) | YES | | NULL | | +| dob | Day of birth | varchar(32) | NO | | 0000-00-00 | | +| address | | varchar(255) | NO | | | | +| locality | | varchar(255) | NO | | | | +| region | | varchar(255) | NO | | | | +| postal-code | | varchar(32) | NO | | | | +| country-name | | varchar(255) | NO | | | | +| hometown | Deprecated | varchar(255) | YES | | NULL | | +| gender | Deprecated | varchar(32) | YES | | NULL | | +| marital | Deprecated | varchar(255) | YES | | NULL | | +| with | Deprecated | text | YES | | NULL | | +| howlong | Deprecated | datetime | YES | | NULL | | +| sexual | Deprecated | varchar(255) | YES | | NULL | | +| politic | Deprecated | varchar(255) | YES | | NULL | | +| religion | Deprecated | varchar(255) | YES | | NULL | | +| pub_keywords | | text | YES | | NULL | | +| prv_keywords | | text | YES | | NULL | | +| likes | Deprecated | text | YES | | NULL | | +| dislikes | Deprecated | text | YES | | NULL | | +| about | Profile description | text | YES | | NULL | | +| summary | Deprecated | varchar(255) | YES | | NULL | | +| music | Deprecated | text | YES | | NULL | | +| book | Deprecated | text | YES | | NULL | | +| tv | Deprecated | text | YES | | NULL | | +| film | Deprecated | text | YES | | NULL | | +| interest | Deprecated | text | YES | | NULL | | +| romance | Deprecated | text | YES | | NULL | | +| work | Deprecated | text | YES | | NULL | | +| education | Deprecated | text | YES | | NULL | | +| contact | Deprecated | text | YES | | NULL | | +| homepage | | varchar(255) | NO | | | | +| xmpp | | varchar(255) | NO | | | | +| photo | | varchar(255) | NO | | | | +| thumb | | varchar(255) | NO | | | | +| publish | publish default profile in local directory | boolean | NO | | 0 | | +| net-publish | publish profile in global directory | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_profile_check.md b/doc/database/db_profile_check.md index b2eea14ae..a98250742 100644 --- a/doc/database/db_profile_check.md +++ b/doc/database/db_profile_check.md @@ -4,11 +4,11 @@ DFRN remote auth use | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | NO | | 0 | | -| cid | contact.id | int unsigned | NO | | 0 | | -| dfrn_id | | varchar(255) | NO | | | | -| sec | | varchar(255) | NO | | | | -| expire | | int unsigned | NO | | 0 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| cid | contact.id | int unsigned | NO | | 0 | | +| dfrn_id | | varchar(255) | NO | | | | +| sec | | varchar(255) | NO | | | | +| expire | | int unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_profile_field.md b/doc/database/db_profile_field.md index 34a683cfb..6b03bde96 100644 --- a/doc/database/db_profile_field.md +++ b/doc/database/db_profile_field.md @@ -4,13 +4,13 @@ Custom profile fields | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | Owner user id | mediumint unsigned | NO | | 0 | | -| order | Field ordering per user | mediumint unsigned | NO | | 1 | | -| psid | ID of the permission set of this profile field - 0 = public | int unsigned | YES | | NULL | | -| label | Label of the field | varchar(255) | NO | | | | -| value | Value of the field | text | YES | | NULL | | -| created | creation time | datetime | NO | | 0001-01-01 00:00:00 | | -| edited | last edit time | datetime | NO | | 0001-01-01 00:00:00 | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner user id | mediumint unsigned | NO | | 0 | | +| order | Field ordering per user | mediumint unsigned | NO | | 1 | | +| psid | ID of the permission set of this profile field - 0 = public | int unsigned | YES | | NULL | | +| label | Label of the field | varchar(255) | NO | | | | +| value | Value of the field | text | YES | | NULL | | +| created | creation time | datetime | NO | | 0001-01-01 00:00:00 | | +| edited | last edit time | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_push_subscriber.md b/doc/database/db_push_subscriber.md index 73af99b9e..df59f0329 100644 --- a/doc/database/db_push_subscriber.md +++ b/doc/database/db_push_subscriber.md @@ -4,15 +4,15 @@ Used for OStatus: Contains feed subscribers | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | NO | | 0 | | -| callback_url | | varchar(255) | NO | | | | -| topic | | varchar(255) | NO | | | | -| nickname | | varchar(255) | NO | | | | -| push | Retrial counter | tinyint | NO | | 0 | | -| last_update | Date of last successful trial | datetime | NO | | 0001-01-01 00:00:00 | | -| next_try | Next retrial date | datetime | NO | | 0001-01-01 00:00:00 | | -| renewed | Date of last subscription renewal | datetime | NO | | 0001-01-01 00:00:00 | | -| secret | | varchar(255) | NO | | | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| callback_url | | varchar(255) | NO | | | | +| topic | | varchar(255) | NO | | | | +| nickname | | varchar(255) | NO | | | | +| push | Retrial counter | tinyint | NO | | 0 | | +| last_update | Date of last successful trial | datetime | NO | | 0001-01-01 00:00:00 | | +| next_try | Next retrial date | datetime | NO | | 0001-01-01 00:00:00 | | +| renewed | Date of last subscription renewal | datetime | NO | | 0001-01-01 00:00:00 | | +| secret | | varchar(255) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_register.md b/doc/database/db_register.md index 675139011..d0f0c8a03 100644 --- a/doc/database/db_register.md +++ b/doc/database/db_register.md @@ -4,12 +4,12 @@ registrations requiring admin approval | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| hash | | varchar(255) | NO | | | | -| created | | datetime | NO | | 0001-01-01 00:00:00 | | -| uid | User id | mediumint unsigned | NO | | 0 | | -| password | | varchar(255) | NO | | | | -| language | | varchar(16) | NO | | | | -| note | | text | YES | | NULL | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| hash | | varchar(255) | NO | | | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | +| uid | User id | mediumint unsigned | NO | | 0 | | +| password | | varchar(255) | NO | | | | +| language | | varchar(16) | NO | | | | +| note | | text | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_search.md b/doc/database/db_search.md index 10deb6c18..d37c48b5e 100644 --- a/doc/database/db_search.md +++ b/doc/database/db_search.md @@ -4,8 +4,8 @@ Table search | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | NO | | 0 | | -| term | | varchar(255) | NO | | | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| term | | varchar(255) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_session.md b/doc/database/db_session.md index d607f74e7..ca7f523f0 100644 --- a/doc/database/db_session.md +++ b/doc/database/db_session.md @@ -4,9 +4,9 @@ web session storage | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | bigint unsigned | NO | PRI | NULL | auto_increment | -| sid | | varbinary(255) | NO | | | | -| data | | text | YES | | NULL | | -| expire | | int unsigned | NO | | 0 | | +| id | sequential ID | bigint unsigned | NO | PRI | NULL | auto_increment | +| sid | | varbinary(255) | NO | | | | +| data | | text | YES | | NULL | | +| expire | | int unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_storage.md b/doc/database/db_storage.md index 198443626..cbed7df2c 100644 --- a/doc/database/db_storage.md +++ b/doc/database/db_storage.md @@ -4,7 +4,7 @@ Data stored by Database storage backend | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | Auto incremented image data id | int unsigned | NO | PRI | NULL | auto_increment | -| data | file data | longblob | NO | | NULL | | +| id | Auto incremented image data id | int unsigned | NO | PRI | NULL | auto_increment | +| data | file data | longblob | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_tag.md b/doc/database/db_tag.md index 8d7ae354f..e2d3cc07d 100644 --- a/doc/database/db_tag.md +++ b/doc/database/db_tag.md @@ -4,8 +4,8 @@ tags and mentions | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | int unsigned | NO | PRI | NULL | auto_increment | -| name | | varchar(96) | NO | | | | -| url | | varbinary(255) | NO | | | | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| name | | varchar(96) | NO | | | | +| url | | varbinary(255) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_tokens.md b/doc/database/db_tokens.md index 712bb05fd..3fe965fa6 100644 --- a/doc/database/db_tokens.md +++ b/doc/database/db_tokens.md @@ -4,11 +4,11 @@ OAuth usage | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | varchar(40) | NO | PRI | NULL | | -| secret | | text | YES | | NULL | | -| client_id | | varchar(20) | NO | | | | -| expires | | int | NO | | 0 | | -| scope | | varchar(200) | NO | | | | -| uid | User id | mediumint unsigned | NO | | 0 | | +| id | | varchar(40) | NO | PRI | NULL | | +| secret | | text | YES | | NULL | | +| client_id | | varchar(20) | NO | | | | +| expires | | int | NO | | 0 | | +| scope | | varchar(200) | NO | | | | +| uid | User id | mediumint unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_user-contact.md b/doc/database/db_user-contact.md index 762c35039..108a568e0 100644 --- a/doc/database/db_user-contact.md +++ b/doc/database/db_user-contact.md @@ -4,10 +4,10 @@ User specific public contact data | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| cid | Contact id of the linked public contact | int unsigned | NO | PRI | 0 | | -| uid | User id | mediumint unsigned | NO | PRI | 0 | | -| blocked | Contact is completely blocked for this user | boolean | YES | | NULL | | -| ignored | Posts from this contact are ignored | boolean | YES | | NULL | | -| collapsed | Posts from this contact are collapsed | boolean | YES | | NULL | | +| cid | Contact id of the linked public contact | int unsigned | NO | PRI | 0 | | +| uid | User id | mediumint unsigned | NO | PRI | 0 | | +| blocked | Contact is completely blocked for this user | boolean | YES | | NULL | | +| ignored | Posts from this contact are ignored | boolean | YES | | NULL | | +| collapsed | Posts from this contact are collapsed | boolean | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_user.md b/doc/database/db_user.md index 0794b7bcb..a56ab9048 100644 --- a/doc/database/db_user.md +++ b/doc/database/db_user.md @@ -4,50 +4,50 @@ The local users | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| uid | sequential ID | mediumint unsigned | NO | PRI | NULL | auto_increment | -| parent-uid | The parent user that has full control about this user | mediumint unsigned | YES | | NULL | | -| guid | A unique identifier for this user | varchar(64) | NO | | | | -| username | Name that this user is known by | varchar(255) | NO | | | | -| password | encrypted password | varchar(255) | NO | | | | -| legacy_password | Is the password hash double-hashed? | boolean | NO | | 0 | | -| nickname | nick- and user name | varchar(255) | NO | | | | -| email | the users email address | varchar(255) | NO | | | | -| openid | | varchar(255) | NO | | | | -| timezone | PHP-legal timezone | varchar(128) | NO | | | | -| language | default language | varchar(32) | NO | | en | | -| register_date | timestamp of registration | datetime | NO | | 0001-01-01 00:00:00 | | -| login_date | timestamp of last login | datetime | NO | | 0001-01-01 00:00:00 | | -| default-location | Default for item.location | varchar(255) | NO | | | | -| allow_location | 1 allows to display the location | boolean | NO | | 0 | | -| theme | user theme preference | varchar(255) | NO | | | | -| pubkey | RSA public key 4096 bit | text | YES | | NULL | | -| prvkey | RSA private key 4096 bit | text | YES | | NULL | | -| spubkey | | text | YES | | NULL | | -| sprvkey | | text | YES | | NULL | | -| verified | user is verified through email | boolean | NO | | 0 | | -| blocked | 1 for user is blocked | boolean | NO | | 0 | | -| blockwall | Prohibit contacts to post to the profile page of the user | boolean | NO | | 0 | | -| hidewall | Hide profile details from unkown viewers | boolean | NO | | 0 | | -| blocktags | Prohibit contacts to tag the post of this user | boolean | NO | | 0 | | -| unkmail | Permit unknown people to send private mails to this user | boolean | NO | | 0 | | -| cntunkmail | | int unsigned | NO | | 10 | | -| notify-flags | email notification options | smallint unsigned | NO | | 65535 | | -| page-flags | page/profile type | tinyint unsigned | NO | | 0 | | -| account-type | | tinyint unsigned | NO | | 0 | | -| prvnets | | boolean | NO | | 0 | | -| pwdreset | Password reset request token | varchar(255) | YES | | NULL | | -| pwdreset_time | Timestamp of the last password reset request | datetime | YES | | NULL | | -| maxreq | | int unsigned | NO | | 10 | | -| expire | | int unsigned | NO | | 0 | | -| account_removed | if 1 the account is removed | boolean | NO | | 0 | | -| account_expired | | boolean | NO | | 0 | | -| account_expires_on | timestamp when account expires and will be deleted | datetime | NO | | 0001-01-01 00:00:00 | | -| expire_notification_sent | timestamp of last warning of account expiration | datetime | NO | | 0001-01-01 00:00:00 | | -| def_gid | | int unsigned | NO | | 0 | | -| allow_cid | default permission for this user | mediumtext | YES | | NULL | | -| allow_gid | default permission for this user | mediumtext | YES | | NULL | | -| deny_cid | default permission for this user | mediumtext | YES | | NULL | | -| deny_gid | default permission for this user | mediumtext | YES | | NULL | | -| openidserver | | text | YES | | NULL | | +| uid | sequential ID | mediumint unsigned | NO | PRI | NULL | auto_increment | +| parent-uid | The parent user that has full control about this user | mediumint unsigned | YES | | NULL | | +| guid | A unique identifier for this user | varchar(64) | NO | | | | +| username | Name that this user is known by | varchar(255) | NO | | | | +| password | encrypted password | varchar(255) | NO | | | | +| legacy_password | Is the password hash double-hashed? | boolean | NO | | 0 | | +| nickname | nick- and user name | varchar(255) | NO | | | | +| email | the users email address | varchar(255) | NO | | | | +| openid | | varchar(255) | NO | | | | +| timezone | PHP-legal timezone | varchar(128) | NO | | | | +| language | default language | varchar(32) | NO | | en | | +| register_date | timestamp of registration | datetime | NO | | 0001-01-01 00:00:00 | | +| login_date | timestamp of last login | datetime | NO | | 0001-01-01 00:00:00 | | +| default-location | Default for item.location | varchar(255) | NO | | | | +| allow_location | 1 allows to display the location | boolean | NO | | 0 | | +| theme | user theme preference | varchar(255) | NO | | | | +| pubkey | RSA public key 4096 bit | text | YES | | NULL | | +| prvkey | RSA private key 4096 bit | text | YES | | NULL | | +| spubkey | | text | YES | | NULL | | +| sprvkey | | text | YES | | NULL | | +| verified | user is verified through email | boolean | NO | | 0 | | +| blocked | 1 for user is blocked | boolean | NO | | 0 | | +| blockwall | Prohibit contacts to post to the profile page of the user | boolean | NO | | 0 | | +| hidewall | Hide profile details from unkown viewers | boolean | NO | | 0 | | +| blocktags | Prohibit contacts to tag the post of this user | boolean | NO | | 0 | | +| unkmail | Permit unknown people to send private mails to this user | boolean | NO | | 0 | | +| cntunkmail | | int unsigned | NO | | 10 | | +| notify-flags | email notification options | smallint unsigned | NO | | 65535 | | +| page-flags | page/profile type | tinyint unsigned | NO | | 0 | | +| account-type | | tinyint unsigned | NO | | 0 | | +| prvnets | | boolean | NO | | 0 | | +| pwdreset | Password reset request token | varchar(255) | YES | | NULL | | +| pwdreset_time | Timestamp of the last password reset request | datetime | YES | | NULL | | +| maxreq | | int unsigned | NO | | 10 | | +| expire | | int unsigned | NO | | 0 | | +| account_removed | if 1 the account is removed | boolean | NO | | 0 | | +| account_expired | | boolean | NO | | 0 | | +| account_expires_on | timestamp when account expires and will be deleted | datetime | NO | | 0001-01-01 00:00:00 | | +| expire_notification_sent | timestamp of last warning of account expiration | datetime | NO | | 0001-01-01 00:00:00 | | +| def_gid | | int unsigned | NO | | 0 | | +| allow_cid | default permission for this user | mediumtext | YES | | NULL | | +| allow_gid | default permission for this user | mediumtext | YES | | NULL | | +| deny_cid | default permission for this user | mediumtext | YES | | NULL | | +| deny_gid | default permission for this user | mediumtext | YES | | NULL | | +| openidserver | | text | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_userd.md b/doc/database/db_userd.md index 5006033e9..ff924dfa7 100644 --- a/doc/database/db_userd.md +++ b/doc/database/db_userd.md @@ -4,7 +4,7 @@ Deleted usernames | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| username | | varchar(255) | NO | | NULL | | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| username | | varchar(255) | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_verb.md b/doc/database/db_verb.md index 4aa171f30..4469acff0 100644 --- a/doc/database/db_verb.md +++ b/doc/database/db_verb.md @@ -4,7 +4,7 @@ Activity Verbs | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | smallint unsigned | NO | PRI | NULL | auto_increment | -| name | | varchar(100) | NO | | | | +| id | | smallint unsigned | NO | PRI | NULL | auto_increment | +| name | | varchar(100) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_worker-ipc.md b/doc/database/db_worker-ipc.md index 2da8021e4..d278be3b4 100644 --- a/doc/database/db_worker-ipc.md +++ b/doc/database/db_worker-ipc.md @@ -4,7 +4,7 @@ Inter process communication between the frontend and the worker | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| key | | int | NO | PRI | NULL | | -| jobs | Flag for outstanding jobs | boolean | YES | | NULL | | +| key | | int | NO | PRI | NULL | | +| jobs | Flag for outstanding jobs | boolean | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_workerqueue.md b/doc/database/db_workerqueue.md index 00768c3b5..b104f7a5f 100644 --- a/doc/database/db_workerqueue.md +++ b/doc/database/db_workerqueue.md @@ -4,15 +4,15 @@ Background tasks queue entries | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | Auto incremented worker task id | int unsigned | NO | PRI | NULL | auto_increment | -| command | Task command | varchar(100) | YES | | NULL | | -| parameter | Task parameter | mediumtext | YES | | NULL | | -| priority | Task priority | tinyint unsigned | NO | | 0 | | -| created | Creation date | datetime | NO | | 0001-01-01 00:00:00 | | -| pid | Process id of the worker | int unsigned | NO | | 0 | | -| executed | Execution date | datetime | NO | | 0001-01-01 00:00:00 | | -| next_try | Next retrial date | datetime | NO | | 0001-01-01 00:00:00 | | -| retrial | Retrial counter | tinyint | NO | | 0 | | -| done | Marked 1 when the task was done - will be deleted later | boolean | NO | | 0 | | +| id | Auto incremented worker task id | int unsigned | NO | PRI | NULL | auto_increment | +| command | Task command | varchar(100) | YES | | NULL | | +| parameter | Task parameter | mediumtext | YES | | NULL | | +| priority | Task priority | tinyint unsigned | NO | | 0 | | +| created | Creation date | datetime | NO | | 0001-01-01 00:00:00 | | +| pid | Process id of the worker | int unsigned | NO | | 0 | | +| executed | Execution date | datetime | NO | | 0001-01-01 00:00:00 | | +| next_try | Next retrial date | datetime | NO | | 0001-01-01 00:00:00 | | +| retrial | Retrial counter | tinyint | NO | | 0 | | +| done | Marked 1 when the task was done - will be deleted later | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index bb66bcb3f..1cf1bc12b 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -166,7 +166,8 @@ class DBStructure $tables = []; foreach (self::definition(null) as $name => $definition) { - $fields = []; + $fields = []; + $lengths = []; foreach ($definition['fields'] as $key => $value) { $field = []; $field['name'] = $key; @@ -177,8 +178,17 @@ class DBStructure $field['default'] = $value['default'] ?? 'NULL'; $field['extra'] = $value['extra'] ?? ''; + foreach ($field as $fieldname => $fieldvalue) { + $lengths[$fieldname] = max($lengths[$fieldname] ?? 0, strlen($fieldvalue)); + } $fields[] = $field; } + + array_walk_recursive($fields, function(&$value, $key) use ($lengths) + { + $value = str_pad($value, $lengths[$key]); + }); + $tables[] = ['name' => $name, 'comment' => $definition['comment']]; $content = Renderer::replaceMacros(Renderer::getMarkupTemplate('structure.tpl'), [ '$name' => $name, From fd30df7300d9de5b2316b86ccc38053cec69dfe1 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 14 Jun 2021 05:58:51 +0000 Subject: [PATCH 06/12] Pad the header --- doc/database/db_2fa_app_specific_password.md | 16 +- doc/database/db_2fa_recovery_codes.md | 12 +- doc/database/db_2fa_trusted_browser.md | 14 +- doc/database/db_addon.md | 18 +- doc/database/db_apcontact.md | 52 +++--- doc/database/db_application-token.md | 24 +-- doc/database/db_application.md | 26 +-- doc/database/db_attach.md | 34 ++-- doc/database/db_auth_codes.md | 14 +- doc/database/db_cache.md | 12 +- doc/database/db_challenge.md | 16 +- doc/database/db_clients.md | 16 +- doc/database/db_config.md | 12 +- doc/database/db_contact-relation.md | 14 +- doc/database/db_contact.md | 164 +++++++++---------- doc/database/db_conv.md | 20 +-- doc/database/db_conversation.md | 20 +-- doc/database/db_delayed-post.md | 12 +- doc/database/db_diaspora-interaction.md | 8 +- doc/database/db_event.md | 44 ++--- doc/database/db_fcontact.md | 38 ++--- doc/database/db_fsuggest.md | 22 +-- doc/database/db_group.md | 14 +- doc/database/db_group_member.md | 10 +- doc/database/db_gserver-tag.md | 8 +- doc/database/db_gserver.md | 50 +++--- doc/database/db_hook.md | 14 +- doc/database/db_host.md | 8 +- doc/database/db_inbox-status.md | 18 +- doc/database/db_intro.md | 26 +-- doc/database/db_item-uri.md | 10 +- doc/database/db_locks.md | 14 +- doc/database/db_mail.md | 48 +++--- doc/database/db_mailacct.md | 30 ++-- doc/database/db_manage.md | 10 +- doc/database/db_notification.md | 22 +-- doc/database/db_notify-threads.md | 16 +- doc/database/db_notify.md | 40 ++--- doc/database/db_oembed.md | 12 +- doc/database/db_openwebauth-token.md | 16 +- doc/database/db_parsed_url.md | 18 +- doc/database/db_pconfig.md | 14 +- doc/database/db_permissionset.md | 16 +- doc/database/db_photo.md | 58 +++---- doc/database/db_post-category.md | 12 +- doc/database/db_post-content.md | 38 ++--- doc/database/db_post-delivery-data.md | 26 +-- doc/database/db_post-media.md | 42 ++--- doc/database/db_post-tag.md | 12 +- doc/database/db_post-thread-user.md | 50 +++--- doc/database/db_post-thread.md | 22 +-- doc/database/db_post-user-notification.md | 10 +- doc/database/db_post-user.md | 64 ++++---- doc/database/db_post.md | 40 ++--- doc/database/db_process.md | 10 +- doc/database/db_profile.md | 88 +++++----- doc/database/db_profile_check.md | 16 +- doc/database/db_profile_field.md | 20 +-- doc/database/db_push_subscriber.md | 24 +-- doc/database/db_register.md | 18 +- doc/database/db_search.md | 10 +- doc/database/db_session.md | 12 +- doc/database/db_storage.md | 8 +- doc/database/db_tag.md | 10 +- doc/database/db_tokens.md | 16 +- doc/database/db_user-contact.md | 14 +- doc/database/db_user.md | 94 +++++------ doc/database/db_userd.md | 8 +- doc/database/db_verb.md | 8 +- doc/database/db_worker-ipc.md | 8 +- doc/database/db_workerqueue.md | 24 +-- src/Database/DBStructure.php | 33 +++- view/templates/structure.tpl | 2 - 73 files changed, 921 insertions(+), 898 deletions(-) diff --git a/doc/database/db_2fa_app_specific_password.md b/doc/database/db_2fa_app_specific_password.md index f34716329..28ec292c6 100644 --- a/doc/database/db_2fa_app_specific_password.md +++ b/doc/database/db_2fa_app_specific_password.md @@ -2,13 +2,13 @@ Table 2fa_app_specific_password =========== Two-factor app-specific _password -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | Password ID for revocation | mediumint unsigned | NO | PRI | NULL | auto_increment | -| uid | User ID | mediumint unsigned | NO | | NULL | | -| description | Description of the usage of the password | varchar(255) | YES | | NULL | | -| hashed_password | Hashed password | varchar(255) | NO | | NULL | | -| generated | Datetime the password was generated | datetime | NO | | NULL | | -| last_used | Datetime the password was last used | datetime | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| --------------- | ---------------------------------------- | ------------------ | ---- | --- | ------- | -------------- | +| id | Password ID for revocation | mediumint unsigned | NO | PRI | NULL | auto_increment | +| uid | User ID | mediumint unsigned | NO | | NULL | | +| description | Description of the usage of the password | varchar(255) | YES | | NULL | | +| hashed_password | Hashed password | varchar(255) | NO | | NULL | | +| generated | Datetime the password was generated | datetime | NO | | NULL | | +| last_used | Datetime the password was last used | datetime | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_2fa_recovery_codes.md b/doc/database/db_2fa_recovery_codes.md index 22c4d85e3..426376369 100644 --- a/doc/database/db_2fa_recovery_codes.md +++ b/doc/database/db_2fa_recovery_codes.md @@ -2,11 +2,11 @@ Table 2fa_recovery_codes =========== Two-factor authentication recovery codes -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| uid | User ID | mediumint unsigned | NO | PRI | NULL | | -| code | Recovery code string | varchar(50) | NO | PRI | NULL | | -| generated | Datetime the code was generated | datetime | NO | | NULL | | -| used | Datetime the code was used | datetime | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| --------- | ------------------------------- | ------------------ | ---- | --- | ------- | ----- | +| uid | User ID | mediumint unsigned | NO | PRI | NULL | | +| code | Recovery code string | varchar(50) | NO | PRI | NULL | | +| generated | Datetime the code was generated | datetime | NO | | NULL | | +| used | Datetime the code was used | datetime | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_2fa_trusted_browser.md b/doc/database/db_2fa_trusted_browser.md index 0067ce41c..b412c104b 100644 --- a/doc/database/db_2fa_trusted_browser.md +++ b/doc/database/db_2fa_trusted_browser.md @@ -2,12 +2,12 @@ Table 2fa_trusted_browser =========== Two-factor authentication trusted browsers -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| cookie_hash | Trusted cookie hash | varchar(80) | NO | PRI | NULL | | -| uid | User ID | mediumint unsigned | NO | | NULL | | -| user_agent | User agent string | text | YES | | NULL | | -| created | Datetime the trusted browser was recorded | datetime | NO | | NULL | | -| last_used | Datetime the trusted browser was last used | datetime | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----------- | ------------------------------------------ | ------------------ | ---- | --- | ------- | ----- | +| cookie_hash | Trusted cookie hash | varchar(80) | NO | PRI | NULL | | +| uid | User ID | mediumint unsigned | NO | | NULL | | +| user_agent | User agent string | text | YES | | NULL | | +| created | Datetime the trusted browser was recorded | datetime | NO | | NULL | | +| last_used | Datetime the trusted browser was last used | datetime | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_addon.md b/doc/database/db_addon.md index 14853cd44..716ee9a1c 100644 --- a/doc/database/db_addon.md +++ b/doc/database/db_addon.md @@ -2,14 +2,14 @@ Table addon =========== registered addons -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | int unsigned | NO | PRI | NULL | auto_increment | -| name | addon base (file)name | varchar(50) | NO | | | | -| version | currently unused | varchar(50) | NO | | | | -| installed | currently always 1 | boolean | NO | | 0 | | -| hidden | currently unused | boolean | NO | | 0 | | -| timestamp | file timestamp to check for reloads | int unsigned | NO | | 0 | | -| plugin_admin | 1 = has admin config, 0 = has no admin config | boolean | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------ | --------------------------------------------- | ------------ | ---- | --- | ------- | -------------- | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| name | addon base (file)name | varchar(50) | NO | | | | +| version | currently unused | varchar(50) | NO | | | | +| installed | currently always 1 | boolean | NO | | 0 | | +| hidden | currently unused | boolean | NO | | 0 | | +| timestamp | file timestamp to check for reloads | int unsigned | NO | | 0 | | +| plugin_admin | 1 = has admin config, 0 = has no admin config | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_apcontact.md b/doc/database/db_apcontact.md index b22a15f8b..a32cc2a9a 100644 --- a/doc/database/db_apcontact.md +++ b/doc/database/db_apcontact.md @@ -2,31 +2,31 @@ Table apcontact =========== ActivityPub compatible contacts - used in the ActivityPub implementation -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| url | URL of the contact | varbinary(255) | NO | PRI | NULL | | -| uuid | | varchar(255) | YES | | NULL | | -| type | | varchar(20) | NO | | NULL | | -| following | | varchar(255) | YES | | NULL | | -| followers | | varchar(255) | YES | | NULL | | -| inbox | | varchar(255) | NO | | NULL | | -| outbox | | varchar(255) | YES | | NULL | | -| sharedinbox | | varchar(255) | YES | | NULL | | -| manually-approve | | boolean | YES | | NULL | | -| nick | | varchar(255) | NO | | | | -| name | | varchar(255) | YES | | NULL | | -| about | | text | YES | | NULL | | -| photo | | varchar(255) | YES | | NULL | | -| addr | | varchar(255) | YES | | NULL | | -| alias | | varchar(255) | YES | | NULL | | -| pubkey | | text | YES | | NULL | | -| subscribe | | varchar(255) | YES | | NULL | | -| baseurl | baseurl of the ap contact | varchar(255) | YES | | NULL | | -| gsid | Global Server ID | int unsigned | YES | | NULL | | -| generator | Name of the contact's system | varchar(255) | YES | | NULL | | -| following_count | Number of following contacts | int unsigned | YES | | 0 | | -| followers_count | Number of followers | int unsigned | YES | | 0 | | -| statuses_count | Number of posts | int unsigned | YES | | 0 | | -| updated | | datetime | NO | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ---------------- | ---------------------------- | -------------- | ---- | --- | ------------------- | ----- | +| url | URL of the contact | varbinary(255) | NO | PRI | NULL | | +| uuid | | varchar(255) | YES | | NULL | | +| type | | varchar(20) | NO | | NULL | | +| following | | varchar(255) | YES | | NULL | | +| followers | | varchar(255) | YES | | NULL | | +| inbox | | varchar(255) | NO | | NULL | | +| outbox | | varchar(255) | YES | | NULL | | +| sharedinbox | | varchar(255) | YES | | NULL | | +| manually-approve | | boolean | YES | | NULL | | +| nick | | varchar(255) | NO | | | | +| name | | varchar(255) | YES | | NULL | | +| about | | text | YES | | NULL | | +| photo | | varchar(255) | YES | | NULL | | +| addr | | varchar(255) | YES | | NULL | | +| alias | | varchar(255) | YES | | NULL | | +| pubkey | | text | YES | | NULL | | +| subscribe | | varchar(255) | YES | | NULL | | +| baseurl | baseurl of the ap contact | varchar(255) | YES | | NULL | | +| gsid | Global Server ID | int unsigned | YES | | NULL | | +| generator | Name of the contact's system | varchar(255) | YES | | NULL | | +| following_count | Number of following contacts | int unsigned | YES | | 0 | | +| followers_count | Number of followers | int unsigned | YES | | 0 | | +| statuses_count | Number of posts | int unsigned | YES | | 0 | | +| updated | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_application-token.md b/doc/database/db_application-token.md index ed9fb6d26..fd273989f 100644 --- a/doc/database/db_application-token.md +++ b/doc/database/db_application-token.md @@ -2,17 +2,17 @@ Table application-token =========== OAuth user token -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| application-id | | int unsigned | NO | PRI | NULL | | -| uid | Owner User id | mediumint unsigned | NO | PRI | NULL | | -| code | | varchar(64) | NO | | NULL | | -| access_token | | varchar(64) | NO | | NULL | | -| created_at | creation time | datetime | NO | | NULL | | -| scopes | | varchar(255) | YES | | NULL | | -| read | Read scope | boolean | YES | | NULL | | -| write | Write scope | boolean | YES | | NULL | | -| follow | Follow scope | boolean | YES | | NULL | | -| push | Push scope | boolean | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| -------------- | ------------- | ------------------ | ---- | --- | ------- | ----- | +| application-id | | int unsigned | NO | PRI | NULL | | +| uid | Owner User id | mediumint unsigned | NO | PRI | NULL | | +| code | | varchar(64) | NO | | NULL | | +| access_token | | varchar(64) | NO | | NULL | | +| created_at | creation time | datetime | NO | | NULL | | +| scopes | | varchar(255) | YES | | NULL | | +| read | Read scope | boolean | YES | | NULL | | +| write | Write scope | boolean | YES | | NULL | | +| follow | Follow scope | boolean | YES | | NULL | | +| push | Push scope | boolean | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_application.md b/doc/database/db_application.md index 65281f394..3206d03be 100644 --- a/doc/database/db_application.md +++ b/doc/database/db_application.md @@ -2,18 +2,18 @@ Table application =========== OAuth application -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | generated index | int unsigned | NO | PRI | NULL | auto_increment | -| client_id | | varchar(64) | NO | | NULL | | -| client_secret | | varchar(64) | NO | | NULL | | -| name | | varchar(255) | NO | | NULL | | -| redirect_uri | | varchar(255) | NO | | NULL | | -| website | | varchar(255) | YES | | NULL | | -| scopes | | varchar(255) | YES | | NULL | | -| read | Read scope | boolean | YES | | NULL | | -| write | Write scope | boolean | YES | | NULL | | -| follow | Follow scope | boolean | YES | | NULL | | -| push | Push scope | boolean | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------- | --------------- | ------------ | ---- | --- | ------- | -------------- | +| id | generated index | int unsigned | NO | PRI | NULL | auto_increment | +| client_id | | varchar(64) | NO | | NULL | | +| client_secret | | varchar(64) | NO | | NULL | | +| name | | varchar(255) | NO | | NULL | | +| redirect_uri | | varchar(255) | NO | | NULL | | +| website | | varchar(255) | YES | | NULL | | +| scopes | | varchar(255) | YES | | NULL | | +| read | Read scope | boolean | YES | | NULL | | +| write | Write scope | boolean | YES | | NULL | | +| follow | Follow scope | boolean | YES | | NULL | | +| push | Push scope | boolean | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_attach.md b/doc/database/db_attach.md index 4e02b599e..95f736def 100644 --- a/doc/database/db_attach.md +++ b/doc/database/db_attach.md @@ -2,22 +2,22 @@ Table attach =========== file attachments -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | generated index | int unsigned | NO | PRI | NULL | auto_increment | -| uid | Owner User id | mediumint unsigned | NO | | 0 | | -| hash | hash | varchar(64) | NO | | | | -| filename | filename of original | varchar(255) | NO | | | | -| filetype | mimetype | varchar(64) | NO | | | | -| filesize | size in bytes | int unsigned | 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 | YES | | NULL | | -| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | -| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | -| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | -| backend-class | Storage backend class | tinytext | YES | | NULL | | -| backend-ref | Storage backend data reference | text | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------- | ----------------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | +| id | generated index | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| hash | hash | varchar(64) | NO | | | | +| filename | filename of original | varchar(255) | NO | | | | +| filetype | mimetype | varchar(64) | NO | | | | +| filesize | size in bytes | int unsigned | 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 | YES | | NULL | | +| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | +| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | +| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | +| backend-class | Storage backend class | tinytext | YES | | NULL | | +| backend-ref | Storage backend data reference | text | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_auth_codes.md b/doc/database/db_auth_codes.md index d7ab8640b..91d611069 100644 --- a/doc/database/db_auth_codes.md +++ b/doc/database/db_auth_codes.md @@ -2,12 +2,12 @@ Table auth_codes =========== OAuth usage -| 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 | NO | | 0 | | -| scope | | varchar(250) | NO | | | | +| 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 | NO | | 0 | | +| scope | | varchar(250) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_cache.md b/doc/database/db_cache.md index 08ef1479b..42a2045e1 100644 --- a/doc/database/db_cache.md +++ b/doc/database/db_cache.md @@ -2,11 +2,11 @@ Table cache =========== Stores temporary data -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| k | cache key | varbinary(255) | NO | PRI | NULL | | -| v | cached serialized value | mediumtext | YES | | NULL | | -| expires | datetime of cache expiration | datetime | NO | | 0001-01-01 00:00:00 | | -| updated | datetime of cache insertion | datetime | NO | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------- | ---------------------------- | -------------- | ---- | --- | ------------------- | ----- | +| k | cache key | varbinary(255) | NO | PRI | NULL | | +| v | cached serialized value | mediumtext | YES | | NULL | | +| expires | datetime of cache expiration | datetime | NO | | 0001-01-01 00:00:00 | | +| updated | datetime of cache insertion | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_challenge.md b/doc/database/db_challenge.md index 12746056e..0b7653e69 100644 --- a/doc/database/db_challenge.md +++ b/doc/database/db_challenge.md @@ -2,13 +2,13 @@ Table challenge =========== -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| challenge | | varchar(255) | NO | | | | -| dfrn-id | | varchar(255) | NO | | | | -| expire | | int unsigned | NO | | 0 | | -| type | | varchar(255) | NO | | | | -| last_update | | varchar(255) | NO | | | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----------- | ------------- | ------------ | ---- | --- | ------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| challenge | | varchar(255) | NO | | | | +| dfrn-id | | varchar(255) | NO | | | | +| expire | | int unsigned | NO | | 0 | | +| type | | varchar(255) | NO | | | | +| last_update | | varchar(255) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_clients.md b/doc/database/db_clients.md index 631cb6539..b354e2b58 100644 --- a/doc/database/db_clients.md +++ b/doc/database/db_clients.md @@ -2,13 +2,13 @@ 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 | User id | mediumint unsigned | NO | | 0 | | +| 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 | User id | mediumint unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_config.md b/doc/database/db_config.md index ce4fe4624..fcd1c93bf 100644 --- a/doc/database/db_config.md +++ b/doc/database/db_config.md @@ -2,11 +2,11 @@ Table config =========== main configuration storage -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | int unsigned | NO | PRI | NULL | auto_increment | -| cat | | varbinary(50) | NO | | | | -| k | | varbinary(50) | NO | | | | -| v | | mediumtext | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | ------------- | ---- | --- | ------- | -------------- | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| cat | | varbinary(50) | NO | | | | +| k | | varbinary(50) | NO | | | | +| v | | mediumtext | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_contact-relation.md b/doc/database/db_contact-relation.md index 80cd9db1f..82b90f79e 100644 --- a/doc/database/db_contact-relation.md +++ b/doc/database/db_contact-relation.md @@ -2,12 +2,12 @@ Table contact-relation =========== Contact relations -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| cid | contact the related contact had interacted with | int unsigned | NO | PRI | 0 | | -| relation-cid | related contact who had interacted with the contact | int unsigned | NO | PRI | 0 | | -| last-interaction | Date of the last interaction | datetime | NO | | 0001-01-01 00:00:00 | | -| follow-updated | Date of the last update of the contact relationship | datetime | NO | | 0001-01-01 00:00:00 | | -| follows | | boolean | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ---------------- | --------------------------------------------------- | ------------ | ---- | --- | ------------------- | ----- | +| cid | contact the related contact had interacted with | int unsigned | NO | PRI | 0 | | +| relation-cid | related contact who had interacted with the contact | int unsigned | NO | PRI | 0 | | +| last-interaction | Date of the last interaction | datetime | NO | | 0001-01-01 00:00:00 | | +| follow-updated | Date of the last update of the contact relationship | datetime | NO | | 0001-01-01 00:00:00 | | +| follows | | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_contact.md b/doc/database/db_contact.md index 134348879..2d89f5172 100644 --- a/doc/database/db_contact.md +++ b/doc/database/db_contact.md @@ -2,87 +2,87 @@ Table contact =========== contact table -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | Owner User id | mediumint unsigned | NO | | 0 | | -| created | | datetime | NO | | 0001-01-01 00:00:00 | | -| updated | Date of last contact update | datetime | YES | | 0001-01-01 00:00:00 | | -| self | 1 if the contact is the user him/her self | boolean | NO | | 0 | | -| remote_self | | boolean | NO | | 0 | | -| rel | The kind of the relation between the user and the contact | tinyint unsigned | NO | | 0 | | -| duplex | | boolean | NO | | 0 | | -| network | Network of the contact | char(4) | NO | | | | -| protocol | Protocol of the contact | char(4) | 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) | YES | | | | -| about | | text | YES | | NULL | | -| keywords | public keywords (interests) of the contact | text | YES | | NULL | | -| gender | Deprecated | varchar(32) | NO | | | | -| xmpp | | varchar(255) | NO | | | | -| attag | | varchar(255) | NO | | | | -| avatar | | varchar(255) | NO | | | | -| photo | Link to the profile photo of the contact | varchar(255) | YES | | | | -| thumb | Link to the profile photo (thumb size) | varchar(255) | YES | | | | -| micro | Link to the profile photo (micro size) | varchar(255) | YES | | | | -| site-pubkey | | text | YES | | 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 | YES | | NULL | | -| prvkey | RSA private key 4096 bit | text | YES | | NULL | | -| batch | | varchar(255) | NO | | | | -| request | | varchar(255) | YES | | NULL | | -| notify | | varchar(255) | YES | | NULL | | -| poll | | varchar(255) | YES | | NULL | | -| confirm | | varchar(255) | YES | | NULL | | -| subscribe | | varchar(255) | YES | | NULL | | -| poco | | varchar(255) | YES | | NULL | | -| aes_allow | | boolean | NO | | 0 | | -| ret-aes | | boolean | NO | | 0 | | -| usehub | | boolean | NO | | 0 | | -| subhub | | boolean | 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 | | -| failed | Connection failed | boolean | YES | | NULL | | -| 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 | | -| last-discovery | date of the last follower discovery | datetime | NO | | 0001-01-01 00:00:00 | | -| priority | | tinyint unsigned | NO | | 0 | | -| blocked | Node-wide block status | boolean | NO | | 1 | | -| block_reason | Node-wide block reason | text | YES | | NULL | | -| readonly | posts of the contact are readonly | boolean | NO | | 0 | | -| writable | | boolean | NO | | 0 | | -| forum | contact is a forum | boolean | NO | | 0 | | -| prv | contact is a private group | boolean | NO | | 0 | | -| contact-type | | tinyint | NO | | 0 | | -| manually-approve | | boolean | YES | | NULL | | -| hidden | | boolean | NO | | 0 | | -| archive | | boolean | NO | | 0 | | -| pending | | boolean | NO | | 1 | | -| deleted | Contact has been deleted | boolean | NO | | 0 | | -| rating | | tinyint | NO | | 0 | | -| unsearchable | Contact prefers to not be searchable | boolean | NO | | 0 | | -| sensitive | Contact posts sensitive content | boolean | NO | | 0 | | -| baseurl | baseurl of the contact | varchar(255) | YES | | | | -| gsid | Global Server ID | int unsigned | YES | | NULL | | -| reason | | text | YES | | NULL | | -| closeness | | tinyint unsigned | NO | | 99 | | -| info | | mediumtext | YES | | NULL | | -| profile-id | Deprecated | int unsigned | YES | | NULL | | -| bdyear | | varchar(4) | NO | | | | -| bd | | date | NO | | 0001-01-01 | | -| notify_new_posts | | boolean | NO | | 0 | | -| fetch_further_information | | tinyint unsigned | NO | | 0 | | -| ffi_keyword_denylist | | text | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------------------- | --------------------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | +| updated | Date of last contact update | datetime | YES | | 0001-01-01 00:00:00 | | +| self | 1 if the contact is the user him/her self | boolean | NO | | 0 | | +| remote_self | | boolean | NO | | 0 | | +| rel | The kind of the relation between the user and the contact | tinyint unsigned | NO | | 0 | | +| duplex | | boolean | NO | | 0 | | +| network | Network of the contact | char(4) | NO | | | | +| protocol | Protocol of the contact | char(4) | 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) | YES | | | | +| about | | text | YES | | NULL | | +| keywords | public keywords (interests) of the contact | text | YES | | NULL | | +| gender | Deprecated | varchar(32) | NO | | | | +| xmpp | | varchar(255) | NO | | | | +| attag | | varchar(255) | NO | | | | +| avatar | | varchar(255) | NO | | | | +| photo | Link to the profile photo of the contact | varchar(255) | YES | | | | +| thumb | Link to the profile photo (thumb size) | varchar(255) | YES | | | | +| micro | Link to the profile photo (micro size) | varchar(255) | YES | | | | +| site-pubkey | | text | YES | | 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 | YES | | NULL | | +| prvkey | RSA private key 4096 bit | text | YES | | NULL | | +| batch | | varchar(255) | NO | | | | +| request | | varchar(255) | YES | | NULL | | +| notify | | varchar(255) | YES | | NULL | | +| poll | | varchar(255) | YES | | NULL | | +| confirm | | varchar(255) | YES | | NULL | | +| subscribe | | varchar(255) | YES | | NULL | | +| poco | | varchar(255) | YES | | NULL | | +| aes_allow | | boolean | NO | | 0 | | +| ret-aes | | boolean | NO | | 0 | | +| usehub | | boolean | NO | | 0 | | +| subhub | | boolean | 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 | | +| failed | Connection failed | boolean | YES | | NULL | | +| 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 | | +| last-discovery | date of the last follower discovery | datetime | NO | | 0001-01-01 00:00:00 | | +| priority | | tinyint unsigned | NO | | 0 | | +| blocked | Node-wide block status | boolean | NO | | 1 | | +| block_reason | Node-wide block reason | text | YES | | NULL | | +| readonly | posts of the contact are readonly | boolean | NO | | 0 | | +| writable | | boolean | NO | | 0 | | +| forum | contact is a forum | boolean | NO | | 0 | | +| prv | contact is a private group | boolean | NO | | 0 | | +| contact-type | | tinyint | NO | | 0 | | +| manually-approve | | boolean | YES | | NULL | | +| hidden | | boolean | NO | | 0 | | +| archive | | boolean | NO | | 0 | | +| pending | | boolean | NO | | 1 | | +| deleted | Contact has been deleted | boolean | NO | | 0 | | +| rating | | tinyint | NO | | 0 | | +| unsearchable | Contact prefers to not be searchable | boolean | NO | | 0 | | +| sensitive | Contact posts sensitive content | boolean | NO | | 0 | | +| baseurl | baseurl of the contact | varchar(255) | YES | | | | +| gsid | Global Server ID | int unsigned | YES | | NULL | | +| reason | | text | YES | | NULL | | +| closeness | | tinyint unsigned | NO | | 99 | | +| info | | mediumtext | YES | | NULL | | +| profile-id | Deprecated | int unsigned | YES | | NULL | | +| bdyear | | varchar(4) | NO | | | | +| bd | | date | NO | | 0001-01-01 | | +| notify_new_posts | | boolean | NO | | 0 | | +| fetch_further_information | | tinyint unsigned | NO | | 0 | | +| ffi_keyword_denylist | | text | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_conv.md b/doc/database/db_conv.md index 72ea49590..8cf835b7e 100644 --- a/doc/database/db_conv.md +++ b/doc/database/db_conv.md @@ -2,15 +2,15 @@ Table conv =========== private messages -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| guid | A unique identifier for this conversation | varchar(255) | NO | | | | -| recips | sender_handle;recipient_handle | text | YES | | NULL | | -| uid | Owner User id | mediumint unsigned | NO | | 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 | text | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------- | ----------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| guid | A unique identifier for this conversation | varchar(255) | NO | | | | +| recips | sender_handle;recipient_handle | text | YES | | NULL | | +| uid | Owner User id | mediumint unsigned | NO | | 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 | text | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_conversation.md b/doc/database/db_conversation.md index 212d2a76e..5e62f21b1 100644 --- a/doc/database/db_conversation.md +++ b/doc/database/db_conversation.md @@ -2,15 +2,15 @@ Table conversation =========== Raw data and structure information for messages -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| item-uri | Original URI of the item - unrelated to the table with the same name | 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 unsigned | NO | | 255 | | -| direction | How the message arrived here: 1=push, 2=pull | tinyint unsigned | NO | | 0 | | -| source | Original source | mediumtext | YES | | NULL | | -| received | Receiving date | datetime | NO | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----------------- | -------------------------------------------------------------------- | ---------------- | ---- | --- | ------------------- | ----- | +| item-uri | Original URI of the item - unrelated to the table with the same name | 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 unsigned | NO | | 255 | | +| direction | How the message arrived here: 1=push, 2=pull | tinyint unsigned | NO | | 0 | | +| source | Original source | mediumtext | YES | | NULL | | +| received | Receiving date | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_delayed-post.md b/doc/database/db_delayed-post.md index ab79f557a..cdf9b7d57 100644 --- a/doc/database/db_delayed-post.md +++ b/doc/database/db_delayed-post.md @@ -2,11 +2,11 @@ Table delayed-post =========== Posts that are about to be distributed at a later time -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | int unsigned | NO | PRI | NULL | auto_increment | -| uri | URI of the post that will be distributed later | varchar(255) | YES | | NULL | | -| uid | Owner User id | mediumint unsigned | YES | | NULL | | -| delayed | delay time | datetime | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------- | ---------------------------------------------- | ------------------ | ---- | --- | ------- | -------------- | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| uri | URI of the post that will be distributed later | varchar(255) | YES | | NULL | | +| uid | Owner User id | mediumint unsigned | YES | | NULL | | +| delayed | delay time | datetime | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_diaspora-interaction.md b/doc/database/db_diaspora-interaction.md index 80bd5f196..0300be72a 100644 --- a/doc/database/db_diaspora-interaction.md +++ b/doc/database/db_diaspora-interaction.md @@ -2,9 +2,9 @@ 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 | NO | PRI | NULL | | -| interaction | The Diaspora interaction | mediumtext | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----------- | --------------------------------------------------------- | ------------ | ---- | --- | ------- | ----- | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| interaction | The Diaspora interaction | mediumtext | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_event.md b/doc/database/db_event.md index a227b78db..69c4d76b9 100644 --- a/doc/database/db_event.md +++ b/doc/database/db_event.md @@ -2,27 +2,27 @@ Table event =========== Events -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| guid | | varchar(255) | NO | | | | -| uid | Owner User id | mediumint unsigned | NO | | 0 | | -| cid | contact_id (ID of the contact in contact table) | int unsigned | 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 | YES | | NULL | | -| desc | event description | text | YES | | NULL | | -| location | event location | text | YES | | NULL | | -| type | event or birthday | varchar(20) | NO | | | | -| nofinish | if event does have no end this is 1 | boolean | NO | | 0 | | -| adjust | adjust to timezone of the recipient (0 or 1) | boolean | NO | | 1 | | -| ignore | 0 or 1 | boolean | NO | | 0 | | -| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | -| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | -| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | -| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| --------- | ------------------------------------------------------ | ------------------ | ---- | --- | ------------------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| guid | | varchar(255) | NO | | | | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| cid | contact_id (ID of the contact in contact table) | int unsigned | 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 | YES | | NULL | | +| desc | event description | text | YES | | NULL | | +| location | event location | text | YES | | NULL | | +| type | event or birthday | varchar(20) | NO | | | | +| nofinish | if event does have no end this is 1 | boolean | NO | | 0 | | +| adjust | adjust to timezone of the recipient (0 or 1) | boolean | NO | | 1 | | +| ignore | 0 or 1 | boolean | NO | | 0 | | +| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | +| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | +| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | +| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_fcontact.md b/doc/database/db_fcontact.md index b1b622a21..84db712f3 100644 --- a/doc/database/db_fcontact.md +++ b/doc/database/db_fcontact.md @@ -2,24 +2,24 @@ Table fcontact =========== Diaspora compatible contacts - used in the Diaspora implementation -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| guid | unique id | varchar(255) | 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 | | | | -| batch | | varchar(255) | NO | | | | -| notify | | varchar(255) | NO | | | | -| poll | | varchar(255) | NO | | | | -| confirm | | varchar(255) | NO | | | | -| priority | | tinyint unsigned | NO | | 0 | | -| network | | char(4) | NO | | | | -| alias | | varchar(255) | NO | | | | -| pubkey | | text | YES | | NULL | | -| updated | | datetime | NO | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| -------- | ------------- | ---------------- | ---- | --- | ------------------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| guid | unique id | varchar(255) | 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 | | | | +| batch | | varchar(255) | NO | | | | +| notify | | varchar(255) | NO | | | | +| poll | | varchar(255) | NO | | | | +| confirm | | varchar(255) | NO | | | | +| priority | | tinyint unsigned | NO | | 0 | | +| network | | char(4) | NO | | | | +| alias | | varchar(255) | NO | | | | +| pubkey | | text | YES | | NULL | | +| updated | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_fsuggest.md b/doc/database/db_fsuggest.md index 206410ad9..20955acc9 100644 --- a/doc/database/db_fsuggest.md +++ b/doc/database/db_fsuggest.md @@ -2,16 +2,16 @@ Table fsuggest =========== friend suggestion stuff -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | int unsigned | NO | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | NO | | 0 | | -| cid | | int unsigned | NO | | 0 | | -| name | | varchar(255) | NO | | | | -| url | | varchar(255) | NO | | | | -| request | | varchar(255) | NO | | | | -| photo | | varchar(255) | NO | | | | -| note | | text | YES | | NULL | | -| created | | datetime | NO | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------- | ----------- | ------------------ | ---- | --- | ------------------- | -------------- | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| cid | | int unsigned | NO | | 0 | | +| name | | varchar(255) | NO | | | | +| url | | varchar(255) | NO | | | | +| request | | varchar(255) | NO | | | | +| photo | | varchar(255) | NO | | | | +| note | | text | YES | | NULL | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_group.md b/doc/database/db_group.md index 11e6d667c..d81148bd6 100644 --- a/doc/database/db_group.md +++ b/doc/database/db_group.md @@ -2,12 +2,12 @@ Table group =========== privacy groups, group info -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | Owner User id | mediumint unsigned | NO | | 0 | | -| visible | 1 indicates the member list is not private | boolean | NO | | 0 | | -| deleted | 1 indicates the group has been deleted | boolean | NO | | 0 | | -| name | human readable name of group | varchar(255) | NO | | | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------- | ------------------------------------------ | ------------------ | ---- | --- | ------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| visible | 1 indicates the member list is not private | boolean | NO | | 0 | | +| deleted | 1 indicates the group has been deleted | boolean | NO | | 0 | | +| name | human readable name of group | varchar(255) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_group_member.md b/doc/database/db_group_member.md index 0169d276b..6057c15b4 100644 --- a/doc/database/db_group_member.md +++ b/doc/database/db_group_member.md @@ -2,10 +2,10 @@ Table group_member =========== privacy groups, member info -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| gid | groups.id of the associated group | int unsigned | NO | | 0 | | -| contact-id | contact.id of the member assigned to the associated group | int unsigned | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ---------- | --------------------------------------------------------- | ------------ | ---- | --- | ------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| gid | groups.id of the associated group | int unsigned | NO | | 0 | | +| contact-id | contact.id of the member assigned to the associated group | int unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_gserver-tag.md b/doc/database/db_gserver-tag.md index 9631f293e..47dedeb54 100644 --- a/doc/database/db_gserver-tag.md +++ b/doc/database/db_gserver-tag.md @@ -2,9 +2,9 @@ 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 | NO | PRI | 0 | | -| tag | Tag that the server has subscribed | varchar(100) | NO | PRI | | | +| Field | Description | Type | Null | Key | Default | Extra | +| ---------- | ---------------------------------- | ------------ | ---- | --- | ------- | ----- | +| gserver-id | The id of the gserver | int unsigned | NO | PRI | 0 | | +| tag | Tag that the server has subscribed | varchar(100) | NO | PRI | | | Return to [database documentation](help/database) diff --git a/doc/database/db_gserver.md b/doc/database/db_gserver.md index 220a8a17c..8be46ba67 100644 --- a/doc/database/db_gserver.md +++ b/doc/database/db_gserver.md @@ -2,30 +2,30 @@ Table gserver =========== Global servers -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| url | | varchar(255) | NO | | | | -| nurl | | varchar(255) | NO | | | | -| version | | varchar(255) | NO | | | | -| site_name | | varchar(255) | NO | | | | -| info | | text | YES | | NULL | | -| register_policy | | tinyint | NO | | 0 | | -| registered-users | Number of registered users | int unsigned | NO | | 0 | | -| directory-type | Type of directory service (Poco, Mastodon) | tinyint | YES | | 0 | | -| poco | | varchar(255) | NO | | | | -| noscrape | | varchar(255) | NO | | | | -| network | | char(4) | NO | | | | -| protocol | The protocol of the server | tinyint unsigned | YES | | NULL | | -| platform | | varchar(255) | NO | | | | -| relay-subscribe | Has the server subscribed to the relay system | boolean | NO | | 0 | | -| relay-scope | The scope of messages that the server wants to get | varchar(10) | NO | | | | -| detection-method | Method that had been used to detect that server | tinyint unsigned | YES | | NULL | | -| created | | datetime | NO | | 0001-01-01 00:00:00 | | -| last_poco_query | | datetime | YES | | 0001-01-01 00:00:00 | | -| last_contact | Last successful connection request | datetime | YES | | 0001-01-01 00:00:00 | | -| last_failure | Last failed connection request | datetime | YES | | 0001-01-01 00:00:00 | | -| failed | Connection failed | boolean | YES | | NULL | | -| next_contact | Next connection request | datetime | YES | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ---------------- | -------------------------------------------------- | ---------------- | ---- | --- | ------------------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| url | | varchar(255) | NO | | | | +| nurl | | varchar(255) | NO | | | | +| version | | varchar(255) | NO | | | | +| site_name | | varchar(255) | NO | | | | +| info | | text | YES | | NULL | | +| register_policy | | tinyint | NO | | 0 | | +| registered-users | Number of registered users | int unsigned | NO | | 0 | | +| directory-type | Type of directory service (Poco, Mastodon) | tinyint | YES | | 0 | | +| poco | | varchar(255) | NO | | | | +| noscrape | | varchar(255) | NO | | | | +| network | | char(4) | NO | | | | +| protocol | The protocol of the server | tinyint unsigned | YES | | NULL | | +| platform | | varchar(255) | NO | | | | +| relay-subscribe | Has the server subscribed to the relay system | boolean | NO | | 0 | | +| relay-scope | The scope of messages that the server wants to get | varchar(10) | NO | | | | +| detection-method | Method that had been used to detect that server | tinyint unsigned | YES | | NULL | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | +| last_poco_query | | datetime | YES | | 0001-01-01 00:00:00 | | +| last_contact | Last successful connection request | datetime | YES | | 0001-01-01 00:00:00 | | +| last_failure | Last failed connection request | datetime | YES | | 0001-01-01 00:00:00 | | +| failed | Connection failed | boolean | YES | | NULL | | +| next_contact | Next connection request | datetime | YES | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_hook.md b/doc/database/db_hook.md index c6b6cf9d0..75235b31c 100644 --- a/doc/database/db_hook.md +++ b/doc/database/db_hook.md @@ -2,12 +2,12 @@ Table hook =========== addon hook registry -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| hook | name of hook | varbinary(100) | NO | | | | -| file | relative filename of hook handler | varbinary(200) | NO | | | | -| function | function name of hook handler | varbinary(200) | NO | | | | -| priority | not yet implemented - can be used to sort conflicts in hook handling by calling handlers in priority order | smallint unsigned | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| -------- | ---------------------------------------------------------------------------------------------------------- | ----------------- | ---- | --- | ------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| hook | name of hook | varbinary(100) | NO | | | | +| file | relative filename of hook handler | varbinary(200) | NO | | | | +| function | function name of hook handler | varbinary(200) | NO | | | | +| priority | not yet implemented - can be used to sort conflicts in hook handling by calling handlers in priority order | smallint unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_host.md b/doc/database/db_host.md index 97c3bb5fe..bb07a5b87 100644 --- a/doc/database/db_host.md +++ b/doc/database/db_host.md @@ -2,9 +2,9 @@ Table host =========== Hostname -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | tinyint unsigned | NO | PRI | NULL | auto_increment | -| name | The hostname | varchar(128) | NO | | | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ------------- | ---------------- | ---- | --- | ------- | -------------- | +| id | sequential ID | tinyint unsigned | NO | PRI | NULL | auto_increment | +| name | The hostname | varchar(128) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_inbox-status.md b/doc/database/db_inbox-status.md index 882f601b2..53fa009e2 100644 --- a/doc/database/db_inbox-status.md +++ b/doc/database/db_inbox-status.md @@ -2,14 +2,14 @@ Table inbox-status =========== Status of ActivityPub inboxes -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| url | URL of the inbox | varbinary(255) | NO | PRI | NULL | | -| created | Creation date of this entry | datetime | NO | | 0001-01-01 00:00:00 | | -| success | Date of the last successful delivery | datetime | NO | | 0001-01-01 00:00:00 | | -| failure | Date of the last failed delivery | datetime | NO | | 0001-01-01 00:00:00 | | -| previous | Previous delivery date | datetime | NO | | 0001-01-01 00:00:00 | | -| archive | Is the inbox archived? | boolean | NO | | 0 | | -| shared | Is it a shared inbox? | boolean | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| -------- | ------------------------------------ | -------------- | ---- | --- | ------------------- | ----- | +| url | URL of the inbox | varbinary(255) | NO | PRI | NULL | | +| created | Creation date of this entry | datetime | NO | | 0001-01-01 00:00:00 | | +| success | Date of the last successful delivery | datetime | NO | | 0001-01-01 00:00:00 | | +| failure | Date of the last failed delivery | datetime | NO | | 0001-01-01 00:00:00 | | +| previous | Previous delivery date | datetime | NO | | 0001-01-01 00:00:00 | | +| archive | Is the inbox archived? | boolean | NO | | 0 | | +| shared | Is it a shared inbox? | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_intro.md b/doc/database/db_intro.md index 698fbe918..df1deac2b 100644 --- a/doc/database/db_intro.md +++ b/doc/database/db_intro.md @@ -2,18 +2,18 @@ Table intro =========== -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | NO | | 0 | | -| fid | | int unsigned | YES | | NULL | | -| contact-id | | int unsigned | NO | | 0 | | -| knowyou | | boolean | NO | | 0 | | -| duplex | | boolean | NO | | 0 | | -| note | | text | YES | | NULL | | -| hash | | varchar(255) | NO | | | | -| datetime | | datetime | NO | | 0001-01-01 00:00:00 | | -| blocked | | boolean | NO | | 1 | | -| ignore | | boolean | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ---------- | ------------- | ------------------ | ---- | --- | ------------------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| fid | | int unsigned | YES | | NULL | | +| contact-id | | int unsigned | NO | | 0 | | +| knowyou | | boolean | NO | | 0 | | +| duplex | | boolean | NO | | 0 | | +| note | | text | YES | | NULL | | +| hash | | varchar(255) | NO | | | | +| datetime | | datetime | NO | | 0001-01-01 00:00:00 | | +| blocked | | boolean | NO | | 1 | | +| ignore | | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_item-uri.md b/doc/database/db_item-uri.md index cc7a28e3a..8e4be669a 100644 --- a/doc/database/db_item-uri.md +++ b/doc/database/db_item-uri.md @@ -2,10 +2,10 @@ Table item-uri =========== URI and GUID for items -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | int unsigned | NO | PRI | NULL | auto_increment | -| uri | URI of an item | varbinary(255) | NO | | NULL | | -| guid | A unique identifier for an item | varbinary(255) | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ------------------------------- | -------------- | ---- | --- | ------- | -------------- | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| uri | URI of an item | varbinary(255) | NO | | NULL | | +| guid | A unique identifier for an item | varbinary(255) | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_locks.md b/doc/database/db_locks.md index 94e39dee7..0da4d8845 100644 --- a/doc/database/db_locks.md +++ b/doc/database/db_locks.md @@ -2,12 +2,12 @@ Table locks =========== -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| name | | varchar(128) | NO | | | | -| locked | | boolean | NO | | 0 | | -| pid | Process ID | int unsigned | NO | | 0 | | -| expires | datetime of cache expiration | datetime | NO | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------- | ---------------------------- | ------------ | ---- | --- | ------------------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| name | | varchar(128) | NO | | | | +| locked | | boolean | NO | | 0 | | +| pid | Process ID | int unsigned | NO | | 0 | | +| expires | datetime of cache expiration | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_mail.md b/doc/database/db_mail.md index 7ee802255..44f435d00 100644 --- a/doc/database/db_mail.md +++ b/doc/database/db_mail.md @@ -2,29 +2,29 @@ Table mail =========== private messages -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | Owner User id | mediumint unsigned | NO | | 0 | | -| guid | A unique identifier for this private message | varchar(255) | NO | | | | -| 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) | YES | | NULL | | -| author-id | Link to the contact table with uid=0 of the author of the mail | int unsigned | YES | | NULL | | -| convid | conv.id | int unsigned | YES | | NULL | | -| title | | varchar(255) | NO | | | | -| body | | mediumtext | YES | | NULL | | -| seen | if message visited it is 1 | boolean | NO | | 0 | | -| reply | | boolean | NO | | 0 | | -| replied | | boolean | NO | | 0 | | -| unknown | if sender not in the contact table this is 1 | boolean | NO | | 0 | | -| uri | | varchar(255) | NO | | | | -| uri-id | Item-uri id of the related mail | int unsigned | YES | | NULL | | -| parent-uri | | varchar(255) | NO | | | | -| parent-uri-id | Item-uri id of the parent of the related mail | int unsigned | YES | | NULL | | -| thr-parent | | varchar(255) | YES | | NULL | | -| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | YES | | NULL | | -| 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 | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| guid | A unique identifier for this private message | varchar(255) | NO | | | | +| 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) | YES | | NULL | | +| author-id | Link to the contact table with uid=0 of the author of the mail | int unsigned | YES | | NULL | | +| convid | conv.id | int unsigned | YES | | NULL | | +| title | | varchar(255) | NO | | | | +| body | | mediumtext | YES | | NULL | | +| seen | if message visited it is 1 | boolean | NO | | 0 | | +| reply | | boolean | NO | | 0 | | +| replied | | boolean | NO | | 0 | | +| unknown | if sender not in the contact table this is 1 | boolean | NO | | 0 | | +| uri | | varchar(255) | NO | | | | +| uri-id | Item-uri id of the related mail | int unsigned | YES | | NULL | | +| parent-uri | | varchar(255) | NO | | | | +| parent-uri-id | Item-uri id of the parent of the related mail | int unsigned | YES | | NULL | | +| thr-parent | | varchar(255) | YES | | NULL | | +| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | YES | | NULL | | +| created | creation time of the private message | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_mailacct.md b/doc/database/db_mailacct.md index cd3808d84..0fb9a43f6 100644 --- a/doc/database/db_mailacct.md +++ b/doc/database/db_mailacct.md @@ -2,20 +2,20 @@ Table mailacct =========== Mail account data for fetching mails -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | NO | | 0 | | -| server | | varchar(255) | NO | | | | -| port | | smallint unsigned | NO | | 0 | | -| ssltype | | varchar(16) | NO | | | | -| mailbox | | varchar(255) | NO | | | | -| user | | varchar(255) | NO | | | | -| pass | | text | YES | | NULL | | -| reply_to | | varchar(255) | NO | | | | -| action | | tinyint unsigned | NO | | 0 | | -| movetofolder | | varchar(255) | NO | | | | -| pubmail | | boolean | NO | | 0 | | -| last_check | | datetime | NO | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------ | ------------- | ------------------ | ---- | --- | ------------------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| server | | varchar(255) | NO | | | | +| port | | smallint unsigned | NO | | 0 | | +| ssltype | | varchar(16) | NO | | | | +| mailbox | | varchar(255) | NO | | | | +| user | | varchar(255) | NO | | | | +| pass | | text | YES | | NULL | | +| reply_to | | varchar(255) | NO | | | | +| action | | tinyint unsigned | NO | | 0 | | +| movetofolder | | varchar(255) | NO | | | | +| pubmail | | boolean | NO | | 0 | | +| last_check | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_manage.md b/doc/database/db_manage.md index 42b255354..96f770370 100644 --- a/doc/database/db_manage.md +++ b/doc/database/db_manage.md @@ -2,10 +2,10 @@ Table manage =========== table of accounts that can manage each other -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | NO | | 0 | | -| mid | User id | mediumint unsigned | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ------------- | ------------------ | ---- | --- | ------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| mid | User id | mediumint unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_notification.md b/doc/database/db_notification.md index 5858151a3..866d77527 100644 --- a/doc/database/db_notification.md +++ b/doc/database/db_notification.md @@ -2,16 +2,16 @@ Table notification =========== notifications -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | Owner User id | mediumint unsigned | YES | | NULL | | -| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | YES | | NULL | | -| type | | tinyint unsigned | YES | | NULL | | -| actor-id | Link to the contact table with uid=0 of the actor that caused the notification | int unsigned | YES | | NULL | | -| target-uri-id | Item-uri id of the related post | int unsigned | YES | | NULL | | -| parent-uri-id | Item-uri id of the parent of the related post | int unsigned | YES | | NULL | | -| created | | datetime | YES | | NULL | | -| seen | | boolean | YES | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------- | ------------------------------------------------------------------------------ | ------------------ | ---- | --- | ------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | YES | | NULL | | +| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | YES | | NULL | | +| type | | tinyint unsigned | YES | | NULL | | +| actor-id | Link to the contact table with uid=0 of the actor that caused the notification | int unsigned | YES | | NULL | | +| target-uri-id | Item-uri id of the related post | int unsigned | YES | | NULL | | +| parent-uri-id | Item-uri id of the parent of the related post | int unsigned | YES | | NULL | | +| created | | datetime | YES | | NULL | | +| seen | | boolean | YES | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_notify-threads.md b/doc/database/db_notify-threads.md index 24aba8093..3461e502d 100644 --- a/doc/database/db_notify-threads.md +++ b/doc/database/db_notify-threads.md @@ -2,13 +2,13 @@ Table notify-threads =========== -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| notify-id | | int unsigned | NO | | 0 | | -| master-parent-item | Deprecated | int unsigned | YES | | NULL | | -| master-parent-uri-id | Item-uri id of the parent of the related post | int unsigned | YES | | NULL | | -| parent-item | | int unsigned | NO | | 0 | | -| receiver-uid | User id | mediumint unsigned | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| -------------------- | --------------------------------------------- | ------------------ | ---- | --- | ------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| notify-id | | int unsigned | NO | | 0 | | +| master-parent-item | Deprecated | int unsigned | YES | | NULL | | +| master-parent-uri-id | Item-uri id of the parent of the related post | int unsigned | YES | | NULL | | +| parent-item | | int unsigned | NO | | 0 | | +| receiver-uid | User id | mediumint unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_notify.md b/doc/database/db_notify.md index 79c1c7359..fef88a971 100644 --- a/doc/database/db_notify.md +++ b/doc/database/db_notify.md @@ -2,25 +2,25 @@ Table notify =========== notifications -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| type | | smallint unsigned | 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 | Owner User id | mediumint unsigned | NO | | 0 | | -| link | | varchar(255) | NO | | | | -| iid | | int unsigned | YES | | NULL | | -| parent | | int unsigned | YES | | NULL | | -| uri-id | Item-uri id of the related post | int unsigned | YES | | NULL | | -| parent-uri-id | Item-uri id of the parent of the related post | int unsigned | YES | | NULL | | -| seen | | boolean | NO | | 0 | | -| verb | | varchar(100) | NO | | | | -| otype | | varchar(10) | 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 | NO | PRI | NULL | auto_increment | +| type | | smallint unsigned | 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 | Owner User id | mediumint unsigned | NO | | 0 | | +| link | | varchar(255) | NO | | | | +| iid | | int unsigned | YES | | NULL | | +| parent | | int unsigned | YES | | NULL | | +| uri-id | Item-uri id of the related post | int unsigned | YES | | NULL | | +| parent-uri-id | Item-uri id of the parent of the related post | int unsigned | YES | | NULL | | +| seen | | boolean | NO | | 0 | | +| verb | | varchar(100) | NO | | | | +| otype | | varchar(10) | NO | | | | +| name_cache | Cached bbcode parsing of name | tinytext | YES | | NULL | | +| msg_cache | Cached bbcode parsing of msg | mediumtext | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_oembed.md b/doc/database/db_oembed.md index 3a264d7da..bff9ebd9c 100644 --- a/doc/database/db_oembed.md +++ b/doc/database/db_oembed.md @@ -2,11 +2,11 @@ Table oembed =========== cache for OEmbed queries -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| url | page url | varbinary(255) | NO | PRI | NULL | | -| maxwidth | Maximum width passed to Oembed | mediumint unsigned | NO | PRI | NULL | | -| content | OEmbed data of the page | mediumtext | YES | | NULL | | -| created | datetime of creation | datetime | NO | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| -------- | ------------------------------ | ------------------ | ---- | --- | ------------------- | ----- | +| url | page url | varbinary(255) | NO | PRI | NULL | | +| maxwidth | Maximum width passed to Oembed | mediumint unsigned | NO | PRI | NULL | | +| content | OEmbed data of the page | mediumtext | YES | | NULL | | +| created | datetime of creation | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_openwebauth-token.md b/doc/database/db_openwebauth-token.md index ce30bbacf..0ae0a85ba 100644 --- a/doc/database/db_openwebauth-token.md +++ b/doc/database/db_openwebauth-token.md @@ -2,13 +2,13 @@ Table openwebauth-token =========== Store OpenWebAuth token to verify contacts -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | User id - currently unused | mediumint unsigned | NO | | 0 | | -| type | Verify type | varchar(32) | NO | | | | -| token | A generated token | varchar(255) | NO | | | | -| meta | | varchar(255) | NO | | | | -| created | datetime of creation | datetime | NO | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------- | -------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id - currently unused | mediumint unsigned | NO | | 0 | | +| type | Verify type | varchar(32) | NO | | | | +| token | A generated token | varchar(255) | NO | | | | +| meta | | varchar(255) | NO | | | | +| created | datetime of creation | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_parsed_url.md b/doc/database/db_parsed_url.md index 757b8c0ab..a264c86e3 100644 --- a/doc/database/db_parsed_url.md +++ b/doc/database/db_parsed_url.md @@ -2,14 +2,14 @@ Table parsed_url =========== cache for 'parse_url' queries -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| url_hash | page url hash | binary(64) | NO | PRI | NULL | | -| guessing | is the 'guessing' mode active? | boolean | NO | PRI | 0 | | -| oembed | is the data the result of oembed? | boolean | NO | PRI | 0 | | -| url | page url | text | NO | | NULL | | -| content | page data | mediumtext | YES | | NULL | | -| created | datetime of creation | datetime | NO | | 0001-01-01 00:00:00 | | -| expires | datetime of expiration | datetime | NO | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| -------- | --------------------------------- | ---------- | ---- | --- | ------------------- | ----- | +| url_hash | page url hash | binary(64) | NO | PRI | NULL | | +| guessing | is the 'guessing' mode active? | boolean | NO | PRI | 0 | | +| oembed | is the data the result of oembed? | boolean | NO | PRI | 0 | | +| url | page url | text | NO | | NULL | | +| content | page data | mediumtext | YES | | NULL | | +| created | datetime of creation | datetime | NO | | 0001-01-01 00:00:00 | | +| expires | datetime of expiration | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_pconfig.md b/doc/database/db_pconfig.md index 99f905877..819dfbfbf 100644 --- a/doc/database/db_pconfig.md +++ b/doc/database/db_pconfig.md @@ -2,12 +2,12 @@ Table pconfig =========== personal (per user) configuration storage -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | Primary key | int unsigned | NO | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | NO | | 0 | | -| cat | Category | varchar(50) | NO | | | | -| k | Key | varchar(100) | NO | | | | -| v | Value | mediumtext | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | ------------------ | ---- | --- | ------- | -------------- | +| id | Primary key | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| cat | Category | varchar(50) | NO | | | | +| k | Key | varchar(100) | NO | | | | +| v | Value | mediumtext | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_permissionset.md b/doc/database/db_permissionset.md index e49245524..39b3d93b3 100644 --- a/doc/database/db_permissionset.md +++ b/doc/database/db_permissionset.md @@ -2,13 +2,13 @@ Table permissionset =========== -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | Owner id of this permission set | mediumint unsigned | NO | | 0 | | -| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | -| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | -| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | -| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| --------- | ------------------------------------------------------ | ------------------ | ---- | --- | ------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner id of this permission set | mediumint unsigned | NO | | 0 | | +| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | +| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | +| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | +| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_photo.md b/doc/database/db_photo.md index 10ae06f09..1574d6181 100644 --- a/doc/database/db_photo.md +++ b/doc/database/db_photo.md @@ -2,34 +2,34 @@ Table photo =========== photo storage -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | Owner User id | mediumint unsigned | NO | | 0 | | -| contact-id | contact.id | int unsigned | NO | | 0 | | -| guid | A unique identifier for this photo | char(16) | NO | | | | -| resource-id | | char(32) | NO | | | | -| hash | hash value of the photo | char(32) | YES | | NULL | | -| 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 | YES | | NULL | | -| album | The name of the album to which the photo belongs | varchar(255) | NO | | | | -| filename | | varchar(255) | NO | | | | -| type | | varchar(30) | NO | | image/jpeg | | -| height | | smallint unsigned | NO | | 0 | | -| width | | smallint unsigned | NO | | 0 | | -| datasize | | int unsigned | NO | | 0 | | -| data | | mediumblob | NO | | NULL | | -| scale | | tinyint unsigned | NO | | 0 | | -| profile | | boolean | NO | | 0 | | -| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | -| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | -| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | -| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | -| accessible | Make photo publicly accessible, ignoring permissions | boolean | NO | | 0 | | -| backend-class | Storage backend class | tinytext | YES | | NULL | | -| backend-ref | Storage backend data reference | text | YES | | NULL | | -| updated | | datetime | NO | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------- | ------------------------------------------------------ | ------------------ | ---- | --- | ------------------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| contact-id | contact.id | int unsigned | NO | | 0 | | +| guid | A unique identifier for this photo | char(16) | NO | | | | +| resource-id | | char(32) | NO | | | | +| hash | hash value of the photo | char(32) | YES | | NULL | | +| 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 | YES | | NULL | | +| album | The name of the album to which the photo belongs | varchar(255) | NO | | | | +| filename | | varchar(255) | NO | | | | +| type | | varchar(30) | NO | | image/jpeg | | +| height | | smallint unsigned | NO | | 0 | | +| width | | smallint unsigned | NO | | 0 | | +| datasize | | int unsigned | NO | | 0 | | +| data | | mediumblob | NO | | NULL | | +| scale | | tinyint unsigned | NO | | 0 | | +| profile | | boolean | NO | | 0 | | +| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | +| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | +| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | +| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | +| accessible | Make photo publicly accessible, ignoring permissions | boolean | NO | | 0 | | +| backend-class | Storage backend class | tinytext | YES | | NULL | | +| backend-ref | Storage backend data reference | text | YES | | NULL | | +| updated | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-category.md b/doc/database/db_post-category.md index a4b847493..c5bf26e8f 100644 --- a/doc/database/db_post-category.md +++ b/doc/database/db_post-category.md @@ -2,11 +2,11 @@ Table post-category =========== post relation to categories -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | -| uid | User id | mediumint unsigned | NO | PRI | 0 | | -| type | | tinyint unsigned | NO | PRI | 0 | | -| tid | | int unsigned | NO | PRI | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------ | --------------------------------------------------------- | ------------------ | ---- | --- | ------- | ----- | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| uid | User id | mediumint unsigned | NO | PRI | 0 | | +| type | | tinyint unsigned | NO | PRI | 0 | | +| tid | | int unsigned | NO | PRI | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-content.md b/doc/database/db_post-content.md index 232753223..cee72373b 100644 --- a/doc/database/db_post-content.md +++ b/doc/database/db_post-content.md @@ -2,24 +2,24 @@ Table post-content =========== Content for all posts -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | -| title | item title | varchar(255) | NO | | | | -| content-warning | | varchar(255) | NO | | | | -| body | item body content | mediumtext | YES | | NULL | | -| raw-body | Body without embedded media links | mediumtext | YES | | NULL | | -| location | text location where this item originated | varchar(255) | NO | | | | -| coord | longitude/latitude pair representing location where this item originated | varchar(255) | NO | | | | -| language | Language information about this post | text | YES | | NULL | | -| app | application which generated this item | varchar(255) | NO | | | | -| rendered-hash | | varchar(32) | NO | | | | -| rendered-html | item.body converted to html | mediumtext | YES | | NULL | | -| object-type | ActivityStreams object type | varchar(100) | NO | | | | -| object | JSON encoded object structure unless it is an implied object (normal post) | text | YES | | NULL | | -| target-type | ActivityStreams target type if applicable (URI) | varchar(100) | NO | | | | -| target | JSON encoded target structure if used | text | YES | | NULL | | -| 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(32) | NO | | | | -| plink | permalink or URL to a displayable copy of the message at its source | varchar(255) | NO | | | | +| Field | Description | Type | Null | Key | Default | Extra | +| --------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------ | ---- | --- | ------- | ----- | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| title | item title | varchar(255) | NO | | | | +| content-warning | | varchar(255) | NO | | | | +| body | item body content | mediumtext | YES | | NULL | | +| raw-body | Body without embedded media links | mediumtext | YES | | NULL | | +| location | text location where this item originated | varchar(255) | NO | | | | +| coord | longitude/latitude pair representing location where this item originated | varchar(255) | NO | | | | +| language | Language information about this post | text | YES | | NULL | | +| app | application which generated this item | varchar(255) | NO | | | | +| rendered-hash | | varchar(32) | NO | | | | +| rendered-html | item.body converted to html | mediumtext | YES | | NULL | | +| object-type | ActivityStreams object type | varchar(100) | NO | | | | +| object | JSON encoded object structure unless it is an implied object (normal post) | text | YES | | NULL | | +| target-type | ActivityStreams target type if applicable (URI) | varchar(100) | NO | | | | +| target | JSON encoded target structure if used | text | YES | | NULL | | +| 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(32) | NO | | | | +| plink | permalink or URL to a displayable copy of the message at its source | varchar(255) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-delivery-data.md b/doc/database/db_post-delivery-data.md index 30a91193a..95e9dc190 100644 --- a/doc/database/db_post-delivery-data.md +++ b/doc/database/db_post-delivery-data.md @@ -2,18 +2,18 @@ Table post-delivery-data =========== Delivery data for items -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | 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 | YES | | NULL | | -| inform | Additional receivers of the linked item | mediumtext | YES | | NULL | | -| queue_count | Initial number of delivery recipients, used as item.delivery_queue_count | mediumint | NO | | 0 | | -| queue_done | Number of successful deliveries, used as item.delivery_queue_done | mediumint | NO | | 0 | | -| queue_failed | Number of unsuccessful deliveries, used as item.delivery_queue_failed | mediumint | NO | | 0 | | -| activitypub | Number of successful deliveries via ActivityPub | mediumint | NO | | 0 | | -| dfrn | Number of successful deliveries via DFRN | mediumint | NO | | 0 | | -| legacy_dfrn | Number of successful deliveries via legacy DFRN | mediumint | NO | | 0 | | -| diaspora | Number of successful deliveries via Diaspora | mediumint | NO | | 0 | | -| ostatus | Number of successful deliveries via OStatus | mediumint | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ---- | --- | ------- | ----- | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | 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 | YES | | NULL | | +| inform | Additional receivers of the linked item | mediumtext | YES | | NULL | | +| queue_count | Initial number of delivery recipients, used as item.delivery_queue_count | mediumint | NO | | 0 | | +| queue_done | Number of successful deliveries, used as item.delivery_queue_done | mediumint | NO | | 0 | | +| queue_failed | Number of unsuccessful deliveries, used as item.delivery_queue_failed | mediumint | NO | | 0 | | +| activitypub | Number of successful deliveries via ActivityPub | mediumint | NO | | 0 | | +| dfrn | Number of successful deliveries via DFRN | mediumint | NO | | 0 | | +| legacy_dfrn | Number of successful deliveries via legacy DFRN | mediumint | NO | | 0 | | +| diaspora | Number of successful deliveries via Diaspora | mediumint | NO | | 0 | | +| ostatus | Number of successful deliveries via OStatus | mediumint | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-media.md b/doc/database/db_post-media.md index de3b0e43c..b78f2d409 100644 --- a/doc/database/db_post-media.md +++ b/doc/database/db_post-media.md @@ -2,26 +2,26 @@ Table post-media =========== Attached media -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | | NULL | | -| url | Media URL | varbinary(511) | NO | | NULL | | -| type | Media type | tinyint unsigned | NO | | 0 | | -| mimetype | | varchar(60) | YES | | NULL | | -| height | Height of the media | smallint unsigned | YES | | NULL | | -| width | Width of the media | smallint unsigned | YES | | NULL | | -| size | Media size | int unsigned | YES | | NULL | | -| preview | Preview URL | varbinary(255) | YES | | NULL | | -| preview-height | Height of the preview picture | smallint unsigned | YES | | NULL | | -| preview-width | Width of the preview picture | smallint unsigned | YES | | NULL | | -| description | | text | YES | | NULL | | -| name | Name of the media | varchar(255) | YES | | NULL | | -| author-url | URL of the author of the media | varbinary(255) | YES | | NULL | | -| author-name | Name of the author of the media | varchar(255) | YES | | NULL | | -| author-image | Image of the author of the media | varbinary(255) | YES | | NULL | | -| publisher-url | URL of the publisher of the media | varbinary(255) | YES | | NULL | | -| publisher-name | Name of the publisher of the media | varchar(255) | YES | | NULL | | -| publisher-image | Image of the publisher of the media | varbinary(255) | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| --------------- | --------------------------------------------------------- | ----------------- | ---- | --- | ------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | | NULL | | +| url | Media URL | varbinary(511) | NO | | NULL | | +| type | Media type | tinyint unsigned | NO | | 0 | | +| mimetype | | varchar(60) | YES | | NULL | | +| height | Height of the media | smallint unsigned | YES | | NULL | | +| width | Width of the media | smallint unsigned | YES | | NULL | | +| size | Media size | int unsigned | YES | | NULL | | +| preview | Preview URL | varbinary(255) | YES | | NULL | | +| preview-height | Height of the preview picture | smallint unsigned | YES | | NULL | | +| preview-width | Width of the preview picture | smallint unsigned | YES | | NULL | | +| description | | text | YES | | NULL | | +| name | Name of the media | varchar(255) | YES | | NULL | | +| author-url | URL of the author of the media | varbinary(255) | YES | | NULL | | +| author-name | Name of the author of the media | varchar(255) | YES | | NULL | | +| author-image | Image of the author of the media | varbinary(255) | YES | | NULL | | +| publisher-url | URL of the publisher of the media | varbinary(255) | YES | | NULL | | +| publisher-name | Name of the publisher of the media | varchar(255) | YES | | NULL | | +| publisher-image | Image of the publisher of the media | varbinary(255) | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-tag.md b/doc/database/db_post-tag.md index ae65cf983..53df02cbe 100644 --- a/doc/database/db_post-tag.md +++ b/doc/database/db_post-tag.md @@ -2,11 +2,11 @@ Table post-tag =========== post relation to tags -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | -| type | | tinyint unsigned | NO | PRI | 0 | | -| tid | | int unsigned | NO | PRI | 0 | | -| cid | Contact id of the mentioned public contact | int unsigned | NO | PRI | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------ | --------------------------------------------------------- | ---------------- | ---- | --- | ------- | ----- | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| type | | tinyint unsigned | NO | PRI | 0 | | +| tid | | int unsigned | NO | PRI | 0 | | +| cid | Contact id of the mentioned public contact | int unsigned | NO | PRI | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-thread-user.md b/doc/database/db_post-thread-user.md index abb1ed8bd..1db1ffe26 100644 --- a/doc/database/db_post-thread-user.md +++ b/doc/database/db_post-thread-user.md @@ -2,30 +2,30 @@ Table post-thread-user =========== Thread related data per user -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | -| owner-id | Item owner | int unsigned | NO | | 0 | | -| author-id | Item author | int unsigned | NO | | 0 | | -| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | -| network | | char(4) | NO | | | | -| created | | datetime | NO | | 0001-01-01 00:00:00 | | -| received | | 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 | | -| commented | | datetime | NO | | 0001-01-01 00:00:00 | | -| uid | Owner id which owns this copy of the item | mediumint unsigned | NO | PRI | 0 | | -| pinned | The thread is pinned on the profile page | boolean | NO | | 0 | | -| starred | | boolean | NO | | 0 | | -| ignored | Ignore updates for this thread | boolean | NO | | 0 | | -| wall | This item was posted to the wall of uid | boolean | NO | | 0 | | -| mention | | boolean | NO | | 0 | | -| pubmail | | boolean | NO | | 0 | | -| forum_mode | | tinyint unsigned | NO | | 0 | | -| contact-id | contact.id | int unsigned | NO | | 0 | | -| unseen | post has not been seen | boolean | NO | | 1 | | -| hidden | Marker to hide the post from the user | boolean | NO | | 0 | | -| origin | item originated at this site | boolean | NO | | 0 | | -| psid | ID of the permission set of this post | int unsigned | YES | | NULL | | -| post-user-id | Id of the post-user table | int unsigned | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------ | ------------------------------------------------------------------------------------------------------- | ------------------ | ---- | --- | ------------------- | ----- | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| owner-id | Item owner | int unsigned | NO | | 0 | | +| author-id | Item author | int unsigned | NO | | 0 | | +| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | +| network | | char(4) | NO | | | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | +| received | | 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 | | +| commented | | datetime | NO | | 0001-01-01 00:00:00 | | +| uid | Owner id which owns this copy of the item | mediumint unsigned | NO | PRI | 0 | | +| pinned | The thread is pinned on the profile page | boolean | NO | | 0 | | +| starred | | boolean | NO | | 0 | | +| ignored | Ignore updates for this thread | boolean | NO | | 0 | | +| wall | This item was posted to the wall of uid | boolean | NO | | 0 | | +| mention | | boolean | NO | | 0 | | +| pubmail | | boolean | NO | | 0 | | +| forum_mode | | tinyint unsigned | NO | | 0 | | +| contact-id | contact.id | int unsigned | NO | | 0 | | +| unseen | post has not been seen | boolean | NO | | 1 | | +| hidden | Marker to hide the post from the user | boolean | NO | | 0 | | +| origin | item originated at this site | boolean | NO | | 0 | | +| psid | ID of the permission set of this post | int unsigned | YES | | NULL | | +| post-user-id | Id of the post-user table | int unsigned | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-thread.md b/doc/database/db_post-thread.md index aca05c1e2..57a28d199 100644 --- a/doc/database/db_post-thread.md +++ b/doc/database/db_post-thread.md @@ -2,16 +2,16 @@ Table post-thread =========== Thread related data -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | -| owner-id | Item owner | int unsigned | NO | | 0 | | -| author-id | Item author | int unsigned | NO | | 0 | | -| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | -| network | | char(4) | NO | | | | -| created | | datetime | NO | | 0001-01-01 00:00:00 | | -| received | | 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 | | -| commented | | datetime | NO | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| --------- | ------------------------------------------------------------------------------------------------------- | ------------ | ---- | --- | ------------------- | ----- | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| owner-id | Item owner | int unsigned | NO | | 0 | | +| author-id | Item author | int unsigned | NO | | 0 | | +| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | +| network | | char(4) | NO | | | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | +| received | | 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 | | +| commented | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-user-notification.md b/doc/database/db_post-user-notification.md index 8a93d7a56..fc367ca75 100644 --- a/doc/database/db_post-user-notification.md +++ b/doc/database/db_post-user-notification.md @@ -2,10 +2,10 @@ Table post-user-notification =========== User post notifications -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | -| uid | Owner id which owns this copy of the item | mediumint unsigned | NO | PRI | NULL | | -| notification-type | | tinyint unsigned | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----------------- | --------------------------------------------------------- | ------------------ | ---- | --- | ------- | ----- | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| uid | Owner id which owns this copy of the item | mediumint unsigned | NO | PRI | NULL | | +| notification-type | | tinyint unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-user.md b/doc/database/db_post-user.md index 247787f58..91c101200 100644 --- a/doc/database/db_post-user.md +++ b/doc/database/db_post-user.md @@ -2,37 +2,37 @@ Table post-user =========== User specific post data -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | int unsigned | NO | PRI | NULL | auto_increment | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | | NULL | | -| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | YES | | NULL | | -| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | YES | | NULL | | -| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | YES | | NULL | | -| 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 | | -| received | datetime | datetime | NO | | 0001-01-01 00:00:00 | | -| gravity | | tinyint unsigned | NO | | 0 | | -| network | Network from where the item comes from | char(4) | NO | | | | -| owner-id | Link to the contact table with uid=0 of the owner of this item | int unsigned | NO | | 0 | | -| author-id | Link to the contact table with uid=0 of the author of this item | int unsigned | NO | | 0 | | -| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | -| post-type | Post type (personal note, image, article, ...) | tinyint unsigned | NO | | 0 | | -| post-reason | Reason why the post arrived at the user | tinyint unsigned | NO | | 0 | | -| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | YES | | NULL | | -| private | 0=public, 1=private, 2=unlisted | tinyint unsigned | NO | | 0 | | -| global | | boolean | NO | | 0 | | -| visible | | boolean | NO | | 0 | | -| deleted | item has been marked for deletion | boolean | NO | | 0 | | -| uid | Owner id which owns this copy of the item | mediumint unsigned | NO | | NULL | | -| protocol | Protocol used to deliver the item for this user | tinyint unsigned | YES | | NULL | | -| contact-id | contact.id | int unsigned | NO | | 0 | | -| event-id | Used to link to the event.id | int unsigned | YES | | NULL | | -| unseen | post has not been seen | boolean | NO | | 1 | | -| hidden | Marker to hide the post from the user | boolean | NO | | 0 | | -| notification-type | | tinyint unsigned | NO | | 0 | | -| wall | This item was posted to the wall of uid | boolean | NO | | 0 | | -| origin | item originated at this site | boolean | NO | | 0 | | -| psid | ID of the permission set of this post | int unsigned | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----------------- | --------------------------------------------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | | NULL | | +| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | YES | | NULL | | +| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | YES | | NULL | | +| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | YES | | NULL | | +| 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 | | +| received | datetime | datetime | NO | | 0001-01-01 00:00:00 | | +| gravity | | tinyint unsigned | NO | | 0 | | +| network | Network from where the item comes from | char(4) | NO | | | | +| owner-id | Link to the contact table with uid=0 of the owner of this item | int unsigned | NO | | 0 | | +| author-id | Link to the contact table with uid=0 of the author of this item | int unsigned | NO | | 0 | | +| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | +| post-type | Post type (personal note, image, article, ...) | tinyint unsigned | NO | | 0 | | +| post-reason | Reason why the post arrived at the user | tinyint unsigned | NO | | 0 | | +| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | YES | | NULL | | +| private | 0=public, 1=private, 2=unlisted | tinyint unsigned | NO | | 0 | | +| global | | boolean | NO | | 0 | | +| visible | | boolean | NO | | 0 | | +| deleted | item has been marked for deletion | boolean | NO | | 0 | | +| uid | Owner id which owns this copy of the item | mediumint unsigned | NO | | NULL | | +| protocol | Protocol used to deliver the item for this user | tinyint unsigned | YES | | NULL | | +| contact-id | contact.id | int unsigned | NO | | 0 | | +| event-id | Used to link to the event.id | int unsigned | YES | | NULL | | +| unseen | post has not been seen | boolean | NO | | 1 | | +| hidden | Marker to hide the post from the user | boolean | NO | | 0 | | +| notification-type | | tinyint unsigned | NO | | 0 | | +| wall | This item was posted to the wall of uid | boolean | NO | | 0 | | +| origin | item originated at this site | boolean | NO | | 0 | | +| psid | ID of the permission set of this post | int unsigned | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_post.md b/doc/database/db_post.md index ac3cdf34d..5d9702037 100644 --- a/doc/database/db_post.md +++ b/doc/database/db_post.md @@ -2,25 +2,25 @@ Table post =========== Structure for all posts -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | -| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | YES | | NULL | | -| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | YES | | NULL | | -| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | YES | | NULL | | -| 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 | | -| received | datetime | datetime | NO | | 0001-01-01 00:00:00 | | -| gravity | | tinyint unsigned | NO | | 0 | | -| network | Network from where the item comes from | char(4) | NO | | | | -| owner-id | Link to the contact table with uid=0 of the owner of this item | int unsigned | NO | | 0 | | -| author-id | Link to the contact table with uid=0 of the author of this item | int unsigned | NO | | 0 | | -| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | -| post-type | Post type (personal note, image, article, ...) | tinyint unsigned | NO | | 0 | | -| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | YES | | NULL | | -| private | 0=public, 1=private, 2=unlisted | tinyint unsigned | NO | | 0 | | -| global | | boolean | NO | | 0 | | -| visible | | boolean | NO | | 0 | | -| deleted | item has been marked for deletion | boolean | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------- | --------------------------------------------------------------------------------- | ----------------- | ---- | --- | ------------------- | ----- | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | YES | | NULL | | +| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | YES | | NULL | | +| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | YES | | NULL | | +| 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 | | +| received | datetime | datetime | NO | | 0001-01-01 00:00:00 | | +| gravity | | tinyint unsigned | NO | | 0 | | +| network | Network from where the item comes from | char(4) | NO | | | | +| owner-id | Link to the contact table with uid=0 of the owner of this item | int unsigned | NO | | 0 | | +| author-id | Link to the contact table with uid=0 of the author of this item | int unsigned | NO | | 0 | | +| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | +| post-type | Post type (personal note, image, article, ...) | tinyint unsigned | NO | | 0 | | +| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | YES | | NULL | | +| private | 0=public, 1=private, 2=unlisted | tinyint unsigned | NO | | 0 | | +| global | | boolean | NO | | 0 | | +| visible | | boolean | NO | | 0 | | +| deleted | item has been marked for deletion | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_process.md b/doc/database/db_process.md index 732aa001b..6e823ce96 100644 --- a/doc/database/db_process.md +++ b/doc/database/db_process.md @@ -2,10 +2,10 @@ Table process =========== Currently running system processes -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| pid | | int unsigned | NO | PRI | NULL | | -| command | | varbinary(32) | NO | | | | -| created | | datetime | NO | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------- | ----------- | ------------- | ---- | --- | ------------------- | ----- | +| pid | | int unsigned | NO | PRI | NULL | | +| command | | varbinary(32) | NO | | | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_profile.md b/doc/database/db_profile.md index c8e27ddc0..debc093ca 100644 --- a/doc/database/db_profile.md +++ b/doc/database/db_profile.md @@ -2,49 +2,49 @@ Table profile =========== user profiles data -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | Owner User id | mediumint unsigned | NO | | 0 | | -| profile-name | Deprecated | varchar(255) | YES | | NULL | | -| is-default | Deprecated | boolean | YES | | NULL | | -| hide-friends | Hide friend list from viewers of this profile | boolean | NO | | 0 | | -| name | | varchar(255) | NO | | | | -| pdesc | Deprecated | varchar(255) | YES | | NULL | | -| dob | Day of birth | varchar(32) | NO | | 0000-00-00 | | -| address | | varchar(255) | NO | | | | -| locality | | varchar(255) | NO | | | | -| region | | varchar(255) | NO | | | | -| postal-code | | varchar(32) | NO | | | | -| country-name | | varchar(255) | NO | | | | -| hometown | Deprecated | varchar(255) | YES | | NULL | | -| gender | Deprecated | varchar(32) | YES | | NULL | | -| marital | Deprecated | varchar(255) | YES | | NULL | | -| with | Deprecated | text | YES | | NULL | | -| howlong | Deprecated | datetime | YES | | NULL | | -| sexual | Deprecated | varchar(255) | YES | | NULL | | -| politic | Deprecated | varchar(255) | YES | | NULL | | -| religion | Deprecated | varchar(255) | YES | | NULL | | -| pub_keywords | | text | YES | | NULL | | -| prv_keywords | | text | YES | | NULL | | -| likes | Deprecated | text | YES | | NULL | | -| dislikes | Deprecated | text | YES | | NULL | | -| about | Profile description | text | YES | | NULL | | -| summary | Deprecated | varchar(255) | YES | | NULL | | -| music | Deprecated | text | YES | | NULL | | -| book | Deprecated | text | YES | | NULL | | -| tv | Deprecated | text | YES | | NULL | | -| film | Deprecated | text | YES | | NULL | | -| interest | Deprecated | text | YES | | NULL | | -| romance | Deprecated | text | YES | | NULL | | -| work | Deprecated | text | YES | | NULL | | -| education | Deprecated | text | YES | | NULL | | -| contact | Deprecated | text | YES | | NULL | | -| homepage | | varchar(255) | NO | | | | -| xmpp | | varchar(255) | NO | | | | -| photo | | varchar(255) | NO | | | | -| thumb | | varchar(255) | NO | | | | -| publish | publish default profile in local directory | boolean | NO | | 0 | | -| net-publish | publish profile in global directory | boolean | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------ | --------------------------------------------- | ------------------ | ---- | --- | ---------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| profile-name | Deprecated | varchar(255) | YES | | NULL | | +| is-default | Deprecated | boolean | YES | | NULL | | +| hide-friends | Hide friend list from viewers of this profile | boolean | NO | | 0 | | +| name | | varchar(255) | NO | | | | +| pdesc | Deprecated | varchar(255) | YES | | NULL | | +| dob | Day of birth | varchar(32) | NO | | 0000-00-00 | | +| address | | varchar(255) | NO | | | | +| locality | | varchar(255) | NO | | | | +| region | | varchar(255) | NO | | | | +| postal-code | | varchar(32) | NO | | | | +| country-name | | varchar(255) | NO | | | | +| hometown | Deprecated | varchar(255) | YES | | NULL | | +| gender | Deprecated | varchar(32) | YES | | NULL | | +| marital | Deprecated | varchar(255) | YES | | NULL | | +| with | Deprecated | text | YES | | NULL | | +| howlong | Deprecated | datetime | YES | | NULL | | +| sexual | Deprecated | varchar(255) | YES | | NULL | | +| politic | Deprecated | varchar(255) | YES | | NULL | | +| religion | Deprecated | varchar(255) | YES | | NULL | | +| pub_keywords | | text | YES | | NULL | | +| prv_keywords | | text | YES | | NULL | | +| likes | Deprecated | text | YES | | NULL | | +| dislikes | Deprecated | text | YES | | NULL | | +| about | Profile description | text | YES | | NULL | | +| summary | Deprecated | varchar(255) | YES | | NULL | | +| music | Deprecated | text | YES | | NULL | | +| book | Deprecated | text | YES | | NULL | | +| tv | Deprecated | text | YES | | NULL | | +| film | Deprecated | text | YES | | NULL | | +| interest | Deprecated | text | YES | | NULL | | +| romance | Deprecated | text | YES | | NULL | | +| work | Deprecated | text | YES | | NULL | | +| education | Deprecated | text | YES | | NULL | | +| contact | Deprecated | text | YES | | NULL | | +| homepage | | varchar(255) | NO | | | | +| xmpp | | varchar(255) | NO | | | | +| photo | | varchar(255) | NO | | | | +| thumb | | varchar(255) | NO | | | | +| publish | publish default profile in local directory | boolean | NO | | 0 | | +| net-publish | publish profile in global directory | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_profile_check.md b/doc/database/db_profile_check.md index a98250742..b35ded56a 100644 --- a/doc/database/db_profile_check.md +++ b/doc/database/db_profile_check.md @@ -2,13 +2,13 @@ Table profile_check =========== DFRN remote auth use -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | NO | | 0 | | -| cid | contact.id | int unsigned | NO | | 0 | | -| dfrn_id | | varchar(255) | NO | | | | -| sec | | varchar(255) | NO | | | | -| expire | | int unsigned | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------- | ------------- | ------------------ | ---- | --- | ------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| cid | contact.id | int unsigned | NO | | 0 | | +| dfrn_id | | varchar(255) | NO | | | | +| sec | | varchar(255) | NO | | | | +| expire | | int unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_profile_field.md b/doc/database/db_profile_field.md index 6b03bde96..c213bf113 100644 --- a/doc/database/db_profile_field.md +++ b/doc/database/db_profile_field.md @@ -2,15 +2,15 @@ Table profile_field =========== Custom profile fields -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | Owner user id | mediumint unsigned | NO | | 0 | | -| order | Field ordering per user | mediumint unsigned | NO | | 1 | | -| psid | ID of the permission set of this profile field - 0 = public | int unsigned | YES | | NULL | | -| label | Label of the field | varchar(255) | NO | | | | -| value | Value of the field | text | YES | | NULL | | -| created | creation time | datetime | NO | | 0001-01-01 00:00:00 | | -| edited | last edit time | datetime | NO | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------- | ----------------------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner user id | mediumint unsigned | NO | | 0 | | +| order | Field ordering per user | mediumint unsigned | NO | | 1 | | +| psid | ID of the permission set of this profile field - 0 = public | int unsigned | YES | | NULL | | +| label | Label of the field | varchar(255) | NO | | | | +| value | Value of the field | text | YES | | NULL | | +| created | creation time | datetime | NO | | 0001-01-01 00:00:00 | | +| edited | last edit time | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_push_subscriber.md b/doc/database/db_push_subscriber.md index df59f0329..6098a4fd8 100644 --- a/doc/database/db_push_subscriber.md +++ b/doc/database/db_push_subscriber.md @@ -2,17 +2,17 @@ Table push_subscriber =========== Used for OStatus: Contains feed subscribers -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | NO | | 0 | | -| callback_url | | varchar(255) | NO | | | | -| topic | | varchar(255) | NO | | | | -| nickname | | varchar(255) | NO | | | | -| push | Retrial counter | tinyint | NO | | 0 | | -| last_update | Date of last successful trial | datetime | NO | | 0001-01-01 00:00:00 | | -| next_try | Next retrial date | datetime | NO | | 0001-01-01 00:00:00 | | -| renewed | Date of last subscription renewal | datetime | NO | | 0001-01-01 00:00:00 | | -| secret | | varchar(255) | NO | | | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------ | --------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| callback_url | | varchar(255) | NO | | | | +| topic | | varchar(255) | NO | | | | +| nickname | | varchar(255) | NO | | | | +| push | Retrial counter | tinyint | NO | | 0 | | +| last_update | Date of last successful trial | datetime | NO | | 0001-01-01 00:00:00 | | +| next_try | Next retrial date | datetime | NO | | 0001-01-01 00:00:00 | | +| renewed | Date of last subscription renewal | datetime | NO | | 0001-01-01 00:00:00 | | +| secret | | varchar(255) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_register.md b/doc/database/db_register.md index d0f0c8a03..630d7b4a6 100644 --- a/doc/database/db_register.md +++ b/doc/database/db_register.md @@ -2,14 +2,14 @@ Table register =========== registrations requiring admin approval -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| hash | | varchar(255) | NO | | | | -| created | | datetime | NO | | 0001-01-01 00:00:00 | | -| uid | User id | mediumint unsigned | NO | | 0 | | -| password | | varchar(255) | NO | | | | -| language | | varchar(16) | NO | | | | -| note | | text | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| -------- | ------------- | ------------------ | ---- | --- | ------------------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| hash | | varchar(255) | NO | | | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | +| uid | User id | mediumint unsigned | NO | | 0 | | +| password | | varchar(255) | NO | | | | +| language | | varchar(16) | NO | | | | +| note | | text | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_search.md b/doc/database/db_search.md index d37c48b5e..0297545a0 100644 --- a/doc/database/db_search.md +++ b/doc/database/db_search.md @@ -2,10 +2,10 @@ Table search =========== -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | NO | | 0 | | -| term | | varchar(255) | NO | | | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ------------- | ------------------ | ---- | --- | ------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| term | | varchar(255) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_session.md b/doc/database/db_session.md index ca7f523f0..04c85487f 100644 --- a/doc/database/db_session.md +++ b/doc/database/db_session.md @@ -2,11 +2,11 @@ Table session =========== web session storage -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | bigint unsigned | NO | PRI | NULL | auto_increment | -| sid | | varbinary(255) | NO | | | | -| data | | text | YES | | NULL | | -| expire | | int unsigned | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------ | ------------- | --------------- | ---- | --- | ------- | -------------- | +| id | sequential ID | bigint unsigned | NO | PRI | NULL | auto_increment | +| sid | | varbinary(255) | NO | | | | +| data | | text | YES | | NULL | | +| expire | | int unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_storage.md b/doc/database/db_storage.md index cbed7df2c..00807760c 100644 --- a/doc/database/db_storage.md +++ b/doc/database/db_storage.md @@ -2,9 +2,9 @@ Table storage =========== Data stored by Database storage backend -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | Auto incremented image data id | int unsigned | NO | PRI | NULL | auto_increment | -| data | file data | longblob | NO | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ------------------------------ | ------------ | ---- | --- | ------- | -------------- | +| id | Auto incremented image data id | int unsigned | NO | PRI | NULL | auto_increment | +| data | file data | longblob | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_tag.md b/doc/database/db_tag.md index e2d3cc07d..1d1ed72b0 100644 --- a/doc/database/db_tag.md +++ b/doc/database/db_tag.md @@ -2,10 +2,10 @@ Table tag =========== tags and mentions -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | int unsigned | NO | PRI | NULL | auto_increment | -| name | | varchar(96) | NO | | | | -| url | | varbinary(255) | NO | | | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | -------------- | ---- | --- | ------- | -------------- | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| name | | varchar(96) | NO | | | | +| url | | varbinary(255) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_tokens.md b/doc/database/db_tokens.md index 3fe965fa6..d3f45bb79 100644 --- a/doc/database/db_tokens.md +++ b/doc/database/db_tokens.md @@ -2,13 +2,13 @@ Table tokens =========== OAuth usage -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | varchar(40) | NO | PRI | NULL | | -| secret | | text | YES | | NULL | | -| client_id | | varchar(20) | NO | | | | -| expires | | int | NO | | 0 | | -| scope | | varchar(200) | NO | | | | -| uid | User id | mediumint unsigned | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| --------- | ----------- | ------------------ | ---- | --- | ------- | ----- | +| id | | varchar(40) | NO | PRI | NULL | | +| secret | | text | YES | | NULL | | +| client_id | | varchar(20) | NO | | | | +| expires | | int | NO | | 0 | | +| scope | | varchar(200) | NO | | | | +| uid | User id | mediumint unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_user-contact.md b/doc/database/db_user-contact.md index 108a568e0..ba529fd0a 100644 --- a/doc/database/db_user-contact.md +++ b/doc/database/db_user-contact.md @@ -2,12 +2,12 @@ Table user-contact =========== User specific public contact data -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| cid | Contact id of the linked public contact | int unsigned | NO | PRI | 0 | | -| uid | User id | mediumint unsigned | NO | PRI | 0 | | -| blocked | Contact is completely blocked for this user | boolean | YES | | NULL | | -| ignored | Posts from this contact are ignored | boolean | YES | | NULL | | -| collapsed | Posts from this contact are collapsed | boolean | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| --------- | ------------------------------------------- | ------------------ | ---- | --- | ------- | ----- | +| cid | Contact id of the linked public contact | int unsigned | NO | PRI | 0 | | +| uid | User id | mediumint unsigned | NO | PRI | 0 | | +| blocked | Contact is completely blocked for this user | boolean | YES | | NULL | | +| ignored | Posts from this contact are ignored | boolean | YES | | NULL | | +| collapsed | Posts from this contact are collapsed | boolean | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_user.md b/doc/database/db_user.md index a56ab9048..6e63c6a3a 100644 --- a/doc/database/db_user.md +++ b/doc/database/db_user.md @@ -2,52 +2,52 @@ Table user =========== The local users -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| uid | sequential ID | mediumint unsigned | NO | PRI | NULL | auto_increment | -| parent-uid | The parent user that has full control about this user | mediumint unsigned | YES | | NULL | | -| guid | A unique identifier for this user | varchar(64) | NO | | | | -| username | Name that this user is known by | varchar(255) | NO | | | | -| password | encrypted password | varchar(255) | NO | | | | -| legacy_password | Is the password hash double-hashed? | boolean | NO | | 0 | | -| nickname | nick- and user name | varchar(255) | NO | | | | -| email | the users email address | varchar(255) | NO | | | | -| openid | | varchar(255) | NO | | | | -| timezone | PHP-legal timezone | varchar(128) | NO | | | | -| language | default language | varchar(32) | NO | | en | | -| register_date | timestamp of registration | datetime | NO | | 0001-01-01 00:00:00 | | -| login_date | timestamp of last login | datetime | NO | | 0001-01-01 00:00:00 | | -| default-location | Default for item.location | varchar(255) | NO | | | | -| allow_location | 1 allows to display the location | boolean | NO | | 0 | | -| theme | user theme preference | varchar(255) | NO | | | | -| pubkey | RSA public key 4096 bit | text | YES | | NULL | | -| prvkey | RSA private key 4096 bit | text | YES | | NULL | | -| spubkey | | text | YES | | NULL | | -| sprvkey | | text | YES | | NULL | | -| verified | user is verified through email | boolean | NO | | 0 | | -| blocked | 1 for user is blocked | boolean | NO | | 0 | | -| blockwall | Prohibit contacts to post to the profile page of the user | boolean | NO | | 0 | | -| hidewall | Hide profile details from unkown viewers | boolean | NO | | 0 | | -| blocktags | Prohibit contacts to tag the post of this user | boolean | NO | | 0 | | -| unkmail | Permit unknown people to send private mails to this user | boolean | NO | | 0 | | -| cntunkmail | | int unsigned | NO | | 10 | | -| notify-flags | email notification options | smallint unsigned | NO | | 65535 | | -| page-flags | page/profile type | tinyint unsigned | NO | | 0 | | -| account-type | | tinyint unsigned | NO | | 0 | | -| prvnets | | boolean | NO | | 0 | | -| pwdreset | Password reset request token | varchar(255) | YES | | NULL | | -| pwdreset_time | Timestamp of the last password reset request | datetime | YES | | NULL | | -| maxreq | | int unsigned | NO | | 10 | | -| expire | | int unsigned | NO | | 0 | | -| account_removed | if 1 the account is removed | boolean | NO | | 0 | | -| account_expired | | boolean | NO | | 0 | | -| account_expires_on | timestamp when account expires and will be deleted | datetime | NO | | 0001-01-01 00:00:00 | | -| expire_notification_sent | timestamp of last warning of account expiration | datetime | NO | | 0001-01-01 00:00:00 | | -| def_gid | | int unsigned | NO | | 0 | | -| allow_cid | default permission for this user | mediumtext | YES | | NULL | | -| allow_gid | default permission for this user | mediumtext | YES | | NULL | | -| deny_cid | default permission for this user | mediumtext | YES | | NULL | | -| deny_gid | default permission for this user | mediumtext | YES | | NULL | | -| openidserver | | text | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------------------ | --------------------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | +| uid | sequential ID | mediumint unsigned | NO | PRI | NULL | auto_increment | +| parent-uid | The parent user that has full control about this user | mediumint unsigned | YES | | NULL | | +| guid | A unique identifier for this user | varchar(64) | NO | | | | +| username | Name that this user is known by | varchar(255) | NO | | | | +| password | encrypted password | varchar(255) | NO | | | | +| legacy_password | Is the password hash double-hashed? | boolean | NO | | 0 | | +| nickname | nick- and user name | varchar(255) | NO | | | | +| email | the users email address | varchar(255) | NO | | | | +| openid | | varchar(255) | NO | | | | +| timezone | PHP-legal timezone | varchar(128) | NO | | | | +| language | default language | varchar(32) | NO | | en | | +| register_date | timestamp of registration | datetime | NO | | 0001-01-01 00:00:00 | | +| login_date | timestamp of last login | datetime | NO | | 0001-01-01 00:00:00 | | +| default-location | Default for item.location | varchar(255) | NO | | | | +| allow_location | 1 allows to display the location | boolean | NO | | 0 | | +| theme | user theme preference | varchar(255) | NO | | | | +| pubkey | RSA public key 4096 bit | text | YES | | NULL | | +| prvkey | RSA private key 4096 bit | text | YES | | NULL | | +| spubkey | | text | YES | | NULL | | +| sprvkey | | text | YES | | NULL | | +| verified | user is verified through email | boolean | NO | | 0 | | +| blocked | 1 for user is blocked | boolean | NO | | 0 | | +| blockwall | Prohibit contacts to post to the profile page of the user | boolean | NO | | 0 | | +| hidewall | Hide profile details from unkown viewers | boolean | NO | | 0 | | +| blocktags | Prohibit contacts to tag the post of this user | boolean | NO | | 0 | | +| unkmail | Permit unknown people to send private mails to this user | boolean | NO | | 0 | | +| cntunkmail | | int unsigned | NO | | 10 | | +| notify-flags | email notification options | smallint unsigned | NO | | 65535 | | +| page-flags | page/profile type | tinyint unsigned | NO | | 0 | | +| account-type | | tinyint unsigned | NO | | 0 | | +| prvnets | | boolean | NO | | 0 | | +| pwdreset | Password reset request token | varchar(255) | YES | | NULL | | +| pwdreset_time | Timestamp of the last password reset request | datetime | YES | | NULL | | +| maxreq | | int unsigned | NO | | 10 | | +| expire | | int unsigned | NO | | 0 | | +| account_removed | if 1 the account is removed | boolean | NO | | 0 | | +| account_expired | | boolean | NO | | 0 | | +| account_expires_on | timestamp when account expires and will be deleted | datetime | NO | | 0001-01-01 00:00:00 | | +| expire_notification_sent | timestamp of last warning of account expiration | datetime | NO | | 0001-01-01 00:00:00 | | +| def_gid | | int unsigned | NO | | 0 | | +| allow_cid | default permission for this user | mediumtext | YES | | NULL | | +| allow_gid | default permission for this user | mediumtext | YES | | NULL | | +| deny_cid | default permission for this user | mediumtext | YES | | NULL | | +| deny_gid | default permission for this user | mediumtext | YES | | NULL | | +| openidserver | | text | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_userd.md b/doc/database/db_userd.md index ff924dfa7..df2c20c33 100644 --- a/doc/database/db_userd.md +++ b/doc/database/db_userd.md @@ -2,9 +2,9 @@ Table userd =========== Deleted usernames -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| username | | varchar(255) | NO | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| -------- | ------------- | ------------ | ---- | --- | ------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| username | | varchar(255) | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_verb.md b/doc/database/db_verb.md index 4469acff0..f5451104c 100644 --- a/doc/database/db_verb.md +++ b/doc/database/db_verb.md @@ -2,9 +2,9 @@ Table verb =========== Activity Verbs -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | | smallint unsigned | NO | PRI | NULL | auto_increment | -| name | | varchar(100) | NO | | | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | ----------------- | ---- | --- | ------- | -------------- | +| id | | smallint unsigned | NO | PRI | NULL | auto_increment | +| name | | varchar(100) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_worker-ipc.md b/doc/database/db_worker-ipc.md index d278be3b4..266efc576 100644 --- a/doc/database/db_worker-ipc.md +++ b/doc/database/db_worker-ipc.md @@ -2,9 +2,9 @@ Table worker-ipc =========== Inter process communication between the frontend and the worker -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| key | | int | NO | PRI | NULL | | -| jobs | Flag for outstanding jobs | boolean | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ------------------------- | ------- | ---- | --- | ------- | ----- | +| key | | int | NO | PRI | NULL | | +| jobs | Flag for outstanding jobs | boolean | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_workerqueue.md b/doc/database/db_workerqueue.md index b104f7a5f..fac65b019 100644 --- a/doc/database/db_workerqueue.md +++ b/doc/database/db_workerqueue.md @@ -2,17 +2,17 @@ Table workerqueue =========== Background tasks queue entries -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | -| id | Auto incremented worker task id | int unsigned | NO | PRI | NULL | auto_increment | -| command | Task command | varchar(100) | YES | | NULL | | -| parameter | Task parameter | mediumtext | YES | | NULL | | -| priority | Task priority | tinyint unsigned | NO | | 0 | | -| created | Creation date | datetime | NO | | 0001-01-01 00:00:00 | | -| pid | Process id of the worker | int unsigned | NO | | 0 | | -| executed | Execution date | datetime | NO | | 0001-01-01 00:00:00 | | -| next_try | Next retrial date | datetime | NO | | 0001-01-01 00:00:00 | | -| retrial | Retrial counter | tinyint | NO | | 0 | | -| done | Marked 1 when the task was done - will be deleted later | boolean | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| --------- | ------------------------------------------------------- | ---------------- | ---- | --- | ------------------- | -------------- | +| id | Auto incremented worker task id | int unsigned | NO | PRI | NULL | auto_increment | +| command | Task command | varchar(100) | YES | | NULL | | +| parameter | Task parameter | mediumtext | YES | | NULL | | +| priority | Task priority | tinyint unsigned | NO | | 0 | | +| created | Creation date | datetime | NO | | 0001-01-01 00:00:00 | | +| pid | Process id of the worker | int unsigned | NO | | 0 | | +| executed | Execution date | datetime | NO | | 0001-01-01 00:00:00 | | +| next_try | Next retrial date | datetime | NO | | 0001-01-01 00:00:00 | | +| retrial | Retrial counter | tinyint | NO | | 0 | | +| done | Marked 1 when the task was done - will be deleted later | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index 1cf1bc12b..4451b09ab 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -166,8 +166,33 @@ class DBStructure $tables = []; foreach (self::definition(null) as $name => $definition) { - $fields = []; - $lengths = []; + $fields = [[ + 'name' => 'Field', + 'comment' => 'Description', + 'type' => 'Type', + 'null' => 'Null', + 'primary' => 'Key', + 'default' => 'Default', + 'extra' => 'Extra', + ], + [ + 'name' => '-', + 'comment' => '-', + 'type' => '-', + 'null' => '-', + 'primary' => '-', + 'default' => '-', + 'extra' => '-', + ]]; + $lengths = [ + 'name' => 5, + 'comment' => 11, + 'type' => 4, + 'null' => 4, + 'primary' => 3, + 'default' => 7, + 'extra' => 5, + ]; foreach ($definition['fields'] as $key => $value) { $field = []; $field['name'] = $key; @@ -186,9 +211,9 @@ class DBStructure array_walk_recursive($fields, function(&$value, $key) use ($lengths) { - $value = str_pad($value, $lengths[$key]); + $value = str_pad($value, $lengths[$key], $value === '-' ? '-' : ' '); }); - + $tables[] = ['name' => $name, 'comment' => $definition['comment']]; $content = Renderer::replaceMacros(Renderer::getMarkupTemplate('structure.tpl'), [ '$name' => $name, diff --git a/view/templates/structure.tpl b/view/templates/structure.tpl index 15049ab57..7b1569e37 100644 --- a/view/templates/structure.tpl +++ b/view/templates/structure.tpl @@ -2,8 +2,6 @@ Table {{$name}} =========== {{$comment}} -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ---- | ---- | --- | ------- | ----- | {{foreach $fields as $field}} | {{$field.name}} | {{$field.comment}} | {{$field.type}} | {{$field.null}} | {{$field.primary}} | {{$field.default}} | {{$field.extra}} | {{/foreach}} From 2cd0c1d30d237806e9c3853aa0645f786e31855c Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 14 Jun 2021 06:10:11 +0000 Subject: [PATCH 07/12] Trailing whitespace removed --- doc/database/db_2fa_app_specific_password.md | 17 +- doc/database/db_2fa_recovery_codes.md | 13 +- doc/database/db_2fa_trusted_browser.md | 15 +- doc/database/db_addon.md | 19 ++- doc/database/db_apcontact.md | 53 +++--- doc/database/db_application-token.md | 25 +-- doc/database/db_application.md | 27 +-- doc/database/db_attach.md | 35 ++-- doc/database/db_auth_codes.md | 15 +- doc/database/db_cache.md | 13 +- doc/database/db_challenge.md | 17 +- doc/database/db_clients.md | 17 +- doc/database/db_config.md | 13 +- doc/database/db_contact-relation.md | 15 +- doc/database/db_contact.md | 165 ++++++++++--------- doc/database/db_conv.md | 21 +-- doc/database/db_conversation.md | 21 +-- doc/database/db_delayed-post.md | 13 +- doc/database/db_diaspora-interaction.md | 9 +- doc/database/db_event.md | 45 ++--- doc/database/db_fcontact.md | 39 ++--- doc/database/db_fsuggest.md | 23 +-- doc/database/db_group.md | 15 +- doc/database/db_group_member.md | 11 +- doc/database/db_gserver-tag.md | 9 +- doc/database/db_gserver.md | 51 +++--- doc/database/db_hook.md | 15 +- doc/database/db_host.md | 9 +- doc/database/db_inbox-status.md | 19 ++- doc/database/db_intro.md | 27 +-- doc/database/db_item-uri.md | 11 +- doc/database/db_locks.md | 15 +- doc/database/db_mail.md | 49 +++--- doc/database/db_mailacct.md | 31 ++-- doc/database/db_manage.md | 11 +- doc/database/db_notification.md | 23 +-- doc/database/db_notify-threads.md | 17 +- doc/database/db_notify.md | 41 ++--- doc/database/db_oembed.md | 13 +- doc/database/db_openwebauth-token.md | 17 +- doc/database/db_parsed_url.md | 19 ++- doc/database/db_pconfig.md | 15 +- doc/database/db_permissionset.md | 17 +- doc/database/db_photo.md | 59 +++---- doc/database/db_post-category.md | 13 +- doc/database/db_post-content.md | 39 ++--- doc/database/db_post-delivery-data.md | 27 +-- doc/database/db_post-media.md | 43 ++--- doc/database/db_post-tag.md | 13 +- doc/database/db_post-thread-user.md | 51 +++--- doc/database/db_post-thread.md | 23 +-- doc/database/db_post-user-notification.md | 11 +- doc/database/db_post-user.md | 65 ++++---- doc/database/db_post.md | 41 ++--- doc/database/db_process.md | 11 +- doc/database/db_profile.md | 89 +++++----- doc/database/db_profile_check.md | 17 +- doc/database/db_profile_field.md | 21 +-- doc/database/db_push_subscriber.md | 25 +-- doc/database/db_register.md | 19 ++- doc/database/db_search.md | 11 +- doc/database/db_session.md | 13 +- doc/database/db_storage.md | 9 +- doc/database/db_tag.md | 11 +- doc/database/db_tokens.md | 17 +- doc/database/db_user-contact.md | 15 +- doc/database/db_user.md | 95 +++++------ doc/database/db_userd.md | 9 +- doc/database/db_verb.md | 9 +- doc/database/db_worker-ipc.md | 9 +- doc/database/db_workerqueue.md | 25 +-- view/templates/structure.tpl | 3 +- 72 files changed, 965 insertions(+), 893 deletions(-) diff --git a/doc/database/db_2fa_app_specific_password.md b/doc/database/db_2fa_app_specific_password.md index 28ec292c6..6dba89bf4 100644 --- a/doc/database/db_2fa_app_specific_password.md +++ b/doc/database/db_2fa_app_specific_password.md @@ -1,14 +1,15 @@ Table 2fa_app_specific_password =========== + Two-factor app-specific _password -| Field | Description | Type | Null | Key | Default | Extra | -| --------------- | ---------------------------------------- | ------------------ | ---- | --- | ------- | -------------- | -| id | Password ID for revocation | mediumint unsigned | NO | PRI | NULL | auto_increment | -| uid | User ID | mediumint unsigned | NO | | NULL | | -| description | Description of the usage of the password | varchar(255) | YES | | NULL | | -| hashed_password | Hashed password | varchar(255) | NO | | NULL | | -| generated | Datetime the password was generated | datetime | NO | | NULL | | -| last_used | Datetime the password was last used | datetime | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| --------------- | ---------------------------------------- | ------------------ | ---- | --- | ------- | -------------- | +| id | Password ID for revocation | mediumint unsigned | NO | PRI | NULL | auto_increment | +| uid | User ID | mediumint unsigned | NO | | NULL | | +| description | Description of the usage of the password | varchar(255) | YES | | NULL | | +| hashed_password | Hashed password | varchar(255) | NO | | NULL | | +| generated | Datetime the password was generated | datetime | NO | | NULL | | +| last_used | Datetime the password was last used | datetime | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_2fa_recovery_codes.md b/doc/database/db_2fa_recovery_codes.md index 426376369..30e00ef65 100644 --- a/doc/database/db_2fa_recovery_codes.md +++ b/doc/database/db_2fa_recovery_codes.md @@ -1,12 +1,13 @@ Table 2fa_recovery_codes =========== + Two-factor authentication recovery codes -| Field | Description | Type | Null | Key | Default | Extra | -| --------- | ------------------------------- | ------------------ | ---- | --- | ------- | ----- | -| uid | User ID | mediumint unsigned | NO | PRI | NULL | | -| code | Recovery code string | varchar(50) | NO | PRI | NULL | | -| generated | Datetime the code was generated | datetime | NO | | NULL | | -| used | Datetime the code was used | datetime | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| --------- | ------------------------------- | ------------------ | ---- | --- | ------- | ----- | +| uid | User ID | mediumint unsigned | NO | PRI | NULL | | +| code | Recovery code string | varchar(50) | NO | PRI | NULL | | +| generated | Datetime the code was generated | datetime | NO | | NULL | | +| used | Datetime the code was used | datetime | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_2fa_trusted_browser.md b/doc/database/db_2fa_trusted_browser.md index b412c104b..34845ba57 100644 --- a/doc/database/db_2fa_trusted_browser.md +++ b/doc/database/db_2fa_trusted_browser.md @@ -1,13 +1,14 @@ Table 2fa_trusted_browser =========== + Two-factor authentication trusted browsers -| Field | Description | Type | Null | Key | Default | Extra | -| ----------- | ------------------------------------------ | ------------------ | ---- | --- | ------- | ----- | -| cookie_hash | Trusted cookie hash | varchar(80) | NO | PRI | NULL | | -| uid | User ID | mediumint unsigned | NO | | NULL | | -| user_agent | User agent string | text | YES | | NULL | | -| created | Datetime the trusted browser was recorded | datetime | NO | | NULL | | -| last_used | Datetime the trusted browser was last used | datetime | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----------- | ------------------------------------------ | ------------------ | ---- | --- | ------- | ----- | +| cookie_hash | Trusted cookie hash | varchar(80) | NO | PRI | NULL | | +| uid | User ID | mediumint unsigned | NO | | NULL | | +| user_agent | User agent string | text | YES | | NULL | | +| created | Datetime the trusted browser was recorded | datetime | NO | | NULL | | +| last_used | Datetime the trusted browser was last used | datetime | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_addon.md b/doc/database/db_addon.md index 716ee9a1c..568e64a5a 100644 --- a/doc/database/db_addon.md +++ b/doc/database/db_addon.md @@ -1,15 +1,16 @@ Table addon =========== + registered addons -| Field | Description | Type | Null | Key | Default | Extra | -| ------------ | --------------------------------------------- | ------------ | ---- | --- | ------- | -------------- | -| id | | int unsigned | NO | PRI | NULL | auto_increment | -| name | addon base (file)name | varchar(50) | NO | | | | -| version | currently unused | varchar(50) | NO | | | | -| installed | currently always 1 | boolean | NO | | 0 | | -| hidden | currently unused | boolean | NO | | 0 | | -| timestamp | file timestamp to check for reloads | int unsigned | NO | | 0 | | -| plugin_admin | 1 = has admin config, 0 = has no admin config | boolean | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------ | --------------------------------------------- | ------------ | ---- | --- | ------- | -------------- | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| name | addon base (file)name | varchar(50) | NO | | | | +| version | currently unused | varchar(50) | NO | | | | +| installed | currently always 1 | boolean | NO | | 0 | | +| hidden | currently unused | boolean | NO | | 0 | | +| timestamp | file timestamp to check for reloads | int unsigned | NO | | 0 | | +| plugin_admin | 1 = has admin config, 0 = has no admin config | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_apcontact.md b/doc/database/db_apcontact.md index a32cc2a9a..c76c99b8b 100644 --- a/doc/database/db_apcontact.md +++ b/doc/database/db_apcontact.md @@ -1,32 +1,33 @@ Table apcontact =========== + ActivityPub compatible contacts - used in the ActivityPub implementation -| Field | Description | Type | Null | Key | Default | Extra | -| ---------------- | ---------------------------- | -------------- | ---- | --- | ------------------- | ----- | -| url | URL of the contact | varbinary(255) | NO | PRI | NULL | | -| uuid | | varchar(255) | YES | | NULL | | -| type | | varchar(20) | NO | | NULL | | -| following | | varchar(255) | YES | | NULL | | -| followers | | varchar(255) | YES | | NULL | | -| inbox | | varchar(255) | NO | | NULL | | -| outbox | | varchar(255) | YES | | NULL | | -| sharedinbox | | varchar(255) | YES | | NULL | | -| manually-approve | | boolean | YES | | NULL | | -| nick | | varchar(255) | NO | | | | -| name | | varchar(255) | YES | | NULL | | -| about | | text | YES | | NULL | | -| photo | | varchar(255) | YES | | NULL | | -| addr | | varchar(255) | YES | | NULL | | -| alias | | varchar(255) | YES | | NULL | | -| pubkey | | text | YES | | NULL | | -| subscribe | | varchar(255) | YES | | NULL | | -| baseurl | baseurl of the ap contact | varchar(255) | YES | | NULL | | -| gsid | Global Server ID | int unsigned | YES | | NULL | | -| generator | Name of the contact's system | varchar(255) | YES | | NULL | | -| following_count | Number of following contacts | int unsigned | YES | | 0 | | -| followers_count | Number of followers | int unsigned | YES | | 0 | | -| statuses_count | Number of posts | int unsigned | YES | | 0 | | -| updated | | datetime | NO | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ---------------- | ---------------------------- | -------------- | ---- | --- | ------------------- | ----- | +| url | URL of the contact | varbinary(255) | NO | PRI | NULL | | +| uuid | | varchar(255) | YES | | NULL | | +| type | | varchar(20) | NO | | NULL | | +| following | | varchar(255) | YES | | NULL | | +| followers | | varchar(255) | YES | | NULL | | +| inbox | | varchar(255) | NO | | NULL | | +| outbox | | varchar(255) | YES | | NULL | | +| sharedinbox | | varchar(255) | YES | | NULL | | +| manually-approve | | boolean | YES | | NULL | | +| nick | | varchar(255) | NO | | | | +| name | | varchar(255) | YES | | NULL | | +| about | | text | YES | | NULL | | +| photo | | varchar(255) | YES | | NULL | | +| addr | | varchar(255) | YES | | NULL | | +| alias | | varchar(255) | YES | | NULL | | +| pubkey | | text | YES | | NULL | | +| subscribe | | varchar(255) | YES | | NULL | | +| baseurl | baseurl of the ap contact | varchar(255) | YES | | NULL | | +| gsid | Global Server ID | int unsigned | YES | | NULL | | +| generator | Name of the contact's system | varchar(255) | YES | | NULL | | +| following_count | Number of following contacts | int unsigned | YES | | 0 | | +| followers_count | Number of followers | int unsigned | YES | | 0 | | +| statuses_count | Number of posts | int unsigned | YES | | 0 | | +| updated | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_application-token.md b/doc/database/db_application-token.md index fd273989f..e37bce6c9 100644 --- a/doc/database/db_application-token.md +++ b/doc/database/db_application-token.md @@ -1,18 +1,19 @@ Table application-token =========== + OAuth user token -| Field | Description | Type | Null | Key | Default | Extra | -| -------------- | ------------- | ------------------ | ---- | --- | ------- | ----- | -| application-id | | int unsigned | NO | PRI | NULL | | -| uid | Owner User id | mediumint unsigned | NO | PRI | NULL | | -| code | | varchar(64) | NO | | NULL | | -| access_token | | varchar(64) | NO | | NULL | | -| created_at | creation time | datetime | NO | | NULL | | -| scopes | | varchar(255) | YES | | NULL | | -| read | Read scope | boolean | YES | | NULL | | -| write | Write scope | boolean | YES | | NULL | | -| follow | Follow scope | boolean | YES | | NULL | | -| push | Push scope | boolean | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| -------------- | ------------- | ------------------ | ---- | --- | ------- | ----- | +| application-id | | int unsigned | NO | PRI | NULL | | +| uid | Owner User id | mediumint unsigned | NO | PRI | NULL | | +| code | | varchar(64) | NO | | NULL | | +| access_token | | varchar(64) | NO | | NULL | | +| created_at | creation time | datetime | NO | | NULL | | +| scopes | | varchar(255) | YES | | NULL | | +| read | Read scope | boolean | YES | | NULL | | +| write | Write scope | boolean | YES | | NULL | | +| follow | Follow scope | boolean | YES | | NULL | | +| push | Push scope | boolean | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_application.md b/doc/database/db_application.md index 3206d03be..461cc1188 100644 --- a/doc/database/db_application.md +++ b/doc/database/db_application.md @@ -1,19 +1,20 @@ Table application =========== + OAuth application -| Field | Description | Type | Null | Key | Default | Extra | -| ------------- | --------------- | ------------ | ---- | --- | ------- | -------------- | -| id | generated index | int unsigned | NO | PRI | NULL | auto_increment | -| client_id | | varchar(64) | NO | | NULL | | -| client_secret | | varchar(64) | NO | | NULL | | -| name | | varchar(255) | NO | | NULL | | -| redirect_uri | | varchar(255) | NO | | NULL | | -| website | | varchar(255) | YES | | NULL | | -| scopes | | varchar(255) | YES | | NULL | | -| read | Read scope | boolean | YES | | NULL | | -| write | Write scope | boolean | YES | | NULL | | -| follow | Follow scope | boolean | YES | | NULL | | -| push | Push scope | boolean | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------- | --------------- | ------------ | ---- | --- | ------- | -------------- | +| id | generated index | int unsigned | NO | PRI | NULL | auto_increment | +| client_id | | varchar(64) | NO | | NULL | | +| client_secret | | varchar(64) | NO | | NULL | | +| name | | varchar(255) | NO | | NULL | | +| redirect_uri | | varchar(255) | NO | | NULL | | +| website | | varchar(255) | YES | | NULL | | +| scopes | | varchar(255) | YES | | NULL | | +| read | Read scope | boolean | YES | | NULL | | +| write | Write scope | boolean | YES | | NULL | | +| follow | Follow scope | boolean | YES | | NULL | | +| push | Push scope | boolean | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_attach.md b/doc/database/db_attach.md index 95f736def..4cbda2a17 100644 --- a/doc/database/db_attach.md +++ b/doc/database/db_attach.md @@ -1,23 +1,24 @@ Table attach =========== + file attachments -| Field | Description | Type | Null | Key | Default | Extra | -| ------------- | ----------------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | -| id | generated index | int unsigned | NO | PRI | NULL | auto_increment | -| uid | Owner User id | mediumint unsigned | NO | | 0 | | -| hash | hash | varchar(64) | NO | | | | -| filename | filename of original | varchar(255) | NO | | | | -| filetype | mimetype | varchar(64) | NO | | | | -| filesize | size in bytes | int unsigned | 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 | YES | | NULL | | -| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | -| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | -| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | -| backend-class | Storage backend class | tinytext | YES | | NULL | | -| backend-ref | Storage backend data reference | text | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------- | ----------------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | +| id | generated index | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| hash | hash | varchar(64) | NO | | | | +| filename | filename of original | varchar(255) | NO | | | | +| filetype | mimetype | varchar(64) | NO | | | | +| filesize | size in bytes | int unsigned | 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 | YES | | NULL | | +| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | +| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | +| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | +| backend-class | Storage backend class | tinytext | YES | | NULL | | +| backend-ref | Storage backend data reference | text | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_auth_codes.md b/doc/database/db_auth_codes.md index 91d611069..fef3f987c 100644 --- a/doc/database/db_auth_codes.md +++ b/doc/database/db_auth_codes.md @@ -1,13 +1,14 @@ Table auth_codes =========== + OAuth usage -| 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 | NO | | 0 | | -| scope | | varchar(250) | NO | | | | +| 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 | NO | | 0 | | +| scope | | varchar(250) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_cache.md b/doc/database/db_cache.md index 42a2045e1..300959ef3 100644 --- a/doc/database/db_cache.md +++ b/doc/database/db_cache.md @@ -1,12 +1,13 @@ Table cache =========== + Stores temporary data -| Field | Description | Type | Null | Key | Default | Extra | -| ------- | ---------------------------- | -------------- | ---- | --- | ------------------- | ----- | -| k | cache key | varbinary(255) | NO | PRI | NULL | | -| v | cached serialized value | mediumtext | YES | | NULL | | -| expires | datetime of cache expiration | datetime | NO | | 0001-01-01 00:00:00 | | -| updated | datetime of cache insertion | datetime | NO | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------- | ---------------------------- | -------------- | ---- | --- | ------------------- | ----- | +| k | cache key | varbinary(255) | NO | PRI | NULL | | +| v | cached serialized value | mediumtext | YES | | NULL | | +| expires | datetime of cache expiration | datetime | NO | | 0001-01-01 00:00:00 | | +| updated | datetime of cache insertion | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_challenge.md b/doc/database/db_challenge.md index 0b7653e69..5988954ab 100644 --- a/doc/database/db_challenge.md +++ b/doc/database/db_challenge.md @@ -2,13 +2,14 @@ Table challenge =========== -| Field | Description | Type | Null | Key | Default | Extra | -| ----------- | ------------- | ------------ | ---- | --- | ------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| challenge | | varchar(255) | NO | | | | -| dfrn-id | | varchar(255) | NO | | | | -| expire | | int unsigned | NO | | 0 | | -| type | | varchar(255) | NO | | | | -| last_update | | varchar(255) | NO | | | | + +| Field | Description | Type | Null | Key | Default | Extra | +| ----------- | ------------- | ------------ | ---- | --- | ------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| challenge | | varchar(255) | NO | | | | +| dfrn-id | | varchar(255) | NO | | | | +| expire | | int unsigned | NO | | 0 | | +| type | | varchar(255) | NO | | | | +| last_update | | varchar(255) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_clients.md b/doc/database/db_clients.md index b354e2b58..f907e0d96 100644 --- a/doc/database/db_clients.md +++ b/doc/database/db_clients.md @@ -1,14 +1,15 @@ 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 | User id | mediumint unsigned | NO | | 0 | | +| 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 | User id | mediumint unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_config.md b/doc/database/db_config.md index fcd1c93bf..029723510 100644 --- a/doc/database/db_config.md +++ b/doc/database/db_config.md @@ -1,12 +1,13 @@ Table config =========== + main configuration storage -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ------------- | ---- | --- | ------- | -------------- | -| id | | int unsigned | NO | PRI | NULL | auto_increment | -| cat | | varbinary(50) | NO | | | | -| k | | varbinary(50) | NO | | | | -| v | | mediumtext | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | ------------- | ---- | --- | ------- | -------------- | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| cat | | varbinary(50) | NO | | | | +| k | | varbinary(50) | NO | | | | +| v | | mediumtext | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_contact-relation.md b/doc/database/db_contact-relation.md index 82b90f79e..9a86b8daf 100644 --- a/doc/database/db_contact-relation.md +++ b/doc/database/db_contact-relation.md @@ -1,13 +1,14 @@ Table contact-relation =========== + Contact relations -| Field | Description | Type | Null | Key | Default | Extra | -| ---------------- | --------------------------------------------------- | ------------ | ---- | --- | ------------------- | ----- | -| cid | contact the related contact had interacted with | int unsigned | NO | PRI | 0 | | -| relation-cid | related contact who had interacted with the contact | int unsigned | NO | PRI | 0 | | -| last-interaction | Date of the last interaction | datetime | NO | | 0001-01-01 00:00:00 | | -| follow-updated | Date of the last update of the contact relationship | datetime | NO | | 0001-01-01 00:00:00 | | -| follows | | boolean | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ---------------- | --------------------------------------------------- | ------------ | ---- | --- | ------------------- | ----- | +| cid | contact the related contact had interacted with | int unsigned | NO | PRI | 0 | | +| relation-cid | related contact who had interacted with the contact | int unsigned | NO | PRI | 0 | | +| last-interaction | Date of the last interaction | datetime | NO | | 0001-01-01 00:00:00 | | +| follow-updated | Date of the last update of the contact relationship | datetime | NO | | 0001-01-01 00:00:00 | | +| follows | | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_contact.md b/doc/database/db_contact.md index 2d89f5172..340f95e06 100644 --- a/doc/database/db_contact.md +++ b/doc/database/db_contact.md @@ -1,88 +1,89 @@ Table contact =========== + contact table -| Field | Description | Type | Null | Key | Default | Extra | -| ------------------------- | --------------------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | Owner User id | mediumint unsigned | NO | | 0 | | -| created | | datetime | NO | | 0001-01-01 00:00:00 | | -| updated | Date of last contact update | datetime | YES | | 0001-01-01 00:00:00 | | -| self | 1 if the contact is the user him/her self | boolean | NO | | 0 | | -| remote_self | | boolean | NO | | 0 | | -| rel | The kind of the relation between the user and the contact | tinyint unsigned | NO | | 0 | | -| duplex | | boolean | NO | | 0 | | -| network | Network of the contact | char(4) | NO | | | | -| protocol | Protocol of the contact | char(4) | 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) | YES | | | | -| about | | text | YES | | NULL | | -| keywords | public keywords (interests) of the contact | text | YES | | NULL | | -| gender | Deprecated | varchar(32) | NO | | | | -| xmpp | | varchar(255) | NO | | | | -| attag | | varchar(255) | NO | | | | -| avatar | | varchar(255) | NO | | | | -| photo | Link to the profile photo of the contact | varchar(255) | YES | | | | -| thumb | Link to the profile photo (thumb size) | varchar(255) | YES | | | | -| micro | Link to the profile photo (micro size) | varchar(255) | YES | | | | -| site-pubkey | | text | YES | | 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 | YES | | NULL | | -| prvkey | RSA private key 4096 bit | text | YES | | NULL | | -| batch | | varchar(255) | NO | | | | -| request | | varchar(255) | YES | | NULL | | -| notify | | varchar(255) | YES | | NULL | | -| poll | | varchar(255) | YES | | NULL | | -| confirm | | varchar(255) | YES | | NULL | | -| subscribe | | varchar(255) | YES | | NULL | | -| poco | | varchar(255) | YES | | NULL | | -| aes_allow | | boolean | NO | | 0 | | -| ret-aes | | boolean | NO | | 0 | | -| usehub | | boolean | NO | | 0 | | -| subhub | | boolean | 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 | | -| failed | Connection failed | boolean | YES | | NULL | | -| 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 | | -| last-discovery | date of the last follower discovery | datetime | NO | | 0001-01-01 00:00:00 | | -| priority | | tinyint unsigned | NO | | 0 | | -| blocked | Node-wide block status | boolean | NO | | 1 | | -| block_reason | Node-wide block reason | text | YES | | NULL | | -| readonly | posts of the contact are readonly | boolean | NO | | 0 | | -| writable | | boolean | NO | | 0 | | -| forum | contact is a forum | boolean | NO | | 0 | | -| prv | contact is a private group | boolean | NO | | 0 | | -| contact-type | | tinyint | NO | | 0 | | -| manually-approve | | boolean | YES | | NULL | | -| hidden | | boolean | NO | | 0 | | -| archive | | boolean | NO | | 0 | | -| pending | | boolean | NO | | 1 | | -| deleted | Contact has been deleted | boolean | NO | | 0 | | -| rating | | tinyint | NO | | 0 | | -| unsearchable | Contact prefers to not be searchable | boolean | NO | | 0 | | -| sensitive | Contact posts sensitive content | boolean | NO | | 0 | | -| baseurl | baseurl of the contact | varchar(255) | YES | | | | -| gsid | Global Server ID | int unsigned | YES | | NULL | | -| reason | | text | YES | | NULL | | -| closeness | | tinyint unsigned | NO | | 99 | | -| info | | mediumtext | YES | | NULL | | -| profile-id | Deprecated | int unsigned | YES | | NULL | | -| bdyear | | varchar(4) | NO | | | | -| bd | | date | NO | | 0001-01-01 | | -| notify_new_posts | | boolean | NO | | 0 | | -| fetch_further_information | | tinyint unsigned | NO | | 0 | | -| ffi_keyword_denylist | | text | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------------------- | --------------------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | +| updated | Date of last contact update | datetime | YES | | 0001-01-01 00:00:00 | | +| self | 1 if the contact is the user him/her self | boolean | NO | | 0 | | +| remote_self | | boolean | NO | | 0 | | +| rel | The kind of the relation between the user and the contact | tinyint unsigned | NO | | 0 | | +| duplex | | boolean | NO | | 0 | | +| network | Network of the contact | char(4) | NO | | | | +| protocol | Protocol of the contact | char(4) | 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) | YES | | | | +| about | | text | YES | | NULL | | +| keywords | public keywords (interests) of the contact | text | YES | | NULL | | +| gender | Deprecated | varchar(32) | NO | | | | +| xmpp | | varchar(255) | NO | | | | +| attag | | varchar(255) | NO | | | | +| avatar | | varchar(255) | NO | | | | +| photo | Link to the profile photo of the contact | varchar(255) | YES | | | | +| thumb | Link to the profile photo (thumb size) | varchar(255) | YES | | | | +| micro | Link to the profile photo (micro size) | varchar(255) | YES | | | | +| site-pubkey | | text | YES | | 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 | YES | | NULL | | +| prvkey | RSA private key 4096 bit | text | YES | | NULL | | +| batch | | varchar(255) | NO | | | | +| request | | varchar(255) | YES | | NULL | | +| notify | | varchar(255) | YES | | NULL | | +| poll | | varchar(255) | YES | | NULL | | +| confirm | | varchar(255) | YES | | NULL | | +| subscribe | | varchar(255) | YES | | NULL | | +| poco | | varchar(255) | YES | | NULL | | +| aes_allow | | boolean | NO | | 0 | | +| ret-aes | | boolean | NO | | 0 | | +| usehub | | boolean | NO | | 0 | | +| subhub | | boolean | 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 | | +| failed | Connection failed | boolean | YES | | NULL | | +| 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 | | +| last-discovery | date of the last follower discovery | datetime | NO | | 0001-01-01 00:00:00 | | +| priority | | tinyint unsigned | NO | | 0 | | +| blocked | Node-wide block status | boolean | NO | | 1 | | +| block_reason | Node-wide block reason | text | YES | | NULL | | +| readonly | posts of the contact are readonly | boolean | NO | | 0 | | +| writable | | boolean | NO | | 0 | | +| forum | contact is a forum | boolean | NO | | 0 | | +| prv | contact is a private group | boolean | NO | | 0 | | +| contact-type | | tinyint | NO | | 0 | | +| manually-approve | | boolean | YES | | NULL | | +| hidden | | boolean | NO | | 0 | | +| archive | | boolean | NO | | 0 | | +| pending | | boolean | NO | | 1 | | +| deleted | Contact has been deleted | boolean | NO | | 0 | | +| rating | | tinyint | NO | | 0 | | +| unsearchable | Contact prefers to not be searchable | boolean | NO | | 0 | | +| sensitive | Contact posts sensitive content | boolean | NO | | 0 | | +| baseurl | baseurl of the contact | varchar(255) | YES | | | | +| gsid | Global Server ID | int unsigned | YES | | NULL | | +| reason | | text | YES | | NULL | | +| closeness | | tinyint unsigned | NO | | 99 | | +| info | | mediumtext | YES | | NULL | | +| profile-id | Deprecated | int unsigned | YES | | NULL | | +| bdyear | | varchar(4) | NO | | | | +| bd | | date | NO | | 0001-01-01 | | +| notify_new_posts | | boolean | NO | | 0 | | +| fetch_further_information | | tinyint unsigned | NO | | 0 | | +| ffi_keyword_denylist | | text | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_conv.md b/doc/database/db_conv.md index 8cf835b7e..11bd7ac13 100644 --- a/doc/database/db_conv.md +++ b/doc/database/db_conv.md @@ -1,16 +1,17 @@ Table conv =========== + private messages -| Field | Description | Type | Null | Key | Default | Extra | -| ------- | ----------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| guid | A unique identifier for this conversation | varchar(255) | NO | | | | -| recips | sender_handle;recipient_handle | text | YES | | NULL | | -| uid | Owner User id | mediumint unsigned | NO | | 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 | text | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------- | ----------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| guid | A unique identifier for this conversation | varchar(255) | NO | | | | +| recips | sender_handle;recipient_handle | text | YES | | NULL | | +| uid | Owner User id | mediumint unsigned | NO | | 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 | text | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_conversation.md b/doc/database/db_conversation.md index 5e62f21b1..964a98d61 100644 --- a/doc/database/db_conversation.md +++ b/doc/database/db_conversation.md @@ -1,16 +1,17 @@ Table conversation =========== + Raw data and structure information for messages -| Field | Description | Type | Null | Key | Default | Extra | -| ----------------- | -------------------------------------------------------------------- | ---------------- | ---- | --- | ------------------- | ----- | -| item-uri | Original URI of the item - unrelated to the table with the same name | 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 unsigned | NO | | 255 | | -| direction | How the message arrived here: 1=push, 2=pull | tinyint unsigned | NO | | 0 | | -| source | Original source | mediumtext | YES | | NULL | | -| received | Receiving date | datetime | NO | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----------------- | -------------------------------------------------------------------- | ---------------- | ---- | --- | ------------------- | ----- | +| item-uri | Original URI of the item - unrelated to the table with the same name | 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 unsigned | NO | | 255 | | +| direction | How the message arrived here: 1=push, 2=pull | tinyint unsigned | NO | | 0 | | +| source | Original source | mediumtext | YES | | NULL | | +| received | Receiving date | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_delayed-post.md b/doc/database/db_delayed-post.md index cdf9b7d57..0f1c2f5cf 100644 --- a/doc/database/db_delayed-post.md +++ b/doc/database/db_delayed-post.md @@ -1,12 +1,13 @@ Table delayed-post =========== + Posts that are about to be distributed at a later time -| Field | Description | Type | Null | Key | Default | Extra | -| ------- | ---------------------------------------------- | ------------------ | ---- | --- | ------- | -------------- | -| id | | int unsigned | NO | PRI | NULL | auto_increment | -| uri | URI of the post that will be distributed later | varchar(255) | YES | | NULL | | -| uid | Owner User id | mediumint unsigned | YES | | NULL | | -| delayed | delay time | datetime | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------- | ---------------------------------------------- | ------------------ | ---- | --- | ------- | -------------- | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| uri | URI of the post that will be distributed later | varchar(255) | YES | | NULL | | +| uid | Owner User id | mediumint unsigned | YES | | NULL | | +| delayed | delay time | datetime | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_diaspora-interaction.md b/doc/database/db_diaspora-interaction.md index 0300be72a..503c846fd 100644 --- a/doc/database/db_diaspora-interaction.md +++ b/doc/database/db_diaspora-interaction.md @@ -1,10 +1,11 @@ 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 | NO | PRI | NULL | | -| interaction | The Diaspora interaction | mediumtext | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----------- | --------------------------------------------------------- | ------------ | ---- | --- | ------- | ----- | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| interaction | The Diaspora interaction | mediumtext | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_event.md b/doc/database/db_event.md index 69c4d76b9..72cec0012 100644 --- a/doc/database/db_event.md +++ b/doc/database/db_event.md @@ -1,28 +1,29 @@ Table event =========== + Events -| Field | Description | Type | Null | Key | Default | Extra | -| --------- | ------------------------------------------------------ | ------------------ | ---- | --- | ------------------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| guid | | varchar(255) | NO | | | | -| uid | Owner User id | mediumint unsigned | NO | | 0 | | -| cid | contact_id (ID of the contact in contact table) | int unsigned | 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 | YES | | NULL | | -| desc | event description | text | YES | | NULL | | -| location | event location | text | YES | | NULL | | -| type | event or birthday | varchar(20) | NO | | | | -| nofinish | if event does have no end this is 1 | boolean | NO | | 0 | | -| adjust | adjust to timezone of the recipient (0 or 1) | boolean | NO | | 1 | | -| ignore | 0 or 1 | boolean | NO | | 0 | | -| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | -| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | -| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | -| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| --------- | ------------------------------------------------------ | ------------------ | ---- | --- | ------------------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| guid | | varchar(255) | NO | | | | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| cid | contact_id (ID of the contact in contact table) | int unsigned | 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 | YES | | NULL | | +| desc | event description | text | YES | | NULL | | +| location | event location | text | YES | | NULL | | +| type | event or birthday | varchar(20) | NO | | | | +| nofinish | if event does have no end this is 1 | boolean | NO | | 0 | | +| adjust | adjust to timezone of the recipient (0 or 1) | boolean | NO | | 1 | | +| ignore | 0 or 1 | boolean | NO | | 0 | | +| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | +| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | +| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | +| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_fcontact.md b/doc/database/db_fcontact.md index 84db712f3..f20ca6cd0 100644 --- a/doc/database/db_fcontact.md +++ b/doc/database/db_fcontact.md @@ -1,25 +1,26 @@ Table fcontact =========== + Diaspora compatible contacts - used in the Diaspora implementation -| Field | Description | Type | Null | Key | Default | Extra | -| -------- | ------------- | ---------------- | ---- | --- | ------------------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| guid | unique id | varchar(255) | 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 | | | | -| batch | | varchar(255) | NO | | | | -| notify | | varchar(255) | NO | | | | -| poll | | varchar(255) | NO | | | | -| confirm | | varchar(255) | NO | | | | -| priority | | tinyint unsigned | NO | | 0 | | -| network | | char(4) | NO | | | | -| alias | | varchar(255) | NO | | | | -| pubkey | | text | YES | | NULL | | -| updated | | datetime | NO | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| -------- | ------------- | ---------------- | ---- | --- | ------------------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| guid | unique id | varchar(255) | 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 | | | | +| batch | | varchar(255) | NO | | | | +| notify | | varchar(255) | NO | | | | +| poll | | varchar(255) | NO | | | | +| confirm | | varchar(255) | NO | | | | +| priority | | tinyint unsigned | NO | | 0 | | +| network | | char(4) | NO | | | | +| alias | | varchar(255) | NO | | | | +| pubkey | | text | YES | | NULL | | +| updated | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_fsuggest.md b/doc/database/db_fsuggest.md index 20955acc9..d3a8e21ab 100644 --- a/doc/database/db_fsuggest.md +++ b/doc/database/db_fsuggest.md @@ -1,17 +1,18 @@ Table fsuggest =========== + friend suggestion stuff -| Field | Description | Type | Null | Key | Default | Extra | -| ------- | ----------- | ------------------ | ---- | --- | ------------------- | -------------- | -| id | | int unsigned | NO | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | NO | | 0 | | -| cid | | int unsigned | NO | | 0 | | -| name | | varchar(255) | NO | | | | -| url | | varchar(255) | NO | | | | -| request | | varchar(255) | NO | | | | -| photo | | varchar(255) | NO | | | | -| note | | text | YES | | NULL | | -| created | | datetime | NO | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------- | ----------- | ------------------ | ---- | --- | ------------------- | -------------- | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| cid | | int unsigned | NO | | 0 | | +| name | | varchar(255) | NO | | | | +| url | | varchar(255) | NO | | | | +| request | | varchar(255) | NO | | | | +| photo | | varchar(255) | NO | | | | +| note | | text | YES | | NULL | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_group.md b/doc/database/db_group.md index d81148bd6..7ea3a0d2f 100644 --- a/doc/database/db_group.md +++ b/doc/database/db_group.md @@ -1,13 +1,14 @@ Table group =========== + privacy groups, group info -| Field | Description | Type | Null | Key | Default | Extra | -| ------- | ------------------------------------------ | ------------------ | ---- | --- | ------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | Owner User id | mediumint unsigned | NO | | 0 | | -| visible | 1 indicates the member list is not private | boolean | NO | | 0 | | -| deleted | 1 indicates the group has been deleted | boolean | NO | | 0 | | -| name | human readable name of group | varchar(255) | NO | | | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------- | ------------------------------------------ | ------------------ | ---- | --- | ------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| visible | 1 indicates the member list is not private | boolean | NO | | 0 | | +| deleted | 1 indicates the group has been deleted | boolean | NO | | 0 | | +| name | human readable name of group | varchar(255) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_group_member.md b/doc/database/db_group_member.md index 6057c15b4..ba0960df4 100644 --- a/doc/database/db_group_member.md +++ b/doc/database/db_group_member.md @@ -1,11 +1,12 @@ Table group_member =========== + privacy groups, member info -| Field | Description | Type | Null | Key | Default | Extra | -| ---------- | --------------------------------------------------------- | ------------ | ---- | --- | ------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| gid | groups.id of the associated group | int unsigned | NO | | 0 | | -| contact-id | contact.id of the member assigned to the associated group | int unsigned | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ---------- | --------------------------------------------------------- | ------------ | ---- | --- | ------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| gid | groups.id of the associated group | int unsigned | NO | | 0 | | +| contact-id | contact.id of the member assigned to the associated group | int unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_gserver-tag.md b/doc/database/db_gserver-tag.md index 47dedeb54..dba65c45a 100644 --- a/doc/database/db_gserver-tag.md +++ b/doc/database/db_gserver-tag.md @@ -1,10 +1,11 @@ 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 | NO | PRI | 0 | | -| tag | Tag that the server has subscribed | varchar(100) | NO | PRI | | | +| Field | Description | Type | Null | Key | Default | Extra | +| ---------- | ---------------------------------- | ------------ | ---- | --- | ------- | ----- | +| gserver-id | The id of the gserver | int unsigned | NO | PRI | 0 | | +| tag | Tag that the server has subscribed | varchar(100) | NO | PRI | | | Return to [database documentation](help/database) diff --git a/doc/database/db_gserver.md b/doc/database/db_gserver.md index 8be46ba67..341f71eff 100644 --- a/doc/database/db_gserver.md +++ b/doc/database/db_gserver.md @@ -1,31 +1,32 @@ Table gserver =========== + Global servers -| Field | Description | Type | Null | Key | Default | Extra | -| ---------------- | -------------------------------------------------- | ---------------- | ---- | --- | ------------------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| url | | varchar(255) | NO | | | | -| nurl | | varchar(255) | NO | | | | -| version | | varchar(255) | NO | | | | -| site_name | | varchar(255) | NO | | | | -| info | | text | YES | | NULL | | -| register_policy | | tinyint | NO | | 0 | | -| registered-users | Number of registered users | int unsigned | NO | | 0 | | -| directory-type | Type of directory service (Poco, Mastodon) | tinyint | YES | | 0 | | -| poco | | varchar(255) | NO | | | | -| noscrape | | varchar(255) | NO | | | | -| network | | char(4) | NO | | | | -| protocol | The protocol of the server | tinyint unsigned | YES | | NULL | | -| platform | | varchar(255) | NO | | | | -| relay-subscribe | Has the server subscribed to the relay system | boolean | NO | | 0 | | -| relay-scope | The scope of messages that the server wants to get | varchar(10) | NO | | | | -| detection-method | Method that had been used to detect that server | tinyint unsigned | YES | | NULL | | -| created | | datetime | NO | | 0001-01-01 00:00:00 | | -| last_poco_query | | datetime | YES | | 0001-01-01 00:00:00 | | -| last_contact | Last successful connection request | datetime | YES | | 0001-01-01 00:00:00 | | -| last_failure | Last failed connection request | datetime | YES | | 0001-01-01 00:00:00 | | -| failed | Connection failed | boolean | YES | | NULL | | -| next_contact | Next connection request | datetime | YES | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ---------------- | -------------------------------------------------- | ---------------- | ---- | --- | ------------------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| url | | varchar(255) | NO | | | | +| nurl | | varchar(255) | NO | | | | +| version | | varchar(255) | NO | | | | +| site_name | | varchar(255) | NO | | | | +| info | | text | YES | | NULL | | +| register_policy | | tinyint | NO | | 0 | | +| registered-users | Number of registered users | int unsigned | NO | | 0 | | +| directory-type | Type of directory service (Poco, Mastodon) | tinyint | YES | | 0 | | +| poco | | varchar(255) | NO | | | | +| noscrape | | varchar(255) | NO | | | | +| network | | char(4) | NO | | | | +| protocol | The protocol of the server | tinyint unsigned | YES | | NULL | | +| platform | | varchar(255) | NO | | | | +| relay-subscribe | Has the server subscribed to the relay system | boolean | NO | | 0 | | +| relay-scope | The scope of messages that the server wants to get | varchar(10) | NO | | | | +| detection-method | Method that had been used to detect that server | tinyint unsigned | YES | | NULL | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | +| last_poco_query | | datetime | YES | | 0001-01-01 00:00:00 | | +| last_contact | Last successful connection request | datetime | YES | | 0001-01-01 00:00:00 | | +| last_failure | Last failed connection request | datetime | YES | | 0001-01-01 00:00:00 | | +| failed | Connection failed | boolean | YES | | NULL | | +| next_contact | Next connection request | datetime | YES | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_hook.md b/doc/database/db_hook.md index 75235b31c..c25f674cc 100644 --- a/doc/database/db_hook.md +++ b/doc/database/db_hook.md @@ -1,13 +1,14 @@ Table hook =========== + addon hook registry -| Field | Description | Type | Null | Key | Default | Extra | -| -------- | ---------------------------------------------------------------------------------------------------------- | ----------------- | ---- | --- | ------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| hook | name of hook | varbinary(100) | NO | | | | -| file | relative filename of hook handler | varbinary(200) | NO | | | | -| function | function name of hook handler | varbinary(200) | NO | | | | -| priority | not yet implemented - can be used to sort conflicts in hook handling by calling handlers in priority order | smallint unsigned | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| -------- | ---------------------------------------------------------------------------------------------------------- | ----------------- | ---- | --- | ------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| hook | name of hook | varbinary(100) | NO | | | | +| file | relative filename of hook handler | varbinary(200) | NO | | | | +| function | function name of hook handler | varbinary(200) | NO | | | | +| priority | not yet implemented - can be used to sort conflicts in hook handling by calling handlers in priority order | smallint unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_host.md b/doc/database/db_host.md index bb07a5b87..97fda6fa6 100644 --- a/doc/database/db_host.md +++ b/doc/database/db_host.md @@ -1,10 +1,11 @@ Table host =========== + Hostname -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ------------- | ---------------- | ---- | --- | ------- | -------------- | -| id | sequential ID | tinyint unsigned | NO | PRI | NULL | auto_increment | -| name | The hostname | varchar(128) | NO | | | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ------------- | ---------------- | ---- | --- | ------- | -------------- | +| id | sequential ID | tinyint unsigned | NO | PRI | NULL | auto_increment | +| name | The hostname | varchar(128) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_inbox-status.md b/doc/database/db_inbox-status.md index 53fa009e2..fb6a40850 100644 --- a/doc/database/db_inbox-status.md +++ b/doc/database/db_inbox-status.md @@ -1,15 +1,16 @@ Table inbox-status =========== + Status of ActivityPub inboxes -| Field | Description | Type | Null | Key | Default | Extra | -| -------- | ------------------------------------ | -------------- | ---- | --- | ------------------- | ----- | -| url | URL of the inbox | varbinary(255) | NO | PRI | NULL | | -| created | Creation date of this entry | datetime | NO | | 0001-01-01 00:00:00 | | -| success | Date of the last successful delivery | datetime | NO | | 0001-01-01 00:00:00 | | -| failure | Date of the last failed delivery | datetime | NO | | 0001-01-01 00:00:00 | | -| previous | Previous delivery date | datetime | NO | | 0001-01-01 00:00:00 | | -| archive | Is the inbox archived? | boolean | NO | | 0 | | -| shared | Is it a shared inbox? | boolean | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| -------- | ------------------------------------ | -------------- | ---- | --- | ------------------- | ----- | +| url | URL of the inbox | varbinary(255) | NO | PRI | NULL | | +| created | Creation date of this entry | datetime | NO | | 0001-01-01 00:00:00 | | +| success | Date of the last successful delivery | datetime | NO | | 0001-01-01 00:00:00 | | +| failure | Date of the last failed delivery | datetime | NO | | 0001-01-01 00:00:00 | | +| previous | Previous delivery date | datetime | NO | | 0001-01-01 00:00:00 | | +| archive | Is the inbox archived? | boolean | NO | | 0 | | +| shared | Is it a shared inbox? | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_intro.md b/doc/database/db_intro.md index df1deac2b..3e3731b55 100644 --- a/doc/database/db_intro.md +++ b/doc/database/db_intro.md @@ -2,18 +2,19 @@ Table intro =========== -| Field | Description | Type | Null | Key | Default | Extra | -| ---------- | ------------- | ------------------ | ---- | --- | ------------------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | NO | | 0 | | -| fid | | int unsigned | YES | | NULL | | -| contact-id | | int unsigned | NO | | 0 | | -| knowyou | | boolean | NO | | 0 | | -| duplex | | boolean | NO | | 0 | | -| note | | text | YES | | NULL | | -| hash | | varchar(255) | NO | | | | -| datetime | | datetime | NO | | 0001-01-01 00:00:00 | | -| blocked | | boolean | NO | | 1 | | -| ignore | | boolean | NO | | 0 | | + +| Field | Description | Type | Null | Key | Default | Extra | +| ---------- | ------------- | ------------------ | ---- | --- | ------------------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| fid | | int unsigned | YES | | NULL | | +| contact-id | | int unsigned | NO | | 0 | | +| knowyou | | boolean | NO | | 0 | | +| duplex | | boolean | NO | | 0 | | +| note | | text | YES | | NULL | | +| hash | | varchar(255) | NO | | | | +| datetime | | datetime | NO | | 0001-01-01 00:00:00 | | +| blocked | | boolean | NO | | 1 | | +| ignore | | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_item-uri.md b/doc/database/db_item-uri.md index 8e4be669a..4b3dda5ce 100644 --- a/doc/database/db_item-uri.md +++ b/doc/database/db_item-uri.md @@ -1,11 +1,12 @@ Table item-uri =========== + URI and GUID for items -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ------------------------------- | -------------- | ---- | --- | ------- | -------------- | -| id | | int unsigned | NO | PRI | NULL | auto_increment | -| uri | URI of an item | varbinary(255) | NO | | NULL | | -| guid | A unique identifier for an item | varbinary(255) | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ------------------------------- | -------------- | ---- | --- | ------- | -------------- | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| uri | URI of an item | varbinary(255) | NO | | NULL | | +| guid | A unique identifier for an item | varbinary(255) | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_locks.md b/doc/database/db_locks.md index 0da4d8845..337999017 100644 --- a/doc/database/db_locks.md +++ b/doc/database/db_locks.md @@ -2,12 +2,13 @@ Table locks =========== -| Field | Description | Type | Null | Key | Default | Extra | -| ------- | ---------------------------- | ------------ | ---- | --- | ------------------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| name | | varchar(128) | NO | | | | -| locked | | boolean | NO | | 0 | | -| pid | Process ID | int unsigned | NO | | 0 | | -| expires | datetime of cache expiration | datetime | NO | | 0001-01-01 00:00:00 | | + +| Field | Description | Type | Null | Key | Default | Extra | +| ------- | ---------------------------- | ------------ | ---- | --- | ------------------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| name | | varchar(128) | NO | | | | +| locked | | boolean | NO | | 0 | | +| pid | Process ID | int unsigned | NO | | 0 | | +| expires | datetime of cache expiration | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_mail.md b/doc/database/db_mail.md index 44f435d00..dbdacb6d3 100644 --- a/doc/database/db_mail.md +++ b/doc/database/db_mail.md @@ -1,30 +1,31 @@ Table mail =========== + private messages -| Field | Description | Type | Null | Key | Default | Extra | -| ------------- | -------------------------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | Owner User id | mediumint unsigned | NO | | 0 | | -| guid | A unique identifier for this private message | varchar(255) | NO | | | | -| 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) | YES | | NULL | | -| author-id | Link to the contact table with uid=0 of the author of the mail | int unsigned | YES | | NULL | | -| convid | conv.id | int unsigned | YES | | NULL | | -| title | | varchar(255) | NO | | | | -| body | | mediumtext | YES | | NULL | | -| seen | if message visited it is 1 | boolean | NO | | 0 | | -| reply | | boolean | NO | | 0 | | -| replied | | boolean | NO | | 0 | | -| unknown | if sender not in the contact table this is 1 | boolean | NO | | 0 | | -| uri | | varchar(255) | NO | | | | -| uri-id | Item-uri id of the related mail | int unsigned | YES | | NULL | | -| parent-uri | | varchar(255) | NO | | | | -| parent-uri-id | Item-uri id of the parent of the related mail | int unsigned | YES | | NULL | | -| thr-parent | | varchar(255) | YES | | NULL | | -| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | YES | | NULL | | -| 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 | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| guid | A unique identifier for this private message | varchar(255) | NO | | | | +| 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) | YES | | NULL | | +| author-id | Link to the contact table with uid=0 of the author of the mail | int unsigned | YES | | NULL | | +| convid | conv.id | int unsigned | YES | | NULL | | +| title | | varchar(255) | NO | | | | +| body | | mediumtext | YES | | NULL | | +| seen | if message visited it is 1 | boolean | NO | | 0 | | +| reply | | boolean | NO | | 0 | | +| replied | | boolean | NO | | 0 | | +| unknown | if sender not in the contact table this is 1 | boolean | NO | | 0 | | +| uri | | varchar(255) | NO | | | | +| uri-id | Item-uri id of the related mail | int unsigned | YES | | NULL | | +| parent-uri | | varchar(255) | NO | | | | +| parent-uri-id | Item-uri id of the parent of the related mail | int unsigned | YES | | NULL | | +| thr-parent | | varchar(255) | YES | | NULL | | +| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | YES | | NULL | | +| created | creation time of the private message | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_mailacct.md b/doc/database/db_mailacct.md index 0fb9a43f6..8a1f38078 100644 --- a/doc/database/db_mailacct.md +++ b/doc/database/db_mailacct.md @@ -1,21 +1,22 @@ Table mailacct =========== + Mail account data for fetching mails -| Field | Description | Type | Null | Key | Default | Extra | -| ------------ | ------------- | ------------------ | ---- | --- | ------------------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | NO | | 0 | | -| server | | varchar(255) | NO | | | | -| port | | smallint unsigned | NO | | 0 | | -| ssltype | | varchar(16) | NO | | | | -| mailbox | | varchar(255) | NO | | | | -| user | | varchar(255) | NO | | | | -| pass | | text | YES | | NULL | | -| reply_to | | varchar(255) | NO | | | | -| action | | tinyint unsigned | NO | | 0 | | -| movetofolder | | varchar(255) | NO | | | | -| pubmail | | boolean | NO | | 0 | | -| last_check | | datetime | NO | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------ | ------------- | ------------------ | ---- | --- | ------------------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| server | | varchar(255) | NO | | | | +| port | | smallint unsigned | NO | | 0 | | +| ssltype | | varchar(16) | NO | | | | +| mailbox | | varchar(255) | NO | | | | +| user | | varchar(255) | NO | | | | +| pass | | text | YES | | NULL | | +| reply_to | | varchar(255) | NO | | | | +| action | | tinyint unsigned | NO | | 0 | | +| movetofolder | | varchar(255) | NO | | | | +| pubmail | | boolean | NO | | 0 | | +| last_check | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_manage.md b/doc/database/db_manage.md index 96f770370..c2dadfca4 100644 --- a/doc/database/db_manage.md +++ b/doc/database/db_manage.md @@ -1,11 +1,12 @@ Table manage =========== + table of accounts that can manage each other -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ------------- | ------------------ | ---- | --- | ------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | NO | | 0 | | -| mid | User id | mediumint unsigned | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ------------- | ------------------ | ---- | --- | ------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| mid | User id | mediumint unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_notification.md b/doc/database/db_notification.md index 866d77527..0941ff1d3 100644 --- a/doc/database/db_notification.md +++ b/doc/database/db_notification.md @@ -1,17 +1,18 @@ Table notification =========== + notifications -| Field | Description | Type | Null | Key | Default | Extra | -| ------------- | ------------------------------------------------------------------------------ | ------------------ | ---- | --- | ------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | Owner User id | mediumint unsigned | YES | | NULL | | -| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | YES | | NULL | | -| type | | tinyint unsigned | YES | | NULL | | -| actor-id | Link to the contact table with uid=0 of the actor that caused the notification | int unsigned | YES | | NULL | | -| target-uri-id | Item-uri id of the related post | int unsigned | YES | | NULL | | -| parent-uri-id | Item-uri id of the parent of the related post | int unsigned | YES | | NULL | | -| created | | datetime | YES | | NULL | | -| seen | | boolean | YES | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------- | ------------------------------------------------------------------------------ | ------------------ | ---- | --- | ------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | YES | | NULL | | +| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | YES | | NULL | | +| type | | tinyint unsigned | YES | | NULL | | +| actor-id | Link to the contact table with uid=0 of the actor that caused the notification | int unsigned | YES | | NULL | | +| target-uri-id | Item-uri id of the related post | int unsigned | YES | | NULL | | +| parent-uri-id | Item-uri id of the parent of the related post | int unsigned | YES | | NULL | | +| created | | datetime | YES | | NULL | | +| seen | | boolean | YES | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_notify-threads.md b/doc/database/db_notify-threads.md index 3461e502d..0dd493975 100644 --- a/doc/database/db_notify-threads.md +++ b/doc/database/db_notify-threads.md @@ -2,13 +2,14 @@ Table notify-threads =========== -| Field | Description | Type | Null | Key | Default | Extra | -| -------------------- | --------------------------------------------- | ------------------ | ---- | --- | ------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| notify-id | | int unsigned | NO | | 0 | | -| master-parent-item | Deprecated | int unsigned | YES | | NULL | | -| master-parent-uri-id | Item-uri id of the parent of the related post | int unsigned | YES | | NULL | | -| parent-item | | int unsigned | NO | | 0 | | -| receiver-uid | User id | mediumint unsigned | NO | | 0 | | + +| Field | Description | Type | Null | Key | Default | Extra | +| -------------------- | --------------------------------------------- | ------------------ | ---- | --- | ------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| notify-id | | int unsigned | NO | | 0 | | +| master-parent-item | Deprecated | int unsigned | YES | | NULL | | +| master-parent-uri-id | Item-uri id of the parent of the related post | int unsigned | YES | | NULL | | +| parent-item | | int unsigned | NO | | 0 | | +| receiver-uid | User id | mediumint unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_notify.md b/doc/database/db_notify.md index fef88a971..a9eac5a3c 100644 --- a/doc/database/db_notify.md +++ b/doc/database/db_notify.md @@ -1,26 +1,27 @@ Table notify =========== + notifications -| Field | Description | Type | Null | Key | Default | Extra | -| ------------- | --------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| type | | smallint unsigned | 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 | Owner User id | mediumint unsigned | NO | | 0 | | -| link | | varchar(255) | NO | | | | -| iid | | int unsigned | YES | | NULL | | -| parent | | int unsigned | YES | | NULL | | -| uri-id | Item-uri id of the related post | int unsigned | YES | | NULL | | -| parent-uri-id | Item-uri id of the parent of the related post | int unsigned | YES | | NULL | | -| seen | | boolean | NO | | 0 | | -| verb | | varchar(100) | NO | | | | -| otype | | varchar(10) | 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 | NO | PRI | NULL | auto_increment | +| type | | smallint unsigned | 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 | Owner User id | mediumint unsigned | NO | | 0 | | +| link | | varchar(255) | NO | | | | +| iid | | int unsigned | YES | | NULL | | +| parent | | int unsigned | YES | | NULL | | +| uri-id | Item-uri id of the related post | int unsigned | YES | | NULL | | +| parent-uri-id | Item-uri id of the parent of the related post | int unsigned | YES | | NULL | | +| seen | | boolean | NO | | 0 | | +| verb | | varchar(100) | NO | | | | +| otype | | varchar(10) | NO | | | | +| name_cache | Cached bbcode parsing of name | tinytext | YES | | NULL | | +| msg_cache | Cached bbcode parsing of msg | mediumtext | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_oembed.md b/doc/database/db_oembed.md index bff9ebd9c..3edee64c6 100644 --- a/doc/database/db_oembed.md +++ b/doc/database/db_oembed.md @@ -1,12 +1,13 @@ Table oembed =========== + cache for OEmbed queries -| Field | Description | Type | Null | Key | Default | Extra | -| -------- | ------------------------------ | ------------------ | ---- | --- | ------------------- | ----- | -| url | page url | varbinary(255) | NO | PRI | NULL | | -| maxwidth | Maximum width passed to Oembed | mediumint unsigned | NO | PRI | NULL | | -| content | OEmbed data of the page | mediumtext | YES | | NULL | | -| created | datetime of creation | datetime | NO | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| -------- | ------------------------------ | ------------------ | ---- | --- | ------------------- | ----- | +| url | page url | varbinary(255) | NO | PRI | NULL | | +| maxwidth | Maximum width passed to Oembed | mediumint unsigned | NO | PRI | NULL | | +| content | OEmbed data of the page | mediumtext | YES | | NULL | | +| created | datetime of creation | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_openwebauth-token.md b/doc/database/db_openwebauth-token.md index 0ae0a85ba..1c3060f0f 100644 --- a/doc/database/db_openwebauth-token.md +++ b/doc/database/db_openwebauth-token.md @@ -1,14 +1,15 @@ Table openwebauth-token =========== + Store OpenWebAuth token to verify contacts -| Field | Description | Type | Null | Key | Default | Extra | -| ------- | -------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | User id - currently unused | mediumint unsigned | NO | | 0 | | -| type | Verify type | varchar(32) | NO | | | | -| token | A generated token | varchar(255) | NO | | | | -| meta | | varchar(255) | NO | | | | -| created | datetime of creation | datetime | NO | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------- | -------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id - currently unused | mediumint unsigned | NO | | 0 | | +| type | Verify type | varchar(32) | NO | | | | +| token | A generated token | varchar(255) | NO | | | | +| meta | | varchar(255) | NO | | | | +| created | datetime of creation | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_parsed_url.md b/doc/database/db_parsed_url.md index a264c86e3..29a3ff852 100644 --- a/doc/database/db_parsed_url.md +++ b/doc/database/db_parsed_url.md @@ -1,15 +1,16 @@ Table parsed_url =========== + cache for 'parse_url' queries -| Field | Description | Type | Null | Key | Default | Extra | -| -------- | --------------------------------- | ---------- | ---- | --- | ------------------- | ----- | -| url_hash | page url hash | binary(64) | NO | PRI | NULL | | -| guessing | is the 'guessing' mode active? | boolean | NO | PRI | 0 | | -| oembed | is the data the result of oembed? | boolean | NO | PRI | 0 | | -| url | page url | text | NO | | NULL | | -| content | page data | mediumtext | YES | | NULL | | -| created | datetime of creation | datetime | NO | | 0001-01-01 00:00:00 | | -| expires | datetime of expiration | datetime | NO | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| -------- | --------------------------------- | ---------- | ---- | --- | ------------------- | ----- | +| url_hash | page url hash | binary(64) | NO | PRI | NULL | | +| guessing | is the 'guessing' mode active? | boolean | NO | PRI | 0 | | +| oembed | is the data the result of oembed? | boolean | NO | PRI | 0 | | +| url | page url | text | NO | | NULL | | +| content | page data | mediumtext | YES | | NULL | | +| created | datetime of creation | datetime | NO | | 0001-01-01 00:00:00 | | +| expires | datetime of expiration | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_pconfig.md b/doc/database/db_pconfig.md index 819dfbfbf..7449c511d 100644 --- a/doc/database/db_pconfig.md +++ b/doc/database/db_pconfig.md @@ -1,13 +1,14 @@ Table pconfig =========== + personal (per user) configuration storage -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ------------------ | ---- | --- | ------- | -------------- | -| id | Primary key | int unsigned | NO | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | NO | | 0 | | -| cat | Category | varchar(50) | NO | | | | -| k | Key | varchar(100) | NO | | | | -| v | Value | mediumtext | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | ------------------ | ---- | --- | ------- | -------------- | +| id | Primary key | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| cat | Category | varchar(50) | NO | | | | +| k | Key | varchar(100) | NO | | | | +| v | Value | mediumtext | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_permissionset.md b/doc/database/db_permissionset.md index 39b3d93b3..855ed1ea1 100644 --- a/doc/database/db_permissionset.md +++ b/doc/database/db_permissionset.md @@ -2,13 +2,14 @@ Table permissionset =========== -| Field | Description | Type | Null | Key | Default | Extra | -| --------- | ------------------------------------------------------ | ------------------ | ---- | --- | ------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | Owner id of this permission set | mediumint unsigned | NO | | 0 | | -| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | -| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | -| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | -| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | + +| Field | Description | Type | Null | Key | Default | Extra | +| --------- | ------------------------------------------------------ | ------------------ | ---- | --- | ------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner id of this permission set | mediumint unsigned | NO | | 0 | | +| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | +| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | +| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | +| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_photo.md b/doc/database/db_photo.md index 1574d6181..168797a1f 100644 --- a/doc/database/db_photo.md +++ b/doc/database/db_photo.md @@ -1,35 +1,36 @@ Table photo =========== + photo storage -| Field | Description | Type | Null | Key | Default | Extra | -| ------------- | ------------------------------------------------------ | ------------------ | ---- | --- | ------------------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | Owner User id | mediumint unsigned | NO | | 0 | | -| contact-id | contact.id | int unsigned | NO | | 0 | | -| guid | A unique identifier for this photo | char(16) | NO | | | | -| resource-id | | char(32) | NO | | | | -| hash | hash value of the photo | char(32) | YES | | NULL | | -| 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 | YES | | NULL | | -| album | The name of the album to which the photo belongs | varchar(255) | NO | | | | -| filename | | varchar(255) | NO | | | | -| type | | varchar(30) | NO | | image/jpeg | | -| height | | smallint unsigned | NO | | 0 | | -| width | | smallint unsigned | NO | | 0 | | -| datasize | | int unsigned | NO | | 0 | | -| data | | mediumblob | NO | | NULL | | -| scale | | tinyint unsigned | NO | | 0 | | -| profile | | boolean | NO | | 0 | | -| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | -| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | -| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | -| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | -| accessible | Make photo publicly accessible, ignoring permissions | boolean | NO | | 0 | | -| backend-class | Storage backend class | tinytext | YES | | NULL | | -| backend-ref | Storage backend data reference | text | YES | | NULL | | -| updated | | datetime | NO | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------- | ------------------------------------------------------ | ------------------ | ---- | --- | ------------------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| contact-id | contact.id | int unsigned | NO | | 0 | | +| guid | A unique identifier for this photo | char(16) | NO | | | | +| resource-id | | char(32) | NO | | | | +| hash | hash value of the photo | char(32) | YES | | NULL | | +| 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 | YES | | NULL | | +| album | The name of the album to which the photo belongs | varchar(255) | NO | | | | +| filename | | varchar(255) | NO | | | | +| type | | varchar(30) | NO | | image/jpeg | | +| height | | smallint unsigned | NO | | 0 | | +| width | | smallint unsigned | NO | | 0 | | +| datasize | | int unsigned | NO | | 0 | | +| data | | mediumblob | NO | | NULL | | +| scale | | tinyint unsigned | NO | | 0 | | +| profile | | boolean | NO | | 0 | | +| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | +| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | +| deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | +| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | +| accessible | Make photo publicly accessible, ignoring permissions | boolean | NO | | 0 | | +| backend-class | Storage backend class | tinytext | YES | | NULL | | +| backend-ref | Storage backend data reference | text | YES | | NULL | | +| updated | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-category.md b/doc/database/db_post-category.md index c5bf26e8f..14663cf5b 100644 --- a/doc/database/db_post-category.md +++ b/doc/database/db_post-category.md @@ -1,12 +1,13 @@ Table post-category =========== + post relation to categories -| Field | Description | Type | Null | Key | Default | Extra | -| ------ | --------------------------------------------------------- | ------------------ | ---- | --- | ------- | ----- | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | -| uid | User id | mediumint unsigned | NO | PRI | 0 | | -| type | | tinyint unsigned | NO | PRI | 0 | | -| tid | | int unsigned | NO | PRI | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------ | --------------------------------------------------------- | ------------------ | ---- | --- | ------- | ----- | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| uid | User id | mediumint unsigned | NO | PRI | 0 | | +| type | | tinyint unsigned | NO | PRI | 0 | | +| tid | | int unsigned | NO | PRI | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-content.md b/doc/database/db_post-content.md index cee72373b..4596a04a5 100644 --- a/doc/database/db_post-content.md +++ b/doc/database/db_post-content.md @@ -1,25 +1,26 @@ Table post-content =========== + Content for all posts -| Field | Description | Type | Null | Key | Default | Extra | -| --------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------ | ---- | --- | ------- | ----- | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | -| title | item title | varchar(255) | NO | | | | -| content-warning | | varchar(255) | NO | | | | -| body | item body content | mediumtext | YES | | NULL | | -| raw-body | Body without embedded media links | mediumtext | YES | | NULL | | -| location | text location where this item originated | varchar(255) | NO | | | | -| coord | longitude/latitude pair representing location where this item originated | varchar(255) | NO | | | | -| language | Language information about this post | text | YES | | NULL | | -| app | application which generated this item | varchar(255) | NO | | | | -| rendered-hash | | varchar(32) | NO | | | | -| rendered-html | item.body converted to html | mediumtext | YES | | NULL | | -| object-type | ActivityStreams object type | varchar(100) | NO | | | | -| object | JSON encoded object structure unless it is an implied object (normal post) | text | YES | | NULL | | -| target-type | ActivityStreams target type if applicable (URI) | varchar(100) | NO | | | | -| target | JSON encoded target structure if used | text | YES | | NULL | | -| 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(32) | NO | | | | -| plink | permalink or URL to a displayable copy of the message at its source | varchar(255) | NO | | | | +| Field | Description | Type | Null | Key | Default | Extra | +| --------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------ | ---- | --- | ------- | ----- | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| title | item title | varchar(255) | NO | | | | +| content-warning | | varchar(255) | NO | | | | +| body | item body content | mediumtext | YES | | NULL | | +| raw-body | Body without embedded media links | mediumtext | YES | | NULL | | +| location | text location where this item originated | varchar(255) | NO | | | | +| coord | longitude/latitude pair representing location where this item originated | varchar(255) | NO | | | | +| language | Language information about this post | text | YES | | NULL | | +| app | application which generated this item | varchar(255) | NO | | | | +| rendered-hash | | varchar(32) | NO | | | | +| rendered-html | item.body converted to html | mediumtext | YES | | NULL | | +| object-type | ActivityStreams object type | varchar(100) | NO | | | | +| object | JSON encoded object structure unless it is an implied object (normal post) | text | YES | | NULL | | +| target-type | ActivityStreams target type if applicable (URI) | varchar(100) | NO | | | | +| target | JSON encoded target structure if used | text | YES | | NULL | | +| 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(32) | NO | | | | +| plink | permalink or URL to a displayable copy of the message at its source | varchar(255) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-delivery-data.md b/doc/database/db_post-delivery-data.md index 95e9dc190..1ed912d8b 100644 --- a/doc/database/db_post-delivery-data.md +++ b/doc/database/db_post-delivery-data.md @@ -1,19 +1,20 @@ Table post-delivery-data =========== + Delivery data for items -| Field | Description | Type | Null | Key | Default | Extra | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ---- | --- | ------- | ----- | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | 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 | YES | | NULL | | -| inform | Additional receivers of the linked item | mediumtext | YES | | NULL | | -| queue_count | Initial number of delivery recipients, used as item.delivery_queue_count | mediumint | NO | | 0 | | -| queue_done | Number of successful deliveries, used as item.delivery_queue_done | mediumint | NO | | 0 | | -| queue_failed | Number of unsuccessful deliveries, used as item.delivery_queue_failed | mediumint | NO | | 0 | | -| activitypub | Number of successful deliveries via ActivityPub | mediumint | NO | | 0 | | -| dfrn | Number of successful deliveries via DFRN | mediumint | NO | | 0 | | -| legacy_dfrn | Number of successful deliveries via legacy DFRN | mediumint | NO | | 0 | | -| diaspora | Number of successful deliveries via Diaspora | mediumint | NO | | 0 | | -| ostatus | Number of successful deliveries via OStatus | mediumint | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ---- | --- | ------- | ----- | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | 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 | YES | | NULL | | +| inform | Additional receivers of the linked item | mediumtext | YES | | NULL | | +| queue_count | Initial number of delivery recipients, used as item.delivery_queue_count | mediumint | NO | | 0 | | +| queue_done | Number of successful deliveries, used as item.delivery_queue_done | mediumint | NO | | 0 | | +| queue_failed | Number of unsuccessful deliveries, used as item.delivery_queue_failed | mediumint | NO | | 0 | | +| activitypub | Number of successful deliveries via ActivityPub | mediumint | NO | | 0 | | +| dfrn | Number of successful deliveries via DFRN | mediumint | NO | | 0 | | +| legacy_dfrn | Number of successful deliveries via legacy DFRN | mediumint | NO | | 0 | | +| diaspora | Number of successful deliveries via Diaspora | mediumint | NO | | 0 | | +| ostatus | Number of successful deliveries via OStatus | mediumint | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-media.md b/doc/database/db_post-media.md index b78f2d409..e1e299f02 100644 --- a/doc/database/db_post-media.md +++ b/doc/database/db_post-media.md @@ -1,27 +1,28 @@ Table post-media =========== + Attached media -| Field | Description | Type | Null | Key | Default | Extra | -| --------------- | --------------------------------------------------------- | ----------------- | ---- | --- | ------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | | NULL | | -| url | Media URL | varbinary(511) | NO | | NULL | | -| type | Media type | tinyint unsigned | NO | | 0 | | -| mimetype | | varchar(60) | YES | | NULL | | -| height | Height of the media | smallint unsigned | YES | | NULL | | -| width | Width of the media | smallint unsigned | YES | | NULL | | -| size | Media size | int unsigned | YES | | NULL | | -| preview | Preview URL | varbinary(255) | YES | | NULL | | -| preview-height | Height of the preview picture | smallint unsigned | YES | | NULL | | -| preview-width | Width of the preview picture | smallint unsigned | YES | | NULL | | -| description | | text | YES | | NULL | | -| name | Name of the media | varchar(255) | YES | | NULL | | -| author-url | URL of the author of the media | varbinary(255) | YES | | NULL | | -| author-name | Name of the author of the media | varchar(255) | YES | | NULL | | -| author-image | Image of the author of the media | varbinary(255) | YES | | NULL | | -| publisher-url | URL of the publisher of the media | varbinary(255) | YES | | NULL | | -| publisher-name | Name of the publisher of the media | varchar(255) | YES | | NULL | | -| publisher-image | Image of the publisher of the media | varbinary(255) | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| --------------- | --------------------------------------------------------- | ----------------- | ---- | --- | ------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | | NULL | | +| url | Media URL | varbinary(511) | NO | | NULL | | +| type | Media type | tinyint unsigned | NO | | 0 | | +| mimetype | | varchar(60) | YES | | NULL | | +| height | Height of the media | smallint unsigned | YES | | NULL | | +| width | Width of the media | smallint unsigned | YES | | NULL | | +| size | Media size | int unsigned | YES | | NULL | | +| preview | Preview URL | varbinary(255) | YES | | NULL | | +| preview-height | Height of the preview picture | smallint unsigned | YES | | NULL | | +| preview-width | Width of the preview picture | smallint unsigned | YES | | NULL | | +| description | | text | YES | | NULL | | +| name | Name of the media | varchar(255) | YES | | NULL | | +| author-url | URL of the author of the media | varbinary(255) | YES | | NULL | | +| author-name | Name of the author of the media | varchar(255) | YES | | NULL | | +| author-image | Image of the author of the media | varbinary(255) | YES | | NULL | | +| publisher-url | URL of the publisher of the media | varbinary(255) | YES | | NULL | | +| publisher-name | Name of the publisher of the media | varchar(255) | YES | | NULL | | +| publisher-image | Image of the publisher of the media | varbinary(255) | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-tag.md b/doc/database/db_post-tag.md index 53df02cbe..228f27708 100644 --- a/doc/database/db_post-tag.md +++ b/doc/database/db_post-tag.md @@ -1,12 +1,13 @@ Table post-tag =========== + post relation to tags -| Field | Description | Type | Null | Key | Default | Extra | -| ------ | --------------------------------------------------------- | ---------------- | ---- | --- | ------- | ----- | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | -| type | | tinyint unsigned | NO | PRI | 0 | | -| tid | | int unsigned | NO | PRI | 0 | | -| cid | Contact id of the mentioned public contact | int unsigned | NO | PRI | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------ | --------------------------------------------------------- | ---------------- | ---- | --- | ------- | ----- | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| type | | tinyint unsigned | NO | PRI | 0 | | +| tid | | int unsigned | NO | PRI | 0 | | +| cid | Contact id of the mentioned public contact | int unsigned | NO | PRI | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-thread-user.md b/doc/database/db_post-thread-user.md index 1db1ffe26..29e5617d3 100644 --- a/doc/database/db_post-thread-user.md +++ b/doc/database/db_post-thread-user.md @@ -1,31 +1,32 @@ Table post-thread-user =========== + Thread related data per user -| Field | Description | Type | Null | Key | Default | Extra | -| ------------ | ------------------------------------------------------------------------------------------------------- | ------------------ | ---- | --- | ------------------- | ----- | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | -| owner-id | Item owner | int unsigned | NO | | 0 | | -| author-id | Item author | int unsigned | NO | | 0 | | -| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | -| network | | char(4) | NO | | | | -| created | | datetime | NO | | 0001-01-01 00:00:00 | | -| received | | 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 | | -| commented | | datetime | NO | | 0001-01-01 00:00:00 | | -| uid | Owner id which owns this copy of the item | mediumint unsigned | NO | PRI | 0 | | -| pinned | The thread is pinned on the profile page | boolean | NO | | 0 | | -| starred | | boolean | NO | | 0 | | -| ignored | Ignore updates for this thread | boolean | NO | | 0 | | -| wall | This item was posted to the wall of uid | boolean | NO | | 0 | | -| mention | | boolean | NO | | 0 | | -| pubmail | | boolean | NO | | 0 | | -| forum_mode | | tinyint unsigned | NO | | 0 | | -| contact-id | contact.id | int unsigned | NO | | 0 | | -| unseen | post has not been seen | boolean | NO | | 1 | | -| hidden | Marker to hide the post from the user | boolean | NO | | 0 | | -| origin | item originated at this site | boolean | NO | | 0 | | -| psid | ID of the permission set of this post | int unsigned | YES | | NULL | | -| post-user-id | Id of the post-user table | int unsigned | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------ | ------------------------------------------------------------------------------------------------------- | ------------------ | ---- | --- | ------------------- | ----- | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| owner-id | Item owner | int unsigned | NO | | 0 | | +| author-id | Item author | int unsigned | NO | | 0 | | +| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | +| network | | char(4) | NO | | | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | +| received | | 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 | | +| commented | | datetime | NO | | 0001-01-01 00:00:00 | | +| uid | Owner id which owns this copy of the item | mediumint unsigned | NO | PRI | 0 | | +| pinned | The thread is pinned on the profile page | boolean | NO | | 0 | | +| starred | | boolean | NO | | 0 | | +| ignored | Ignore updates for this thread | boolean | NO | | 0 | | +| wall | This item was posted to the wall of uid | boolean | NO | | 0 | | +| mention | | boolean | NO | | 0 | | +| pubmail | | boolean | NO | | 0 | | +| forum_mode | | tinyint unsigned | NO | | 0 | | +| contact-id | contact.id | int unsigned | NO | | 0 | | +| unseen | post has not been seen | boolean | NO | | 1 | | +| hidden | Marker to hide the post from the user | boolean | NO | | 0 | | +| origin | item originated at this site | boolean | NO | | 0 | | +| psid | ID of the permission set of this post | int unsigned | YES | | NULL | | +| post-user-id | Id of the post-user table | int unsigned | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-thread.md b/doc/database/db_post-thread.md index 57a28d199..8b847e628 100644 --- a/doc/database/db_post-thread.md +++ b/doc/database/db_post-thread.md @@ -1,17 +1,18 @@ Table post-thread =========== + Thread related data -| Field | Description | Type | Null | Key | Default | Extra | -| --------- | ------------------------------------------------------------------------------------------------------- | ------------ | ---- | --- | ------------------- | ----- | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | -| owner-id | Item owner | int unsigned | NO | | 0 | | -| author-id | Item author | int unsigned | NO | | 0 | | -| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | -| network | | char(4) | NO | | | | -| created | | datetime | NO | | 0001-01-01 00:00:00 | | -| received | | 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 | | -| commented | | datetime | NO | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| --------- | ------------------------------------------------------------------------------------------------------- | ------------ | ---- | --- | ------------------- | ----- | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| owner-id | Item owner | int unsigned | NO | | 0 | | +| author-id | Item author | int unsigned | NO | | 0 | | +| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | +| network | | char(4) | NO | | | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | +| received | | 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 | | +| commented | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-user-notification.md b/doc/database/db_post-user-notification.md index fc367ca75..1607ce2c2 100644 --- a/doc/database/db_post-user-notification.md +++ b/doc/database/db_post-user-notification.md @@ -1,11 +1,12 @@ Table post-user-notification =========== + User post notifications -| Field | Description | Type | Null | Key | Default | Extra | -| ----------------- | --------------------------------------------------------- | ------------------ | ---- | --- | ------- | ----- | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | -| uid | Owner id which owns this copy of the item | mediumint unsigned | NO | PRI | NULL | | -| notification-type | | tinyint unsigned | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----------------- | --------------------------------------------------------- | ------------------ | ---- | --- | ------- | ----- | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| uid | Owner id which owns this copy of the item | mediumint unsigned | NO | PRI | NULL | | +| notification-type | | tinyint unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_post-user.md b/doc/database/db_post-user.md index 91c101200..8fad8056e 100644 --- a/doc/database/db_post-user.md +++ b/doc/database/db_post-user.md @@ -1,38 +1,39 @@ Table post-user =========== + User specific post data -| Field | Description | Type | Null | Key | Default | Extra | -| ----------------- | --------------------------------------------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | -| id | | int unsigned | NO | PRI | NULL | auto_increment | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | | NULL | | -| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | YES | | NULL | | -| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | YES | | NULL | | -| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | YES | | NULL | | -| 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 | | -| received | datetime | datetime | NO | | 0001-01-01 00:00:00 | | -| gravity | | tinyint unsigned | NO | | 0 | | -| network | Network from where the item comes from | char(4) | NO | | | | -| owner-id | Link to the contact table with uid=0 of the owner of this item | int unsigned | NO | | 0 | | -| author-id | Link to the contact table with uid=0 of the author of this item | int unsigned | NO | | 0 | | -| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | -| post-type | Post type (personal note, image, article, ...) | tinyint unsigned | NO | | 0 | | -| post-reason | Reason why the post arrived at the user | tinyint unsigned | NO | | 0 | | -| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | YES | | NULL | | -| private | 0=public, 1=private, 2=unlisted | tinyint unsigned | NO | | 0 | | -| global | | boolean | NO | | 0 | | -| visible | | boolean | NO | | 0 | | -| deleted | item has been marked for deletion | boolean | NO | | 0 | | -| uid | Owner id which owns this copy of the item | mediumint unsigned | NO | | NULL | | -| protocol | Protocol used to deliver the item for this user | tinyint unsigned | YES | | NULL | | -| contact-id | contact.id | int unsigned | NO | | 0 | | -| event-id | Used to link to the event.id | int unsigned | YES | | NULL | | -| unseen | post has not been seen | boolean | NO | | 1 | | -| hidden | Marker to hide the post from the user | boolean | NO | | 0 | | -| notification-type | | tinyint unsigned | NO | | 0 | | -| wall | This item was posted to the wall of uid | boolean | NO | | 0 | | -| origin | item originated at this site | boolean | NO | | 0 | | -| psid | ID of the permission set of this post | int unsigned | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----------------- | --------------------------------------------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | | NULL | | +| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | YES | | NULL | | +| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | YES | | NULL | | +| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | YES | | NULL | | +| 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 | | +| received | datetime | datetime | NO | | 0001-01-01 00:00:00 | | +| gravity | | tinyint unsigned | NO | | 0 | | +| network | Network from where the item comes from | char(4) | NO | | | | +| owner-id | Link to the contact table with uid=0 of the owner of this item | int unsigned | NO | | 0 | | +| author-id | Link to the contact table with uid=0 of the author of this item | int unsigned | NO | | 0 | | +| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | +| post-type | Post type (personal note, image, article, ...) | tinyint unsigned | NO | | 0 | | +| post-reason | Reason why the post arrived at the user | tinyint unsigned | NO | | 0 | | +| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | YES | | NULL | | +| private | 0=public, 1=private, 2=unlisted | tinyint unsigned | NO | | 0 | | +| global | | boolean | NO | | 0 | | +| visible | | boolean | NO | | 0 | | +| deleted | item has been marked for deletion | boolean | NO | | 0 | | +| uid | Owner id which owns this copy of the item | mediumint unsigned | NO | | NULL | | +| protocol | Protocol used to deliver the item for this user | tinyint unsigned | YES | | NULL | | +| contact-id | contact.id | int unsigned | NO | | 0 | | +| event-id | Used to link to the event.id | int unsigned | YES | | NULL | | +| unseen | post has not been seen | boolean | NO | | 1 | | +| hidden | Marker to hide the post from the user | boolean | NO | | 0 | | +| notification-type | | tinyint unsigned | NO | | 0 | | +| wall | This item was posted to the wall of uid | boolean | NO | | 0 | | +| origin | item originated at this site | boolean | NO | | 0 | | +| psid | ID of the permission set of this post | int unsigned | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_post.md b/doc/database/db_post.md index 5d9702037..afde2ef87 100644 --- a/doc/database/db_post.md +++ b/doc/database/db_post.md @@ -1,26 +1,27 @@ Table post =========== + Structure for all posts -| Field | Description | Type | Null | Key | Default | Extra | -| ------------- | --------------------------------------------------------------------------------- | ----------------- | ---- | --- | ------------------- | ----- | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | -| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | YES | | NULL | | -| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | YES | | NULL | | -| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | YES | | NULL | | -| 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 | | -| received | datetime | datetime | NO | | 0001-01-01 00:00:00 | | -| gravity | | tinyint unsigned | NO | | 0 | | -| network | Network from where the item comes from | char(4) | NO | | | | -| owner-id | Link to the contact table with uid=0 of the owner of this item | int unsigned | NO | | 0 | | -| author-id | Link to the contact table with uid=0 of the author of this item | int unsigned | NO | | 0 | | -| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | -| post-type | Post type (personal note, image, article, ...) | tinyint unsigned | NO | | 0 | | -| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | YES | | NULL | | -| private | 0=public, 1=private, 2=unlisted | tinyint unsigned | NO | | 0 | | -| global | | boolean | NO | | 0 | | -| visible | | boolean | NO | | 0 | | -| deleted | item has been marked for deletion | boolean | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------- | --------------------------------------------------------------------------------- | ----------------- | ---- | --- | ------------------- | ----- | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | YES | | NULL | | +| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | YES | | NULL | | +| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | YES | | NULL | | +| 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 | | +| received | datetime | datetime | NO | | 0001-01-01 00:00:00 | | +| gravity | | tinyint unsigned | NO | | 0 | | +| network | Network from where the item comes from | char(4) | NO | | | | +| owner-id | Link to the contact table with uid=0 of the owner of this item | int unsigned | NO | | 0 | | +| author-id | Link to the contact table with uid=0 of the author of this item | int unsigned | NO | | 0 | | +| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | +| post-type | Post type (personal note, image, article, ...) | tinyint unsigned | NO | | 0 | | +| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | YES | | NULL | | +| private | 0=public, 1=private, 2=unlisted | tinyint unsigned | NO | | 0 | | +| global | | boolean | NO | | 0 | | +| visible | | boolean | NO | | 0 | | +| deleted | item has been marked for deletion | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_process.md b/doc/database/db_process.md index 6e823ce96..648019e83 100644 --- a/doc/database/db_process.md +++ b/doc/database/db_process.md @@ -1,11 +1,12 @@ Table process =========== + Currently running system processes -| Field | Description | Type | Null | Key | Default | Extra | -| ------- | ----------- | ------------- | ---- | --- | ------------------- | ----- | -| pid | | int unsigned | NO | PRI | NULL | | -| command | | varbinary(32) | NO | | | | -| created | | datetime | NO | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------- | ----------- | ------------- | ---- | --- | ------------------- | ----- | +| pid | | int unsigned | NO | PRI | NULL | | +| command | | varbinary(32) | NO | | | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_profile.md b/doc/database/db_profile.md index debc093ca..be97c5d4a 100644 --- a/doc/database/db_profile.md +++ b/doc/database/db_profile.md @@ -1,50 +1,51 @@ Table profile =========== + user profiles data -| Field | Description | Type | Null | Key | Default | Extra | -| ------------ | --------------------------------------------- | ------------------ | ---- | --- | ---------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | Owner User id | mediumint unsigned | NO | | 0 | | -| profile-name | Deprecated | varchar(255) | YES | | NULL | | -| is-default | Deprecated | boolean | YES | | NULL | | -| hide-friends | Hide friend list from viewers of this profile | boolean | NO | | 0 | | -| name | | varchar(255) | NO | | | | -| pdesc | Deprecated | varchar(255) | YES | | NULL | | -| dob | Day of birth | varchar(32) | NO | | 0000-00-00 | | -| address | | varchar(255) | NO | | | | -| locality | | varchar(255) | NO | | | | -| region | | varchar(255) | NO | | | | -| postal-code | | varchar(32) | NO | | | | -| country-name | | varchar(255) | NO | | | | -| hometown | Deprecated | varchar(255) | YES | | NULL | | -| gender | Deprecated | varchar(32) | YES | | NULL | | -| marital | Deprecated | varchar(255) | YES | | NULL | | -| with | Deprecated | text | YES | | NULL | | -| howlong | Deprecated | datetime | YES | | NULL | | -| sexual | Deprecated | varchar(255) | YES | | NULL | | -| politic | Deprecated | varchar(255) | YES | | NULL | | -| religion | Deprecated | varchar(255) | YES | | NULL | | -| pub_keywords | | text | YES | | NULL | | -| prv_keywords | | text | YES | | NULL | | -| likes | Deprecated | text | YES | | NULL | | -| dislikes | Deprecated | text | YES | | NULL | | -| about | Profile description | text | YES | | NULL | | -| summary | Deprecated | varchar(255) | YES | | NULL | | -| music | Deprecated | text | YES | | NULL | | -| book | Deprecated | text | YES | | NULL | | -| tv | Deprecated | text | YES | | NULL | | -| film | Deprecated | text | YES | | NULL | | -| interest | Deprecated | text | YES | | NULL | | -| romance | Deprecated | text | YES | | NULL | | -| work | Deprecated | text | YES | | NULL | | -| education | Deprecated | text | YES | | NULL | | -| contact | Deprecated | text | YES | | NULL | | -| homepage | | varchar(255) | NO | | | | -| xmpp | | varchar(255) | NO | | | | -| photo | | varchar(255) | NO | | | | -| thumb | | varchar(255) | NO | | | | -| publish | publish default profile in local directory | boolean | NO | | 0 | | -| net-publish | publish profile in global directory | boolean | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------ | --------------------------------------------- | ------------------ | ---- | --- | ---------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner User id | mediumint unsigned | NO | | 0 | | +| profile-name | Deprecated | varchar(255) | YES | | NULL | | +| is-default | Deprecated | boolean | YES | | NULL | | +| hide-friends | Hide friend list from viewers of this profile | boolean | NO | | 0 | | +| name | | varchar(255) | NO | | | | +| pdesc | Deprecated | varchar(255) | YES | | NULL | | +| dob | Day of birth | varchar(32) | NO | | 0000-00-00 | | +| address | | varchar(255) | NO | | | | +| locality | | varchar(255) | NO | | | | +| region | | varchar(255) | NO | | | | +| postal-code | | varchar(32) | NO | | | | +| country-name | | varchar(255) | NO | | | | +| hometown | Deprecated | varchar(255) | YES | | NULL | | +| gender | Deprecated | varchar(32) | YES | | NULL | | +| marital | Deprecated | varchar(255) | YES | | NULL | | +| with | Deprecated | text | YES | | NULL | | +| howlong | Deprecated | datetime | YES | | NULL | | +| sexual | Deprecated | varchar(255) | YES | | NULL | | +| politic | Deprecated | varchar(255) | YES | | NULL | | +| religion | Deprecated | varchar(255) | YES | | NULL | | +| pub_keywords | | text | YES | | NULL | | +| prv_keywords | | text | YES | | NULL | | +| likes | Deprecated | text | YES | | NULL | | +| dislikes | Deprecated | text | YES | | NULL | | +| about | Profile description | text | YES | | NULL | | +| summary | Deprecated | varchar(255) | YES | | NULL | | +| music | Deprecated | text | YES | | NULL | | +| book | Deprecated | text | YES | | NULL | | +| tv | Deprecated | text | YES | | NULL | | +| film | Deprecated | text | YES | | NULL | | +| interest | Deprecated | text | YES | | NULL | | +| romance | Deprecated | text | YES | | NULL | | +| work | Deprecated | text | YES | | NULL | | +| education | Deprecated | text | YES | | NULL | | +| contact | Deprecated | text | YES | | NULL | | +| homepage | | varchar(255) | NO | | | | +| xmpp | | varchar(255) | NO | | | | +| photo | | varchar(255) | NO | | | | +| thumb | | varchar(255) | NO | | | | +| publish | publish default profile in local directory | boolean | NO | | 0 | | +| net-publish | publish profile in global directory | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_profile_check.md b/doc/database/db_profile_check.md index b35ded56a..77f4bb618 100644 --- a/doc/database/db_profile_check.md +++ b/doc/database/db_profile_check.md @@ -1,14 +1,15 @@ Table profile_check =========== + DFRN remote auth use -| Field | Description | Type | Null | Key | Default | Extra | -| ------- | ------------- | ------------------ | ---- | --- | ------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | NO | | 0 | | -| cid | contact.id | int unsigned | NO | | 0 | | -| dfrn_id | | varchar(255) | NO | | | | -| sec | | varchar(255) | NO | | | | -| expire | | int unsigned | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------- | ------------- | ------------------ | ---- | --- | ------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| cid | contact.id | int unsigned | NO | | 0 | | +| dfrn_id | | varchar(255) | NO | | | | +| sec | | varchar(255) | NO | | | | +| expire | | int unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_profile_field.md b/doc/database/db_profile_field.md index c213bf113..7bf2e9dcd 100644 --- a/doc/database/db_profile_field.md +++ b/doc/database/db_profile_field.md @@ -1,16 +1,17 @@ Table profile_field =========== + Custom profile fields -| Field | Description | Type | Null | Key | Default | Extra | -| ------- | ----------------------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | Owner user id | mediumint unsigned | NO | | 0 | | -| order | Field ordering per user | mediumint unsigned | NO | | 1 | | -| psid | ID of the permission set of this profile field - 0 = public | int unsigned | YES | | NULL | | -| label | Label of the field | varchar(255) | NO | | | | -| value | Value of the field | text | YES | | NULL | | -| created | creation time | datetime | NO | | 0001-01-01 00:00:00 | | -| edited | last edit time | datetime | NO | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------- | ----------------------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | Owner user id | mediumint unsigned | NO | | 0 | | +| order | Field ordering per user | mediumint unsigned | NO | | 1 | | +| psid | ID of the permission set of this profile field - 0 = public | int unsigned | YES | | NULL | | +| label | Label of the field | varchar(255) | NO | | | | +| value | Value of the field | text | YES | | NULL | | +| created | creation time | datetime | NO | | 0001-01-01 00:00:00 | | +| edited | last edit time | datetime | NO | | 0001-01-01 00:00:00 | | Return to [database documentation](help/database) diff --git a/doc/database/db_push_subscriber.md b/doc/database/db_push_subscriber.md index 6098a4fd8..fde15de14 100644 --- a/doc/database/db_push_subscriber.md +++ b/doc/database/db_push_subscriber.md @@ -1,18 +1,19 @@ Table push_subscriber =========== + Used for OStatus: Contains feed subscribers -| Field | Description | Type | Null | Key | Default | Extra | -| ------------ | --------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | NO | | 0 | | -| callback_url | | varchar(255) | NO | | | | -| topic | | varchar(255) | NO | | | | -| nickname | | varchar(255) | NO | | | | -| push | Retrial counter | tinyint | NO | | 0 | | -| last_update | Date of last successful trial | datetime | NO | | 0001-01-01 00:00:00 | | -| next_try | Next retrial date | datetime | NO | | 0001-01-01 00:00:00 | | -| renewed | Date of last subscription renewal | datetime | NO | | 0001-01-01 00:00:00 | | -| secret | | varchar(255) | NO | | | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------ | --------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| callback_url | | varchar(255) | NO | | | | +| topic | | varchar(255) | NO | | | | +| nickname | | varchar(255) | NO | | | | +| push | Retrial counter | tinyint | NO | | 0 | | +| last_update | Date of last successful trial | datetime | NO | | 0001-01-01 00:00:00 | | +| next_try | Next retrial date | datetime | NO | | 0001-01-01 00:00:00 | | +| renewed | Date of last subscription renewal | datetime | NO | | 0001-01-01 00:00:00 | | +| secret | | varchar(255) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_register.md b/doc/database/db_register.md index 630d7b4a6..fac22811d 100644 --- a/doc/database/db_register.md +++ b/doc/database/db_register.md @@ -1,15 +1,16 @@ Table register =========== + registrations requiring admin approval -| Field | Description | Type | Null | Key | Default | Extra | -| -------- | ------------- | ------------------ | ---- | --- | ------------------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| hash | | varchar(255) | NO | | | | -| created | | datetime | NO | | 0001-01-01 00:00:00 | | -| uid | User id | mediumint unsigned | NO | | 0 | | -| password | | varchar(255) | NO | | | | -| language | | varchar(16) | NO | | | | -| note | | text | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| -------- | ------------- | ------------------ | ---- | --- | ------------------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| hash | | varchar(255) | NO | | | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | +| uid | User id | mediumint unsigned | NO | | 0 | | +| password | | varchar(255) | NO | | | | +| language | | varchar(16) | NO | | | | +| note | | text | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_search.md b/doc/database/db_search.md index 0297545a0..dc20ac42a 100644 --- a/doc/database/db_search.md +++ b/doc/database/db_search.md @@ -2,10 +2,11 @@ Table search =========== -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ------------- | ------------------ | ---- | --- | ------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uid | User id | mediumint unsigned | NO | | 0 | | -| term | | varchar(255) | NO | | | | + +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ------------- | ------------------ | ---- | --- | ------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uid | User id | mediumint unsigned | NO | | 0 | | +| term | | varchar(255) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_session.md b/doc/database/db_session.md index 04c85487f..d01b57364 100644 --- a/doc/database/db_session.md +++ b/doc/database/db_session.md @@ -1,12 +1,13 @@ Table session =========== + web session storage -| Field | Description | Type | Null | Key | Default | Extra | -| ------ | ------------- | --------------- | ---- | --- | ------- | -------------- | -| id | sequential ID | bigint unsigned | NO | PRI | NULL | auto_increment | -| sid | | varbinary(255) | NO | | | | -| data | | text | YES | | NULL | | -| expire | | int unsigned | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------ | ------------- | --------------- | ---- | --- | ------- | -------------- | +| id | sequential ID | bigint unsigned | NO | PRI | NULL | auto_increment | +| sid | | varbinary(255) | NO | | | | +| data | | text | YES | | NULL | | +| expire | | int unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_storage.md b/doc/database/db_storage.md index 00807760c..21596ba65 100644 --- a/doc/database/db_storage.md +++ b/doc/database/db_storage.md @@ -1,10 +1,11 @@ Table storage =========== + Data stored by Database storage backend -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ------------------------------ | ------------ | ---- | --- | ------- | -------------- | -| id | Auto incremented image data id | int unsigned | NO | PRI | NULL | auto_increment | -| data | file data | longblob | NO | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ------------------------------ | ------------ | ---- | --- | ------- | -------------- | +| id | Auto incremented image data id | int unsigned | NO | PRI | NULL | auto_increment | +| data | file data | longblob | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_tag.md b/doc/database/db_tag.md index 1d1ed72b0..f52478c85 100644 --- a/doc/database/db_tag.md +++ b/doc/database/db_tag.md @@ -1,11 +1,12 @@ Table tag =========== + tags and mentions -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | -------------- | ---- | --- | ------- | -------------- | -| id | | int unsigned | NO | PRI | NULL | auto_increment | -| name | | varchar(96) | NO | | | | -| url | | varbinary(255) | NO | | | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | -------------- | ---- | --- | ------- | -------------- | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| name | | varchar(96) | NO | | | | +| url | | varbinary(255) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_tokens.md b/doc/database/db_tokens.md index d3f45bb79..bf20f16b8 100644 --- a/doc/database/db_tokens.md +++ b/doc/database/db_tokens.md @@ -1,14 +1,15 @@ Table tokens =========== + OAuth usage -| Field | Description | Type | Null | Key | Default | Extra | -| --------- | ----------- | ------------------ | ---- | --- | ------- | ----- | -| id | | varchar(40) | NO | PRI | NULL | | -| secret | | text | YES | | NULL | | -| client_id | | varchar(20) | NO | | | | -| expires | | int | NO | | 0 | | -| scope | | varchar(200) | NO | | | | -| uid | User id | mediumint unsigned | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| --------- | ----------- | ------------------ | ---- | --- | ------- | ----- | +| id | | varchar(40) | NO | PRI | NULL | | +| secret | | text | YES | | NULL | | +| client_id | | varchar(20) | NO | | | | +| expires | | int | NO | | 0 | | +| scope | | varchar(200) | NO | | | | +| uid | User id | mediumint unsigned | NO | | 0 | | Return to [database documentation](help/database) diff --git a/doc/database/db_user-contact.md b/doc/database/db_user-contact.md index ba529fd0a..9bcbff7d3 100644 --- a/doc/database/db_user-contact.md +++ b/doc/database/db_user-contact.md @@ -1,13 +1,14 @@ Table user-contact =========== + User specific public contact data -| Field | Description | Type | Null | Key | Default | Extra | -| --------- | ------------------------------------------- | ------------------ | ---- | --- | ------- | ----- | -| cid | Contact id of the linked public contact | int unsigned | NO | PRI | 0 | | -| uid | User id | mediumint unsigned | NO | PRI | 0 | | -| blocked | Contact is completely blocked for this user | boolean | YES | | NULL | | -| ignored | Posts from this contact are ignored | boolean | YES | | NULL | | -| collapsed | Posts from this contact are collapsed | boolean | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| --------- | ------------------------------------------- | ------------------ | ---- | --- | ------- | ----- | +| cid | Contact id of the linked public contact | int unsigned | NO | PRI | 0 | | +| uid | User id | mediumint unsigned | NO | PRI | 0 | | +| blocked | Contact is completely blocked for this user | boolean | YES | | NULL | | +| ignored | Posts from this contact are ignored | boolean | YES | | NULL | | +| collapsed | Posts from this contact are collapsed | boolean | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_user.md b/doc/database/db_user.md index 6e63c6a3a..8cc762cc2 100644 --- a/doc/database/db_user.md +++ b/doc/database/db_user.md @@ -1,53 +1,54 @@ Table user =========== + The local users -| Field | Description | Type | Null | Key | Default | Extra | -| ------------------------ | --------------------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | -| uid | sequential ID | mediumint unsigned | NO | PRI | NULL | auto_increment | -| parent-uid | The parent user that has full control about this user | mediumint unsigned | YES | | NULL | | -| guid | A unique identifier for this user | varchar(64) | NO | | | | -| username | Name that this user is known by | varchar(255) | NO | | | | -| password | encrypted password | varchar(255) | NO | | | | -| legacy_password | Is the password hash double-hashed? | boolean | NO | | 0 | | -| nickname | nick- and user name | varchar(255) | NO | | | | -| email | the users email address | varchar(255) | NO | | | | -| openid | | varchar(255) | NO | | | | -| timezone | PHP-legal timezone | varchar(128) | NO | | | | -| language | default language | varchar(32) | NO | | en | | -| register_date | timestamp of registration | datetime | NO | | 0001-01-01 00:00:00 | | -| login_date | timestamp of last login | datetime | NO | | 0001-01-01 00:00:00 | | -| default-location | Default for item.location | varchar(255) | NO | | | | -| allow_location | 1 allows to display the location | boolean | NO | | 0 | | -| theme | user theme preference | varchar(255) | NO | | | | -| pubkey | RSA public key 4096 bit | text | YES | | NULL | | -| prvkey | RSA private key 4096 bit | text | YES | | NULL | | -| spubkey | | text | YES | | NULL | | -| sprvkey | | text | YES | | NULL | | -| verified | user is verified through email | boolean | NO | | 0 | | -| blocked | 1 for user is blocked | boolean | NO | | 0 | | -| blockwall | Prohibit contacts to post to the profile page of the user | boolean | NO | | 0 | | -| hidewall | Hide profile details from unkown viewers | boolean | NO | | 0 | | -| blocktags | Prohibit contacts to tag the post of this user | boolean | NO | | 0 | | -| unkmail | Permit unknown people to send private mails to this user | boolean | NO | | 0 | | -| cntunkmail | | int unsigned | NO | | 10 | | -| notify-flags | email notification options | smallint unsigned | NO | | 65535 | | -| page-flags | page/profile type | tinyint unsigned | NO | | 0 | | -| account-type | | tinyint unsigned | NO | | 0 | | -| prvnets | | boolean | NO | | 0 | | -| pwdreset | Password reset request token | varchar(255) | YES | | NULL | | -| pwdreset_time | Timestamp of the last password reset request | datetime | YES | | NULL | | -| maxreq | | int unsigned | NO | | 10 | | -| expire | | int unsigned | NO | | 0 | | -| account_removed | if 1 the account is removed | boolean | NO | | 0 | | -| account_expired | | boolean | NO | | 0 | | -| account_expires_on | timestamp when account expires and will be deleted | datetime | NO | | 0001-01-01 00:00:00 | | -| expire_notification_sent | timestamp of last warning of account expiration | datetime | NO | | 0001-01-01 00:00:00 | | -| def_gid | | int unsigned | NO | | 0 | | -| allow_cid | default permission for this user | mediumtext | YES | | NULL | | -| allow_gid | default permission for this user | mediumtext | YES | | NULL | | -| deny_cid | default permission for this user | mediumtext | YES | | NULL | | -| deny_gid | default permission for this user | mediumtext | YES | | NULL | | -| openidserver | | text | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------------------ | --------------------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | +| uid | sequential ID | mediumint unsigned | NO | PRI | NULL | auto_increment | +| parent-uid | The parent user that has full control about this user | mediumint unsigned | YES | | NULL | | +| guid | A unique identifier for this user | varchar(64) | NO | | | | +| username | Name that this user is known by | varchar(255) | NO | | | | +| password | encrypted password | varchar(255) | NO | | | | +| legacy_password | Is the password hash double-hashed? | boolean | NO | | 0 | | +| nickname | nick- and user name | varchar(255) | NO | | | | +| email | the users email address | varchar(255) | NO | | | | +| openid | | varchar(255) | NO | | | | +| timezone | PHP-legal timezone | varchar(128) | NO | | | | +| language | default language | varchar(32) | NO | | en | | +| register_date | timestamp of registration | datetime | NO | | 0001-01-01 00:00:00 | | +| login_date | timestamp of last login | datetime | NO | | 0001-01-01 00:00:00 | | +| default-location | Default for item.location | varchar(255) | NO | | | | +| allow_location | 1 allows to display the location | boolean | NO | | 0 | | +| theme | user theme preference | varchar(255) | NO | | | | +| pubkey | RSA public key 4096 bit | text | YES | | NULL | | +| prvkey | RSA private key 4096 bit | text | YES | | NULL | | +| spubkey | | text | YES | | NULL | | +| sprvkey | | text | YES | | NULL | | +| verified | user is verified through email | boolean | NO | | 0 | | +| blocked | 1 for user is blocked | boolean | NO | | 0 | | +| blockwall | Prohibit contacts to post to the profile page of the user | boolean | NO | | 0 | | +| hidewall | Hide profile details from unkown viewers | boolean | NO | | 0 | | +| blocktags | Prohibit contacts to tag the post of this user | boolean | NO | | 0 | | +| unkmail | Permit unknown people to send private mails to this user | boolean | NO | | 0 | | +| cntunkmail | | int unsigned | NO | | 10 | | +| notify-flags | email notification options | smallint unsigned | NO | | 65535 | | +| page-flags | page/profile type | tinyint unsigned | NO | | 0 | | +| account-type | | tinyint unsigned | NO | | 0 | | +| prvnets | | boolean | NO | | 0 | | +| pwdreset | Password reset request token | varchar(255) | YES | | NULL | | +| pwdreset_time | Timestamp of the last password reset request | datetime | YES | | NULL | | +| maxreq | | int unsigned | NO | | 10 | | +| expire | | int unsigned | NO | | 0 | | +| account_removed | if 1 the account is removed | boolean | NO | | 0 | | +| account_expired | | boolean | NO | | 0 | | +| account_expires_on | timestamp when account expires and will be deleted | datetime | NO | | 0001-01-01 00:00:00 | | +| expire_notification_sent | timestamp of last warning of account expiration | datetime | NO | | 0001-01-01 00:00:00 | | +| def_gid | | int unsigned | NO | | 0 | | +| allow_cid | default permission for this user | mediumtext | YES | | NULL | | +| allow_gid | default permission for this user | mediumtext | YES | | NULL | | +| deny_cid | default permission for this user | mediumtext | YES | | NULL | | +| deny_gid | default permission for this user | mediumtext | YES | | NULL | | +| openidserver | | text | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_userd.md b/doc/database/db_userd.md index df2c20c33..eaef34874 100644 --- a/doc/database/db_userd.md +++ b/doc/database/db_userd.md @@ -1,10 +1,11 @@ Table userd =========== + Deleted usernames -| Field | Description | Type | Null | Key | Default | Extra | -| -------- | ------------- | ------------ | ---- | --- | ------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| username | | varchar(255) | NO | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| -------- | ------------- | ------------ | ---- | --- | ------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| username | | varchar(255) | NO | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_verb.md b/doc/database/db_verb.md index f5451104c..cd5d66f83 100644 --- a/doc/database/db_verb.md +++ b/doc/database/db_verb.md @@ -1,10 +1,11 @@ Table verb =========== + Activity Verbs -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ----------- | ----------------- | ---- | --- | ------- | -------------- | -| id | | smallint unsigned | NO | PRI | NULL | auto_increment | -| name | | varchar(100) | NO | | | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ----------- | ----------------- | ---- | --- | ------- | -------------- | +| id | | smallint unsigned | NO | PRI | NULL | auto_increment | +| name | | varchar(100) | NO | | | | Return to [database documentation](help/database) diff --git a/doc/database/db_worker-ipc.md b/doc/database/db_worker-ipc.md index 266efc576..57ec48935 100644 --- a/doc/database/db_worker-ipc.md +++ b/doc/database/db_worker-ipc.md @@ -1,10 +1,11 @@ Table worker-ipc =========== + Inter process communication between the frontend and the worker -| Field | Description | Type | Null | Key | Default | Extra | -| ----- | ------------------------- | ------- | ---- | --- | ------- | ----- | -| key | | int | NO | PRI | NULL | | -| jobs | Flag for outstanding jobs | boolean | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----- | ------------------------- | ------- | ---- | --- | ------- | ----- | +| key | | int | NO | PRI | NULL | | +| jobs | Flag for outstanding jobs | boolean | YES | | NULL | | Return to [database documentation](help/database) diff --git a/doc/database/db_workerqueue.md b/doc/database/db_workerqueue.md index fac65b019..16b6a2e0d 100644 --- a/doc/database/db_workerqueue.md +++ b/doc/database/db_workerqueue.md @@ -1,18 +1,19 @@ Table workerqueue =========== + Background tasks queue entries -| Field | Description | Type | Null | Key | Default | Extra | -| --------- | ------------------------------------------------------- | ---------------- | ---- | --- | ------------------- | -------------- | -| id | Auto incremented worker task id | int unsigned | NO | PRI | NULL | auto_increment | -| command | Task command | varchar(100) | YES | | NULL | | -| parameter | Task parameter | mediumtext | YES | | NULL | | -| priority | Task priority | tinyint unsigned | NO | | 0 | | -| created | Creation date | datetime | NO | | 0001-01-01 00:00:00 | | -| pid | Process id of the worker | int unsigned | NO | | 0 | | -| executed | Execution date | datetime | NO | | 0001-01-01 00:00:00 | | -| next_try | Next retrial date | datetime | NO | | 0001-01-01 00:00:00 | | -| retrial | Retrial counter | tinyint | NO | | 0 | | -| done | Marked 1 when the task was done - will be deleted later | boolean | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| --------- | ------------------------------------------------------- | ---------------- | ---- | --- | ------------------- | -------------- | +| id | Auto incremented worker task id | int unsigned | NO | PRI | NULL | auto_increment | +| command | Task command | varchar(100) | YES | | NULL | | +| parameter | Task parameter | mediumtext | YES | | NULL | | +| priority | Task priority | tinyint unsigned | NO | | 0 | | +| created | Creation date | datetime | NO | | 0001-01-01 00:00:00 | | +| pid | Process id of the worker | int unsigned | NO | | 0 | | +| executed | Execution date | datetime | NO | | 0001-01-01 00:00:00 | | +| next_try | Next retrial date | datetime | NO | | 0001-01-01 00:00:00 | | +| retrial | Retrial counter | tinyint | NO | | 0 | | +| done | Marked 1 when the task was done - will be deleted later | boolean | NO | | 0 | | Return to [database documentation](help/database) diff --git a/view/templates/structure.tpl b/view/templates/structure.tpl index 7b1569e37..3ec9ba9b2 100644 --- a/view/templates/structure.tpl +++ b/view/templates/structure.tpl @@ -1,9 +1,10 @@ Table {{$name}} =========== + {{$comment}} {{foreach $fields as $field}} -| {{$field.name}} | {{$field.comment}} | {{$field.type}} | {{$field.null}} | {{$field.primary}} | {{$field.default}} | {{$field.extra}} | +| {{$field.name}} | {{$field.comment}} | {{$field.type}} | {{$field.null}} | {{$field.primary}} | {{$field.default}} | {{$field.extra}} | {{/foreach}} Return to [database documentation](help/database) From 96f07c7288a0b9a2433ad66ee6cef21612d90264 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 14 Jun 2021 08:53:37 +0000 Subject: [PATCH 08/12] Indexes and foreign keys added --- doc/database/db_2fa_app_specific_password.md | 18 ++++++++ doc/database/db_2fa_recovery_codes.md | 17 +++++++ doc/database/db_2fa_trusted_browser.md | 18 ++++++++ doc/database/db_addon.md | 13 ++++++ doc/database/db_apcontact.md | 23 ++++++++++ doc/database/db_application-token.md | 19 ++++++++ doc/database/db_application.md | 12 +++++ doc/database/db_attach.md | 18 ++++++++ doc/database/db_auth_codes.md | 18 ++++++++ doc/database/db_cache.md | 12 +++++ doc/database/db_challenge.md | 12 +++++ doc/database/db_clients.md | 18 ++++++++ doc/database/db_config.md | 12 +++++ doc/database/db_contact-relation.md | 19 ++++++++ doc/database/db_contact.md | 40 +++++++++++++++++ doc/database/db_conv.md | 18 ++++++++ doc/database/db_conversation.md | 13 ++++++ doc/database/db_delayed-post.md | 18 ++++++++ doc/database/db_diaspora-interaction.md | 17 +++++++ doc/database/db_event.md | 20 +++++++++ doc/database/db_fcontact.md | 13 ++++++ doc/database/db_fsuggest.md | 20 +++++++++ doc/database/db_group.md | 18 ++++++++ doc/database/db_group_member.md | 20 +++++++++ doc/database/db_gserver-tag.md | 18 ++++++++ doc/database/db_gserver.md | 14 ++++++ doc/database/db_hook.md | 13 ++++++ doc/database/db_host.md | 12 +++++ doc/database/db_inbox-status.md | 11 +++++ doc/database/db_intro.md | 20 +++++++++ doc/database/db_item-uri.md | 13 ++++++ doc/database/db_locks.md | 12 +++++ doc/database/db_mail.md | 30 +++++++++++++ doc/database/db_mailacct.md | 18 ++++++++ doc/database/db_manage.md | 20 +++++++++ doc/database/db_notification.md | 27 +++++++++++ doc/database/db_notify-threads.md | 22 +++++++++ doc/database/db_notify.md | 24 ++++++++++ doc/database/db_oembed.md | 12 +++++ doc/database/db_openwebauth-token.md | 18 ++++++++ doc/database/db_parsed_url.md | 13 ++++++ doc/database/db_pconfig.md | 18 ++++++++ doc/database/db_permissionset.md | 18 ++++++++ doc/database/db_photo.md | 24 ++++++++++ doc/database/db_post-category.md | 21 +++++++++ doc/database/db_post-content.md | 20 +++++++++ doc/database/db_post-delivery-data.md | 17 +++++++ doc/database/db_post-media.md | 18 ++++++++ doc/database/db_post-tag.md | 21 +++++++++ doc/database/db_post-thread-user.md | 38 ++++++++++++++++ doc/database/db_post-thread.md | 25 +++++++++++ doc/database/db_post-user-notification.md | 19 ++++++++ doc/database/db_post-user.md | 47 ++++++++++++++++++++ doc/database/db_post.md | 31 +++++++++++++ doc/database/db_process.md | 12 +++++ doc/database/db_profile.md | 19 ++++++++ doc/database/db_profile_check.md | 20 +++++++++ doc/database/db_profile_field.md | 21 +++++++++ doc/database/db_push_subscriber.md | 19 ++++++++ doc/database/db_register.md | 18 ++++++++ doc/database/db_search.md | 19 ++++++++ doc/database/db_session.md | 13 ++++++ doc/database/db_storage.md | 11 +++++ doc/database/db_tag.md | 13 ++++++ doc/database/db_tokens.md | 20 +++++++++ doc/database/db_user-contact.md | 19 ++++++++ doc/database/db_user.md | 21 +++++++++ doc/database/db_userd.md | 12 +++++ doc/database/db_verb.md | 12 +++++ doc/database/db_worker-ipc.md | 11 +++++ doc/database/db_workerqueue.md | 19 ++++++++ src/Database/DBStructure.php | 32 +++++++++---- view/templates/structure.tpl | 23 ++++++++++ 73 files changed, 1366 insertions(+), 8 deletions(-) diff --git a/doc/database/db_2fa_app_specific_password.md b/doc/database/db_2fa_app_specific_password.md index 6dba89bf4..dd9773503 100644 --- a/doc/database/db_2fa_app_specific_password.md +++ b/doc/database/db_2fa_app_specific_password.md @@ -3,6 +3,9 @@ Table 2fa_app_specific_password Two-factor app-specific _password +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | --------------- | ---------------------------------------- | ------------------ | ---- | --- | ------- | -------------- | | id | Password ID for revocation | mediumint unsigned | NO | PRI | NULL | auto_increment | @@ -12,4 +15,19 @@ Two-factor app-specific _password | generated | Datetime the password was generated | datetime | NO | | NULL | | | last_used | Datetime the password was last used | datetime | YES | | NULL | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| uid_description | uid, description(190) | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uid | [user](help/database/db_user) | uid | + Return to [database documentation](help/database) diff --git a/doc/database/db_2fa_recovery_codes.md b/doc/database/db_2fa_recovery_codes.md index 30e00ef65..53574c754 100644 --- a/doc/database/db_2fa_recovery_codes.md +++ b/doc/database/db_2fa_recovery_codes.md @@ -3,6 +3,9 @@ Table 2fa_recovery_codes Two-factor authentication recovery codes +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | --------- | ------------------------------- | ------------------ | ---- | --- | ------- | ----- | | uid | User ID | mediumint unsigned | NO | PRI | NULL | | @@ -10,4 +13,18 @@ Two-factor authentication recovery codes | generated | Datetime the code was generated | datetime | NO | | NULL | | | used | Datetime the code was used | datetime | YES | | NULL | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | uid, code | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uid | [user](help/database/db_user) | uid | + Return to [database documentation](help/database) diff --git a/doc/database/db_2fa_trusted_browser.md b/doc/database/db_2fa_trusted_browser.md index 34845ba57..595d0ef5c 100644 --- a/doc/database/db_2fa_trusted_browser.md +++ b/doc/database/db_2fa_trusted_browser.md @@ -3,6 +3,9 @@ Table 2fa_trusted_browser Two-factor authentication trusted browsers +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ----------- | ------------------------------------------ | ------------------ | ---- | --- | ------- | ----- | | cookie_hash | Trusted cookie hash | varchar(80) | NO | PRI | NULL | | @@ -11,4 +14,19 @@ Two-factor authentication trusted browsers | created | Datetime the trusted browser was recorded | datetime | NO | | NULL | | | last_used | Datetime the trusted browser was last used | datetime | YES | | NULL | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | cookie_hash | +| uid | uid | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uid | [user](help/database/db_user) | uid | + Return to [database documentation](help/database) diff --git a/doc/database/db_addon.md b/doc/database/db_addon.md index 568e64a5a..6644ebaa2 100644 --- a/doc/database/db_addon.md +++ b/doc/database/db_addon.md @@ -3,6 +3,9 @@ Table addon registered addons +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------------ | --------------------------------------------- | ------------ | ---- | --- | ------- | -------------- | | id | | int unsigned | NO | PRI | NULL | auto_increment | @@ -13,4 +16,14 @@ registered addons | timestamp | file timestamp to check for reloads | int unsigned | NO | | 0 | | | plugin_admin | 1 = has admin config, 0 = has no admin config | boolean | NO | | 0 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| installed_name | installed, name | +| name | UNIQUE, name | + + Return to [database documentation](help/database) diff --git a/doc/database/db_apcontact.md b/doc/database/db_apcontact.md index c76c99b8b..a7ea4e9d4 100644 --- a/doc/database/db_apcontact.md +++ b/doc/database/db_apcontact.md @@ -3,6 +3,9 @@ Table apcontact ActivityPub compatible contacts - used in the ActivityPub implementation +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ---------------- | ---------------------------- | -------------- | ---- | --- | ------------------- | ----- | | url | URL of the contact | varbinary(255) | NO | PRI | NULL | | @@ -30,4 +33,24 @@ ActivityPub compatible contacts - used in the ActivityPub implementation | statuses_count | Number of posts | int unsigned | YES | | 0 | | | updated | | datetime | NO | | 0001-01-01 00:00:00 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | url | +| addr | addr(32) | +| alias | alias(190) | +| followers | followers(190) | +| baseurl | baseurl(190) | +| sharedinbox | sharedinbox(190) | +| gsid | gsid | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| gsid | [gserver](help/database/db_gserver) | id | + Return to [database documentation](help/database) diff --git a/doc/database/db_application-token.md b/doc/database/db_application-token.md index e37bce6c9..19230b10b 100644 --- a/doc/database/db_application-token.md +++ b/doc/database/db_application-token.md @@ -3,6 +3,9 @@ Table application-token OAuth user token +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | -------------- | ------------- | ------------------ | ---- | --- | ------- | ----- | | application-id | | int unsigned | NO | PRI | NULL | | @@ -16,4 +19,20 @@ OAuth user token | follow | Follow scope | boolean | YES | | NULL | | | push | Push scope | boolean | YES | | NULL | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | application-id, uid | +| uid_id | uid, application-id | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| application-id | [application](help/database/db_application) | id | +| uid | [user](help/database/db_user) | uid | + Return to [database documentation](help/database) diff --git a/doc/database/db_application.md b/doc/database/db_application.md index 461cc1188..e1743f28c 100644 --- a/doc/database/db_application.md +++ b/doc/database/db_application.md @@ -3,6 +3,9 @@ Table application OAuth application +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------------- | --------------- | ------------ | ---- | --- | ------- | -------------- | | id | generated index | int unsigned | NO | PRI | NULL | auto_increment | @@ -17,4 +20,13 @@ OAuth application | follow | Follow scope | boolean | YES | | NULL | | | push | Push scope | boolean | YES | | NULL | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| client_id | UNIQUE, client_id | + + Return to [database documentation](help/database) diff --git a/doc/database/db_attach.md b/doc/database/db_attach.md index 4cbda2a17..218ce8b1d 100644 --- a/doc/database/db_attach.md +++ b/doc/database/db_attach.md @@ -3,6 +3,9 @@ Table attach file attachments +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------------- | ----------------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | | id | generated index | int unsigned | NO | PRI | NULL | auto_increment | @@ -21,4 +24,19 @@ file attachments | backend-class | Storage backend class | tinytext | YES | | NULL | | | backend-ref | Storage backend data reference | text | YES | | NULL | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| uid | uid | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uid | [user](help/database/db_user) | uid | + Return to [database documentation](help/database) diff --git a/doc/database/db_auth_codes.md b/doc/database/db_auth_codes.md index fef3f987c..9ebd15cbd 100644 --- a/doc/database/db_auth_codes.md +++ b/doc/database/db_auth_codes.md @@ -3,6 +3,9 @@ Table auth_codes OAuth usage +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------------ | ----------- | ------------ | ---- | --- | ------- | ----- | | id | | varchar(40) | NO | PRI | NULL | | @@ -11,4 +14,19 @@ OAuth usage | expires | | int | NO | | 0 | | | scope | | varchar(250) | NO | | | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| client_id | client_id | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| client_id | [clients](help/database/db_clients) | client_id | + Return to [database documentation](help/database) diff --git a/doc/database/db_cache.md b/doc/database/db_cache.md index 300959ef3..2428a6f51 100644 --- a/doc/database/db_cache.md +++ b/doc/database/db_cache.md @@ -3,6 +3,9 @@ Table cache Stores temporary data +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------- | ---------------------------- | -------------- | ---- | --- | ------------------- | ----- | | k | cache key | varbinary(255) | NO | PRI | NULL | | @@ -10,4 +13,13 @@ Stores temporary data | expires | datetime of cache expiration | datetime | NO | | 0001-01-01 00:00:00 | | | updated | datetime of cache insertion | datetime | NO | | 0001-01-01 00:00:00 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | k | +| k_expires | k, expires | + + Return to [database documentation](help/database) diff --git a/doc/database/db_challenge.md b/doc/database/db_challenge.md index 5988954ab..bfd54c45d 100644 --- a/doc/database/db_challenge.md +++ b/doc/database/db_challenge.md @@ -3,6 +3,9 @@ Table challenge +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ----------- | ------------- | ------------ | ---- | --- | ------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | @@ -12,4 +15,13 @@ Table challenge | type | | varchar(255) | NO | | | | | last_update | | varchar(255) | NO | | | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| expire | expire | + + Return to [database documentation](help/database) diff --git a/doc/database/db_clients.md b/doc/database/db_clients.md index f907e0d96..00e5ef6c3 100644 --- a/doc/database/db_clients.md +++ b/doc/database/db_clients.md @@ -3,6 +3,9 @@ Table clients OAuth usage +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------------ | ----------- | ------------------ | ---- | --- | ------- | ----- | | client_id | | varchar(20) | NO | PRI | NULL | | @@ -12,4 +15,19 @@ OAuth usage | icon | | text | YES | | NULL | | | uid | User id | mediumint unsigned | NO | | 0 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | client_id | +| uid | uid | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uid | [user](help/database/db_user) | uid | + Return to [database documentation](help/database) diff --git a/doc/database/db_config.md b/doc/database/db_config.md index 029723510..17c3cfee2 100644 --- a/doc/database/db_config.md +++ b/doc/database/db_config.md @@ -3,6 +3,9 @@ Table config main configuration storage +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ------------- | ---- | --- | ------- | -------------- | | id | | int unsigned | NO | PRI | NULL | auto_increment | @@ -10,4 +13,13 @@ main configuration storage | k | | varbinary(50) | NO | | | | | v | | mediumtext | YES | | NULL | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| cat_k | UNIQUE, cat, k | + + Return to [database documentation](help/database) diff --git a/doc/database/db_contact-relation.md b/doc/database/db_contact-relation.md index 9a86b8daf..c8dc95a3b 100644 --- a/doc/database/db_contact-relation.md +++ b/doc/database/db_contact-relation.md @@ -3,6 +3,9 @@ Table contact-relation Contact relations +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ---------------- | --------------------------------------------------- | ------------ | ---- | --- | ------------------- | ----- | | cid | contact the related contact had interacted with | int unsigned | NO | PRI | 0 | | @@ -11,4 +14,20 @@ Contact relations | follow-updated | Date of the last update of the contact relationship | datetime | NO | | 0001-01-01 00:00:00 | | | follows | | boolean | NO | | 0 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | cid, relation-cid | +| relation-cid | relation-cid | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| cid | [contact](help/database/db_contact) | id | +| relation-cid | [contact](help/database/db_contact) | id | + Return to [database documentation](help/database) diff --git a/doc/database/db_contact.md b/doc/database/db_contact.md index 340f95e06..ae49777aa 100644 --- a/doc/database/db_contact.md +++ b/doc/database/db_contact.md @@ -3,6 +3,9 @@ Table contact contact table +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------------------------- | --------------------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | @@ -86,4 +89,41 @@ contact table | fetch_further_information | | tinyint unsigned | NO | | 0 | | | ffi_keyword_denylist | | text | YES | | NULL | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| uid_name | uid, name(190) | +| self_uid | self, uid | +| alias_uid | alias(128), uid | +| pending_uid | pending, uid | +| blocked_uid | blocked, uid | +| uid_rel_network_poll | uid, rel, network, poll(64), archive | +| uid_network_batch | uid, network, batch(64) | +| batch_contact-type | batch(64), contact-type | +| addr_uid | addr(128), uid | +| nurl_uid | nurl(128), uid | +| nick_uid | nick(128), uid | +| attag_uid | attag(96), uid | +| dfrn-id | dfrn-id(64) | +| issued-id | issued-id(64) | +| network_uid_lastupdate | network, uid, last-update | +| uid_network_self_lastupdate | uid, network, self, last-update | +| uid_lastitem | uid, last-item | +| baseurl | baseurl(64) | +| uid_contact-type | uid, contact-type | +| uid_self_contact-type | uid, self, contact-type | +| self_network_uid | self, network, uid | +| gsid | gsid | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uid | [user](help/database/db_user) | uid | +| gsid | [gserver](help/database/db_gserver) | id | + Return to [database documentation](help/database) diff --git a/doc/database/db_conv.md b/doc/database/db_conv.md index 11bd7ac13..a92e154c2 100644 --- a/doc/database/db_conv.md +++ b/doc/database/db_conv.md @@ -3,6 +3,9 @@ Table conv private messages +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------- | ----------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | @@ -14,4 +17,19 @@ private messages | updated | edited timestamp | datetime | NO | | 0001-01-01 00:00:00 | | | subject | subject of initial message | text | YES | | NULL | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| uid | uid | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uid | [user](help/database/db_user) | uid | + Return to [database documentation](help/database) diff --git a/doc/database/db_conversation.md b/doc/database/db_conversation.md index 964a98d61..eba69c990 100644 --- a/doc/database/db_conversation.md +++ b/doc/database/db_conversation.md @@ -3,6 +3,9 @@ Table conversation Raw data and structure information for messages +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ----------------- | -------------------------------------------------------------------- | ---------------- | ---- | --- | ------------------- | ----- | | item-uri | Original URI of the item - unrelated to the table with the same name | varbinary(255) | NO | PRI | NULL | | @@ -14,4 +17,14 @@ Raw data and structure information for messages | source | Original source | mediumtext | YES | | NULL | | | received | Receiving date | datetime | NO | | 0001-01-01 00:00:00 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | item-uri | +| conversation-uri | conversation-uri | +| received | received | + + Return to [database documentation](help/database) diff --git a/doc/database/db_delayed-post.md b/doc/database/db_delayed-post.md index 0f1c2f5cf..16c31e46e 100644 --- a/doc/database/db_delayed-post.md +++ b/doc/database/db_delayed-post.md @@ -3,6 +3,9 @@ Table delayed-post Posts that are about to be distributed at a later time +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------- | ---------------------------------------------- | ------------------ | ---- | --- | ------- | -------------- | | id | | int unsigned | NO | PRI | NULL | auto_increment | @@ -10,4 +13,19 @@ Posts that are about to be distributed at a later time | uid | Owner User id | mediumint unsigned | YES | | NULL | | | delayed | delay time | datetime | YES | | NULL | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| uid_uri | UNIQUE, uid, uri(190) | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uid | [user](help/database/db_user) | uid | + Return to [database documentation](help/database) diff --git a/doc/database/db_diaspora-interaction.md b/doc/database/db_diaspora-interaction.md index 503c846fd..3a15a5d19 100644 --- a/doc/database/db_diaspora-interaction.md +++ b/doc/database/db_diaspora-interaction.md @@ -3,9 +3,26 @@ Table diaspora-interaction Signed Diaspora Interaction +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ----------- | --------------------------------------------------------- | ------------ | ---- | --- | ------- | ----- | | uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | | interaction | The Diaspora interaction | mediumtext | YES | | NULL | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | uri-id | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uri-id | [item-uri](help/database/db_item-uri) | id | + Return to [database documentation](help/database) diff --git a/doc/database/db_event.md b/doc/database/db_event.md index 72cec0012..6b893dafd 100644 --- a/doc/database/db_event.md +++ b/doc/database/db_event.md @@ -3,6 +3,9 @@ Table event Events +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | --------- | ------------------------------------------------------ | ------------------ | ---- | --- | ------------------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | @@ -26,4 +29,21 @@ Events | deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | | deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| uid_start | uid, start | +| cid | cid | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uid | [user](help/database/db_user) | uid | +| cid | [contact](help/database/db_contact) | id | + Return to [database documentation](help/database) diff --git a/doc/database/db_fcontact.md b/doc/database/db_fcontact.md index f20ca6cd0..a30bfb4ee 100644 --- a/doc/database/db_fcontact.md +++ b/doc/database/db_fcontact.md @@ -3,6 +3,9 @@ Table fcontact Diaspora compatible contacts - used in the Diaspora implementation +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | -------- | ------------- | ---------------- | ---- | --- | ------------------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | @@ -23,4 +26,14 @@ Diaspora compatible contacts - used in the Diaspora implementation | pubkey | | text | YES | | NULL | | | updated | | datetime | NO | | 0001-01-01 00:00:00 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| addr | addr(32) | +| url | UNIQUE, url(190) | + + Return to [database documentation](help/database) diff --git a/doc/database/db_fsuggest.md b/doc/database/db_fsuggest.md index d3a8e21ab..55c36e3c1 100644 --- a/doc/database/db_fsuggest.md +++ b/doc/database/db_fsuggest.md @@ -3,6 +3,9 @@ Table fsuggest friend suggestion stuff +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------- | ----------- | ------------------ | ---- | --- | ------------------- | -------------- | | id | | int unsigned | NO | PRI | NULL | auto_increment | @@ -15,4 +18,21 @@ friend suggestion stuff | note | | text | YES | | NULL | | | created | | datetime | NO | | 0001-01-01 00:00:00 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| cid | cid | +| uid | uid | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uid | [user](help/database/db_user) | uid | +| cid | [contact](help/database/db_contact) | id | + Return to [database documentation](help/database) diff --git a/doc/database/db_group.md b/doc/database/db_group.md index 7ea3a0d2f..48565aaee 100644 --- a/doc/database/db_group.md +++ b/doc/database/db_group.md @@ -3,6 +3,9 @@ Table group privacy groups, group info +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------- | ------------------------------------------ | ------------------ | ---- | --- | ------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | @@ -11,4 +14,19 @@ privacy groups, group info | deleted | 1 indicates the group has been deleted | boolean | NO | | 0 | | | name | human readable name of group | varchar(255) | NO | | | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| uid | uid | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uid | [user](help/database/db_user) | uid | + Return to [database documentation](help/database) diff --git a/doc/database/db_group_member.md b/doc/database/db_group_member.md index ba0960df4..adebe933b 100644 --- a/doc/database/db_group_member.md +++ b/doc/database/db_group_member.md @@ -3,10 +3,30 @@ Table group_member privacy groups, member info +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ---------- | --------------------------------------------------------- | ------------ | ---- | --- | ------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | | gid | groups.id of the associated group | int unsigned | NO | | 0 | | | contact-id | contact.id of the member assigned to the associated group | int unsigned | NO | | 0 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| contactid | contact-id | +| gid_contactid | UNIQUE, gid, contact-id | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| gid | [group](help/database/db_group) | id | +| contact-id | [contact](help/database/db_contact) | id | + Return to [database documentation](help/database) diff --git a/doc/database/db_gserver-tag.md b/doc/database/db_gserver-tag.md index dba65c45a..216bef1d5 100644 --- a/doc/database/db_gserver-tag.md +++ b/doc/database/db_gserver-tag.md @@ -3,9 +3,27 @@ Table gserver-tag Tags that the server has subscribed +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ---------- | ---------------------------------- | ------------ | ---- | --- | ------- | ----- | | gserver-id | The id of the gserver | int unsigned | NO | PRI | 0 | | | tag | Tag that the server has subscribed | varchar(100) | NO | PRI | | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | gserver-id, tag | +| tag | tag | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| gserver-id | [gserver](help/database/db_gserver) | id | + Return to [database documentation](help/database) diff --git a/doc/database/db_gserver.md b/doc/database/db_gserver.md index 341f71eff..5d5f2226b 100644 --- a/doc/database/db_gserver.md +++ b/doc/database/db_gserver.md @@ -3,6 +3,9 @@ Table gserver Global servers +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ---------------- | -------------------------------------------------- | ---------------- | ---- | --- | ------------------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | @@ -29,4 +32,15 @@ Global servers | failed | Connection failed | boolean | YES | | NULL | | | next_contact | Next connection request | datetime | YES | | 0001-01-01 00:00:00 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| nurl | UNIQUE, nurl(190) | +| next_contact | next_contact | +| network | network | + + Return to [database documentation](help/database) diff --git a/doc/database/db_hook.md b/doc/database/db_hook.md index c25f674cc..500e8f91d 100644 --- a/doc/database/db_hook.md +++ b/doc/database/db_hook.md @@ -3,6 +3,9 @@ Table hook addon hook registry +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | -------- | ---------------------------------------------------------------------------------------------------------- | ----------------- | ---- | --- | ------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | @@ -11,4 +14,14 @@ addon hook registry | function | function name of hook handler | varbinary(200) | NO | | | | | priority | not yet implemented - can be used to sort conflicts in hook handling by calling handlers in priority order | smallint unsigned | NO | | 0 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| priority | priority | +| hook_file_function | UNIQUE, hook, file, function | + + Return to [database documentation](help/database) diff --git a/doc/database/db_host.md b/doc/database/db_host.md index 97fda6fa6..802001e1b 100644 --- a/doc/database/db_host.md +++ b/doc/database/db_host.md @@ -3,9 +3,21 @@ Table host Hostname +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ----- | ------------- | ---------------- | ---- | --- | ------- | -------------- | | id | sequential ID | tinyint unsigned | NO | PRI | NULL | auto_increment | | name | The hostname | varchar(128) | NO | | | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| name | UNIQUE, name | + + Return to [database documentation](help/database) diff --git a/doc/database/db_inbox-status.md b/doc/database/db_inbox-status.md index fb6a40850..1f3463ad4 100644 --- a/doc/database/db_inbox-status.md +++ b/doc/database/db_inbox-status.md @@ -3,6 +3,9 @@ Table inbox-status Status of ActivityPub inboxes +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | -------- | ------------------------------------ | -------------- | ---- | --- | ------------------- | ----- | | url | URL of the inbox | varbinary(255) | NO | PRI | NULL | | @@ -13,4 +16,12 @@ Status of ActivityPub inboxes | archive | Is the inbox archived? | boolean | NO | | 0 | | | shared | Is it a shared inbox? | boolean | NO | | 0 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | url | + + Return to [database documentation](help/database) diff --git a/doc/database/db_intro.md b/doc/database/db_intro.md index 3e3731b55..ed4dd54b6 100644 --- a/doc/database/db_intro.md +++ b/doc/database/db_intro.md @@ -3,6 +3,9 @@ Table intro +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ---------- | ------------- | ------------------ | ---- | --- | ------------------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | @@ -17,4 +20,21 @@ Table intro | blocked | | boolean | NO | | 1 | | | ignore | | boolean | NO | | 0 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| contact-id | contact-id | +| uid | uid | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uid | [user](help/database/db_user) | uid | +| contact-id | [contact](help/database/db_contact) | id | + Return to [database documentation](help/database) diff --git a/doc/database/db_item-uri.md b/doc/database/db_item-uri.md index 4b3dda5ce..3ce86fca1 100644 --- a/doc/database/db_item-uri.md +++ b/doc/database/db_item-uri.md @@ -3,10 +3,23 @@ Table item-uri URI and GUID for items +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ----- | ------------------------------- | -------------- | ---- | --- | ------- | -------------- | | id | | int unsigned | NO | PRI | NULL | auto_increment | | uri | URI of an item | varbinary(255) | NO | | NULL | | | guid | A unique identifier for an item | varbinary(255) | YES | | NULL | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| uri | UNIQUE, uri | +| guid | guid | + + Return to [database documentation](help/database) diff --git a/doc/database/db_locks.md b/doc/database/db_locks.md index 337999017..92d3e6434 100644 --- a/doc/database/db_locks.md +++ b/doc/database/db_locks.md @@ -3,6 +3,9 @@ Table locks +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------- | ---------------------------- | ------------ | ---- | --- | ------------------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | @@ -11,4 +14,13 @@ Table locks | pid | Process ID | int unsigned | NO | | 0 | | | expires | datetime of cache expiration | datetime | NO | | 0001-01-01 00:00:00 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| name_expires | name, expires | + + Return to [database documentation](help/database) diff --git a/doc/database/db_mail.md b/doc/database/db_mail.md index dbdacb6d3..685dd2a0f 100644 --- a/doc/database/db_mail.md +++ b/doc/database/db_mail.md @@ -3,6 +3,9 @@ Table mail private messages +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------------- | -------------------------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | @@ -28,4 +31,31 @@ private messages | thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | YES | | NULL | | | created | creation time of the private message | datetime | NO | | 0001-01-01 00:00:00 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| uid_seen | uid, seen | +| convid | convid | +| uri | uri(64) | +| parent-uri | parent-uri(64) | +| contactid | contact-id(32) | +| author-id | author-id | +| uri-id | uri-id | +| parent-uri-id | parent-uri-id | +| thr-parent-id | thr-parent-id | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uid | [user](help/database/db_user) | uid | +| author-id | [contact](help/database/db_contact) | id | +| uri-id | [item-uri](help/database/db_item-uri) | id | +| parent-uri-id | [item-uri](help/database/db_item-uri) | id | +| thr-parent-id | [item-uri](help/database/db_item-uri) | id | + Return to [database documentation](help/database) diff --git a/doc/database/db_mailacct.md b/doc/database/db_mailacct.md index 8a1f38078..aaa0fa877 100644 --- a/doc/database/db_mailacct.md +++ b/doc/database/db_mailacct.md @@ -3,6 +3,9 @@ Table mailacct Mail account data for fetching mails +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------------ | ------------- | ------------------ | ---- | --- | ------------------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | @@ -19,4 +22,19 @@ Mail account data for fetching mails | pubmail | | boolean | NO | | 0 | | | last_check | | datetime | NO | | 0001-01-01 00:00:00 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| uid | uid | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uid | [user](help/database/db_user) | uid | + Return to [database documentation](help/database) diff --git a/doc/database/db_manage.md b/doc/database/db_manage.md index c2dadfca4..53e5a35bb 100644 --- a/doc/database/db_manage.md +++ b/doc/database/db_manage.md @@ -3,10 +3,30 @@ Table manage table of accounts that can manage each other +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ----- | ------------- | ------------------ | ---- | --- | ------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | | uid | User id | mediumint unsigned | NO | | 0 | | | mid | User id | mediumint unsigned | NO | | 0 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| uid_mid | UNIQUE, uid, mid | +| mid | mid | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uid | [user](help/database/db_user) | uid | +| mid | [user](help/database/db_user) | uid | + Return to [database documentation](help/database) diff --git a/doc/database/db_notification.md b/doc/database/db_notification.md index 0941ff1d3..4de2a53bf 100644 --- a/doc/database/db_notification.md +++ b/doc/database/db_notification.md @@ -3,6 +3,9 @@ Table notification notifications +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------------- | ------------------------------------------------------------------------------ | ------------------ | ---- | --- | ------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | @@ -15,4 +18,28 @@ notifications | created | | datetime | YES | | NULL | | | seen | | boolean | YES | | 0 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| uid_vid_type_actor-id_target-uri-id | UNIQUE, uid, vid, type, actor-id, target-uri-id | +| vid | vid | +| actor-id | actor-id | +| target-uri-id | target-uri-id | +| parent-uri-id | parent-uri-id | +| seen_uid | seen, uid | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uid | [user](help/database/db_user) | uid | +| vid | [verb](help/database/db_verb) | id | +| actor-id | [contact](help/database/db_contact) | id | +| target-uri-id | [item-uri](help/database/db_item-uri) | id | +| parent-uri-id | [item-uri](help/database/db_item-uri) | id | + Return to [database documentation](help/database) diff --git a/doc/database/db_notify-threads.md b/doc/database/db_notify-threads.md index 0dd493975..a58c45dab 100644 --- a/doc/database/db_notify-threads.md +++ b/doc/database/db_notify-threads.md @@ -3,6 +3,9 @@ Table notify-threads +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | -------------------- | --------------------------------------------- | ------------------ | ---- | --- | ------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | @@ -12,4 +15,23 @@ Table notify-threads | parent-item | | int unsigned | NO | | 0 | | | receiver-uid | User id | mediumint unsigned | NO | | 0 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| master-parent-uri-id | master-parent-uri-id | +| receiver-uid | receiver-uid | +| notify-id | notify-id | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| notify-id | [notify](help/database/db_notify) | id | +| master-parent-uri-id | [item-uri](help/database/db_item-uri) | id | +| receiver-uid | [user](help/database/db_user) | uid | + Return to [database documentation](help/database) diff --git a/doc/database/db_notify.md b/doc/database/db_notify.md index a9eac5a3c..338425ac9 100644 --- a/doc/database/db_notify.md +++ b/doc/database/db_notify.md @@ -3,6 +3,9 @@ Table notify notifications +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------------- | --------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | @@ -24,4 +27,25 @@ notifications | name_cache | Cached bbcode parsing of name | tinytext | YES | | NULL | | | msg_cache | Cached bbcode parsing of msg | mediumtext | YES | | NULL | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| seen_uid_date | seen, uid, date | +| uid_date | uid, date | +| uid_type_link | uid, type, link(190) | +| uri-id | uri-id | +| parent-uri-id | parent-uri-id | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uid | [user](help/database/db_user) | uid | +| uri-id | [item-uri](help/database/db_item-uri) | id | +| parent-uri-id | [item-uri](help/database/db_item-uri) | id | + Return to [database documentation](help/database) diff --git a/doc/database/db_oembed.md b/doc/database/db_oembed.md index 3edee64c6..86b23f70f 100644 --- a/doc/database/db_oembed.md +++ b/doc/database/db_oembed.md @@ -3,6 +3,9 @@ Table oembed cache for OEmbed queries +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | -------- | ------------------------------ | ------------------ | ---- | --- | ------------------- | ----- | | url | page url | varbinary(255) | NO | PRI | NULL | | @@ -10,4 +13,13 @@ cache for OEmbed queries | content | OEmbed data of the page | mediumtext | YES | | NULL | | | created | datetime of creation | datetime | NO | | 0001-01-01 00:00:00 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | url, maxwidth | +| created | created | + + Return to [database documentation](help/database) diff --git a/doc/database/db_openwebauth-token.md b/doc/database/db_openwebauth-token.md index 1c3060f0f..ad598087e 100644 --- a/doc/database/db_openwebauth-token.md +++ b/doc/database/db_openwebauth-token.md @@ -3,6 +3,9 @@ Table openwebauth-token Store OpenWebAuth token to verify contacts +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------- | -------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | @@ -12,4 +15,19 @@ Store OpenWebAuth token to verify contacts | meta | | varchar(255) | NO | | | | | created | datetime of creation | datetime | NO | | 0001-01-01 00:00:00 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| uid | uid | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uid | [user](help/database/db_user) | uid | + Return to [database documentation](help/database) diff --git a/doc/database/db_parsed_url.md b/doc/database/db_parsed_url.md index 29a3ff852..8101883a3 100644 --- a/doc/database/db_parsed_url.md +++ b/doc/database/db_parsed_url.md @@ -3,6 +3,9 @@ Table parsed_url cache for 'parse_url' queries +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | -------- | --------------------------------- | ---------- | ---- | --- | ------------------- | ----- | | url_hash | page url hash | binary(64) | NO | PRI | NULL | | @@ -13,4 +16,14 @@ cache for 'parse_url' queries | created | datetime of creation | datetime | NO | | 0001-01-01 00:00:00 | | | expires | datetime of expiration | datetime | NO | | 0001-01-01 00:00:00 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | url_hash, guessing, oembed | +| created | created | +| expires | expires | + + Return to [database documentation](help/database) diff --git a/doc/database/db_pconfig.md b/doc/database/db_pconfig.md index 7449c511d..2de6dd294 100644 --- a/doc/database/db_pconfig.md +++ b/doc/database/db_pconfig.md @@ -3,6 +3,9 @@ Table pconfig personal (per user) configuration storage +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ------------------ | ---- | --- | ------- | -------------- | | id | Primary key | int unsigned | NO | PRI | NULL | auto_increment | @@ -11,4 +14,19 @@ personal (per user) configuration storage | k | Key | varchar(100) | NO | | | | | v | Value | mediumtext | YES | | NULL | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| uid_cat_k | UNIQUE, uid, cat, k | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uid | [user](help/database/db_user) | uid | + Return to [database documentation](help/database) diff --git a/doc/database/db_permissionset.md b/doc/database/db_permissionset.md index 855ed1ea1..421c67abb 100644 --- a/doc/database/db_permissionset.md +++ b/doc/database/db_permissionset.md @@ -3,6 +3,9 @@ Table permissionset +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | --------- | ------------------------------------------------------ | ------------------ | ---- | --- | ------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | @@ -12,4 +15,19 @@ Table permissionset | deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | | deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| uid_allow_cid_allow_gid_deny_cid_deny_gid | uid, allow_cid(50), allow_gid(30), deny_cid(50), deny_gid(30) | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uid | [user](help/database/db_user) | uid | + Return to [database documentation](help/database) diff --git a/doc/database/db_photo.md b/doc/database/db_photo.md index 168797a1f..5f98e4e34 100644 --- a/doc/database/db_photo.md +++ b/doc/database/db_photo.md @@ -3,6 +3,9 @@ Table photo photo storage +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------------- | ------------------------------------------------------ | ------------------ | ---- | --- | ------------------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | @@ -33,4 +36,25 @@ photo storage | backend-ref | Storage backend data reference | text | YES | | NULL | | | updated | | datetime | NO | | 0001-01-01 00:00:00 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| contactid | contact-id | +| uid_contactid | uid, contact-id | +| uid_profile | uid, profile | +| uid_album_scale_created | uid, album(32), scale, created | +| uid_album_resource-id_created | uid, album(32), resource-id, created | +| resource-id | resource-id | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uid | [user](help/database/db_user) | uid | +| contact-id | [contact](help/database/db_contact) | id | + Return to [database documentation](help/database) diff --git a/doc/database/db_post-category.md b/doc/database/db_post-category.md index 14663cf5b..77e9ed679 100644 --- a/doc/database/db_post-category.md +++ b/doc/database/db_post-category.md @@ -3,6 +3,9 @@ Table post-category post relation to categories +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------ | --------------------------------------------------------- | ------------------ | ---- | --- | ------- | ----- | | uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | @@ -10,4 +13,22 @@ post relation to categories | type | | tinyint unsigned | NO | PRI | 0 | | | tid | | int unsigned | NO | PRI | 0 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | uri-id, uid, type, tid | +| uri-id | tid | +| uid | uid | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uri-id | [item-uri](help/database/db_item-uri) | id | +| uid | [user](help/database/db_user) | uid | +| tid | [tag](help/database/db_tag) | id | + Return to [database documentation](help/database) diff --git a/doc/database/db_post-content.md b/doc/database/db_post-content.md index 4596a04a5..5b8b258ec 100644 --- a/doc/database/db_post-content.md +++ b/doc/database/db_post-content.md @@ -3,6 +3,9 @@ Table post-content Content for all posts +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | --------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------ | ---- | --- | ------- | ----- | | uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | @@ -23,4 +26,21 @@ Content for all posts | 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(32) | NO | | | | | plink | permalink or URL to a displayable copy of the message at its source | varchar(255) | NO | | | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | uri-id | +| plink | plink(191) | +| resource-id | resource-id | +| title-content-warning-body | FULLTEXT, title, content-warning, body | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uri-id | [item-uri](help/database/db_item-uri) | id | + Return to [database documentation](help/database) diff --git a/doc/database/db_post-delivery-data.md b/doc/database/db_post-delivery-data.md index 1ed912d8b..61f8b75de 100644 --- a/doc/database/db_post-delivery-data.md +++ b/doc/database/db_post-delivery-data.md @@ -3,6 +3,9 @@ Table post-delivery-data Delivery data for items +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ---- | --- | ------- | ----- | | uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | @@ -17,4 +20,18 @@ Delivery data for items | diaspora | Number of successful deliveries via Diaspora | mediumint | NO | | 0 | | | ostatus | Number of successful deliveries via OStatus | mediumint | NO | | 0 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | uri-id | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uri-id | [item-uri](help/database/db_item-uri) | id | + Return to [database documentation](help/database) diff --git a/doc/database/db_post-media.md b/doc/database/db_post-media.md index e1e299f02..ef599ed13 100644 --- a/doc/database/db_post-media.md +++ b/doc/database/db_post-media.md @@ -3,6 +3,9 @@ Table post-media Attached media +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | --------------- | --------------------------------------------------------- | ----------------- | ---- | --- | ------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | @@ -25,4 +28,19 @@ Attached media | publisher-name | Name of the publisher of the media | varchar(255) | YES | | NULL | | | publisher-image | Image of the publisher of the media | varbinary(255) | YES | | NULL | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| uri-id-url | UNIQUE, uri-id, url | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uri-id | [item-uri](help/database/db_item-uri) | id | + Return to [database documentation](help/database) diff --git a/doc/database/db_post-tag.md b/doc/database/db_post-tag.md index 228f27708..30e513cab 100644 --- a/doc/database/db_post-tag.md +++ b/doc/database/db_post-tag.md @@ -3,6 +3,9 @@ Table post-tag post relation to tags +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------ | --------------------------------------------------------- | ---------------- | ---- | --- | ------- | ----- | | uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | @@ -10,4 +13,22 @@ post relation to tags | tid | | int unsigned | NO | PRI | 0 | | | cid | Contact id of the mentioned public contact | int unsigned | NO | PRI | 0 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | uri-id, type, tid, cid | +| tid | tid | +| cid | cid | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uri-id | [item-uri](help/database/db_item-uri) | id | +| tid | [tag](help/database/db_tag) | id | +| cid | [contact](help/database/db_contact) | id | + Return to [database documentation](help/database) diff --git a/doc/database/db_post-thread-user.md b/doc/database/db_post-thread-user.md index 29e5617d3..875aee4aa 100644 --- a/doc/database/db_post-thread-user.md +++ b/doc/database/db_post-thread-user.md @@ -3,6 +3,9 @@ Table post-thread-user Thread related data per user +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------------ | ------------------------------------------------------------------------------------------------------- | ------------------ | ---- | --- | ------------------- | ----- | | uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | @@ -29,4 +32,39 @@ Thread related data per user | psid | ID of the permission set of this post | int unsigned | YES | | NULL | | | post-user-id | Id of the post-user table | int unsigned | YES | | NULL | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | uid, uri-id | +| uri-id | uri-id | +| owner-id | owner-id | +| author-id | author-id | +| causer-id | causer-id | +| uid | uid | +| contact-id | contact-id | +| psid | psid | +| post-user-id | post-user-id | +| commented | commented | +| uid_received | uid, received | +| uid_pinned | uid, pinned | +| uid_commented | uid, commented | +| uid_starred | uid, starred | +| uid_mention | uid, mention | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uri-id | [item-uri](help/database/db_item-uri) | id | +| owner-id | [contact](help/database/db_contact) | id | +| author-id | [contact](help/database/db_contact) | id | +| causer-id | [contact](help/database/db_contact) | id | +| uid | [user](help/database/db_user) | uid | +| contact-id | [contact](help/database/db_contact) | id | +| psid | [permissionset](help/database/db_permissionset) | id | +| post-user-id | [post-user](help/database/db_post-user) | id | + Return to [database documentation](help/database) diff --git a/doc/database/db_post-thread.md b/doc/database/db_post-thread.md index 8b847e628..f5a851650 100644 --- a/doc/database/db_post-thread.md +++ b/doc/database/db_post-thread.md @@ -3,6 +3,9 @@ Table post-thread Thread related data +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | --------- | ------------------------------------------------------------------------------------------------------- | ------------ | ---- | --- | ------------------- | ----- | | uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | @@ -15,4 +18,26 @@ Thread related data | changed | Date that something in the conversation changed, indicating clients should fetch the conversation again | datetime | NO | | 0001-01-01 00:00:00 | | | commented | | datetime | NO | | 0001-01-01 00:00:00 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | uri-id | +| owner-id | owner-id | +| author-id | author-id | +| causer-id | causer-id | +| received | received | +| commented | commented | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uri-id | [item-uri](help/database/db_item-uri) | id | +| owner-id | [contact](help/database/db_contact) | id | +| author-id | [contact](help/database/db_contact) | id | +| causer-id | [contact](help/database/db_contact) | id | + Return to [database documentation](help/database) diff --git a/doc/database/db_post-user-notification.md b/doc/database/db_post-user-notification.md index 1607ce2c2..0ebe8ccaf 100644 --- a/doc/database/db_post-user-notification.md +++ b/doc/database/db_post-user-notification.md @@ -3,10 +3,29 @@ Table post-user-notification User post notifications +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ----------------- | --------------------------------------------------------- | ------------------ | ---- | --- | ------- | ----- | | uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | | uid | Owner id which owns this copy of the item | mediumint unsigned | NO | PRI | NULL | | | notification-type | | tinyint unsigned | NO | | 0 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | uid, uri-id | +| uri-id | uri-id | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uri-id | [item-uri](help/database/db_item-uri) | id | +| uid | [user](help/database/db_user) | uid | + Return to [database documentation](help/database) diff --git a/doc/database/db_post-user.md b/doc/database/db_post-user.md index 8fad8056e..6d2f0c71b 100644 --- a/doc/database/db_post-user.md +++ b/doc/database/db_post-user.md @@ -3,6 +3,9 @@ Table post-user User specific post data +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ----------------- | --------------------------------------------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | | id | | int unsigned | NO | PRI | NULL | auto_increment | @@ -36,4 +39,48 @@ User specific post data | origin | item originated at this site | boolean | NO | | 0 | | | psid | ID of the permission set of this post | int unsigned | YES | | NULL | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| uid_uri-id | UNIQUE, uid, uri-id | +| uri-id | uri-id | +| parent-uri-id | parent-uri-id | +| thr-parent-id | thr-parent-id | +| external-id | external-id | +| owner-id | owner-id | +| author-id | author-id | +| causer-id | causer-id | +| vid | vid | +| contact-id | contact-id | +| event-id | event-id | +| psid | psid | +| author-id_uid | author-id, uid | +| author-id_received | author-id, received | +| parent-uri-id_uid | parent-uri-id, uid | +| uid_contactid | uid, contact-id | +| uid_unseen_contactid | uid, unseen, contact-id | +| uid_unseen | uid, unseen | +| uid_hidden_uri-id | uid, hidden, uri-id | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uri-id | [item-uri](help/database/db_item-uri) | id | +| parent-uri-id | [item-uri](help/database/db_item-uri) | id | +| thr-parent-id | [item-uri](help/database/db_item-uri) | id | +| external-id | [item-uri](help/database/db_item-uri) | id | +| owner-id | [contact](help/database/db_contact) | id | +| author-id | [contact](help/database/db_contact) | id | +| causer-id | [contact](help/database/db_contact) | id | +| vid | [verb](help/database/db_verb) | id | +| uid | [user](help/database/db_user) | uid | +| contact-id | [contact](help/database/db_contact) | id | +| event-id | [event](help/database/db_event) | id | +| psid | [permissionset](help/database/db_permissionset) | id | + Return to [database documentation](help/database) diff --git a/doc/database/db_post.md b/doc/database/db_post.md index afde2ef87..7d5d7cc56 100644 --- a/doc/database/db_post.md +++ b/doc/database/db_post.md @@ -3,6 +3,9 @@ Table post Structure for all posts +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------------- | --------------------------------------------------------------------------------- | ----------------- | ---- | --- | ------------------- | ----- | | uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | @@ -24,4 +27,32 @@ Structure for all posts | visible | | boolean | NO | | 0 | | | deleted | item has been marked for deletion | boolean | NO | | 0 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | uri-id | +| parent-uri-id | parent-uri-id | +| thr-parent-id | thr-parent-id | +| external-id | external-id | +| owner-id | owner-id | +| author-id | author-id | +| causer-id | causer-id | +| vid | vid | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uri-id | [item-uri](help/database/db_item-uri) | id | +| parent-uri-id | [item-uri](help/database/db_item-uri) | id | +| thr-parent-id | [item-uri](help/database/db_item-uri) | id | +| external-id | [item-uri](help/database/db_item-uri) | id | +| owner-id | [contact](help/database/db_contact) | id | +| author-id | [contact](help/database/db_contact) | id | +| causer-id | [contact](help/database/db_contact) | id | +| vid | [verb](help/database/db_verb) | id | + Return to [database documentation](help/database) diff --git a/doc/database/db_process.md b/doc/database/db_process.md index 648019e83..aca53c70a 100644 --- a/doc/database/db_process.md +++ b/doc/database/db_process.md @@ -3,10 +3,22 @@ Table process Currently running system processes +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------- | ----------- | ------------- | ---- | --- | ------------------- | ----- | | pid | | int unsigned | NO | PRI | NULL | | | command | | varbinary(32) | NO | | | | | created | | datetime | NO | | 0001-01-01 00:00:00 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | pid | +| command | command | + + Return to [database documentation](help/database) diff --git a/doc/database/db_profile.md b/doc/database/db_profile.md index be97c5d4a..79de8ade5 100644 --- a/doc/database/db_profile.md +++ b/doc/database/db_profile.md @@ -3,6 +3,9 @@ Table profile user profiles data +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------------ | --------------------------------------------- | ------------------ | ---- | --- | ---------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | @@ -48,4 +51,20 @@ user profiles data | publish | publish default profile in local directory | boolean | NO | | 0 | | | net-publish | publish profile in global directory | boolean | NO | | 0 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| uid_is-default | uid, is-default | +| pub_keywords | FULLTEXT, pub_keywords | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uid | [user](help/database/db_user) | uid | + Return to [database documentation](help/database) diff --git a/doc/database/db_profile_check.md b/doc/database/db_profile_check.md index 77f4bb618..1c7bc8147 100644 --- a/doc/database/db_profile_check.md +++ b/doc/database/db_profile_check.md @@ -3,6 +3,9 @@ Table profile_check DFRN remote auth use +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------- | ------------- | ------------------ | ---- | --- | ------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | @@ -12,4 +15,21 @@ DFRN remote auth use | sec | | varchar(255) | NO | | | | | expire | | int unsigned | NO | | 0 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| uid | uid | +| cid | cid | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uid | [user](help/database/db_user) | uid | +| cid | [contact](help/database/db_contact) | id | + Return to [database documentation](help/database) diff --git a/doc/database/db_profile_field.md b/doc/database/db_profile_field.md index 7bf2e9dcd..e920bcd1a 100644 --- a/doc/database/db_profile_field.md +++ b/doc/database/db_profile_field.md @@ -3,6 +3,9 @@ Table profile_field Custom profile fields +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------- | ----------------------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | @@ -14,4 +17,22 @@ Custom profile fields | created | creation time | datetime | NO | | 0001-01-01 00:00:00 | | | edited | last edit time | datetime | NO | | 0001-01-01 00:00:00 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| uid | uid | +| order | order | +| psid | psid | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uid | [user](help/database/db_user) | uid | +| psid | [permissionset](help/database/db_permissionset) | id | + Return to [database documentation](help/database) diff --git a/doc/database/db_push_subscriber.md b/doc/database/db_push_subscriber.md index fde15de14..9c5094b6f 100644 --- a/doc/database/db_push_subscriber.md +++ b/doc/database/db_push_subscriber.md @@ -3,6 +3,9 @@ Table push_subscriber Used for OStatus: Contains feed subscribers +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------------ | --------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | @@ -16,4 +19,20 @@ Used for OStatus: Contains feed subscribers | renewed | Date of last subscription renewal | datetime | NO | | 0001-01-01 00:00:00 | | | secret | | varchar(255) | NO | | | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| next_try | next_try | +| uid | uid | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uid | [user](help/database/db_user) | uid | + Return to [database documentation](help/database) diff --git a/doc/database/db_register.md b/doc/database/db_register.md index fac22811d..856128a42 100644 --- a/doc/database/db_register.md +++ b/doc/database/db_register.md @@ -3,6 +3,9 @@ Table register registrations requiring admin approval +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | -------- | ------------- | ------------------ | ---- | --- | ------------------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | @@ -13,4 +16,19 @@ registrations requiring admin approval | language | | varchar(16) | NO | | | | | note | | text | YES | | NULL | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| uid | uid | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uid | [user](help/database/db_user) | uid | + Return to [database documentation](help/database) diff --git a/doc/database/db_search.md b/doc/database/db_search.md index dc20ac42a..2b7684b0b 100644 --- a/doc/database/db_search.md +++ b/doc/database/db_search.md @@ -3,10 +3,29 @@ Table search +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ----- | ------------- | ------------------ | ---- | --- | ------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | | uid | User id | mediumint unsigned | NO | | 0 | | | term | | varchar(255) | NO | | | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| uid_term | uid, term(64) | +| term | term(64) | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uid | [user](help/database/db_user) | uid | + Return to [database documentation](help/database) diff --git a/doc/database/db_session.md b/doc/database/db_session.md index d01b57364..72810e7e9 100644 --- a/doc/database/db_session.md +++ b/doc/database/db_session.md @@ -3,6 +3,9 @@ Table session web session storage +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------ | ------------- | --------------- | ---- | --- | ------- | -------------- | | id | sequential ID | bigint unsigned | NO | PRI | NULL | auto_increment | @@ -10,4 +13,14 @@ web session storage | data | | text | YES | | NULL | | | expire | | int unsigned | NO | | 0 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| sid | sid(64) | +| expire | expire | + + Return to [database documentation](help/database) diff --git a/doc/database/db_storage.md b/doc/database/db_storage.md index 21596ba65..4278fbfd3 100644 --- a/doc/database/db_storage.md +++ b/doc/database/db_storage.md @@ -3,9 +3,20 @@ Table storage Data stored by Database storage backend +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ----- | ------------------------------ | ------------ | ---- | --- | ------- | -------------- | | id | Auto incremented image data id | int unsigned | NO | PRI | NULL | auto_increment | | data | file data | longblob | NO | | NULL | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | + + Return to [database documentation](help/database) diff --git a/doc/database/db_tag.md b/doc/database/db_tag.md index f52478c85..071eb7928 100644 --- a/doc/database/db_tag.md +++ b/doc/database/db_tag.md @@ -3,10 +3,23 @@ Table tag tags and mentions +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | -------------- | ---- | --- | ------- | -------------- | | id | | int unsigned | NO | PRI | NULL | auto_increment | | name | | varchar(96) | NO | | | | | url | | varbinary(255) | NO | | | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| type_name_url | UNIQUE, name, url | +| url | url | + + Return to [database documentation](help/database) diff --git a/doc/database/db_tokens.md b/doc/database/db_tokens.md index bf20f16b8..116910054 100644 --- a/doc/database/db_tokens.md +++ b/doc/database/db_tokens.md @@ -3,6 +3,9 @@ Table tokens OAuth usage +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | --------- | ----------- | ------------------ | ---- | --- | ------- | ----- | | id | | varchar(40) | NO | PRI | NULL | | @@ -12,4 +15,21 @@ OAuth usage | scope | | varchar(200) | NO | | | | | uid | User id | mediumint unsigned | NO | | 0 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| client_id | client_id | +| uid | uid | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| client_id | [clients](help/database/db_clients) | client_id | +| uid | [user](help/database/db_user) | uid | + Return to [database documentation](help/database) diff --git a/doc/database/db_user-contact.md b/doc/database/db_user-contact.md index 9bcbff7d3..8c8f12f75 100644 --- a/doc/database/db_user-contact.md +++ b/doc/database/db_user-contact.md @@ -3,6 +3,9 @@ Table user-contact User specific public contact data +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | --------- | ------------------------------------------- | ------------------ | ---- | --- | ------- | ----- | | cid | Contact id of the linked public contact | int unsigned | NO | PRI | 0 | | @@ -11,4 +14,20 @@ User specific public contact data | ignored | Posts from this contact are ignored | boolean | YES | | NULL | | | collapsed | Posts from this contact are collapsed | boolean | YES | | NULL | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | uid, cid | +| cid | cid | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| cid | [contact](help/database/db_contact) | id | +| uid | [user](help/database/db_user) | uid | + Return to [database documentation](help/database) diff --git a/doc/database/db_user.md b/doc/database/db_user.md index 8cc762cc2..8104e0f0f 100644 --- a/doc/database/db_user.md +++ b/doc/database/db_user.md @@ -3,6 +3,9 @@ Table user The local users +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ------------------------ | --------------------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | | uid | sequential ID | mediumint unsigned | NO | PRI | NULL | auto_increment | @@ -51,4 +54,22 @@ The local users | deny_gid | default permission for this user | mediumtext | YES | | NULL | | | openidserver | | text | YES | | NULL | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | uid | +| nickname | nickname(32) | +| parent-uid | parent-uid | +| guid | guid | +| email | email(64) | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| parent-uid | [user](help/database/db_user) | uid | + Return to [database documentation](help/database) diff --git a/doc/database/db_userd.md b/doc/database/db_userd.md index eaef34874..cca71a272 100644 --- a/doc/database/db_userd.md +++ b/doc/database/db_userd.md @@ -3,9 +3,21 @@ Table userd Deleted usernames +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | -------- | ------------- | ------------ | ---- | --- | ------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | | username | | varchar(255) | NO | | NULL | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| username | username(32) | + + Return to [database documentation](help/database) diff --git a/doc/database/db_verb.md b/doc/database/db_verb.md index cd5d66f83..6613225f9 100644 --- a/doc/database/db_verb.md +++ b/doc/database/db_verb.md @@ -3,9 +3,21 @@ Table verb Activity Verbs +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ----- | ----------- | ----------------- | ---- | --- | ------- | -------------- | | id | | smallint unsigned | NO | PRI | NULL | auto_increment | | name | | varchar(100) | NO | | | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| name | name | + + Return to [database documentation](help/database) diff --git a/doc/database/db_worker-ipc.md b/doc/database/db_worker-ipc.md index 57ec48935..ac34d4649 100644 --- a/doc/database/db_worker-ipc.md +++ b/doc/database/db_worker-ipc.md @@ -3,9 +3,20 @@ Table worker-ipc Inter process communication between the frontend and the worker +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | ----- | ------------------------- | ------- | ---- | --- | ------- | ----- | | key | | int | NO | PRI | NULL | | | jobs | Flag for outstanding jobs | boolean | YES | | NULL | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | key | + + Return to [database documentation](help/database) diff --git a/doc/database/db_workerqueue.md b/doc/database/db_workerqueue.md index 16b6a2e0d..7510b7a76 100644 --- a/doc/database/db_workerqueue.md +++ b/doc/database/db_workerqueue.md @@ -3,6 +3,9 @@ Table workerqueue Background tasks queue entries +Fields +------ + | Field | Description | Type | Null | Key | Default | Extra | | --------- | ------------------------------------------------------- | ---------------- | ---- | --- | ------------------- | -------------- | | id | Auto incremented worker task id | int unsigned | NO | PRI | NULL | auto_increment | @@ -16,4 +19,20 @@ Background tasks queue entries | retrial | Retrial counter | tinyint | NO | | 0 | | | done | Marked 1 when the task was done - will be deleted later | boolean | NO | | 0 | | +Indexes +------------ + +| Name | Fields | +|------|---------| +| PRIMARY | id | +| command | command | +| done_command_parameter | done, command, parameter(64) | +| done_executed | done, executed | +| done_priority_retrial_created | done, priority, retrial, created | +| done_priority_next_try | done, priority, next_try | +| done_pid_next_try | done, pid, next_try | +| done_pid_retrial | done, pid, retrial | +| done_pid_priority_created | done, pid, priority, created | + + Return to [database documentation](help/database) diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index 4451b09ab..864f2ded3 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -166,6 +166,12 @@ class DBStructure $tables = []; foreach (self::definition(null) as $name => $definition) { + $indexes = []; + foreach ($definition['indexes'] as $key => $value) { + $indexes[] = ['name' => $key, 'fields' => implode(', ', $value)]; + } + + $foreign = []; $fields = [[ 'name' => 'Field', 'comment' => 'Description', @@ -174,7 +180,7 @@ class DBStructure 'primary' => 'Key', 'default' => 'Default', 'extra' => 'Extra', - ], + ], [ 'name' => '-', 'comment' => '-', @@ -202,33 +208,43 @@ class DBStructure $field['primary'] = ($value['primary'] ?? false) ? 'PRI' : ''; $field['default'] = $value['default'] ?? 'NULL'; $field['extra'] = $value['extra'] ?? ''; - + foreach ($field as $fieldname => $fieldvalue) { $lengths[$fieldname] = max($lengths[$fieldname] ?? 0, strlen($fieldvalue)); } $fields[] = $field; + + if (!empty($value['foreign'])) { + $foreign[] = [ + 'field' => $key, + 'targettable' => array_keys($value['foreign'])[0], + 'targetfield' => array_values($value['foreign'])[0] + ]; + } } array_walk_recursive($fields, function(&$value, $key) use ($lengths) { $value = str_pad($value, $lengths[$key], $value === '-' ? '-' : ' '); }); - + $tables[] = ['name' => $name, 'comment' => $definition['comment']]; $content = Renderer::replaceMacros(Renderer::getMarkupTemplate('structure.tpl'), [ '$name' => $name, '$comment' => $definition['comment'], '$fields' => $fields, + '$indexes' => $indexes, + '$foreign' => $foreign, ]); $filename = DI::basePath() . '/doc/database/db_' . $name . '.md'; file_put_contents($filename, $content); } asort($tables); $content = Renderer::replaceMacros(Renderer::getMarkupTemplate('tables.tpl'), [ - '$tables' => $tables, + '$tables' => $tables, ]); $filename = DI::basePath() . '/doc/database.md'; - file_put_contents($filename, $content); + file_put_contents($filename, $content); } public static function printStructure($basePath) @@ -1278,7 +1294,7 @@ class DBStructure if ($verbose) { echo "Zero contact added\n"; } - } + } } elseif (self::existsTable('contact') && $verbose) { echo "Zero contact already added\n"; } elseif ($verbose) { @@ -1302,7 +1318,7 @@ class DBStructure if (self::existsTable('permissionset')) { if (!DBA::exists('permissionset', ['id' => 0])) { - DBA::insert('permissionset', ['allow_cid' => '', 'allow_gid' => '', 'deny_cid' => '', 'deny_gid' => '']); + DBA::insert('permissionset', ['allow_cid' => '', 'allow_gid' => '', 'deny_cid' => '', 'deny_gid' => '']); $lastid = DBA::lastInsertId(); if ($lastid != 0) { DBA::update('permissionset', ['id' => 0], ['id' => $lastid]); @@ -1337,7 +1353,7 @@ class DBStructure } elseif ($verbose) { echo "permissionset: Table not found\n"; } - + if (!self::existsForeignKeyForField('tokens', 'client_id')) { $tokens = DBA::p("SELECT `tokens`.`id` FROM `tokens` LEFT JOIN `clients` ON `clients`.`client_id` = `tokens`.`client_id` diff --git a/view/templates/structure.tpl b/view/templates/structure.tpl index 3ec9ba9b2..14704973a 100644 --- a/view/templates/structure.tpl +++ b/view/templates/structure.tpl @@ -3,8 +3,31 @@ Table {{$name}} {{$comment}} +Fields +------ + {{foreach $fields as $field}} | {{$field.name}} | {{$field.comment}} | {{$field.type}} | {{$field.null}} | {{$field.primary}} | {{$field.default}} | {{$field.extra}} | {{/foreach}} +Indexes +------------ + +| Name | Fields | +|------|---------| +{{foreach $indexes as $index}} +| {{$index.name}} | {{$index.fields}} | +{{/foreach}} + +{{if $foreign}} +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +{{foreach $foreign as $key}} +| {{$key.field}} | [{{$key.targettable}}](help/database/db_{{$key.targettable}}) | {{$key.targetfield}} | +{{/foreach}} +{{/if}} + Return to [database documentation](help/database) From a29c21224d2b831875b265573e2647aa9b288de8 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 14 Jun 2021 08:54:31 +0000 Subject: [PATCH 09/12] Dash removed --- view/templates/structure.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/templates/structure.tpl b/view/templates/structure.tpl index 14704973a..77ee1e85a 100644 --- a/view/templates/structure.tpl +++ b/view/templates/structure.tpl @@ -14,7 +14,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| {{foreach $indexes as $index}} | {{$index.name}} | {{$index.fields}} | {{/foreach}} From 3d74d0a49c07162f6745e9576139a4823bb2af9d Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 14 Jun 2021 08:54:57 +0000 Subject: [PATCH 10/12] Updated documentation --- doc/database/db_2fa_app_specific_password.md | 2 +- doc/database/db_2fa_recovery_codes.md | 2 +- doc/database/db_2fa_trusted_browser.md | 2 +- doc/database/db_addon.md | 2 +- doc/database/db_apcontact.md | 2 +- doc/database/db_application-token.md | 2 +- doc/database/db_application.md | 2 +- doc/database/db_attach.md | 2 +- doc/database/db_auth_codes.md | 2 +- doc/database/db_cache.md | 2 +- doc/database/db_challenge.md | 2 +- doc/database/db_clients.md | 2 +- doc/database/db_config.md | 2 +- doc/database/db_contact-relation.md | 2 +- doc/database/db_contact.md | 2 +- doc/database/db_conv.md | 2 +- doc/database/db_conversation.md | 2 +- doc/database/db_delayed-post.md | 2 +- doc/database/db_diaspora-interaction.md | 2 +- doc/database/db_event.md | 2 +- doc/database/db_fcontact.md | 2 +- doc/database/db_fsuggest.md | 2 +- doc/database/db_group.md | 2 +- doc/database/db_group_member.md | 2 +- doc/database/db_gserver-tag.md | 2 +- doc/database/db_gserver.md | 2 +- doc/database/db_hook.md | 2 +- doc/database/db_host.md | 2 +- doc/database/db_inbox-status.md | 2 +- doc/database/db_intro.md | 2 +- doc/database/db_item-uri.md | 2 +- doc/database/db_locks.md | 2 +- doc/database/db_mail.md | 2 +- doc/database/db_mailacct.md | 2 +- doc/database/db_manage.md | 2 +- doc/database/db_notification.md | 2 +- doc/database/db_notify-threads.md | 2 +- doc/database/db_notify.md | 2 +- doc/database/db_oembed.md | 2 +- doc/database/db_openwebauth-token.md | 2 +- doc/database/db_parsed_url.md | 2 +- doc/database/db_pconfig.md | 2 +- doc/database/db_permissionset.md | 2 +- doc/database/db_photo.md | 2 +- doc/database/db_post-category.md | 2 +- doc/database/db_post-content.md | 2 +- doc/database/db_post-delivery-data.md | 2 +- doc/database/db_post-media.md | 2 +- doc/database/db_post-tag.md | 2 +- doc/database/db_post-thread-user.md | 2 +- doc/database/db_post-thread.md | 2 +- doc/database/db_post-user-notification.md | 2 +- doc/database/db_post-user.md | 2 +- doc/database/db_post.md | 2 +- doc/database/db_process.md | 2 +- doc/database/db_profile.md | 2 +- doc/database/db_profile_check.md | 2 +- doc/database/db_profile_field.md | 2 +- doc/database/db_push_subscriber.md | 2 +- doc/database/db_register.md | 2 +- doc/database/db_search.md | 2 +- doc/database/db_session.md | 2 +- doc/database/db_storage.md | 2 +- doc/database/db_tag.md | 2 +- doc/database/db_tokens.md | 2 +- doc/database/db_user-contact.md | 2 +- doc/database/db_user.md | 2 +- doc/database/db_userd.md | 2 +- doc/database/db_verb.md | 2 +- doc/database/db_worker-ipc.md | 2 +- doc/database/db_workerqueue.md | 2 +- 71 files changed, 71 insertions(+), 71 deletions(-) diff --git a/doc/database/db_2fa_app_specific_password.md b/doc/database/db_2fa_app_specific_password.md index dd9773503..9d9c7ca45 100644 --- a/doc/database/db_2fa_app_specific_password.md +++ b/doc/database/db_2fa_app_specific_password.md @@ -19,7 +19,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | uid_description | uid, description(190) | diff --git a/doc/database/db_2fa_recovery_codes.md b/doc/database/db_2fa_recovery_codes.md index 53574c754..e7c1940d8 100644 --- a/doc/database/db_2fa_recovery_codes.md +++ b/doc/database/db_2fa_recovery_codes.md @@ -17,7 +17,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | uid, code | Foreign Keys diff --git a/doc/database/db_2fa_trusted_browser.md b/doc/database/db_2fa_trusted_browser.md index 595d0ef5c..9e12dabc7 100644 --- a/doc/database/db_2fa_trusted_browser.md +++ b/doc/database/db_2fa_trusted_browser.md @@ -18,7 +18,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | cookie_hash | | uid | uid | diff --git a/doc/database/db_addon.md b/doc/database/db_addon.md index 6644ebaa2..21fae66f3 100644 --- a/doc/database/db_addon.md +++ b/doc/database/db_addon.md @@ -20,7 +20,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | installed_name | installed, name | | name | UNIQUE, name | diff --git a/doc/database/db_apcontact.md b/doc/database/db_apcontact.md index a7ea4e9d4..cb2f8327a 100644 --- a/doc/database/db_apcontact.md +++ b/doc/database/db_apcontact.md @@ -37,7 +37,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | url | | addr | addr(32) | | alias | alias(190) | diff --git a/doc/database/db_application-token.md b/doc/database/db_application-token.md index 19230b10b..15f85f06e 100644 --- a/doc/database/db_application-token.md +++ b/doc/database/db_application-token.md @@ -23,7 +23,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | application-id, uid | | uid_id | uid, application-id | diff --git a/doc/database/db_application.md b/doc/database/db_application.md index e1743f28c..2099b3374 100644 --- a/doc/database/db_application.md +++ b/doc/database/db_application.md @@ -24,7 +24,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | client_id | UNIQUE, client_id | diff --git a/doc/database/db_attach.md b/doc/database/db_attach.md index 218ce8b1d..baef7c89d 100644 --- a/doc/database/db_attach.md +++ b/doc/database/db_attach.md @@ -28,7 +28,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | uid | uid | diff --git a/doc/database/db_auth_codes.md b/doc/database/db_auth_codes.md index 9ebd15cbd..df53a5b28 100644 --- a/doc/database/db_auth_codes.md +++ b/doc/database/db_auth_codes.md @@ -18,7 +18,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | client_id | client_id | diff --git a/doc/database/db_cache.md b/doc/database/db_cache.md index 2428a6f51..770b4ab44 100644 --- a/doc/database/db_cache.md +++ b/doc/database/db_cache.md @@ -17,7 +17,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | k | | k_expires | k, expires | diff --git a/doc/database/db_challenge.md b/doc/database/db_challenge.md index bfd54c45d..a9f17bc63 100644 --- a/doc/database/db_challenge.md +++ b/doc/database/db_challenge.md @@ -19,7 +19,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | expire | expire | diff --git a/doc/database/db_clients.md b/doc/database/db_clients.md index 00e5ef6c3..29f9fe52f 100644 --- a/doc/database/db_clients.md +++ b/doc/database/db_clients.md @@ -19,7 +19,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | client_id | | uid | uid | diff --git a/doc/database/db_config.md b/doc/database/db_config.md index 17c3cfee2..32396dc74 100644 --- a/doc/database/db_config.md +++ b/doc/database/db_config.md @@ -17,7 +17,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | cat_k | UNIQUE, cat, k | diff --git a/doc/database/db_contact-relation.md b/doc/database/db_contact-relation.md index c8dc95a3b..d9f74a40a 100644 --- a/doc/database/db_contact-relation.md +++ b/doc/database/db_contact-relation.md @@ -18,7 +18,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | cid, relation-cid | | relation-cid | relation-cid | diff --git a/doc/database/db_contact.md b/doc/database/db_contact.md index ae49777aa..0cca0ed11 100644 --- a/doc/database/db_contact.md +++ b/doc/database/db_contact.md @@ -93,7 +93,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | uid_name | uid, name(190) | | self_uid | self, uid | diff --git a/doc/database/db_conv.md b/doc/database/db_conv.md index a92e154c2..f53918291 100644 --- a/doc/database/db_conv.md +++ b/doc/database/db_conv.md @@ -21,7 +21,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | uid | uid | diff --git a/doc/database/db_conversation.md b/doc/database/db_conversation.md index eba69c990..308d5ee2b 100644 --- a/doc/database/db_conversation.md +++ b/doc/database/db_conversation.md @@ -21,7 +21,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | item-uri | | conversation-uri | conversation-uri | | received | received | diff --git a/doc/database/db_delayed-post.md b/doc/database/db_delayed-post.md index 16c31e46e..d9faab289 100644 --- a/doc/database/db_delayed-post.md +++ b/doc/database/db_delayed-post.md @@ -17,7 +17,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | uid_uri | UNIQUE, uid, uri(190) | diff --git a/doc/database/db_diaspora-interaction.md b/doc/database/db_diaspora-interaction.md index 3a15a5d19..f56a72abd 100644 --- a/doc/database/db_diaspora-interaction.md +++ b/doc/database/db_diaspora-interaction.md @@ -15,7 +15,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | uri-id | Foreign Keys diff --git a/doc/database/db_event.md b/doc/database/db_event.md index 6b893dafd..b222dc915 100644 --- a/doc/database/db_event.md +++ b/doc/database/db_event.md @@ -33,7 +33,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | uid_start | uid, start | | cid | cid | diff --git a/doc/database/db_fcontact.md b/doc/database/db_fcontact.md index a30bfb4ee..e3cf61fa5 100644 --- a/doc/database/db_fcontact.md +++ b/doc/database/db_fcontact.md @@ -30,7 +30,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | addr | addr(32) | | url | UNIQUE, url(190) | diff --git a/doc/database/db_fsuggest.md b/doc/database/db_fsuggest.md index 55c36e3c1..37d63c7c6 100644 --- a/doc/database/db_fsuggest.md +++ b/doc/database/db_fsuggest.md @@ -22,7 +22,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | cid | cid | | uid | uid | diff --git a/doc/database/db_group.md b/doc/database/db_group.md index 48565aaee..23150bdcb 100644 --- a/doc/database/db_group.md +++ b/doc/database/db_group.md @@ -18,7 +18,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | uid | uid | diff --git a/doc/database/db_group_member.md b/doc/database/db_group_member.md index adebe933b..2dd9fb41d 100644 --- a/doc/database/db_group_member.md +++ b/doc/database/db_group_member.md @@ -16,7 +16,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | contactid | contact-id | | gid_contactid | UNIQUE, gid, contact-id | diff --git a/doc/database/db_gserver-tag.md b/doc/database/db_gserver-tag.md index 216bef1d5..bce171f11 100644 --- a/doc/database/db_gserver-tag.md +++ b/doc/database/db_gserver-tag.md @@ -15,7 +15,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | gserver-id, tag | | tag | tag | diff --git a/doc/database/db_gserver.md b/doc/database/db_gserver.md index 5d5f2226b..66339427e 100644 --- a/doc/database/db_gserver.md +++ b/doc/database/db_gserver.md @@ -36,7 +36,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | nurl | UNIQUE, nurl(190) | | next_contact | next_contact | diff --git a/doc/database/db_hook.md b/doc/database/db_hook.md index 500e8f91d..622695a26 100644 --- a/doc/database/db_hook.md +++ b/doc/database/db_hook.md @@ -18,7 +18,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | priority | priority | | hook_file_function | UNIQUE, hook, file, function | diff --git a/doc/database/db_host.md b/doc/database/db_host.md index 802001e1b..bccea5f87 100644 --- a/doc/database/db_host.md +++ b/doc/database/db_host.md @@ -15,7 +15,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | name | UNIQUE, name | diff --git a/doc/database/db_inbox-status.md b/doc/database/db_inbox-status.md index 1f3463ad4..7f6a5d599 100644 --- a/doc/database/db_inbox-status.md +++ b/doc/database/db_inbox-status.md @@ -20,7 +20,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | url | diff --git a/doc/database/db_intro.md b/doc/database/db_intro.md index ed4dd54b6..5ea923fce 100644 --- a/doc/database/db_intro.md +++ b/doc/database/db_intro.md @@ -24,7 +24,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | contact-id | contact-id | | uid | uid | diff --git a/doc/database/db_item-uri.md b/doc/database/db_item-uri.md index 3ce86fca1..c49ef3813 100644 --- a/doc/database/db_item-uri.md +++ b/doc/database/db_item-uri.md @@ -16,7 +16,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | uri | UNIQUE, uri | | guid | guid | diff --git a/doc/database/db_locks.md b/doc/database/db_locks.md index 92d3e6434..821db5fee 100644 --- a/doc/database/db_locks.md +++ b/doc/database/db_locks.md @@ -18,7 +18,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | name_expires | name, expires | diff --git a/doc/database/db_mail.md b/doc/database/db_mail.md index 685dd2a0f..0558cff69 100644 --- a/doc/database/db_mail.md +++ b/doc/database/db_mail.md @@ -35,7 +35,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | uid_seen | uid, seen | | convid | convid | diff --git a/doc/database/db_mailacct.md b/doc/database/db_mailacct.md index aaa0fa877..dba0fd958 100644 --- a/doc/database/db_mailacct.md +++ b/doc/database/db_mailacct.md @@ -26,7 +26,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | uid | uid | diff --git a/doc/database/db_manage.md b/doc/database/db_manage.md index 53e5a35bb..ccfa7170d 100644 --- a/doc/database/db_manage.md +++ b/doc/database/db_manage.md @@ -16,7 +16,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | uid_mid | UNIQUE, uid, mid | | mid | mid | diff --git a/doc/database/db_notification.md b/doc/database/db_notification.md index 4de2a53bf..b5c0d7b1e 100644 --- a/doc/database/db_notification.md +++ b/doc/database/db_notification.md @@ -22,7 +22,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | uid_vid_type_actor-id_target-uri-id | UNIQUE, uid, vid, type, actor-id, target-uri-id | | vid | vid | diff --git a/doc/database/db_notify-threads.md b/doc/database/db_notify-threads.md index a58c45dab..5a0157d84 100644 --- a/doc/database/db_notify-threads.md +++ b/doc/database/db_notify-threads.md @@ -19,7 +19,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | master-parent-uri-id | master-parent-uri-id | | receiver-uid | receiver-uid | diff --git a/doc/database/db_notify.md b/doc/database/db_notify.md index 338425ac9..f1eb35881 100644 --- a/doc/database/db_notify.md +++ b/doc/database/db_notify.md @@ -31,7 +31,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | seen_uid_date | seen, uid, date | | uid_date | uid, date | diff --git a/doc/database/db_oembed.md b/doc/database/db_oembed.md index 86b23f70f..f3a6a0231 100644 --- a/doc/database/db_oembed.md +++ b/doc/database/db_oembed.md @@ -17,7 +17,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | url, maxwidth | | created | created | diff --git a/doc/database/db_openwebauth-token.md b/doc/database/db_openwebauth-token.md index ad598087e..05313df62 100644 --- a/doc/database/db_openwebauth-token.md +++ b/doc/database/db_openwebauth-token.md @@ -19,7 +19,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | uid | uid | diff --git a/doc/database/db_parsed_url.md b/doc/database/db_parsed_url.md index 8101883a3..1bb408357 100644 --- a/doc/database/db_parsed_url.md +++ b/doc/database/db_parsed_url.md @@ -20,7 +20,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | url_hash, guessing, oembed | | created | created | | expires | expires | diff --git a/doc/database/db_pconfig.md b/doc/database/db_pconfig.md index 2de6dd294..f1e031f2a 100644 --- a/doc/database/db_pconfig.md +++ b/doc/database/db_pconfig.md @@ -18,7 +18,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | uid_cat_k | UNIQUE, uid, cat, k | diff --git a/doc/database/db_permissionset.md b/doc/database/db_permissionset.md index 421c67abb..a9e237429 100644 --- a/doc/database/db_permissionset.md +++ b/doc/database/db_permissionset.md @@ -19,7 +19,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | uid_allow_cid_allow_gid_deny_cid_deny_gid | uid, allow_cid(50), allow_gid(30), deny_cid(50), deny_gid(30) | diff --git a/doc/database/db_photo.md b/doc/database/db_photo.md index 5f98e4e34..964530d7e 100644 --- a/doc/database/db_photo.md +++ b/doc/database/db_photo.md @@ -40,7 +40,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | contactid | contact-id | | uid_contactid | uid, contact-id | diff --git a/doc/database/db_post-category.md b/doc/database/db_post-category.md index 77e9ed679..2d758905f 100644 --- a/doc/database/db_post-category.md +++ b/doc/database/db_post-category.md @@ -17,7 +17,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | uri-id, uid, type, tid | | uri-id | tid | | uid | uid | diff --git a/doc/database/db_post-content.md b/doc/database/db_post-content.md index 5b8b258ec..2e055d820 100644 --- a/doc/database/db_post-content.md +++ b/doc/database/db_post-content.md @@ -30,7 +30,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | uri-id | | plink | plink(191) | | resource-id | resource-id | diff --git a/doc/database/db_post-delivery-data.md b/doc/database/db_post-delivery-data.md index 61f8b75de..f7273b5ef 100644 --- a/doc/database/db_post-delivery-data.md +++ b/doc/database/db_post-delivery-data.md @@ -24,7 +24,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | uri-id | Foreign Keys diff --git a/doc/database/db_post-media.md b/doc/database/db_post-media.md index ef599ed13..a6c151d03 100644 --- a/doc/database/db_post-media.md +++ b/doc/database/db_post-media.md @@ -32,7 +32,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | uri-id-url | UNIQUE, uri-id, url | diff --git a/doc/database/db_post-tag.md b/doc/database/db_post-tag.md index 30e513cab..5d4caad22 100644 --- a/doc/database/db_post-tag.md +++ b/doc/database/db_post-tag.md @@ -17,7 +17,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | uri-id, type, tid, cid | | tid | tid | | cid | cid | diff --git a/doc/database/db_post-thread-user.md b/doc/database/db_post-thread-user.md index 875aee4aa..9b6accc23 100644 --- a/doc/database/db_post-thread-user.md +++ b/doc/database/db_post-thread-user.md @@ -36,7 +36,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | uid, uri-id | | uri-id | uri-id | | owner-id | owner-id | diff --git a/doc/database/db_post-thread.md b/doc/database/db_post-thread.md index f5a851650..c13be54ba 100644 --- a/doc/database/db_post-thread.md +++ b/doc/database/db_post-thread.md @@ -22,7 +22,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | uri-id | | owner-id | owner-id | | author-id | author-id | diff --git a/doc/database/db_post-user-notification.md b/doc/database/db_post-user-notification.md index 0ebe8ccaf..db024b621 100644 --- a/doc/database/db_post-user-notification.md +++ b/doc/database/db_post-user-notification.md @@ -16,7 +16,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | uid, uri-id | | uri-id | uri-id | diff --git a/doc/database/db_post-user.md b/doc/database/db_post-user.md index 6d2f0c71b..a3b30c9b1 100644 --- a/doc/database/db_post-user.md +++ b/doc/database/db_post-user.md @@ -43,7 +43,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | uid_uri-id | UNIQUE, uid, uri-id | | uri-id | uri-id | diff --git a/doc/database/db_post.md b/doc/database/db_post.md index 7d5d7cc56..8d7410052 100644 --- a/doc/database/db_post.md +++ b/doc/database/db_post.md @@ -31,7 +31,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | uri-id | | parent-uri-id | parent-uri-id | | thr-parent-id | thr-parent-id | diff --git a/doc/database/db_process.md b/doc/database/db_process.md index aca53c70a..fb76d998e 100644 --- a/doc/database/db_process.md +++ b/doc/database/db_process.md @@ -16,7 +16,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | pid | | command | command | diff --git a/doc/database/db_profile.md b/doc/database/db_profile.md index 79de8ade5..d0bbcb6d2 100644 --- a/doc/database/db_profile.md +++ b/doc/database/db_profile.md @@ -55,7 +55,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | uid_is-default | uid, is-default | | pub_keywords | FULLTEXT, pub_keywords | diff --git a/doc/database/db_profile_check.md b/doc/database/db_profile_check.md index 1c7bc8147..96931618c 100644 --- a/doc/database/db_profile_check.md +++ b/doc/database/db_profile_check.md @@ -19,7 +19,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | uid | uid | | cid | cid | diff --git a/doc/database/db_profile_field.md b/doc/database/db_profile_field.md index e920bcd1a..e2fbad303 100644 --- a/doc/database/db_profile_field.md +++ b/doc/database/db_profile_field.md @@ -21,7 +21,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | uid | uid | | order | order | diff --git a/doc/database/db_push_subscriber.md b/doc/database/db_push_subscriber.md index 9c5094b6f..ffcf56f88 100644 --- a/doc/database/db_push_subscriber.md +++ b/doc/database/db_push_subscriber.md @@ -23,7 +23,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | next_try | next_try | | uid | uid | diff --git a/doc/database/db_register.md b/doc/database/db_register.md index 856128a42..2367b9d9f 100644 --- a/doc/database/db_register.md +++ b/doc/database/db_register.md @@ -20,7 +20,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | uid | uid | diff --git a/doc/database/db_search.md b/doc/database/db_search.md index 2b7684b0b..42c179a04 100644 --- a/doc/database/db_search.md +++ b/doc/database/db_search.md @@ -16,7 +16,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | uid_term | uid, term(64) | | term | term(64) | diff --git a/doc/database/db_session.md b/doc/database/db_session.md index 72810e7e9..775088c0a 100644 --- a/doc/database/db_session.md +++ b/doc/database/db_session.md @@ -17,7 +17,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | sid | sid(64) | | expire | expire | diff --git a/doc/database/db_storage.md b/doc/database/db_storage.md index 4278fbfd3..9c8495967 100644 --- a/doc/database/db_storage.md +++ b/doc/database/db_storage.md @@ -15,7 +15,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | diff --git a/doc/database/db_tag.md b/doc/database/db_tag.md index 071eb7928..a7c47e9fc 100644 --- a/doc/database/db_tag.md +++ b/doc/database/db_tag.md @@ -16,7 +16,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | type_name_url | UNIQUE, name, url | | url | url | diff --git a/doc/database/db_tokens.md b/doc/database/db_tokens.md index 116910054..3620f5fb5 100644 --- a/doc/database/db_tokens.md +++ b/doc/database/db_tokens.md @@ -19,7 +19,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | client_id | client_id | | uid | uid | diff --git a/doc/database/db_user-contact.md b/doc/database/db_user-contact.md index 8c8f12f75..69adc0c6b 100644 --- a/doc/database/db_user-contact.md +++ b/doc/database/db_user-contact.md @@ -18,7 +18,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | uid, cid | | cid | cid | diff --git a/doc/database/db_user.md b/doc/database/db_user.md index 8104e0f0f..a2f9d931d 100644 --- a/doc/database/db_user.md +++ b/doc/database/db_user.md @@ -58,7 +58,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | uid | | nickname | nickname(32) | | parent-uid | parent-uid | diff --git a/doc/database/db_userd.md b/doc/database/db_userd.md index cca71a272..7fce9ce9a 100644 --- a/doc/database/db_userd.md +++ b/doc/database/db_userd.md @@ -15,7 +15,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | username | username(32) | diff --git a/doc/database/db_verb.md b/doc/database/db_verb.md index 6613225f9..887f5fc4e 100644 --- a/doc/database/db_verb.md +++ b/doc/database/db_verb.md @@ -15,7 +15,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | name | name | diff --git a/doc/database/db_worker-ipc.md b/doc/database/db_worker-ipc.md index ac34d4649..be9a07d0f 100644 --- a/doc/database/db_worker-ipc.md +++ b/doc/database/db_worker-ipc.md @@ -15,7 +15,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | key | diff --git a/doc/database/db_workerqueue.md b/doc/database/db_workerqueue.md index 7510b7a76..81596192c 100644 --- a/doc/database/db_workerqueue.md +++ b/doc/database/db_workerqueue.md @@ -23,7 +23,7 @@ Indexes ------------ | Name | Fields | -|------|---------| +|------|--------| | PRIMARY | id | | command | command | | done_command_parameter | done, command, parameter(64) | From 7106106f11ca1212351e785c6bd4c1f8e343d82c Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 14 Jun 2021 12:15:10 +0000 Subject: [PATCH 11/12] Formatted index list --- doc/database/db_2fa_app_specific_password.md | 6 +-- doc/database/db_2fa_recovery_codes.md | 4 +- doc/database/db_2fa_trusted_browser.md | 6 +-- doc/database/db_addon.md | 8 ++-- doc/database/db_apcontact.md | 16 +++---- doc/database/db_application-token.md | 6 +-- doc/database/db_application.md | 6 +-- doc/database/db_attach.md | 8 ++-- doc/database/db_auth_codes.md | 6 +-- doc/database/db_cache.md | 6 +-- doc/database/db_challenge.md | 8 ++-- doc/database/db_clients.md | 6 +-- doc/database/db_config.md | 8 ++-- doc/database/db_contact-relation.md | 8 ++-- doc/database/db_contact.md | 50 ++++++++++---------- doc/database/db_conv.md | 8 ++-- doc/database/db_conversation.md | 8 ++-- doc/database/db_delayed-post.md | 6 +-- doc/database/db_diaspora-interaction.md | 4 +- doc/database/db_event.md | 8 ++-- doc/database/db_fcontact.md | 10 ++-- doc/database/db_fsuggest.md | 10 ++-- doc/database/db_group.md | 8 ++-- doc/database/db_group_member.md | 8 ++-- doc/database/db_gserver-tag.md | 6 +-- doc/database/db_gserver.md | 12 ++--- doc/database/db_hook.md | 8 ++-- doc/database/db_host.md | 8 ++-- doc/database/db_inbox-status.md | 6 +-- doc/database/db_intro.md | 8 ++-- doc/database/db_item-uri.md | 10 ++-- doc/database/db_locks.md | 6 +-- doc/database/db_mail.md | 24 +++++----- doc/database/db_mailacct.md | 8 ++-- doc/database/db_manage.md | 8 ++-- doc/database/db_notification.md | 16 +++---- doc/database/db_notify-threads.md | 10 ++-- doc/database/db_notify.md | 14 +++--- doc/database/db_oembed.md | 6 +-- doc/database/db_openwebauth-token.md | 8 ++-- doc/database/db_parsed_url.md | 8 ++-- doc/database/db_pconfig.md | 6 +-- doc/database/db_permissionset.md | 6 +-- doc/database/db_photo.md | 16 +++---- doc/database/db_post-category.md | 8 ++-- doc/database/db_post-content.md | 10 ++-- doc/database/db_post-delivery-data.md | 4 +- doc/database/db_post-media.md | 6 +-- doc/database/db_post-tag.md | 8 ++-- doc/database/db_post-thread-user.md | 32 ++++++------- doc/database/db_post-thread.md | 10 ++-- doc/database/db_post-user-notification.md | 6 +-- doc/database/db_post-user.md | 42 ++++++++-------- doc/database/db_post.md | 16 +++---- doc/database/db_process.md | 6 +-- doc/database/db_profile.md | 10 ++-- doc/database/db_profile_check.md | 10 ++-- doc/database/db_profile_field.md | 12 ++--- doc/database/db_push_subscriber.md | 8 ++-- doc/database/db_register.md | 8 ++-- doc/database/db_search.md | 8 ++-- doc/database/db_session.md | 10 ++-- doc/database/db_storage.md | 6 +-- doc/database/db_tag.md | 8 ++-- doc/database/db_tokens.md | 8 ++-- doc/database/db_user-contact.md | 6 +-- doc/database/db_user.md | 14 +++--- doc/database/db_userd.md | 6 +-- doc/database/db_verb.md | 8 ++-- doc/database/db_worker-ipc.md | 6 +-- doc/database/db_workerqueue.md | 20 ++++---- src/Database/DBStructure.php | 21 +++++++- view/templates/structure.tpl | 2 - 73 files changed, 375 insertions(+), 360 deletions(-) diff --git a/doc/database/db_2fa_app_specific_password.md b/doc/database/db_2fa_app_specific_password.md index 9d9c7ca45..66dd77c95 100644 --- a/doc/database/db_2fa_app_specific_password.md +++ b/doc/database/db_2fa_app_specific_password.md @@ -18,9 +18,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| --------------- | --------------------- | +| PRIMARY | id | | uid_description | uid, description(190) | Foreign Keys diff --git a/doc/database/db_2fa_recovery_codes.md b/doc/database/db_2fa_recovery_codes.md index e7c1940d8..69c34e654 100644 --- a/doc/database/db_2fa_recovery_codes.md +++ b/doc/database/db_2fa_recovery_codes.md @@ -16,8 +16,8 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| +| Name | Fields | +| ------- | --------- | | PRIMARY | uid, code | Foreign Keys diff --git a/doc/database/db_2fa_trusted_browser.md b/doc/database/db_2fa_trusted_browser.md index 9e12dabc7..d12d9e1fc 100644 --- a/doc/database/db_2fa_trusted_browser.md +++ b/doc/database/db_2fa_trusted_browser.md @@ -17,10 +17,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| +| Name | Fields | +| ------- | ----------- | | PRIMARY | cookie_hash | -| uid | uid | +| uid | uid | Foreign Keys ------------ diff --git a/doc/database/db_addon.md b/doc/database/db_addon.md index 21fae66f3..7233b8009 100644 --- a/doc/database/db_addon.md +++ b/doc/database/db_addon.md @@ -19,11 +19,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| -------------- | --------------- | +| PRIMARY | id | | installed_name | installed, name | -| name | UNIQUE, name | +| name | UNIQUE, name | Return to [database documentation](help/database) diff --git a/doc/database/db_apcontact.md b/doc/database/db_apcontact.md index cb2f8327a..5f5d21e4e 100644 --- a/doc/database/db_apcontact.md +++ b/doc/database/db_apcontact.md @@ -36,15 +36,15 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | url | -| addr | addr(32) | -| alias | alias(190) | -| followers | followers(190) | -| baseurl | baseurl(190) | +| Name | Fields | +| ----------- | ---------------- | +| PRIMARY | url | +| addr | addr(32) | +| alias | alias(190) | +| followers | followers(190) | +| baseurl | baseurl(190) | | sharedinbox | sharedinbox(190) | -| gsid | gsid | +| gsid | gsid | Foreign Keys ------------ diff --git a/doc/database/db_application-token.md b/doc/database/db_application-token.md index 15f85f06e..9899a5e8b 100644 --- a/doc/database/db_application-token.md +++ b/doc/database/db_application-token.md @@ -22,10 +22,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| +| Name | Fields | +| ------- | ------------------- | | PRIMARY | application-id, uid | -| uid_id | uid, application-id | +| uid_id | uid, application-id | Foreign Keys ------------ diff --git a/doc/database/db_application.md b/doc/database/db_application.md index 2099b3374..0a91e703a 100644 --- a/doc/database/db_application.md +++ b/doc/database/db_application.md @@ -23,9 +23,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| --------- | ----------------- | +| PRIMARY | id | | client_id | UNIQUE, client_id | diff --git a/doc/database/db_attach.md b/doc/database/db_attach.md index baef7c89d..9eb0f36e9 100644 --- a/doc/database/db_attach.md +++ b/doc/database/db_attach.md @@ -27,10 +27,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| uid | uid | +| Name | Fields | +| ------- | ------ | +| PRIMARY | id | +| uid | uid | Foreign Keys ------------ diff --git a/doc/database/db_auth_codes.md b/doc/database/db_auth_codes.md index df53a5b28..a1d28e096 100644 --- a/doc/database/db_auth_codes.md +++ b/doc/database/db_auth_codes.md @@ -17,9 +17,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| --------- | --------- | +| PRIMARY | id | | client_id | client_id | Foreign Keys diff --git a/doc/database/db_cache.md b/doc/database/db_cache.md index 770b4ab44..27a11daa6 100644 --- a/doc/database/db_cache.md +++ b/doc/database/db_cache.md @@ -16,9 +16,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | k | +| Name | Fields | +| --------- | ---------- | +| PRIMARY | k | | k_expires | k, expires | diff --git a/doc/database/db_challenge.md b/doc/database/db_challenge.md index a9f17bc63..161838909 100644 --- a/doc/database/db_challenge.md +++ b/doc/database/db_challenge.md @@ -18,10 +18,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| expire | expire | +| Name | Fields | +| ------- | ------ | +| PRIMARY | id | +| expire | expire | Return to [database documentation](help/database) diff --git a/doc/database/db_clients.md b/doc/database/db_clients.md index 29f9fe52f..a97e796ed 100644 --- a/doc/database/db_clients.md +++ b/doc/database/db_clients.md @@ -18,10 +18,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| +| Name | Fields | +| ------- | --------- | | PRIMARY | client_id | -| uid | uid | +| uid | uid | Foreign Keys ------------ diff --git a/doc/database/db_config.md b/doc/database/db_config.md index 32396dc74..7d7618794 100644 --- a/doc/database/db_config.md +++ b/doc/database/db_config.md @@ -16,10 +16,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| cat_k | UNIQUE, cat, k | +| Name | Fields | +| ------- | -------------- | +| PRIMARY | id | +| cat_k | UNIQUE, cat, k | Return to [database documentation](help/database) diff --git a/doc/database/db_contact-relation.md b/doc/database/db_contact-relation.md index d9f74a40a..8628b1ef6 100644 --- a/doc/database/db_contact-relation.md +++ b/doc/database/db_contact-relation.md @@ -17,10 +17,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | cid, relation-cid | -| relation-cid | relation-cid | +| Name | Fields | +| ------------ | ----------------- | +| PRIMARY | cid, relation-cid | +| relation-cid | relation-cid | Foreign Keys ------------ diff --git a/doc/database/db_contact.md b/doc/database/db_contact.md index 0cca0ed11..0e04c1ece 100644 --- a/doc/database/db_contact.md +++ b/doc/database/db_contact.md @@ -92,31 +92,31 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| uid_name | uid, name(190) | -| self_uid | self, uid | -| alias_uid | alias(128), uid | -| pending_uid | pending, uid | -| blocked_uid | blocked, uid | -| uid_rel_network_poll | uid, rel, network, poll(64), archive | -| uid_network_batch | uid, network, batch(64) | -| batch_contact-type | batch(64), contact-type | -| addr_uid | addr(128), uid | -| nurl_uid | nurl(128), uid | -| nick_uid | nick(128), uid | -| attag_uid | attag(96), uid | -| dfrn-id | dfrn-id(64) | -| issued-id | issued-id(64) | -| network_uid_lastupdate | network, uid, last-update | -| uid_network_self_lastupdate | uid, network, self, last-update | -| uid_lastitem | uid, last-item | -| baseurl | baseurl(64) | -| uid_contact-type | uid, contact-type | -| uid_self_contact-type | uid, self, contact-type | -| self_network_uid | self, network, uid | -| gsid | gsid | +| Name | Fields | +| --------------------------- | ------------------------------------ | +| PRIMARY | id | +| uid_name | uid, name(190) | +| self_uid | self, uid | +| alias_uid | alias(128), uid | +| pending_uid | pending, uid | +| blocked_uid | blocked, uid | +| uid_rel_network_poll | uid, rel, network, poll(64), archive | +| uid_network_batch | uid, network, batch(64) | +| batch_contact-type | batch(64), contact-type | +| addr_uid | addr(128), uid | +| nurl_uid | nurl(128), uid | +| nick_uid | nick(128), uid | +| attag_uid | attag(96), uid | +| dfrn-id | dfrn-id(64) | +| issued-id | issued-id(64) | +| network_uid_lastupdate | network, uid, last-update | +| uid_network_self_lastupdate | uid, network, self, last-update | +| uid_lastitem | uid, last-item | +| baseurl | baseurl(64) | +| uid_contact-type | uid, contact-type | +| uid_self_contact-type | uid, self, contact-type | +| self_network_uid | self, network, uid | +| gsid | gsid | Foreign Keys ------------ diff --git a/doc/database/db_conv.md b/doc/database/db_conv.md index f53918291..c1d50b5de 100644 --- a/doc/database/db_conv.md +++ b/doc/database/db_conv.md @@ -20,10 +20,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| uid | uid | +| Name | Fields | +| ------- | ------ | +| PRIMARY | id | +| uid | uid | Foreign Keys ------------ diff --git a/doc/database/db_conversation.md b/doc/database/db_conversation.md index 308d5ee2b..504b0dd4a 100644 --- a/doc/database/db_conversation.md +++ b/doc/database/db_conversation.md @@ -20,11 +20,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | item-uri | +| Name | Fields | +| ---------------- | ---------------- | +| PRIMARY | item-uri | | conversation-uri | conversation-uri | -| received | received | +| received | received | Return to [database documentation](help/database) diff --git a/doc/database/db_delayed-post.md b/doc/database/db_delayed-post.md index d9faab289..fe3251f70 100644 --- a/doc/database/db_delayed-post.md +++ b/doc/database/db_delayed-post.md @@ -16,9 +16,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| ------- | --------------------- | +| PRIMARY | id | | uid_uri | UNIQUE, uid, uri(190) | Foreign Keys diff --git a/doc/database/db_diaspora-interaction.md b/doc/database/db_diaspora-interaction.md index f56a72abd..4ac432590 100644 --- a/doc/database/db_diaspora-interaction.md +++ b/doc/database/db_diaspora-interaction.md @@ -14,8 +14,8 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| +| Name | Fields | +| ------- | ------ | | PRIMARY | uri-id | Foreign Keys diff --git a/doc/database/db_event.md b/doc/database/db_event.md index b222dc915..d8b009639 100644 --- a/doc/database/db_event.md +++ b/doc/database/db_event.md @@ -32,11 +32,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| --------- | ---------- | +| PRIMARY | id | | uid_start | uid, start | -| cid | cid | +| cid | cid | Foreign Keys ------------ diff --git a/doc/database/db_fcontact.md b/doc/database/db_fcontact.md index e3cf61fa5..43a073f61 100644 --- a/doc/database/db_fcontact.md +++ b/doc/database/db_fcontact.md @@ -29,11 +29,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| addr | addr(32) | -| url | UNIQUE, url(190) | +| Name | Fields | +| ------- | ---------------- | +| PRIMARY | id | +| addr | addr(32) | +| url | UNIQUE, url(190) | Return to [database documentation](help/database) diff --git a/doc/database/db_fsuggest.md b/doc/database/db_fsuggest.md index 37d63c7c6..6ccf73297 100644 --- a/doc/database/db_fsuggest.md +++ b/doc/database/db_fsuggest.md @@ -21,11 +21,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| cid | cid | -| uid | uid | +| Name | Fields | +| ------- | ------ | +| PRIMARY | id | +| cid | cid | +| uid | uid | Foreign Keys ------------ diff --git a/doc/database/db_group.md b/doc/database/db_group.md index 23150bdcb..1892de3e4 100644 --- a/doc/database/db_group.md +++ b/doc/database/db_group.md @@ -17,10 +17,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| uid | uid | +| Name | Fields | +| ------- | ------ | +| PRIMARY | id | +| uid | uid | Foreign Keys ------------ diff --git a/doc/database/db_group_member.md b/doc/database/db_group_member.md index 2dd9fb41d..a544f3b0e 100644 --- a/doc/database/db_group_member.md +++ b/doc/database/db_group_member.md @@ -15,10 +15,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| contactid | contact-id | +| Name | Fields | +| ------------- | ----------------------- | +| PRIMARY | id | +| contactid | contact-id | | gid_contactid | UNIQUE, gid, contact-id | Foreign Keys diff --git a/doc/database/db_gserver-tag.md b/doc/database/db_gserver-tag.md index bce171f11..82b0ccc88 100644 --- a/doc/database/db_gserver-tag.md +++ b/doc/database/db_gserver-tag.md @@ -14,10 +14,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| +| Name | Fields | +| ------- | --------------- | | PRIMARY | gserver-id, tag | -| tag | tag | +| tag | tag | Foreign Keys ------------ diff --git a/doc/database/db_gserver.md b/doc/database/db_gserver.md index 66339427e..905602b3b 100644 --- a/doc/database/db_gserver.md +++ b/doc/database/db_gserver.md @@ -35,12 +35,12 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| nurl | UNIQUE, nurl(190) | -| next_contact | next_contact | -| network | network | +| Name | Fields | +| ------------ | ----------------- | +| PRIMARY | id | +| nurl | UNIQUE, nurl(190) | +| next_contact | next_contact | +| network | network | Return to [database documentation](help/database) diff --git a/doc/database/db_hook.md b/doc/database/db_hook.md index 622695a26..0ad0981f0 100644 --- a/doc/database/db_hook.md +++ b/doc/database/db_hook.md @@ -17,10 +17,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| priority | priority | +| Name | Fields | +| ------------------ | ---------------------------- | +| PRIMARY | id | +| priority | priority | | hook_file_function | UNIQUE, hook, file, function | diff --git a/doc/database/db_host.md b/doc/database/db_host.md index bccea5f87..4b2d4d1e5 100644 --- a/doc/database/db_host.md +++ b/doc/database/db_host.md @@ -14,10 +14,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| name | UNIQUE, name | +| Name | Fields | +| ------- | ------------ | +| PRIMARY | id | +| name | UNIQUE, name | Return to [database documentation](help/database) diff --git a/doc/database/db_inbox-status.md b/doc/database/db_inbox-status.md index 7f6a5d599..3b82cf46a 100644 --- a/doc/database/db_inbox-status.md +++ b/doc/database/db_inbox-status.md @@ -19,9 +19,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | url | +| Name | Fields | +| ------- | ------ | +| PRIMARY | url | Return to [database documentation](help/database) diff --git a/doc/database/db_intro.md b/doc/database/db_intro.md index 5ea923fce..426d8579d 100644 --- a/doc/database/db_intro.md +++ b/doc/database/db_intro.md @@ -23,11 +23,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| ---------- | ---------- | +| PRIMARY | id | | contact-id | contact-id | -| uid | uid | +| uid | uid | Foreign Keys ------------ diff --git a/doc/database/db_item-uri.md b/doc/database/db_item-uri.md index c49ef3813..c6d1c4c37 100644 --- a/doc/database/db_item-uri.md +++ b/doc/database/db_item-uri.md @@ -15,11 +15,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| uri | UNIQUE, uri | -| guid | guid | +| Name | Fields | +| ------- | ----------- | +| PRIMARY | id | +| uri | UNIQUE, uri | +| guid | guid | Return to [database documentation](help/database) diff --git a/doc/database/db_locks.md b/doc/database/db_locks.md index 821db5fee..dc5371184 100644 --- a/doc/database/db_locks.md +++ b/doc/database/db_locks.md @@ -17,9 +17,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| ------------ | ------------- | +| PRIMARY | id | | name_expires | name, expires | diff --git a/doc/database/db_mail.md b/doc/database/db_mail.md index 0558cff69..460c03bf6 100644 --- a/doc/database/db_mail.md +++ b/doc/database/db_mail.md @@ -34,18 +34,18 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| uid_seen | uid, seen | -| convid | convid | -| uri | uri(64) | -| parent-uri | parent-uri(64) | -| contactid | contact-id(32) | -| author-id | author-id | -| uri-id | uri-id | -| parent-uri-id | parent-uri-id | -| thr-parent-id | thr-parent-id | +| Name | Fields | +| ------------- | -------------- | +| PRIMARY | id | +| uid_seen | uid, seen | +| convid | convid | +| uri | uri(64) | +| parent-uri | parent-uri(64) | +| contactid | contact-id(32) | +| author-id | author-id | +| uri-id | uri-id | +| parent-uri-id | parent-uri-id | +| thr-parent-id | thr-parent-id | Foreign Keys ------------ diff --git a/doc/database/db_mailacct.md b/doc/database/db_mailacct.md index dba0fd958..59f34250c 100644 --- a/doc/database/db_mailacct.md +++ b/doc/database/db_mailacct.md @@ -25,10 +25,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| uid | uid | +| Name | Fields | +| ------- | ------ | +| PRIMARY | id | +| uid | uid | Foreign Keys ------------ diff --git a/doc/database/db_manage.md b/doc/database/db_manage.md index ccfa7170d..8a2228a5e 100644 --- a/doc/database/db_manage.md +++ b/doc/database/db_manage.md @@ -15,11 +15,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| ------- | ---------------- | +| PRIMARY | id | | uid_mid | UNIQUE, uid, mid | -| mid | mid | +| mid | mid | Foreign Keys ------------ diff --git a/doc/database/db_notification.md b/doc/database/db_notification.md index b5c0d7b1e..ff059c344 100644 --- a/doc/database/db_notification.md +++ b/doc/database/db_notification.md @@ -21,15 +21,15 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| ----------------------------------- | ----------------------------------------------- | +| PRIMARY | id | | uid_vid_type_actor-id_target-uri-id | UNIQUE, uid, vid, type, actor-id, target-uri-id | -| vid | vid | -| actor-id | actor-id | -| target-uri-id | target-uri-id | -| parent-uri-id | parent-uri-id | -| seen_uid | seen, uid | +| vid | vid | +| actor-id | actor-id | +| target-uri-id | target-uri-id | +| parent-uri-id | parent-uri-id | +| seen_uid | seen, uid | Foreign Keys ------------ diff --git a/doc/database/db_notify-threads.md b/doc/database/db_notify-threads.md index 5a0157d84..82ed225f7 100644 --- a/doc/database/db_notify-threads.md +++ b/doc/database/db_notify-threads.md @@ -18,12 +18,12 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| -------------------- | -------------------- | +| PRIMARY | id | | master-parent-uri-id | master-parent-uri-id | -| receiver-uid | receiver-uid | -| notify-id | notify-id | +| receiver-uid | receiver-uid | +| notify-id | notify-id | Foreign Keys ------------ diff --git a/doc/database/db_notify.md b/doc/database/db_notify.md index f1eb35881..250734e56 100644 --- a/doc/database/db_notify.md +++ b/doc/database/db_notify.md @@ -30,14 +30,14 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| seen_uid_date | seen, uid, date | -| uid_date | uid, date | +| Name | Fields | +| ------------- | -------------------- | +| PRIMARY | id | +| seen_uid_date | seen, uid, date | +| uid_date | uid, date | | uid_type_link | uid, type, link(190) | -| uri-id | uri-id | -| parent-uri-id | parent-uri-id | +| uri-id | uri-id | +| parent-uri-id | parent-uri-id | Foreign Keys ------------ diff --git a/doc/database/db_oembed.md b/doc/database/db_oembed.md index f3a6a0231..8304a32f4 100644 --- a/doc/database/db_oembed.md +++ b/doc/database/db_oembed.md @@ -16,10 +16,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| +| Name | Fields | +| ------- | ------------- | | PRIMARY | url, maxwidth | -| created | created | +| created | created | Return to [database documentation](help/database) diff --git a/doc/database/db_openwebauth-token.md b/doc/database/db_openwebauth-token.md index 05313df62..c330623d9 100644 --- a/doc/database/db_openwebauth-token.md +++ b/doc/database/db_openwebauth-token.md @@ -18,10 +18,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| uid | uid | +| Name | Fields | +| ------- | ------ | +| PRIMARY | id | +| uid | uid | Foreign Keys ------------ diff --git a/doc/database/db_parsed_url.md b/doc/database/db_parsed_url.md index 1bb408357..67ea5caeb 100644 --- a/doc/database/db_parsed_url.md +++ b/doc/database/db_parsed_url.md @@ -19,11 +19,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| +| Name | Fields | +| ------- | -------------------------- | | PRIMARY | url_hash, guessing, oembed | -| created | created | -| expires | expires | +| created | created | +| expires | expires | Return to [database documentation](help/database) diff --git a/doc/database/db_pconfig.md b/doc/database/db_pconfig.md index f1e031f2a..cf9b0d781 100644 --- a/doc/database/db_pconfig.md +++ b/doc/database/db_pconfig.md @@ -17,9 +17,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| --------- | ------------------- | +| PRIMARY | id | | uid_cat_k | UNIQUE, uid, cat, k | Foreign Keys diff --git a/doc/database/db_permissionset.md b/doc/database/db_permissionset.md index a9e237429..107cedea1 100644 --- a/doc/database/db_permissionset.md +++ b/doc/database/db_permissionset.md @@ -18,9 +18,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| ----------------------------------------- | ------------------------------------------------------------- | +| PRIMARY | id | | uid_allow_cid_allow_gid_deny_cid_deny_gid | uid, allow_cid(50), allow_gid(30), deny_cid(50), deny_gid(30) | Foreign Keys diff --git a/doc/database/db_photo.md b/doc/database/db_photo.md index 964530d7e..aad26bdbe 100644 --- a/doc/database/db_photo.md +++ b/doc/database/db_photo.md @@ -39,15 +39,15 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| contactid | contact-id | -| uid_contactid | uid, contact-id | -| uid_profile | uid, profile | -| uid_album_scale_created | uid, album(32), scale, created | +| Name | Fields | +| ----------------------------- | ------------------------------------ | +| PRIMARY | id | +| contactid | contact-id | +| uid_contactid | uid, contact-id | +| uid_profile | uid, profile | +| uid_album_scale_created | uid, album(32), scale, created | | uid_album_resource-id_created | uid, album(32), resource-id, created | -| resource-id | resource-id | +| resource-id | resource-id | Foreign Keys ------------ diff --git a/doc/database/db_post-category.md b/doc/database/db_post-category.md index 2d758905f..b825a8f4b 100644 --- a/doc/database/db_post-category.md +++ b/doc/database/db_post-category.md @@ -16,11 +16,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| +| Name | Fields | +| ------- | ---------------------- | | PRIMARY | uri-id, uid, type, tid | -| uri-id | tid | -| uid | uid | +| uri-id | tid | +| uid | uid | Foreign Keys ------------ diff --git a/doc/database/db_post-content.md b/doc/database/db_post-content.md index 2e055d820..0addf43a3 100644 --- a/doc/database/db_post-content.md +++ b/doc/database/db_post-content.md @@ -29,11 +29,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | uri-id | -| plink | plink(191) | -| resource-id | resource-id | +| Name | Fields | +| -------------------------- | -------------------------------------- | +| PRIMARY | uri-id | +| plink | plink(191) | +| resource-id | resource-id | | title-content-warning-body | FULLTEXT, title, content-warning, body | Foreign Keys diff --git a/doc/database/db_post-delivery-data.md b/doc/database/db_post-delivery-data.md index f7273b5ef..ad4ca6af3 100644 --- a/doc/database/db_post-delivery-data.md +++ b/doc/database/db_post-delivery-data.md @@ -23,8 +23,8 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| +| Name | Fields | +| ------- | ------ | | PRIMARY | uri-id | Foreign Keys diff --git a/doc/database/db_post-media.md b/doc/database/db_post-media.md index a6c151d03..e17a04e5f 100644 --- a/doc/database/db_post-media.md +++ b/doc/database/db_post-media.md @@ -31,9 +31,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| ---------- | ------------------- | +| PRIMARY | id | | uri-id-url | UNIQUE, uri-id, url | Foreign Keys diff --git a/doc/database/db_post-tag.md b/doc/database/db_post-tag.md index 5d4caad22..7811f32e0 100644 --- a/doc/database/db_post-tag.md +++ b/doc/database/db_post-tag.md @@ -16,11 +16,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| +| Name | Fields | +| ------- | ---------------------- | | PRIMARY | uri-id, type, tid, cid | -| tid | tid | -| cid | cid | +| tid | tid | +| cid | cid | Foreign Keys ------------ diff --git a/doc/database/db_post-thread-user.md b/doc/database/db_post-thread-user.md index 9b6accc23..3efb5a77a 100644 --- a/doc/database/db_post-thread-user.md +++ b/doc/database/db_post-thread-user.md @@ -35,23 +35,23 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | uid, uri-id | -| uri-id | uri-id | -| owner-id | owner-id | -| author-id | author-id | -| causer-id | causer-id | -| uid | uid | -| contact-id | contact-id | -| psid | psid | -| post-user-id | post-user-id | -| commented | commented | -| uid_received | uid, received | -| uid_pinned | uid, pinned | +| Name | Fields | +| ------------- | -------------- | +| PRIMARY | uid, uri-id | +| uri-id | uri-id | +| owner-id | owner-id | +| author-id | author-id | +| causer-id | causer-id | +| uid | uid | +| contact-id | contact-id | +| psid | psid | +| post-user-id | post-user-id | +| commented | commented | +| uid_received | uid, received | +| uid_pinned | uid, pinned | | uid_commented | uid, commented | -| uid_starred | uid, starred | -| uid_mention | uid, mention | +| uid_starred | uid, starred | +| uid_mention | uid, mention | Foreign Keys ------------ diff --git a/doc/database/db_post-thread.md b/doc/database/db_post-thread.md index c13be54ba..96fd0d427 100644 --- a/doc/database/db_post-thread.md +++ b/doc/database/db_post-thread.md @@ -21,13 +21,13 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | uri-id | -| owner-id | owner-id | +| Name | Fields | +| --------- | --------- | +| PRIMARY | uri-id | +| owner-id | owner-id | | author-id | author-id | | causer-id | causer-id | -| received | received | +| received | received | | commented | commented | Foreign Keys diff --git a/doc/database/db_post-user-notification.md b/doc/database/db_post-user-notification.md index db024b621..36edd4a28 100644 --- a/doc/database/db_post-user-notification.md +++ b/doc/database/db_post-user-notification.md @@ -15,10 +15,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| +| Name | Fields | +| ------- | ----------- | | PRIMARY | uid, uri-id | -| uri-id | uri-id | +| uri-id | uri-id | Foreign Keys ------------ diff --git a/doc/database/db_post-user.md b/doc/database/db_post-user.md index a3b30c9b1..5fbc3e985 100644 --- a/doc/database/db_post-user.md +++ b/doc/database/db_post-user.md @@ -42,28 +42,28 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| uid_uri-id | UNIQUE, uid, uri-id | -| uri-id | uri-id | -| parent-uri-id | parent-uri-id | -| thr-parent-id | thr-parent-id | -| external-id | external-id | -| owner-id | owner-id | -| author-id | author-id | -| causer-id | causer-id | -| vid | vid | -| contact-id | contact-id | -| event-id | event-id | -| psid | psid | -| author-id_uid | author-id, uid | -| author-id_received | author-id, received | -| parent-uri-id_uid | parent-uri-id, uid | -| uid_contactid | uid, contact-id | +| Name | Fields | +| -------------------- | ----------------------- | +| PRIMARY | id | +| uid_uri-id | UNIQUE, uid, uri-id | +| uri-id | uri-id | +| parent-uri-id | parent-uri-id | +| thr-parent-id | thr-parent-id | +| external-id | external-id | +| owner-id | owner-id | +| author-id | author-id | +| causer-id | causer-id | +| vid | vid | +| contact-id | contact-id | +| event-id | event-id | +| psid | psid | +| author-id_uid | author-id, uid | +| author-id_received | author-id, received | +| parent-uri-id_uid | parent-uri-id, uid | +| uid_contactid | uid, contact-id | | uid_unseen_contactid | uid, unseen, contact-id | -| uid_unseen | uid, unseen | -| uid_hidden_uri-id | uid, hidden, uri-id | +| uid_unseen | uid, unseen | +| uid_hidden_uri-id | uid, hidden, uri-id | Foreign Keys ------------ diff --git a/doc/database/db_post.md b/doc/database/db_post.md index 8d7410052..303269b1c 100644 --- a/doc/database/db_post.md +++ b/doc/database/db_post.md @@ -30,16 +30,16 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | uri-id | +| Name | Fields | +| ------------- | ------------- | +| PRIMARY | uri-id | | parent-uri-id | parent-uri-id | | thr-parent-id | thr-parent-id | -| external-id | external-id | -| owner-id | owner-id | -| author-id | author-id | -| causer-id | causer-id | -| vid | vid | +| external-id | external-id | +| owner-id | owner-id | +| author-id | author-id | +| causer-id | causer-id | +| vid | vid | Foreign Keys ------------ diff --git a/doc/database/db_process.md b/doc/database/db_process.md index fb76d998e..062e6ff22 100644 --- a/doc/database/db_process.md +++ b/doc/database/db_process.md @@ -15,9 +15,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | pid | +| Name | Fields | +| ------- | ------- | +| PRIMARY | pid | | command | command | diff --git a/doc/database/db_profile.md b/doc/database/db_profile.md index d0bbcb6d2..4ea3b5600 100644 --- a/doc/database/db_profile.md +++ b/doc/database/db_profile.md @@ -54,11 +54,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| uid_is-default | uid, is-default | -| pub_keywords | FULLTEXT, pub_keywords | +| Name | Fields | +| -------------- | ---------------------- | +| PRIMARY | id | +| uid_is-default | uid, is-default | +| pub_keywords | FULLTEXT, pub_keywords | Foreign Keys ------------ diff --git a/doc/database/db_profile_check.md b/doc/database/db_profile_check.md index 96931618c..4049bd604 100644 --- a/doc/database/db_profile_check.md +++ b/doc/database/db_profile_check.md @@ -18,11 +18,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| uid | uid | -| cid | cid | +| Name | Fields | +| ------- | ------ | +| PRIMARY | id | +| uid | uid | +| cid | cid | Foreign Keys ------------ diff --git a/doc/database/db_profile_field.md b/doc/database/db_profile_field.md index e2fbad303..56e8e3d0b 100644 --- a/doc/database/db_profile_field.md +++ b/doc/database/db_profile_field.md @@ -20,12 +20,12 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| uid | uid | -| order | order | -| psid | psid | +| Name | Fields | +| ------- | ------ | +| PRIMARY | id | +| uid | uid | +| order | order | +| psid | psid | Foreign Keys ------------ diff --git a/doc/database/db_push_subscriber.md b/doc/database/db_push_subscriber.md index ffcf56f88..4ba50a4d1 100644 --- a/doc/database/db_push_subscriber.md +++ b/doc/database/db_push_subscriber.md @@ -22,11 +22,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| -------- | -------- | +| PRIMARY | id | | next_try | next_try | -| uid | uid | +| uid | uid | Foreign Keys ------------ diff --git a/doc/database/db_register.md b/doc/database/db_register.md index 2367b9d9f..8ace3c199 100644 --- a/doc/database/db_register.md +++ b/doc/database/db_register.md @@ -19,10 +19,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| uid | uid | +| Name | Fields | +| ------- | ------ | +| PRIMARY | id | +| uid | uid | Foreign Keys ------------ diff --git a/doc/database/db_search.md b/doc/database/db_search.md index 42c179a04..157d09ecb 100644 --- a/doc/database/db_search.md +++ b/doc/database/db_search.md @@ -15,11 +15,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| -------- | ------------- | +| PRIMARY | id | | uid_term | uid, term(64) | -| term | term(64) | +| term | term(64) | Foreign Keys ------------ diff --git a/doc/database/db_session.md b/doc/database/db_session.md index 775088c0a..794e49c6a 100644 --- a/doc/database/db_session.md +++ b/doc/database/db_session.md @@ -16,11 +16,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| sid | sid(64) | -| expire | expire | +| Name | Fields | +| ------- | ------- | +| PRIMARY | id | +| sid | sid(64) | +| expire | expire | Return to [database documentation](help/database) diff --git a/doc/database/db_storage.md b/doc/database/db_storage.md index 9c8495967..55911e28a 100644 --- a/doc/database/db_storage.md +++ b/doc/database/db_storage.md @@ -14,9 +14,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| ------- | ------ | +| PRIMARY | id | Return to [database documentation](help/database) diff --git a/doc/database/db_tag.md b/doc/database/db_tag.md index a7c47e9fc..8c742917a 100644 --- a/doc/database/db_tag.md +++ b/doc/database/db_tag.md @@ -15,11 +15,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| ------------- | ----------------- | +| PRIMARY | id | | type_name_url | UNIQUE, name, url | -| url | url | +| url | url | Return to [database documentation](help/database) diff --git a/doc/database/db_tokens.md b/doc/database/db_tokens.md index 3620f5fb5..7cf9bba4c 100644 --- a/doc/database/db_tokens.md +++ b/doc/database/db_tokens.md @@ -18,11 +18,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| --------- | --------- | +| PRIMARY | id | | client_id | client_id | -| uid | uid | +| uid | uid | Foreign Keys ------------ diff --git a/doc/database/db_user-contact.md b/doc/database/db_user-contact.md index 69adc0c6b..35d140cff 100644 --- a/doc/database/db_user-contact.md +++ b/doc/database/db_user-contact.md @@ -17,10 +17,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| +| Name | Fields | +| ------- | -------- | | PRIMARY | uid, cid | -| cid | cid | +| cid | cid | Foreign Keys ------------ diff --git a/doc/database/db_user.md b/doc/database/db_user.md index a2f9d931d..611fb76b0 100644 --- a/doc/database/db_user.md +++ b/doc/database/db_user.md @@ -57,13 +57,13 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | uid | -| nickname | nickname(32) | -| parent-uid | parent-uid | -| guid | guid | -| email | email(64) | +| Name | Fields | +| ---------- | ------------ | +| PRIMARY | uid | +| nickname | nickname(32) | +| parent-uid | parent-uid | +| guid | guid | +| email | email(64) | Foreign Keys ------------ diff --git a/doc/database/db_userd.md b/doc/database/db_userd.md index 7fce9ce9a..17a81b408 100644 --- a/doc/database/db_userd.md +++ b/doc/database/db_userd.md @@ -14,9 +14,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| -------- | ------------ | +| PRIMARY | id | | username | username(32) | diff --git a/doc/database/db_verb.md b/doc/database/db_verb.md index 887f5fc4e..43507053b 100644 --- a/doc/database/db_verb.md +++ b/doc/database/db_verb.md @@ -14,10 +14,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| name | name | +| Name | Fields | +| ------- | ------ | +| PRIMARY | id | +| name | name | Return to [database documentation](help/database) diff --git a/doc/database/db_worker-ipc.md b/doc/database/db_worker-ipc.md index be9a07d0f..1635981d7 100644 --- a/doc/database/db_worker-ipc.md +++ b/doc/database/db_worker-ipc.md @@ -14,9 +14,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | key | +| Name | Fields | +| ------- | ------ | +| PRIMARY | key | Return to [database documentation](help/database) diff --git a/doc/database/db_workerqueue.md b/doc/database/db_workerqueue.md index 81596192c..a479ecbca 100644 --- a/doc/database/db_workerqueue.md +++ b/doc/database/db_workerqueue.md @@ -22,17 +22,17 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| command | command | -| done_command_parameter | done, command, parameter(64) | -| done_executed | done, executed | +| Name | Fields | +| ----------------------------- | -------------------------------- | +| PRIMARY | id | +| command | command | +| done_command_parameter | done, command, parameter(64) | +| done_executed | done, executed | | done_priority_retrial_created | done, priority, retrial, created | -| done_priority_next_try | done, priority, next_try | -| done_pid_next_try | done, pid, next_try | -| done_pid_retrial | done, pid, retrial | -| done_pid_priority_created | done, pid, priority, created | +| done_priority_next_try | done, priority, next_try | +| done_pid_next_try | done, pid, next_try | +| done_pid_retrial | done, pid, retrial | +| done_pid_priority_created | done, pid, priority, created | Return to [database documentation](help/database) diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index 864f2ded3..9af6100a0 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -166,11 +166,28 @@ class DBStructure $tables = []; foreach (self::definition(null) as $name => $definition) { - $indexes = []; + $indexes = [[ + 'name' => 'Name', + 'fields' => 'Fields', + ], + [ + 'name' => '-', + 'fields' => '-', + ]]; + + $lengths = ['name' => 4, 'fields' => 6]; foreach ($definition['indexes'] as $key => $value) { - $indexes[] = ['name' => $key, 'fields' => implode(', ', $value)]; + $fieldlist = implode(', ', $value); + $indexes[] = ['name' => $key, 'fields' => $fieldlist]; + $lengths['name'] = max($lengths['name'], strlen($key)); + $lengths['fields'] = max($lengths['fields'], strlen($fieldlist)); } + array_walk_recursive($indexes, function(&$value, $key) use ($lengths) + { + $value = str_pad($value, $lengths[$key], $value === '-' ? '-' : ' '); + }); + $foreign = []; $fields = [[ 'name' => 'Field', diff --git a/view/templates/structure.tpl b/view/templates/structure.tpl index 77ee1e85a..954712f12 100644 --- a/view/templates/structure.tpl +++ b/view/templates/structure.tpl @@ -13,8 +13,6 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| {{foreach $indexes as $index}} | {{$index.name}} | {{$index.fields}} | {{/foreach}} From c3cfc443ae06986234631a7651c7b9386c8817f1 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 14 Jun 2021 12:38:42 +0000 Subject: [PATCH 12/12] Handling of special characters --- doc/database.md | 2 +- doc/database/db_apcontact.md | 2 +- doc/database/db_attach.md | 2 +- doc/database/db_event.md | 2 +- doc/database/db_parsed_url.md | 4 ++-- doc/database/db_permissionset.md | 2 +- doc/database/db_photo.md | 2 +- view/templates/structure.tpl | 10 +++++----- view/templates/tables.tpl | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/doc/database.md b/doc/database.md index 5e5413916..60e3253fe 100644 --- a/doc/database.md +++ b/doc/database.md @@ -45,7 +45,7 @@ Database Tables | [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 | +| [parsed_url](help/database/db_parsed_url) | cache for 'parse_url' queries | | [pconfig](help/database/db_pconfig) | personal (per user) configuration storage | | [permissionset](help/database/db_permissionset) | | | [photo](help/database/db_photo) | photo storage | diff --git a/doc/database/db_apcontact.md b/doc/database/db_apcontact.md index 5f5d21e4e..539be251a 100644 --- a/doc/database/db_apcontact.md +++ b/doc/database/db_apcontact.md @@ -27,7 +27,7 @@ Fields | subscribe | | varchar(255) | YES | | NULL | | | baseurl | baseurl of the ap contact | varchar(255) | YES | | NULL | | | gsid | Global Server ID | int unsigned | YES | | NULL | | -| generator | Name of the contact's system | varchar(255) | YES | | NULL | | +| generator | Name of the contact's system | varchar(255) | YES | | NULL | | | following_count | Number of following contacts | int unsigned | YES | | 0 | | | followers_count | Number of followers | int unsigned | YES | | 0 | | | statuses_count | Number of posts | int unsigned | YES | | 0 | | diff --git a/doc/database/db_attach.md b/doc/database/db_attach.md index 9eb0f36e9..76d8e01f2 100644 --- a/doc/database/db_attach.md +++ b/doc/database/db_attach.md @@ -17,7 +17,7 @@ Fields | 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 | YES | | NULL | | +| allow_cid | Access Control - list of allowed contact.id '<19><78> | mediumtext | YES | | NULL | | | allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | | deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | | deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | diff --git a/doc/database/db_event.md b/doc/database/db_event.md index d8b009639..37048599b 100644 --- a/doc/database/db_event.md +++ b/doc/database/db_event.md @@ -24,7 +24,7 @@ Fields | nofinish | if event does have no end this is 1 | boolean | NO | | 0 | | | adjust | adjust to timezone of the recipient (0 or 1) | boolean | NO | | 1 | | | ignore | 0 or 1 | boolean | NO | | 0 | | -| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | +| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | | allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | | deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | | deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | diff --git a/doc/database/db_parsed_url.md b/doc/database/db_parsed_url.md index 67ea5caeb..1752cd0b5 100644 --- a/doc/database/db_parsed_url.md +++ b/doc/database/db_parsed_url.md @@ -1,7 +1,7 @@ Table parsed_url =========== -cache for 'parse_url' queries +cache for 'parse_url' queries Fields ------ @@ -9,7 +9,7 @@ Fields | Field | Description | Type | Null | Key | Default | Extra | | -------- | --------------------------------- | ---------- | ---- | --- | ------------------- | ----- | | url_hash | page url hash | binary(64) | NO | PRI | NULL | | -| guessing | is the 'guessing' mode active? | boolean | NO | PRI | 0 | | +| guessing | is the 'guessing' mode active? | boolean | NO | PRI | 0 | | | oembed | is the data the result of oembed? | boolean | NO | PRI | 0 | | | url | page url | text | NO | | NULL | | | content | page data | mediumtext | YES | | NULL | | diff --git a/doc/database/db_permissionset.md b/doc/database/db_permissionset.md index 107cedea1..38c6fe8f3 100644 --- a/doc/database/db_permissionset.md +++ b/doc/database/db_permissionset.md @@ -10,7 +10,7 @@ Fields | --------- | ------------------------------------------------------ | ------------------ | ---- | --- | ------- | -------------- | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | | uid | Owner id of this permission set | mediumint unsigned | NO | | 0 | | -| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | +| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | | allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | | deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | | deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | diff --git a/doc/database/db_photo.md b/doc/database/db_photo.md index aad26bdbe..b641ae459 100644 --- a/doc/database/db_photo.md +++ b/doc/database/db_photo.md @@ -27,7 +27,7 @@ Fields | data | | mediumblob | NO | | NULL | | | scale | | tinyint unsigned | NO | | 0 | | | profile | | boolean | NO | | 0 | | -| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | +| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | | allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | | deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | | deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | diff --git a/view/templates/structure.tpl b/view/templates/structure.tpl index 954712f12..f6a647b79 100644 --- a/view/templates/structure.tpl +++ b/view/templates/structure.tpl @@ -1,20 +1,20 @@ -Table {{$name}} +Table {{$name nofilter}} =========== -{{$comment}} +{{$comment nofilter}} Fields ------ {{foreach $fields as $field}} -| {{$field.name}} | {{$field.comment}} | {{$field.type}} | {{$field.null}} | {{$field.primary}} | {{$field.default}} | {{$field.extra}} | +| {{$field.name nofilter}} | {{$field.comment nofilter}} | {{$field.type nofilter}} | {{$field.null nofilter}} | {{$field.primary nofilter}} | {{$field.default nofilter}} | {{$field.extra nofilter}} | {{/foreach}} Indexes ------------ {{foreach $indexes as $index}} -| {{$index.name}} | {{$index.fields}} | +| {{$index.name nofilter}} | {{$index.fields nofilter}} | {{/foreach}} {{if $foreign}} @@ -24,7 +24,7 @@ Foreign Keys | Field | Target Table | Target Field | |-------|--------------|--------------| {{foreach $foreign as $key}} -| {{$key.field}} | [{{$key.targettable}}](help/database/db_{{$key.targettable}}) | {{$key.targetfield}} | +| {{$key.field nofilter}} | [{{$key.targettable nofilter}}](help/database/db_{{$key.targettable nofilter}}) | {{$key.targetfield nofilter}} | {{/foreach}} {{/if}} diff --git a/view/templates/tables.tpl b/view/templates/tables.tpl index 8fdd12a37..2bf38c9f1 100644 --- a/view/templates/tables.tpl +++ b/view/templates/tables.tpl @@ -6,5 +6,5 @@ Database Tables | Table | Description | |-------|-------------| {{foreach $tables as $table}} -| [{{$table.name}}](help/database/db_{{$table.name}}) | {{$table.comment}} | +| [{{$table.name nofilter}}](help/database/db_{{$table.name nofilter}}) | {{$table.comment nofilter}} | {{/foreach}}