From a827f948c867ceebf60d82b0740032512be23302 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 14 Jun 2021 05:14:09 +0000 Subject: [PATCH] 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 660319e041..654de9a6e6 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 aec9bbd559..61bd520d91 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 f3b3365627..ccb426880a 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 91918adef1..ae8507af0d 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 69d33fe6c4..9cff3af0cd 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 af2b8d6613..c847c32181 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 799b01fa16..261c982047 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 ee546d54e8..fec3f8b242 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 51d78aa5a3..51cad7595e 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 1d1d552c3a..403fbf8649 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 d3633f1860..54ffd252cf 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 acbcaea2c7..8f72824846 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 e2fb6149fc..0eba8f11af 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 5077cd753f..4fe92a7756 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 e362e33458..35b94cdd77 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 d3e40ebbec..e07ee44844 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 6c1d5d8ce9..bcc531a495 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 732131a602..40e644ec45 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 f8435b71dc..8a971cd3dd 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 d7ef08fcdc..e8c55a5b33 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 c38df0a04e..d78d55fe4a 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 8b37f268e6..11325b6472 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 d9eb2a4ddf..1f4d0e588f 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 db53bb5670..fa1c64d2eb 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 96a5f02f49..985845c43d 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 6efc2a9f92..bfbf4ec85f 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 44fcf5668c..dbf4f79016 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 befb04d608..586f2b4501 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 81dbb84932..19b3c43e5f 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 34444303d4..7aa162bddc 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 1fb4f9b950..85c7a40b3c 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 774e9ed9b1..cf56a00719 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 75ecf6a9f4..2f96d639d3 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 898116fd08..ec2f5cb54e 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 53d44a4d42..645bba4925 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 51240b493f..6a6f0c81d5 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 18c443444c..11d98b4c0a 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 58d4d923d2..07263ab4dc 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 e74bfb7100..09b9fbbf4c 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 3b2cab3726..71a04b0d12 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 bf4b7117f5..8f8bd7bdd7 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 7c71d53053..c927093782 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 3086d8a943..3bcbef86e7 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 3834e72a49..80b74b6d2e 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 9be89de455..ecb0793c5e 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 c75c417227..69aa06c4ba 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 bf3289e266..8a333dada9 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 58f1ed7030..bf5f1dfe52 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 9c33ec2ae4..5223ef9f4f 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 9a3a996fcc..02b7b22d54 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 49fac4fd91..af0124b160 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 01727e2667..6696fc3ac3 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 58fa6f902a..964ccf45cf 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 020e5e9c9f..1367bcb770 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 2c92fc84d3..9284130b56 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 aa0e36066f..c7ee655696 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 b41a102732..b2eea14ae6 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 4018f1256f..34a683cfba 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 d745db6d2e..73af99b9ea 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 fe2f18ba84..6751390112 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 994a3ffbf2..10deb6c187 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 80916366a2..d607f74e7c 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 376f0cb225..1984436265 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 3fb7d7d8fc..8d7ae354f1 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 93510a16e7..712bb05fdd 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 2c208735a7..762c350395 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 8f055b1bc2..0794b7bcb1 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 42cc72c3cb..5006033e96 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 73871a07ca..4aa171f301 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 5246974f57..2da8021e44 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 ec10ba5496..00768c3b55 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 888ac73e67..bb66bcb3fd 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 91ba2eb315..15049ab575 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)