Updates database structure documentation
This commit is contained in:
parent
cd8ce7eada
commit
84ab5d6159
120
doc/database.md
120
doc/database.md
|
@ -3,50 +3,76 @@ Database Tables
|
||||||
|
|
||||||
* [Home](help)
|
* [Home](help)
|
||||||
|
|
||||||
| Table | Description |
|
| Table | Description |
|
||||||
|------------------------------------------------------|--------------------------------------------------|
|
|-------|-------------|
|
||||||
| [addon](help/database/db_addon) | registered addons |
|
| [gserver](help/database/db_gserver) | Global servers |
|
||||||
| [attach](help/database/db_attach) | file attachments |
|
| [user](help/database/db_user) | The local users |
|
||||||
| [auth_codes](help/database/db_auth_codes) | OAuth usage |
|
| [contact](help/database/db_contact) | contact table |
|
||||||
| [cache](help/database/db_cache) | OEmbed cache |
|
| [item-uri](help/database/db_item-uri) | URI and GUID for items |
|
||||||
| [challenge](help/database/db_challenge) | |
|
| [tag](help/database/db_tag) | tags and mentions |
|
||||||
| [clients](help/database/db_clients) | OAuth usage |
|
| [clients](help/database/db_clients) | OAuth usage |
|
||||||
| [config](help/database/db_config) | main configuration storage |
|
| [permissionset](help/database/db_permissionset) | |
|
||||||
| [contact](help/database/db_contact) | contact table |
|
| [verb](help/database/db_verb) | Activity Verbs |
|
||||||
| [conv](help/database/db_conv) | private messages |
|
| [2fa_app_specific_password](help/database/db_2fa_app_specific_password) | Two-factor app-specific _password |
|
||||||
| [conversation](help/database/db_conversation) | Raw data and structure information for messages |
|
| [2fa_recovery_codes](help/database/db_2fa_recovery_codes) | Two-factor authentication recovery codes |
|
||||||
| [event](help/database/db_event) | Events |
|
| [2fa_trusted_browser](help/database/db_2fa_trusted_browser) | Two-factor authentication trusted browsers |
|
||||||
| [fcontact](help/database/db_fcontact) | friend suggestion stuff |
|
| [addon](help/database/db_addon) | registered addons |
|
||||||
| [fsuggest](help/database/db_fsuggest) | friend suggestion stuff |
|
| [apcontact](help/database/db_apcontact) | ActivityPub compatible contacts - used in the ActivityPub implementation |
|
||||||
| [group](help/database/db_group) | privacy groups, group info |
|
| [application](help/database/db_application) | OAuth application |
|
||||||
| [group_member](help/database/db_group_member) | privacy groups, member info |
|
| [application-token](help/database/db_application-token) | OAuth user token |
|
||||||
| [gserver](help/database/db_gserver) | |
|
| [attach](help/database/db_attach) | file attachments |
|
||||||
| [hook](help/database/db_hook) | addon hook registry |
|
| [auth_codes](help/database/db_auth_codes) | OAuth usage |
|
||||||
| [intro](help/database/db_intro) | |
|
| [cache](help/database/db_cache) | Stores temporary data |
|
||||||
| [item](help/database/db_item) | all posts |
|
| [challenge](help/database/db_challenge) | |
|
||||||
| [locks](help/database/db_locks) | |
|
| [config](help/database/db_config) | main configuration storage |
|
||||||
| [mail](help/database/db_mail) | private messages |
|
| [contact-relation](help/database/db_contact-relation) | Contact relations |
|
||||||
| [mailacct](help/database/db_mailacct) | |
|
| [conv](help/database/db_conv) | private messages |
|
||||||
| [manage](help/database/db_manage) | table of accounts that can "su" each other |
|
| [conversation](help/database/db_conversation) | Raw data and structure information for messages |
|
||||||
| [notify](help/database/db_notify) | notifications |
|
| [delayed-post](help/database/db_delayed-post) | Posts that are about to be distributed at a later time |
|
||||||
| [notify-threads](help/database/db_notify-threads) | |
|
| [diaspora-interaction](help/database/db_diaspora-interaction) | Signed Diaspora Interaction |
|
||||||
| [oembed](help/database/db_oembed) | cache for OEmbed queries |
|
| [event](help/database/db_event) | Events |
|
||||||
| [parsed_url](help/database/db_parsed_url) | cache for "parse_url" queries |
|
| [fcontact](help/database/db_fcontact) | Diaspora compatible contacts - used in the Diaspora implementation |
|
||||||
| [pconfig](help/database/db_pconfig) | personal (per user) configuration storage |
|
| [fsuggest](help/database/db_fsuggest) | friend suggestion stuff |
|
||||||
| [photo](help/database/db_photo) | photo storage |
|
| [group](help/database/db_group) | privacy groups, group info |
|
||||||
| [poll](help/database/db_poll) | data for polls |
|
| [group_member](help/database/db_group_member) | privacy groups, member info |
|
||||||
| [poll_result](help/database/db_poll_result) | data for poll elements |
|
| [gserver-tag](help/database/db_gserver-tag) | Tags that the server has subscribed |
|
||||||
| [profile](help/database/db_profile) | user profiles data |
|
| [hook](help/database/db_hook) | addon hook registry |
|
||||||
| [profile_check](help/database/db_profile_check) | DFRN remote auth use |
|
| [host](help/database/db_host) | Hostname |
|
||||||
| [push_subscriber](help/database/db_push_subscriber) | |
|
| [inbox-status](help/database/db_inbox-status) | Status of ActivityPub inboxes |
|
||||||
| [queue](help/database/db_queue) | |
|
| [intro](help/database/db_intro) | |
|
||||||
| [register](help/database/db_register) | registrations requiring admin approval |
|
| [locks](help/database/db_locks) | |
|
||||||
| [search](help/database/db_search) | |
|
| [mail](help/database/db_mail) | private messages |
|
||||||
| [session](help/database/db_session) | web session storage |
|
| [mailacct](help/database/db_mailacct) | Mail account data for fetching mails |
|
||||||
| [sign](help/database/db_sign) | Diaspora signatures |
|
| [manage](help/database/db_manage) | table of accounts that can manage each other |
|
||||||
| [term](help/database/db_term) | item taxonomy (categories, tags, etc.) table |
|
| [notification](help/database/db_notification) | notifications |
|
||||||
| [thread](help/database/db_thread) | |
|
| [notify](help/database/db_notify) | notifications |
|
||||||
| [tokens](help/database/db_tokens) | OAuth usage |
|
| [notify-threads](help/database/db_notify-threads) | |
|
||||||
| [user](help/database/db_user) | local user table |
|
| [oembed](help/database/db_oembed) | cache for OEmbed queries |
|
||||||
| [userd](help/database/db_userd) | |
|
| [openwebauth-token](help/database/db_openwebauth-token) | Store OpenWebAuth token to verify contacts |
|
||||||
| [workerqueue](help/database/db_workerqueue) | |
|
| [parsed_url](help/database/db_parsed_url) | cache for 'parse_url' queries |
|
||||||
|
| [pconfig](help/database/db_pconfig) | personal (per user) configuration storage |
|
||||||
|
| [photo](help/database/db_photo) | photo storage |
|
||||||
|
| [post](help/database/db_post) | Structure for all posts |
|
||||||
|
| [post-category](help/database/db_post-category) | post relation to categories |
|
||||||
|
| [post-content](help/database/db_post-content) | Content for all posts |
|
||||||
|
| [post-delivery-data](help/database/db_post-delivery-data) | Delivery data for items |
|
||||||
|
| [post-media](help/database/db_post-media) | Attached media |
|
||||||
|
| [post-tag](help/database/db_post-tag) | post relation to tags |
|
||||||
|
| [post-thread](help/database/db_post-thread) | Thread related data |
|
||||||
|
| [post-user](help/database/db_post-user) | User specific post data |
|
||||||
|
| [post-thread-user](help/database/db_post-thread-user) | Thread related data per user |
|
||||||
|
| [post-user-notification](help/database/db_post-user-notification) | User post notifications |
|
||||||
|
| [process](help/database/db_process) | Currently running system processes |
|
||||||
|
| [profile](help/database/db_profile) | user profiles data |
|
||||||
|
| [profile_check](help/database/db_profile_check) | DFRN remote auth use |
|
||||||
|
| [profile_field](help/database/db_profile_field) | Custom profile fields |
|
||||||
|
| [push_subscriber](help/database/db_push_subscriber) | Used for OStatus: Contains feed subscribers |
|
||||||
|
| [register](help/database/db_register) | registrations requiring admin approval |
|
||||||
|
| [search](help/database/db_search) | |
|
||||||
|
| [session](help/database/db_session) | web session storage |
|
||||||
|
| [storage](help/database/db_storage) | Data stored by Database storage backend |
|
||||||
|
| [tokens](help/database/db_tokens) | OAuth usage |
|
||||||
|
| [userd](help/database/db_userd) | Deleted usernames |
|
||||||
|
| [user-contact](help/database/db_user-contact) | User specific public contact data |
|
||||||
|
| [worker-ipc](help/database/db_worker-ipc) | Inter process communication between the frontend and the worker |
|
||||||
|
| [workerqueue](help/database/db_workerqueue) | Background tasks queue entries |
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
Table 2fa_app_specific_password
|
||||||
|
===========
|
||||||
|
Two-factor app-specific _password
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| id | Password ID for revocation | mediumint unsigned | YES | PRI | | auto_increment |
|
||||||
|
| uid | User ID | mediumint unsigned | YES | | | |
|
||||||
|
| description | Description of the usage of the password | varchar(255) | NO | | | |
|
||||||
|
| hashed_password | Hashed password | varchar(255) | YES | | | |
|
||||||
|
| generated | Datetime the password was generated | datetime | YES | | | |
|
||||||
|
| last_used | Datetime the password was last used | datetime | NO | | | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -0,0 +1,12 @@
|
||||||
|
Table 2fa_recovery_codes
|
||||||
|
===========
|
||||||
|
Two-factor authentication recovery codes
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| uid | User ID | mediumint unsigned | YES | PRI | | |
|
||||||
|
| code | Recovery code string | varchar(50) | YES | PRI | | |
|
||||||
|
| generated | Datetime the code was generated | datetime | YES | | | |
|
||||||
|
| used | Datetime the code was used | datetime | NO | | | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -0,0 +1,13 @@
|
||||||
|
Table 2fa_trusted_browser
|
||||||
|
===========
|
||||||
|
Two-factor authentication trusted browsers
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| cookie_hash | Trusted cookie hash | varchar(80) | YES | PRI | | |
|
||||||
|
| uid | User ID | mediumint unsigned | YES | | | |
|
||||||
|
| user_agent | User agent string | text | NO | | | |
|
||||||
|
| created | Datetime the trusted browser was recorded | datetime | YES | | | |
|
||||||
|
| last_used | Datetime the trusted browser was last used | datetime | NO | | | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -1,17 +1,15 @@
|
||||||
Table addon
|
Table addon
|
||||||
===========
|
===========
|
||||||
|
registered addons
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| ------------- | --------------------------------------------- | ---------- | ---- | --- | ------- | --------------- |
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| id | | int(11) | NO | PRI | NULL | auto_increment |
|
| id | | int unsigned | YES | PRI | | auto_increment |
|
||||||
| name | addon base (file)name | char(255) | NO | | | |
|
| name | addon base (file)name | varchar(50) | YES | | | |
|
||||||
| version | currently unused | char(255) | NO | | | |
|
| version | currently unused | varchar(50) | YES | | | |
|
||||||
| installed | currently always 1 | tinyint(1) | NO | | 0 | |
|
| installed | currently always 1 | boolean | YES | | 0 | |
|
||||||
| hidden | currently unused | tinyint(1) | NO | | 0 | |
|
| hidden | currently unused | boolean | YES | | 0 | |
|
||||||
| timestamp | file timestamp to check for reloads | bigint(20) | NO | | 0 | |
|
| timestamp | file timestamp to check for reloads | int unsigned | YES | | 0 | |
|
||||||
| plugin_admin | 1 = has admin config, 0 = has no admin config | tinyint(1) | NO | | 0 | |
|
| plugin_admin | 1 = has admin config, 0 = has no admin config | boolean | YES | | 0 | |
|
||||||
|
|
||||||
Notes:
|
|
||||||
These are addons which have been enabled by the site administrator on the addon page
|
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
Table apcontact
|
||||||
|
===========
|
||||||
|
ActivityPub compatible contacts - used in the ActivityPub implementation
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| url | URL of the contact | varbinary(255) | YES | PRI | | |
|
||||||
|
| uuid | | varchar(255) | NO | | | |
|
||||||
|
| type | | varchar(20) | YES | | | |
|
||||||
|
| following | | varchar(255) | NO | | | |
|
||||||
|
| followers | | varchar(255) | NO | | | |
|
||||||
|
| inbox | | varchar(255) | YES | | | |
|
||||||
|
| outbox | | varchar(255) | NO | | | |
|
||||||
|
| sharedinbox | | varchar(255) | NO | | | |
|
||||||
|
| manually-approve | | boolean | NO | | | |
|
||||||
|
| nick | | varchar(255) | YES | | | |
|
||||||
|
| name | | varchar(255) | NO | | | |
|
||||||
|
| about | | text | NO | | | |
|
||||||
|
| photo | | varchar(255) | NO | | | |
|
||||||
|
| addr | | varchar(255) | NO | | | |
|
||||||
|
| alias | | varchar(255) | NO | | | |
|
||||||
|
| pubkey | | text | NO | | | |
|
||||||
|
| subscribe | | varchar(255) | NO | | | |
|
||||||
|
| baseurl | baseurl of the ap contact | varchar(255) | NO | | | |
|
||||||
|
| gsid | Global Server ID | int unsigned | NO | | | |
|
||||||
|
| generator | Name of the contact's system | varchar(255) | NO | | | |
|
||||||
|
| following_count | Number of following contacts | int unsigned | NO | | 0 | |
|
||||||
|
| followers_count | Number of followers | int unsigned | NO | | 0 | |
|
||||||
|
| statuses_count | Number of posts | int unsigned | NO | | 0 | |
|
||||||
|
| updated | | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -0,0 +1,18 @@
|
||||||
|
Table application-token
|
||||||
|
===========
|
||||||
|
OAuth user token
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| application-id | | int unsigned | YES | PRI | | |
|
||||||
|
| uid | Owner User id | mediumint unsigned | YES | PRI | | |
|
||||||
|
| code | | varchar(64) | YES | | | |
|
||||||
|
| access_token | | varchar(64) | YES | | | |
|
||||||
|
| created_at | creation time | datetime | YES | | | |
|
||||||
|
| scopes | | varchar(255) | NO | | | |
|
||||||
|
| read | Read scope | boolean | NO | | | |
|
||||||
|
| write | Write scope | boolean | NO | | | |
|
||||||
|
| follow | Follow scope | boolean | NO | | | |
|
||||||
|
| push | Push scope | boolean | NO | | | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -0,0 +1,19 @@
|
||||||
|
Table application
|
||||||
|
===========
|
||||||
|
OAuth application
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| id | generated index | int unsigned | YES | PRI | | auto_increment |
|
||||||
|
| client_id | | varchar(64) | YES | | | |
|
||||||
|
| client_secret | | varchar(64) | YES | | | |
|
||||||
|
| name | | varchar(255) | YES | | | |
|
||||||
|
| redirect_uri | | varchar(255) | YES | | | |
|
||||||
|
| website | | varchar(255) | NO | | | |
|
||||||
|
| scopes | | varchar(255) | NO | | | |
|
||||||
|
| read | Read scope | boolean | NO | | | |
|
||||||
|
| write | Write scope | boolean | NO | | | |
|
||||||
|
| follow | Follow scope | boolean | NO | | | |
|
||||||
|
| push | Push scope | boolean | NO | | | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -1,22 +1,23 @@
|
||||||
Table attach
|
Table attach
|
||||||
============
|
===========
|
||||||
|
file attachments
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| ---------- | ------------------------------------------------------| ------------ | ---- | --- | ------------------- | --------------- |
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| id | generated index | int(11) | NO | PRI | NULL | auto_increment |
|
| id | generated index | int unsigned | YES | PRI | | auto_increment |
|
||||||
| uid | user_id of owner | int(11) | NO | | 0 | |
|
| uid | Owner User id | mediumint unsigned | YES | | 0 | |
|
||||||
| hash | hash | varchar(64) | NO | | | |
|
| hash | hash | varchar(64) | YES | | | |
|
||||||
| filename | filename of original | varchar(255) | NO | | | |
|
| filename | filename of original | varchar(255) | YES | | | |
|
||||||
| filetype | mimetype | varchar(64) | NO | | | |
|
| filetype | mimetype | varchar(64) | YES | | | |
|
||||||
| filesize | size in bytes | int(11) | NO | | 0 | |
|
| filesize | size in bytes | int unsigned | YES | | 0 | |
|
||||||
| data | file data | longblob | NO | | NULL | |
|
| data | file data | longblob | YES | | | |
|
||||||
| created | creation time | datetime | NO | | 0001-01-01 00:00:00 | |
|
| created | creation time | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| edited | last edit time | datetime | NO | | 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_cid | Access Control - list of allowed contact.id '<19><78> | mediumtext | NO | | | |
|
||||||
| allow_gid | Access Control - list of allowed groups | mediumtext | NO | | NULL | |
|
| allow_gid | Access Control - list of allowed groups | mediumtext | NO | | | |
|
||||||
| deny_cid | Access Control - list of denied contact.id | mediumtext | NO | | NULL | |
|
| deny_cid | Access Control - list of denied contact.id | mediumtext | NO | | | |
|
||||||
| deny_gid | Access Control - list of denied groups | mediumtext | NO | | NULL | |
|
| deny_gid | Access Control - list of denied groups | mediumtext | NO | | | |
|
||||||
|
| backend-class | Storage backend class | tinytext | NO | | | |
|
||||||
Notes: Permissions are surrounded by angle chars. e.g. <4>
|
| backend-ref | Storage backend data reference | text | NO | | | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
Table auth_codes
|
Table auth_codes
|
||||||
================
|
===========
|
||||||
|
OAuth usage
|
||||||
|
|
||||||
OAuth2 authorisation register - currently implemented but unused
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| id | | varchar(40) | YES | PRI | | |
|
||||||
| ------------- | ----------- | ------------ | ---- | --- | ------- | ----- |
|
| client_id | | varchar(20) | YES | | | |
|
||||||
| id | | varchar(40) | NO | PRI | NULL | |
|
| redirect_uri | | varchar(200) | YES | | | |
|
||||||
| client_id | | varchar(20) | NO | | | |
|
| expires | | int | YES | | 0 | |
|
||||||
| redirect_uri | | varchar(200) | NO | | | |
|
| scope | | varchar(250) | YES | | | |
|
||||||
| expires | | int(11) | NO | | 0 | |
|
|
||||||
| scope | | varchar(250) | NO | | | |
|
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
Table cache
|
Table cache
|
||||||
===========
|
===========
|
||||||
|
|
||||||
Stores temporary data
|
Stores temporary data
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| ------------ | ---------------------------------- | ------------ | ---- | --- | ------------------- | ----- |
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| k | cache key | varchar(255) | NO | PRI | NULL | |
|
| k | cache key | varbinary(255) | YES | PRI | | |
|
||||||
| v | cached serialized value | text | NO | | NULL | |
|
| v | cached serialized value | mediumtext | NO | | | |
|
||||||
| expires | datetime of cache expiration | datetime | NO | MUL | 0001-01-01 00:00:00 | |
|
| expires | datetime of cache expiration | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| updated | datetime of cache insertion | datetime | NO | MUL | 0001-01-01 00:00:00 | |
|
| updated | datetime of cache insertion | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
Table challenge
|
Table challenge
|
||||||
===============
|
===========
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
|
||||||
|-------------|------------------|------------------|------|-----|---------|----------------|
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| id | sequential ID | int(10) unsigned | NO | PRI | NULL | auto_increment |
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| challenge | | varchar(255) | NO | | | |
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
| dfrn-id | | varchar(255) | NO | | | |
|
| challenge | | varchar(255) | YES | | | |
|
||||||
| expire | | int(11) | NO | | 0 | |
|
| dfrn-id | | varchar(255) | YES | | | |
|
||||||
| type | | varchar(255) | NO | | | |
|
| expire | | int unsigned | YES | | 0 | |
|
||||||
| last_update | | varchar(255) | NO | | | |
|
| type | | varchar(255) | YES | | | |
|
||||||
|
| last_update | | varchar(255) | YES | | | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
Table clients
|
Table clients
|
||||||
=============
|
===========
|
||||||
|
OAuth usage
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| ------------- | ----------- | ------------ | ---- | --- | ------- | ----- |
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| client_id | | varchar(20) | NO | PRI | NULL | |
|
| client_id | | varchar(20) | YES | PRI | | |
|
||||||
| pw | | varchar(20) | NO | | | |
|
| pw | | varchar(20) | YES | | | |
|
||||||
| redirect_uri | | varchar(200) | NO | | | |
|
| redirect_uri | | varchar(200) | YES | | | |
|
||||||
| name | | text | YES | | NULL | |
|
| name | | text | NO | | | |
|
||||||
| icon | | text | YES | | NULL | |
|
| icon | | text | NO | | | |
|
||||||
| uid | | int(11) | NO | | 0 | |
|
| uid | User id | mediumint unsigned | YES | | 0 | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
Table config
|
Table config
|
||||||
============
|
===========
|
||||||
|
main configuration storage
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| ----- | ----------- | ---------------- | ---- | --- | ------- | --------------- |
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| id | | int(10) unsigned | NO | PRI | NULL | auto_increment |
|
| id | | int unsigned | YES | PRI | | auto_increment |
|
||||||
| cat | | char(255) | NO | MUL | | |
|
| cat | | varbinary(50) | YES | | | |
|
||||||
| k | | char(255) | NO | | | |
|
| k | | varbinary(50) | YES | | | |
|
||||||
| v | | text | NO | | NULL | |
|
| v | | mediumtext | NO | | | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
Table contact-relation
|
||||||
|
===========
|
||||||
|
Contact relations
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| cid | contact the related contact had interacted with | int unsigned | YES | PRI | 0 | |
|
||||||
|
| relation-cid | related contact who had interacted with the contact | int unsigned | YES | PRI | 0 | |
|
||||||
|
| last-interaction | Date of the last interaction | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
| follow-updated | Date of the last update of the contact relationship | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
| follows | | boolean | YES | | 0 | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -1,72 +1,88 @@
|
||||||
Table contact
|
Table contact
|
||||||
=============
|
===========
|
||||||
|
contact table
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|---------------------------|-----------------------------------------------------------|--------------|------|-----|---------------------|----------------|
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment |
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
| uid | user.id of the owner of this data | int(11) | NO | MUL | 0 | |
|
| uid | Owner User id | mediumint unsigned | YES | | 0 | |
|
||||||
| created | | datetime | NO | | 0001-01-01 00:00:00 | |
|
| created | | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| self | 1 if the contact is the user him/her self | tinyint(1) | NO | | 0 | |
|
| updated | Date of last contact update | datetime | NO | | 0001-01-01 00:00:00 | |
|
||||||
| remote_self | | tinyint(1) | NO | | 0 | |
|
| self | 1 if the contact is the user him/her self | boolean | YES | | 0 | |
|
||||||
| rel | The kind of the relation between the user and the contact | tinyint(1) | NO | | 0 | |
|
| remote_self | | boolean | YES | | 0 | |
|
||||||
| duplex | | tinyint(1) | NO | | 0 | |
|
| rel | The kind of the relation between the user and the contact | tinyint unsigned | YES | | 0 | |
|
||||||
| network | Network protocol of the contact | varchar(255) | NO | | | |
|
| duplex | | boolean | YES | | 0 | |
|
||||||
| name | Name that this contact is known by | varchar(255) | NO | | | |
|
| network | Network of the contact | char(4) | YES | | | |
|
||||||
| nick | Nick- and user name of the contact | varchar(255) | NO | | | |
|
| protocol | Protocol of the contact | char(4) | YES | | | |
|
||||||
| location | | varchar(255) | NO | | | |
|
| name | Name that this contact is known by | varchar(255) | YES | | | |
|
||||||
| about | | text | NO | | NULL | |
|
| nick | Nick- and user name of the contact | varchar(255) | YES | | | |
|
||||||
| keywords | public keywords (interests) of the contact | text | NO | | NULL | |
|
| location | | varchar(255) | NO | | | |
|
||||||
| gender | | varchar(32) | NO | | | |
|
| about | | text | NO | | | |
|
||||||
| attag | | varchar(255) | NO | | | |
|
| keywords | public keywords (interests) of the contact | text | NO | | | |
|
||||||
| photo | Link to the profile photo of the contact | text | NO | | NULL | |
|
| gender | Deprecated | varchar(32) | YES | | | |
|
||||||
| thumb | Link to the profile photo (thumb size) | text | NO | | NULL | |
|
| xmpp | | varchar(255) | YES | | | |
|
||||||
| micro | Link to the profile photo (micro size) | text | NO | | NULL | |
|
| attag | | varchar(255) | YES | | | |
|
||||||
| site-pubkey | | text | NO | | NULL | |
|
| avatar | | varchar(255) | YES | | | |
|
||||||
| issued-id | | varchar(255) | NO | | | |
|
| photo | Link to the profile photo of the contact | varchar(255) | NO | | | |
|
||||||
| dfrn-id | | varchar(255) | NO | | | |
|
| thumb | Link to the profile photo (thumb size) | varchar(255) | NO | | | |
|
||||||
| url | | varchar(255) | NO | | | |
|
| micro | Link to the profile photo (micro size) | varchar(255) | NO | | | |
|
||||||
| nurl | | varchar(255) | NO | | | |
|
| site-pubkey | | text | NO | | | |
|
||||||
| addr | | varchar(255) | NO | | | |
|
| issued-id | | varchar(255) | YES | | | |
|
||||||
| alias | | varchar(255) | NO | | | |
|
| dfrn-id | | varchar(255) | YES | | | |
|
||||||
| pubkey | RSA public key 4096 bit | text | NO | | NULL | |
|
| url | | varchar(255) | YES | | | |
|
||||||
| prvkey | RSA private key 4096 bit | text | NO | | NULL | |
|
| nurl | | varchar(255) | YES | | | |
|
||||||
| batch | | varchar(255) | NO | | | |
|
| addr | | varchar(255) | YES | | | |
|
||||||
| request | | text | NO | | NULL | |
|
| alias | | varchar(255) | YES | | | |
|
||||||
| notify | | text | NO | | NULL | |
|
| pubkey | RSA public key 4096 bit | text | NO | | | |
|
||||||
| poll | | text | NO | | NULL | |
|
| prvkey | RSA private key 4096 bit | text | NO | | | |
|
||||||
| confirm | | text | NO | | NULL | |
|
| batch | | varchar(255) | YES | | | |
|
||||||
| poco | | text | NO | | NULL | |
|
| request | | varchar(255) | NO | | | |
|
||||||
| aes_allow | | tinyint(1) | NO | | 0 | |
|
| notify | | varchar(255) | NO | | | |
|
||||||
| ret-aes | | tinyint(1) | NO | | 0 | |
|
| poll | | varchar(255) | NO | | | |
|
||||||
| usehub | | tinyint(1) | NO | | 0 | |
|
| confirm | | varchar(255) | NO | | | |
|
||||||
| subhub | | tinyint(1) | NO | | 0 | |
|
| subscribe | | varchar(255) | NO | | | |
|
||||||
| hub-verify | | varchar(255) | NO | | | |
|
| poco | | varchar(255) | NO | | | |
|
||||||
| last-update | Date of the last try to update the contact info | datetime | NO | | 0001-01-01 00:00:00 | |
|
| aes_allow | | boolean | YES | | 0 | |
|
||||||
| success_update | Date of the last successful contact update | datetime | NO | | 0001-01-01 00:00:00 | |
|
| ret-aes | | boolean | YES | | 0 | |
|
||||||
| failure_update | Date of the last failed update | datetime | NO | | 0001-01-01 00:00:00 | |
|
| usehub | | boolean | YES | | 0 | |
|
||||||
| name-date | | datetime | NO | | 0001-01-01 00:00:00 | |
|
| subhub | | boolean | YES | | 0 | |
|
||||||
| uri-date | | datetime | NO | | 0001-01-01 00:00:00 | |
|
| hub-verify | | varchar(255) | YES | | | |
|
||||||
| avatar-date | | datetime | NO | | 0001-01-01 00:00:00 | |
|
| last-update | Date of the last try to update the contact info | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| term-date | | datetime | NO | | 0001-01-01 00:00:00 | |
|
| success_update | Date of the last successful contact update | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| last-item | date of the last post | datetime | NO | | 0001-01-01 00:00:00 | |
|
| failure_update | Date of the last failed update | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| priority | | tinyint(3) | NO | | 0 | |
|
| failed | Connection failed | boolean | NO | | | |
|
||||||
| blocked | | tinyint(1) | NO | | 1 | |
|
| name-date | | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| readonly | posts of the contact are readonly | tinyint(1) | NO | | 0 | |
|
| uri-date | | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| writable | | tinyint(1) | NO | | 0 | |
|
| avatar-date | | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| forum | contact is a forum | tinyint(1) | NO | | 0 | |
|
| term-date | | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| prv | contact is a private group | tinyint(1) | NO | | 0 | |
|
| last-item | date of the last post | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| hidden | | tinyint(1) | NO | | 0 | |
|
| last-discovery | date of the last follower discovery | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| archive | | tinyint(1) | NO | | 0 | |
|
| priority | | tinyint unsigned | YES | | 0 | |
|
||||||
| pending | | tinyint(1) | NO | | 1 | |
|
| blocked | Node-wide block status | boolean | YES | | 1 | |
|
||||||
| rating | | tinyint(1) | NO | | 0 | |
|
| block_reason | Node-wide block reason | text | NO | | | |
|
||||||
| reason | | text | NO | | NULL | |
|
| readonly | posts of the contact are readonly | boolean | YES | | 0 | |
|
||||||
| closeness | | tinyint(2) | NO | | 99 | |
|
| writable | | boolean | YES | | 0 | |
|
||||||
| info | | mediumtext | NO | | NULL | |
|
| forum | contact is a forum | boolean | YES | | 0 | |
|
||||||
| profile-id | | int(11) | NO | | 0 | |
|
| prv | contact is a private group | boolean | YES | | 0 | |
|
||||||
| bdyear | | varchar(4) | NO | | | |
|
| contact-type | | tinyint | YES | | 0 | |
|
||||||
| bd | | date | NO | | 0001-01-01 | |
|
| manually-approve | | boolean | NO | | | |
|
||||||
| notify_new_posts | | tinyint(1) | NO | | 0 | |
|
| hidden | | boolean | YES | | 0 | |
|
||||||
| fetch_further_information | | tinyint(1) | NO | | 0 | |
|
| archive | | boolean | YES | | 0 | |
|
||||||
| ffi_keyword_denylist | | mediumtext | NO | | NULL | |
|
| pending | | boolean | YES | | 1 | |
|
||||||
|
| deleted | Contact has been deleted | boolean | YES | | 0 | |
|
||||||
|
| rating | | tinyint | YES | | 0 | |
|
||||||
|
| unsearchable | Contact prefers to not be searchable | boolean | YES | | 0 | |
|
||||||
|
| sensitive | Contact posts sensitive content | boolean | YES | | 0 | |
|
||||||
|
| baseurl | baseurl of the contact | varchar(255) | NO | | | |
|
||||||
|
| gsid | Global Server ID | int unsigned | NO | | | |
|
||||||
|
| reason | | text | NO | | | |
|
||||||
|
| closeness | | tinyint unsigned | YES | | 99 | |
|
||||||
|
| info | | mediumtext | NO | | | |
|
||||||
|
| profile-id | Deprecated | int unsigned | NO | | | |
|
||||||
|
| bdyear | | varchar(4) | YES | | | |
|
||||||
|
| bd | | date | YES | | 0001-01-01 | |
|
||||||
|
| notify_new_posts | | boolean | YES | | 0 | |
|
||||||
|
| fetch_further_information | | tinyint unsigned | YES | | 0 | |
|
||||||
|
| ffi_keyword_denylist | | text | NO | | | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
Table conv
|
Table conv
|
||||||
==========
|
===========
|
||||||
|
private messages
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| ------- | ----------------------------------------- | ---------------- | ---- | --- | ------------------- | --------------- |
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| id | sequential ID | int(10) unsigned | NO | PRI | NULL | auto_increment |
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
| guid | A unique identifier for this conversation | varchar(64) | NO | | | |
|
| guid | A unique identifier for this conversation | varchar(255) | YES | | | |
|
||||||
| recips | sender_handle;recipient_handle | mediumtext | NO | | NULL | |
|
| recips | sender_handle;recipient_handle | text | NO | | | |
|
||||||
| uid | user_id of the owner of this data | int(11) | NO | MUL | 0 | |
|
| uid | Owner User id | mediumint unsigned | YES | | 0 | |
|
||||||
| creator | handle of creator | varchar(255) | NO | | | |
|
| creator | handle of creator | varchar(255) | YES | | | |
|
||||||
| created | creation timestamp | datetime | NO | | 0001-01-01 00:00:00 | |
|
| created | creation timestamp | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| updated | edited timestamp | datetime | NO | | 0001-01-01 00:00:00 | |
|
| updated | edited timestamp | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| subject | subject of initial message | mediumtext | NO | | NULL | |
|
| subject | subject of initial message | text | NO | | | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
Table conversation
|
Table conversation
|
||||||
==================
|
===========
|
||||||
|
Raw data and structure information for messages
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|-------------------| ---------------------------------- |---------------------|------|-----|---------------------|----------------|
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| item-uri | URI of the item | varbinary(255) | NO | PRI | NULL | |
|
| item-uri | Original URI of the item - unrelated to the table with the same name | varbinary(255) | YES | PRI | | |
|
||||||
| reply-to-uri | URI to which this item is a reply | varbinary(255) | NO | | | |
|
| reply-to-uri | URI to which this item is a reply | varbinary(255) | YES | | | |
|
||||||
| conversation-uri | GNU Social conversation URI | varbinary(255) | NO | | | |
|
| conversation-uri | GNU Social conversation URI | varbinary(255) | YES | | | |
|
||||||
| conversation-href | GNU Social conversation link | varbinary(255) | NO | | | |
|
| conversation-href | GNU Social conversation link | varbinary(255) | YES | | | |
|
||||||
| protocol | The protocol of the item | tinyint(1) unsigned | NO | | 0 | |
|
| protocol | The protocol of the item | tinyint unsigned | YES | | 255 | |
|
||||||
| source | Original source | mediumtext | NO | | | |
|
| direction | How the message arrived here: 1=push, 2=pull | tinyint unsigned | YES | | 0 | |
|
||||||
| received | Receiving date | datetime | NO | | 0001-01-01 | |
|
| source | Original source | mediumtext | NO | | | |
|
||||||
|
| received | Receiving date | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
Table delayed-post
|
||||||
|
===========
|
||||||
|
Posts that are about to be distributed at a later time
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| id | | int unsigned | YES | PRI | | auto_increment |
|
||||||
|
| uri | URI of the post that will be distributed later | varchar(255) | NO | | | |
|
||||||
|
| uid | Owner User id | mediumint unsigned | NO | | | |
|
||||||
|
| delayed | delay time | datetime | NO | | | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -0,0 +1,10 @@
|
||||||
|
Table diaspora-interaction
|
||||||
|
===========
|
||||||
|
Signed Diaspora Interaction
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | PRI | | |
|
||||||
|
| interaction | The Diaspora interaction | mediumtext | NO | | | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -1,26 +1,28 @@
|
||||||
Table event
|
Table event
|
||||||
===========
|
===========
|
||||||
|
Events
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| ---------- | ----------------------------------------------- -------| ------------------- | ---- | --- | ------------------- | --------------- |
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment |
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
| uid | user_id of the owner of this data | int(11) | NO | MUL | 0 | |
|
| guid | | varchar(255) | YES | | | |
|
||||||
| cid | contact_id (ID of the contact in contact table) | int(11) | NO | | 0 | |
|
| uid | Owner User id | mediumint unsigned | YES | | 0 | |
|
||||||
| uri | | varchar(255) | NO | | | |
|
| cid | contact_id (ID of the contact in contact table) | int unsigned | YES | | 0 | |
|
||||||
| created | creation time | datetime | NO | | 0001-01-01 00:00:00 | |
|
| uri | | varchar(255) | YES | | | |
|
||||||
| edited | last edit time | datetime | NO | | 0001-01-01 00:00:00 | |
|
| created | creation time | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| start | event start time | datetime | NO | | 0001-01-01 00:00:00 | |
|
| edited | last edit time | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| finish | event end time | datetime | NO | | 0001-01-01 00:00:00 | |
|
| start | event start time | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| summary | short description or title of the event | text | NO | | NULL | |
|
| finish | event end time | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| desc | event description | text | NO | | NULL | |
|
| summary | short description or title of the event | text | NO | | | |
|
||||||
| location | event location | text | NO | | NULL | |
|
| desc | event description | text | NO | | | |
|
||||||
| type | event or birthday | varchar(255) | NO | | | |
|
| location | event location | text | NO | | | |
|
||||||
| nofinish | if event does have no end this is 1 | tinyint(1) | NO | | 0 | |
|
| type | event or birthday | varchar(20) | YES | | | |
|
||||||
| adjust | adjust to timezone of the recipient (0 or 1) | tinyint(1) | NO | | 1 | |
|
| nofinish | if event does have no end this is 1 | boolean | YES | | 0 | |
|
||||||
| ignore | 0 or 1 | tinyint(1) unsigned | NO | | 0 | |
|
| adjust | adjust to timezone of the recipient (0 or 1) | boolean | YES | | 1 | |
|
||||||
| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | NO | | NULL | |
|
| ignore | 0 or 1 | boolean | YES | | 0 | |
|
||||||
| allow_gid | Access Control - list of allowed groups | mediumtext | NO | | NULL | |
|
| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | NO | | | |
|
||||||
| deny_cid | Access Control - list of denied contact.id | mediumtext | NO | | NULL | |
|
| allow_gid | Access Control - list of allowed groups | mediumtext | NO | | | |
|
||||||
| deny_gid | Access Control - list of denied groups | mediumtext | NO | | NULL | |
|
| deny_cid | Access Control - list of denied contact.id | mediumtext | NO | | | |
|
||||||
|
| deny_gid | Access Control - list of denied groups | mediumtext | NO | | | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -1,24 +1,25 @@
|
||||||
Table fcontact
|
Table fcontact
|
||||||
==============
|
===========
|
||||||
|
Diaspora compatible contacts - used in the Diaspora implementation
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| -------- | ------------- | ---------------- | ---- | --- | ------------------- | --------------- |
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| id | sequential ID | int(10) unsigned | NO | PRI | NULL | auto_increment |
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
| guid | unique id | varchar(64) | NO | | | |
|
| guid | unique id | varchar(255) | YES | | | |
|
||||||
| url | | varchar(255) | NO | | | |
|
| url | | varchar(255) | YES | | | |
|
||||||
| name | | varchar(255) | NO | | | |
|
| name | | varchar(255) | YES | | | |
|
||||||
| photo | | varchar(255) | NO | | | |
|
| photo | | varchar(255) | YES | | | |
|
||||||
| request | | varchar(255) | NO | | | |
|
| request | | varchar(255) | YES | | | |
|
||||||
| nick | | varchar(255) | NO | | | |
|
| nick | | varchar(255) | YES | | | |
|
||||||
| addr | | varchar(255) | NO | MUL | | |
|
| addr | | varchar(255) | YES | | | |
|
||||||
| batch | | varchar(255) | NO | | | |
|
| batch | | varchar(255) | YES | | | |
|
||||||
| notify | | varchar(255) | NO | | | |
|
| notify | | varchar(255) | YES | | | |
|
||||||
| poll | | varchar(255) | NO | | | |
|
| poll | | varchar(255) | YES | | | |
|
||||||
| confirm | | varchar(255) | NO | | | |
|
| confirm | | varchar(255) | YES | | | |
|
||||||
| priority | | tinyint(1) | NO | | 0 | |
|
| priority | | tinyint unsigned | YES | | 0 | |
|
||||||
| network | | varchar(32) | NO | | | |
|
| network | | char(4) | YES | | | |
|
||||||
| alias | | varchar(255) | NO | | | |
|
| alias | | varchar(255) | YES | | | |
|
||||||
| pubkey | | text | NO | | NULL | |
|
| pubkey | | text | NO | | | |
|
||||||
| updated | | datetime | NO | | 0001-01-01 00:00:00 | |
|
| updated | | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
Table fsuggest
|
Table fsuggest
|
||||||
==============
|
===========
|
||||||
|
friend suggestion stuff
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| ------- | ----------- | ------------ | ---- | --- | ------------------- | --------------- |
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| id | | int(11) | NO | PRI | NULL | auto_increment |
|
| id | | int unsigned | YES | PRI | | auto_increment |
|
||||||
| uid | | int(11) | NO | | 0 | |
|
| uid | User id | mediumint unsigned | YES | | 0 | |
|
||||||
| cid | | int(11) | NO | | 0 | |
|
| cid | | int unsigned | YES | | 0 | |
|
||||||
| name | | varchar(255) | NO | | | |
|
| name | | varchar(255) | YES | | | |
|
||||||
| url | | varchar(255) | NO | | | |
|
| url | | varchar(255) | YES | | | |
|
||||||
| request | | varchar(255) | NO | | | |
|
| request | | varchar(255) | YES | | | |
|
||||||
| photo | | varchar(255) | NO | | | |
|
| photo | | varchar(255) | YES | | | |
|
||||||
| note | | text | NO | | NULL | |
|
| note | | text | NO | | | |
|
||||||
| created | | datetime | NO | | 0001-01-01 00:00:00 | |
|
| created | | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
Table group
|
Table group
|
||||||
===========
|
===========
|
||||||
|
privacy groups, group info
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| ------- | ------------------------------------------ | ---------------- | ---- | --- | ------- | --------------- |
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| id | sequential ID | int(10) unsigned | NO | PRI | NULL | auto_increment |
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
| uid | user.id owning this data | int(10) unsigned | NO | MUL | 0 | |
|
| uid | Owner User id | mediumint unsigned | YES | | 0 | |
|
||||||
| visible | 1 indicates the member list is not private | tinyint(1) | NO | | 0 | |
|
| visible | 1 indicates the member list is not private | boolean | YES | | 0 | |
|
||||||
| deleted | 1 indicates the group has been deleted | tinyint(1) | NO | | 0 | |
|
| deleted | 1 indicates the group has been deleted | boolean | YES | | 0 | |
|
||||||
| name | human readable name of group | varchar(255) | NO | | | |
|
| name | human readable name of group | varchar(255) | YES | | | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
Table group_member
|
Table group_member
|
||||||
==================
|
===========
|
||||||
|
privacy groups, member info
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| ---------- | ----------------------------------------------------------- | ---------------- | ---- | --- | ------- | --------------- |
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| id | sequential ID | int(10) unsigned | NO | PRI | NULL | auto_increment |
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
| uid | user.id of the owner of this data | int(10) unsigned | NO | MUL | 0 | |
|
| gid | groups.id of the associated group | int unsigned | YES | | 0 | |
|
||||||
| gid | groups.id of the associated group | int(10) unsigned | NO | | 0 | |
|
| contact-id | contact.id of the member assigned to the associated group | int unsigned | YES | | 0 | |
|
||||||
| contact-id | contact.id of the member assigned to the associated group | int(10) unsigned | NO | | 0 | |
|
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
Table gserver-tag
|
||||||
|
===========
|
||||||
|
Tags that the server has subscribed
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| gserver-id | The id of the gserver | int unsigned | YES | PRI | 0 | |
|
||||||
|
| tag | Tag that the server has subscribed | varchar(100) | YES | PRI | | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -1,24 +1,31 @@
|
||||||
Table gserver
|
Table gserver
|
||||||
=============
|
===========
|
||||||
|
Global servers
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
|
||||||
|------------------|---------------------------|------------------|------|-----|---------------------|----------------|
|
|
||||||
| id | sequential ID | int(10) unsigned | NO | PRI | NULL | auto_increment |
|
|
||||||
| url | | varchar(255) | NO | | | |
|
|
||||||
| nurl | | varchar(255) | NO | MUL | | |
|
|
||||||
| version | | varchar(255) | NO | | | |
|
|
||||||
| site_name | | varchar(255) | NO | | | |
|
|
||||||
| info | | text | NO | | NULL | |
|
|
||||||
| register_policy | | tinyint(1) | NO | | 0 | |
|
|
||||||
| registered-users |Number of registered users | int(10) | NO | | 0 | |
|
|
||||||
| poco | | varchar(255) | NO | | | |
|
|
||||||
| noscrape | | varchar(255) | NO | | | |
|
|
||||||
| network | | varchar(32) | NO | | | |
|
|
||||||
| platform | | varchar(255) | NO | | | |
|
|
||||||
| created | | datetime | NO | | 0001-01-01 00:00:00 | |
|
|
||||||
| last_poco_query | | datetime | YES | | 0001-01-01 00:00:00 | |
|
|
||||||
| last_contact | | datetime | YES | | 0001-01-01 00:00:00 | |
|
|
||||||
| last_failure | | datetime | YES | | 0001-01-01 00:00:00 | |
|
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
|
| url | | varchar(255) | YES | | | |
|
||||||
|
| nurl | | varchar(255) | YES | | | |
|
||||||
|
| version | | varchar(255) | YES | | | |
|
||||||
|
| site_name | | varchar(255) | YES | | | |
|
||||||
|
| info | | text | NO | | | |
|
||||||
|
| register_policy | | tinyint | YES | | 0 | |
|
||||||
|
| registered-users | Number of registered users | int unsigned | YES | | 0 | |
|
||||||
|
| directory-type | Type of directory service (Poco, Mastodon) | tinyint | NO | | 0 | |
|
||||||
|
| poco | | varchar(255) | YES | | | |
|
||||||
|
| noscrape | | varchar(255) | YES | | | |
|
||||||
|
| network | | char(4) | YES | | | |
|
||||||
|
| protocol | The protocol of the server | tinyint unsigned | NO | | | |
|
||||||
|
| platform | | varchar(255) | YES | | | |
|
||||||
|
| relay-subscribe | Has the server subscribed to the relay system | boolean | YES | | 0 | |
|
||||||
|
| relay-scope | The scope of messages that the server wants to get | varchar(10) | YES | | | |
|
||||||
|
| detection-method | Method that had been used to detect that server | tinyint unsigned | NO | | | |
|
||||||
|
| created | | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
| last_poco_query | | datetime | NO | | 0001-01-01 00:00:00 | |
|
||||||
|
| last_contact | Last successful connection request | datetime | NO | | 0001-01-01 00:00:00 | |
|
||||||
|
| last_failure | Last failed connection request | datetime | NO | | 0001-01-01 00:00:00 | |
|
||||||
|
| failed | Connection failed | boolean | NO | | | |
|
||||||
|
| next_contact | Next connection request | datetime | NO | | 0001-01-01 00:00:00 | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
Table hook
|
Table hook
|
||||||
==========
|
===========
|
||||||
|
addon hook registry
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| -------- | ---------------------------------------------------------------------------------------------------------- | ---------------- | ---- | --- | ------- | --------------- |
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment |
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
| hook | name of hook | varchar(255) | NO | MUL | | |
|
| hook | name of hook | varbinary(100) | YES | | | |
|
||||||
| file | relative filename of hook handler | varchar(255) | NO | | | |
|
| file | relative filename of hook handler | varbinary(200) | YES | | | |
|
||||||
| function | function name of hook handler | varchar(255) | NO | | | |
|
| 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 | int(11) unsigned | NO | | 0 | |
|
| priority | not yet implemented - can be used to sort conflicts in hook handling by calling handlers in priority order | smallint unsigned | YES | | 0 | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
Table host
|
||||||
|
===========
|
||||||
|
Hostname
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| id | sequential ID | tinyint unsigned | YES | PRI | | auto_increment |
|
||||||
|
| name | The hostname | varchar(128) | YES | | | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -0,0 +1,15 @@
|
||||||
|
Table inbox-status
|
||||||
|
===========
|
||||||
|
Status of ActivityPub inboxes
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| url | URL of the inbox | varbinary(255) | YES | PRI | | |
|
||||||
|
| created | Creation date of this entry | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
| success | Date of the last successful delivery | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
| failure | Date of the last failed delivery | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
| previous | Previous delivery date | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
| archive | Is the inbox archived? | boolean | YES | | 0 | |
|
||||||
|
| shared | Is it a shared inbox? | boolean | YES | | 0 | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -1,18 +1,19 @@
|
||||||
Table intro
|
Table intro
|
||||||
===========
|
===========
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
|
||||||
|------------|------------------|------------------|------|-----|---------------------|----------------|
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| id | sequential ID | int(10) unsigned | NO | PRI | NULL | auto_increment |
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| uid | | int(10) unsigned | NO | | 0 | |
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
| fid | | int(11) | NO | | 0 | |
|
| uid | User id | mediumint unsigned | YES | | 0 | |
|
||||||
| contact-id | | int(11) | NO | | 0 | |
|
| fid | | int unsigned | NO | | | |
|
||||||
| knowyou | | tinyint(1) | NO | | 0 | |
|
| contact-id | | int unsigned | YES | | 0 | |
|
||||||
| duplex | | tinyint(1) | NO | | 0 | |
|
| knowyou | | boolean | YES | | 0 | |
|
||||||
| note | | text | NO | | NULL | |
|
| duplex | | boolean | YES | | 0 | |
|
||||||
| hash | | varchar(255) | NO | | | |
|
| note | | text | NO | | | |
|
||||||
| datetime | | datetime | NO | | 0001-01-01 00:00:00 | |
|
| hash | | varchar(255) | YES | | | |
|
||||||
| blocked | | tinyint(1) | NO | | 1 | |
|
| datetime | | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| ignore | | tinyint(1) | NO | | 0 | |
|
| blocked | | boolean | YES | | 1 | |
|
||||||
|
| ignore | | boolean | YES | | 0 | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
Table item-uri
|
||||||
|
===========
|
||||||
|
URI and GUID for items
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| id | | int unsigned | YES | PRI | | auto_increment |
|
||||||
|
| uri | URI of an item | varbinary(255) | YES | | | |
|
||||||
|
| guid | A unique identifier for an item | varbinary(255) | NO | | | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -1,72 +0,0 @@
|
||||||
Table item
|
|
||||||
==========
|
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
|
||||||
|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|------|-----|---------------------|----------------|
|
|
||||||
| id | sequential ID | int(10) unsigned | NO | PRI | NULL | auto_increment |
|
|
||||||
| guid | A unique identifier for this item | varchar(255) | NO | MUL | | |
|
|
||||||
| uri | | varchar(255) | NO | MUL | | |
|
|
||||||
| uid | user.id which owns this copy of the item | int(10) unsigned | NO | MUL | 0 | |
|
|
||||||
| contact-id | contact.id | int(11) | NO | MUL | 0 | |
|
|
||||||
| gcontact-id | ID of the global contact | int(11) | NO | MUL | 0 | |
|
|
||||||
| type | | varchar(255) | NO | | | |
|
|
||||||
| wall | This item was posted to the wall of uid | tinyint(1) | NO | MUL | 0 | |
|
|
||||||
| gravity | | tinyint(1) | NO | | 0 | |
|
|
||||||
| parent | item.id of the parent to this item if it is a reply of some form; otherwise this must be set to the id of this item | int(10) unsigned | NO | MUL | 0 | |
|
|
||||||
| parent-uri | uri of the parent to this item | varchar(255) | NO | MUL | | |
|
|
||||||
| extid | | varchar(255 | NO | MUL | | |
|
|
||||||
| thr-parent | If the parent of this item is not the top-level item in the conversation, the uri of the immediate parent; otherwise set to parent-uri | varchar(255) | NO | | | |
|
|
||||||
| created | Creation timestamp. | datetime | NO | | 0001-01-01 00:00:00 | |
|
|
||||||
| edited | Date of last edit (default is created) | datetime | NO | | 0001-01-01 00:00:00 | |
|
|
||||||
| commented | Date of last comment/reply to this item | datetime | NO | | 0001-01-01 00:00:00 | |
|
|
||||||
| received | datetime | datetime | NO | | 0001-01-01 00:00:00 | |
|
|
||||||
| changed | Date that something in the conversation changed, indicating clients should fetch the conversation again | datetime | NO | | 0001-01-01 00:00:00 | |
|
|
||||||
| owner-name | Name of the owner of this item | varchar(255) | NO | | | |
|
|
||||||
| owner-link | Link to the profile page of the owner of this item | varchar(255) | NO | | | |
|
|
||||||
| owner-avatar | Link to the avatar picture of the owner of this item | varchar(255) | NO | | | |
|
|
||||||
| owner-id | Link to the contact table with uid=0 of the owner of this item | int(11) | NO | MUL | 0 | |
|
|
||||||
| author-name | Name of the author of this item | varchar(255) | NO | | | |
|
|
||||||
| author-link | Link to the profile page of the author of this item | varchar(255) | NO | | | |
|
|
||||||
| author-avatar | Link to the avatar picture of the author of this item | varchar(255) | NO | | | |
|
|
||||||
| author-id | Link to the contact table with uid=0 of the author of this item | int(11) | NO | MUL | 0 | |
|
|
||||||
| title | item title | varchar(255) | NO | | | |
|
|
||||||
| body | item body content | mediumtext | NO | | NULL | |
|
|
||||||
| app | application which generated this item | varchar(255) | NO | | | |
|
|
||||||
| verb | ActivityStreams verb | varchar(255) | NO | | | |
|
|
||||||
| object-type | ActivityStreams object type | varchar(255) | NO | | | |
|
|
||||||
| object | JSON encoded object structure unless it is an implied object (normal post) | text | NO | | NULL | |
|
|
||||||
| target-type | ActivityStreams target type if applicable (URI) | varchar(255) | NO | | | |
|
|
||||||
| target | JSON encoded target structure if used | text | NO | | NULL | |
|
|
||||||
| postopts | External post connectors add their network name to this comma-separated string to identify that they should be delivered to these networks during delivery | text | NO | | NULL | |
|
|
||||||
| plink | permalink or URL toa displayable copy of the message at its source | varchar(255) | NO | | | |
|
|
||||||
| resource-id | Used to link other tables to items, it identifies the linked resource (e.g. photo) and if set must also set resource_type | varchar(255) | NO | MUL | | |
|
|
||||||
| event-id | Used to link to the event.id | int(11) | NO | | 0 | |
|
|
||||||
| tag | | mediumtext | NO | | NULL | |
|
|
||||||
| attach | JSON structure representing attachments to this item | mediumtext | NO | | NULL | |
|
|
||||||
| inform | | mediumtext | NO | | NULL | |
|
|
||||||
| file | | mediumtext | NO | | NULL | |
|
|
||||||
| location | text location where this item originated | varchar(255) | NO | | | |
|
|
||||||
| coord | longitude/latitude pair representing location where this item originated | varchar(255) | NO | | | |
|
|
||||||
| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | NO | | NULL | |
|
|
||||||
| allow_gid | Access Control - list of allowed groups | mediumtext | NO | | NULL | |
|
|
||||||
| deny_cid | Access Control - list of denied contact.id | mediumtext | NO | | NULL | |
|
|
||||||
| deny_gid | Access Control - list of denied groups | mediumtext | NO | | NULL | |
|
|
||||||
| private | distribution is restricted | tinyint(1) | NO | | 0 | |
|
|
||||||
| pubmail | | tinyint(1) | NO | | 0 | |
|
|
||||||
| moderated | | tinyint(1) | NO | | 0 | |
|
|
||||||
| visible | | tinyint(1) | NO | | 0 | |
|
|
||||||
| spam | | tinyint(1) | NO | | 0 | |
|
|
||||||
| starred | item has been favourited | tinyint(1) | NO | | 0 | |
|
|
||||||
| bookmark | item has been bookmarked | tinyint(1) | NO | | 0 | |
|
|
||||||
| unseen | item has not been seen | tinyint(1) | NO | | 1 | |
|
|
||||||
| deleted | item has been deleted | tinyint(1) | NO | MUL | 0 | |
|
|
||||||
| origin | item originated at this site | tinyint(1) | NO | | 0 | |
|
|
||||||
| forum_mode | | tinyint(1) | NO | | 0 | |
|
|
||||||
| last-child | | tinyint(1) unsigned | NO | | 1 | |
|
|
||||||
| mention | The owner of this item was mentioned in it | tinyint(1) | NO | | 0 | |
|
|
||||||
| network | Network from where the item comes from | varchar(32) | NO | | | |
|
|
||||||
| rendered-hash | | varchar(32) | NO | | | |
|
|
||||||
| rendered-html | item.body converted to html | mediumtext | NO | | NULL | |
|
|
||||||
| global | | tinyint(1) | NO | | 0 | |
|
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
|
|
@ -1,11 +1,13 @@
|
||||||
Table locks
|
Table locks
|
||||||
===========
|
===========
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
|
||||||
|---------|------------------|------------------|------|-----|---------------------|----------------|
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment |
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| name | | varchar(128) | NO | | | |
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
| locked | | tinyint(1) | NO | | 0 | |
|
| name | | varchar(128) | YES | | | |
|
||||||
| pid | Process ID | int(10) unsigned | NO | | 0 | |
|
| locked | | boolean | YES | | 0 | |
|
||||||
|
| pid | Process ID | int unsigned | YES | | 0 | |
|
||||||
|
| expires | datetime of cache expiration | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -1,24 +1,30 @@
|
||||||
Table mail
|
Table mail
|
||||||
==========
|
===========
|
||||||
|
private messages
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| ---------- | -------------------------------------------- | ---------------- | ---- | --- | ------------------- | --------------- |
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| id | sequential ID | int(10) unsigned | NO | PRI | NULL | auto_increment |
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
| uid | user.id of the owner of this data | int(10) unsigned | NO | MUL | 0 | |
|
| uid | Owner User id | mediumint unsigned | YES | | 0 | |
|
||||||
| guid | A unique identifier for this private message | int(10) unsigned | NO | MUL | | |
|
| guid | A unique identifier for this private message | varchar(255) | YES | | | |
|
||||||
| from-name | name of the sender | varchar(255) | NO | | | |
|
| from-name | name of the sender | varchar(255) | YES | | | |
|
||||||
| from-photo | contact photo link of the sender | varchar(255) | NO | | | |
|
| from-photo | contact photo link of the sender | varchar(255) | YES | | | |
|
||||||
| from-url | profile linke of the sender | varchar(255) | NO | | | |
|
| from-url | profile linke of the sender | varchar(255) | YES | | | |
|
||||||
| contact-id | contact.id | varchar(255) | NO | | | |
|
| contact-id | contact.id | varchar(255) | NO | | | |
|
||||||
| convid | conv.id | int(11) unsigned | NO | MUL | 0 | |
|
| author-id | Link to the contact table with uid=0 of the author of the mail | int unsigned | NO | | | |
|
||||||
| title | | varchar(255) | NO | | | |
|
| convid | conv.id | int unsigned | NO | | | |
|
||||||
| body | | mediumtext | NO | | NULL | |
|
| title | | varchar(255) | YES | | | |
|
||||||
| seen | if message visited it is 1 | varchar(255) | NO | | 0 | |
|
| body | | mediumtext | NO | | | |
|
||||||
| reply | | varchar(255) | NO | MUL | 0 | |
|
| seen | if message visited it is 1 | boolean | YES | | 0 | |
|
||||||
| replied | | varchar(255) | NO | | 0 | |
|
| reply | | boolean | YES | | 0 | |
|
||||||
| unknown | if sender not in the contact table this is 1 | varchar(255) | NO | | 0 | |
|
| replied | | boolean | YES | | 0 | |
|
||||||
| uri | | varchar(255) | NO | MUL | | |
|
| unknown | if sender not in the contact table this is 1 | boolean | YES | | 0 | |
|
||||||
| parent-uri | | varchar(255) | NO | MUL | | |
|
| uri | | varchar(255) | YES | | | |
|
||||||
| created | creation time of the private message | datetime | NO | | 0001-01-01 00:00:00 | |
|
| uri-id | Item-uri id of the related mail | int unsigned | NO | | | |
|
||||||
|
| parent-uri | | varchar(255) | YES | | | |
|
||||||
|
| parent-uri-id | Item-uri id of the parent of the related mail | int unsigned | NO | | | |
|
||||||
|
| thr-parent | | varchar(255) | NO | | | |
|
||||||
|
| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | NO | | | |
|
||||||
|
| created | creation time of the private message | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -1,20 +1,21 @@
|
||||||
Table mailacct
|
Table mailacct
|
||||||
==============
|
===========
|
||||||
|
Mail account data for fetching mails
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|--------------|------------------|--------------|------|-----|---------------------|----------------|
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment |
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
| uid | | int(11) | NO | | 0 | |
|
| uid | User id | mediumint unsigned | YES | | 0 | |
|
||||||
| server | | varchar(255) | NO | | | |
|
| server | | varchar(255) | YES | | | |
|
||||||
| port | | int(11) | NO | | 0 | |
|
| port | | smallint unsigned | YES | | 0 | |
|
||||||
| ssltype | | varchar(16) | NO | | | |
|
| ssltype | | varchar(16) | YES | | | |
|
||||||
| mailbox | | varchar(255) | NO | | | |
|
| mailbox | | varchar(255) | YES | | | |
|
||||||
| user | | varchar(255) | NO | | | |
|
| user | | varchar(255) | YES | | | |
|
||||||
| pass | | text | NO | | NULL | |
|
| pass | | text | NO | | | |
|
||||||
| reply_to | | varchar(255) | NO | | | |
|
| reply_to | | varchar(255) | YES | | | |
|
||||||
| action | | int(11) | NO | | 0 | |
|
| action | | tinyint unsigned | YES | | 0 | |
|
||||||
| movetofolder | | varchar(255) | NO | | | |
|
| movetofolder | | varchar(255) | YES | | | |
|
||||||
| pubmail | | tinyint(1) | NO | | 0 | |
|
| pubmail | | boolean | YES | | 0 | |
|
||||||
| last_check | | datetime | NO | | 0001-01-01 00:00:00 | |
|
| last_check | | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
Table manage
|
Table manage
|
||||||
============
|
===========
|
||||||
|
table of accounts that can manage each other
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| ----- | ------------- | ------- | ---- | --- | ------- | --------------- |
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment |
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
| uid | user.id | int(11) | NO | MUL | 0 | |
|
| uid | User id | mediumint unsigned | YES | | 0 | |
|
||||||
| mid | | int(11) | NO | | 0 | |
|
| mid | User id | mediumint unsigned | YES | | 0 | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
Table notification
|
||||||
|
===========
|
||||||
|
notifications
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
|
| uid | Owner User id | mediumint unsigned | NO | | | |
|
||||||
|
| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | NO | | | |
|
||||||
|
| type | | tinyint unsigned | NO | | | |
|
||||||
|
| actor-id | Link to the contact table with uid=0 of the actor that caused the notification | int unsigned | NO | | | |
|
||||||
|
| target-uri-id | Item-uri id of the related post | int unsigned | NO | | | |
|
||||||
|
| parent-uri-id | Item-uri id of the parent of the related post | int unsigned | NO | | | |
|
||||||
|
| created | | datetime | NO | | | |
|
||||||
|
| seen | | boolean | NO | | 0 | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -1,12 +1,14 @@
|
||||||
Table notify-threads
|
Table notify-threads
|
||||||
====================
|
===========
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
|
||||||
|--------------------|------------------|------------------|------|-----|---------|----------------|
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment |
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| notify-id | | int(11) | NO | | 0 | |
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
| master-parent-item | | int(10) unsigned | NO | MUL | 0 | |
|
| notify-id | | int unsigned | YES | | 0 | |
|
||||||
| parent-item | | int(10) unsigned | NO | | 0 | |
|
| master-parent-item | Deprecated | int unsigned | NO | | | |
|
||||||
| receiver-uid | | int(11) | NO | MUL | 0 | |
|
| master-parent-uri-id | Item-uri id of the parent of the related post | int unsigned | NO | | | |
|
||||||
|
| parent-item | | int unsigned | YES | | 0 | |
|
||||||
|
| receiver-uid | User id | mediumint unsigned | YES | | 0 | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -1,24 +1,26 @@
|
||||||
Table notify
|
Table notify
|
||||||
============
|
===========
|
||||||
|
notifications
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| ---------- | --------------------------------- | ------------ | ---- | --- | ------------------- | --------------- |
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment |
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
| hash | | varchar(64) | NO | | | |
|
| type | | smallint unsigned | YES | | 0 | |
|
||||||
| type | | int(11) | NO | | 0 | |
|
| name | | varchar(255) | YES | | | |
|
||||||
| name | | varchar(255) | NO | | | |
|
| url | | varchar(255) | YES | | | |
|
||||||
| url | | varchar(255) | NO | | | |
|
| photo | | varchar(255) | YES | | | |
|
||||||
| photo | | varchar(255) | NO | | | |
|
| date | | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| date | | datetime | NO | | 0001-01-01 00:00:00 | |
|
| msg | | mediumtext | NO | | | |
|
||||||
| msg | | mediumtext | YES | | NULL | |
|
| uid | Owner User id | mediumint unsigned | YES | | 0 | |
|
||||||
| uid | user.id of the owner of this data | int(11) | NO | MUL | 0 | |
|
| link | | varchar(255) | YES | | | |
|
||||||
| link | | varchar(255) | NO | | | |
|
| iid | | int unsigned | NO | | | |
|
||||||
| iid | item.id | int(11) | NO | | 0 | |
|
| parent | | int unsigned | NO | | | |
|
||||||
| parent | | int(11) | NO | | 0 | |
|
| uri-id | Item-uri id of the related post | int unsigned | NO | | | |
|
||||||
| seen | | tinyint(1) | NO | | 0 | |
|
| parent-uri-id | Item-uri id of the parent of the related post | int unsigned | NO | | | |
|
||||||
| verb | | varchar(255) | NO | | | |
|
| seen | | boolean | YES | | 0 | |
|
||||||
| otype | | varchar(16) | NO | | | |
|
| verb | | varchar(100) | YES | | | |
|
||||||
| name_cache | Cached bbcode parsing of name | tinytext | YES | | NULL | |
|
| otype | | varchar(10) | YES | | | |
|
||||||
| msg_cache | Cached bbcode parsing of msg | mediumtext | YES | | NULL | |
|
| name_cache | Cached bbcode parsing of name | tinytext | NO | | | |
|
||||||
|
| msg_cache | Cached bbcode parsing of msg | mediumtext | NO | | | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
Table oembed
|
Table oembed
|
||||||
============
|
===========
|
||||||
|
cache for OEmbed queries
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| ------------ | ---------------------------------- | ------------ | ---- | --- | ------------------- | ----- |
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| url | page url | varchar(255) | NO | PRI | NULL | |
|
| url | page url | varbinary(255) | YES | PRI | | |
|
||||||
| maxwidth | Maximum width passed to Oembed | int(11) | NO | PRI | 0 | |
|
| maxwidth | Maximum width passed to Oembed | mediumint unsigned | YES | PRI | | |
|
||||||
| content | OEmbed data of the page | text | NO | | NULL | |
|
| content | OEmbed data of the page | mediumtext | NO | | | |
|
||||||
| created | datetime of creation | datetime | NO | MUL | 0001-01-01 00:00:00 | |
|
| created | datetime of creation | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
Table openwebauth-token
|
||||||
|
===========
|
||||||
|
Store OpenWebAuth token to verify contacts
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
|
| uid | User id - currently unused | mediumint unsigned | YES | | 0 | |
|
||||||
|
| type | Verify type | varchar(32) | YES | | | |
|
||||||
|
| token | A generated token | varchar(255) | YES | | | |
|
||||||
|
| meta | | varchar(255) | YES | | | |
|
||||||
|
| created | datetime of creation | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -1,12 +1,15 @@
|
||||||
Table parsed_url
|
Table parsed_url
|
||||||
================
|
===========
|
||||||
|
cache for 'parse_url' queries
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| ------------ | ---------------------------------- | ------------ | ---- | --- | ------------------- | ----- |
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| url | page url | varchar(255) | NO | PRI | NULL | |
|
| url_hash | page url hash | binary(64) | YES | PRI | | |
|
||||||
| guessing | is the "guessing" mode active? | tinyint(1) | NO | PRI | 0 | |
|
| guessing | is the 'guessing' mode active? | boolean | YES | PRI | 0 | |
|
||||||
| oembed | is the data the result of oembed? | tinyint(1) | NO | PRI | 0 | |
|
| oembed | is the data the result of oembed? | boolean | YES | PRI | 0 | |
|
||||||
| content | page data | text | NO | | NULL | |
|
| url | page url | text | YES | | | |
|
||||||
| created | datetime of creation | datetime | NO | MUL | 0001-01-01 00:00:00 | |
|
| content | page data | mediumtext | NO | | | |
|
||||||
|
| created | datetime of creation | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
| expires | datetime of expiration | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
Table pconfic
|
Table pconfig
|
||||||
=============
|
===========
|
||||||
|
personal (per user) configuration storage
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|-------|-------------|------------|------|-----|---------|----------------|
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| id | | int(11) | NO | PRI | NULL | auto_increment |
|
| id | Primary key | int unsigned | YES | PRI | | auto_increment |
|
||||||
| uid | | int(11) | NO | MUL | 0 | |
|
| uid | User id | mediumint unsigned | YES | | 0 | |
|
||||||
| cat | | char(255) | NO | | | |
|
| cat | Category | varchar(50) | YES | | | |
|
||||||
| k | | char(255) | NO | | | |
|
| k | Key | varchar(100) | YES | | | |
|
||||||
| v | | mediumtext | NO | | NULL | |
|
| v | Value | mediumtext | NO | | | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
Table permissionset
|
||||||
|
===========
|
||||||
|
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
|
| uid | Owner id of this permission set | mediumint unsigned | YES | | 0 | |
|
||||||
|
| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | NO | | | |
|
||||||
|
| allow_gid | Access Control - list of allowed groups | mediumtext | NO | | | |
|
||||||
|
| deny_cid | Access Control - list of denied contact.id | mediumtext | NO | | | |
|
||||||
|
| deny_gid | Access Control - list of denied groups | mediumtext | NO | | | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -1,29 +1,35 @@
|
||||||
Table photo
|
Table photo
|
||||||
===========
|
===========
|
||||||
|
photo storage
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| ----------- | ------------------------------------------------------ | ---------------- | ---- | --- | ------------------- | --------------- |
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| id | sequential ID | int(10) unsigned | NO | PRI | NULL | auto_increment |
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
| uid | user.id of the owner of this data | int(10) unsigned | NO | MUL | 0 | |
|
| uid | Owner User id | mediumint unsigned | YES | | 0 | |
|
||||||
| contact-id | contact.id | int(10) unsigned | NO | | 0 | |
|
| contact-id | contact.id | int unsigned | YES | | 0 | |
|
||||||
| guid | A unique identifier for this photo | varchar(64) | NO | MUL | | |
|
| guid | A unique identifier for this photo | char(16) | YES | | | |
|
||||||
| resource-id | | varchar(255) | NO | MUL | | |
|
| resource-id | | char(32) | YES | | | |
|
||||||
| created | creation date | datetime | NO | | 0001-01-01 00:00:00 | |
|
| hash | hash value of the photo | char(32) | NO | | | |
|
||||||
| edited | last edited date | datetime | NO | | 0001-01-01 00:00:00 | |
|
| created | creation date | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| title | | varchar(255) | NO | | | |
|
| edited | last edited date | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| desc | | text | NO | | NULL | |
|
| title | | varchar(255) | YES | | | |
|
||||||
| album | The name of the album to which the photo belongs | varchar(255) | NO | | | |
|
| desc | | text | NO | | | |
|
||||||
| filename | | varchar(255) | NO | | | |
|
| album | The name of the album to which the photo belongs | varchar(255) | YES | | | |
|
||||||
| type | image type | varchar(128) | NO | | image/jpeg | |
|
| filename | | varchar(255) | YES | | | |
|
||||||
| height | | smallint(6) | NO | | 0 | |
|
| type | | varchar(30) | YES | | image/jpeg | |
|
||||||
| width | | smallint(6) | NO | | 0 | |
|
| height | | smallint unsigned | YES | | 0 | |
|
||||||
| size | | int(10) unsigned | NO | | 0 | |
|
| width | | smallint unsigned | YES | | 0 | |
|
||||||
| data | | mediumblob | NO | | NULL | |
|
| datasize | | int unsigned | YES | | 0 | |
|
||||||
| scale | | tinyint(3) | NO | | 0 | |
|
| data | | mediumblob | YES | | | |
|
||||||
| profile | | tinyint(1) | NO | | 0 | |
|
| scale | | tinyint unsigned | YES | | 0 | |
|
||||||
| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | NO | | NULL | |
|
| profile | | boolean | YES | | 0 | |
|
||||||
| allow_gid | Access Control - list of allowed groups | mediumtext | NO | | NULL | |
|
| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | NO | | | |
|
||||||
| deny_cid | Access Control - list of denied contact.id | mediumtext | NO | | NULL | |
|
| allow_gid | Access Control - list of allowed groups | mediumtext | NO | | | |
|
||||||
| deny_gid | Access Control - list of denied groups | mediumtext | NO | | NULL | |
|
| deny_cid | Access Control - list of denied contact.id | mediumtext | NO | | | |
|
||||||
|
| deny_gid | Access Control - list of denied groups | mediumtext | NO | | | |
|
||||||
|
| accessible | Make photo publicly accessible, ignoring permissions | boolean | YES | | 0 | |
|
||||||
|
| backend-class | Storage backend class | tinytext | NO | | | |
|
||||||
|
| backend-ref | Storage backend data reference | text | NO | | | |
|
||||||
|
| updated | | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
Table poll
|
|
||||||
==========
|
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
|
||||||
|-------|-------------|------------|------|-----|---------|----------------|
|
|
||||||
| id | | int(11) | NO | PRI | NULL | auto_increment |
|
|
||||||
| uid | | int(11) | NO | MUL | 0 | |
|
|
||||||
| q0 | | mediumtext | NO | | NULL | |
|
|
||||||
| q1 | | mediumtext | NO | | NULL | |
|
|
||||||
| q2 | | mediumtext | NO | | NULL | |
|
|
||||||
| q3 | | mediumtext | NO | | NULL | |
|
|
||||||
| q4 | | mediumtext | NO | | NULL | |
|
|
||||||
| q5 | | mediumtext | NO | | NULL | |
|
|
||||||
| q6 | | mediumtext | NO | | NULL | |
|
|
||||||
| q7 | | mediumtext | NO | | NULL | |
|
|
||||||
| q8 | | mediumtext | NO | | NULL | |
|
|
||||||
| q9 | | mediumtext | NO | | NULL | |
|
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
|
|
@ -1,10 +0,0 @@
|
||||||
Table poll_result
|
|
||||||
=================
|
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
|
||||||
|---------|------------------|---------|------|-----|---------|----------------|
|
|
||||||
| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment |
|
|
||||||
| poll_id | | int(11) | NO | MUL | 0 | |
|
|
||||||
| choice | | int(11) | NO | MUL | 0 | |
|
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
Table post-category
|
||||||
|
===========
|
||||||
|
post relation to categories
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | PRI | | |
|
||||||
|
| uid | User id | mediumint unsigned | YES | PRI | 0 | |
|
||||||
|
| type | | tinyint unsigned | YES | PRI | 0 | |
|
||||||
|
| tid | | int unsigned | YES | PRI | 0 | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -0,0 +1,25 @@
|
||||||
|
Table post-content
|
||||||
|
===========
|
||||||
|
Content for all posts
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | PRI | | |
|
||||||
|
| title | item title | varchar(255) | YES | | | |
|
||||||
|
| content-warning | | varchar(255) | YES | | | |
|
||||||
|
| body | item body content | mediumtext | NO | | | |
|
||||||
|
| raw-body | Body without embedded media links | mediumtext | NO | | | |
|
||||||
|
| location | text location where this item originated | varchar(255) | YES | | | |
|
||||||
|
| coord | longitude/latitude pair representing location where this item originated | varchar(255) | YES | | | |
|
||||||
|
| language | Language information about this post | text | NO | | | |
|
||||||
|
| app | application which generated this item | varchar(255) | YES | | | |
|
||||||
|
| rendered-hash | | varchar(32) | YES | | | |
|
||||||
|
| rendered-html | item.body converted to html | mediumtext | NO | | | |
|
||||||
|
| object-type | ActivityStreams object type | varchar(100) | YES | | | |
|
||||||
|
| object | JSON encoded object structure unless it is an implied object (normal post) | text | NO | | | |
|
||||||
|
| target-type | ActivityStreams target type if applicable (URI) | varchar(100) | YES | | | |
|
||||||
|
| target | JSON encoded target structure if used | text | NO | | | |
|
||||||
|
| resource-id | Used to link other tables to items, it identifies the linked resource (e.g. photo) and if set must also set resource_type | varchar(32) | YES | | | |
|
||||||
|
| plink | permalink or URL to a displayable copy of the message at its source | varchar(255) | YES | | | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -0,0 +1,19 @@
|
||||||
|
Table post-delivery-data
|
||||||
|
===========
|
||||||
|
Delivery data for items
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | PRI | | |
|
||||||
|
| postopts | External post connectors add their network name to this comma-separated string to identify that they should be delivered to these networks during delivery | text | NO | | | |
|
||||||
|
| inform | Additional receivers of the linked item | mediumtext | NO | | | |
|
||||||
|
| queue_count | Initial number of delivery recipients, used as item.delivery_queue_count | mediumint | YES | | 0 | |
|
||||||
|
| queue_done | Number of successful deliveries, used as item.delivery_queue_done | mediumint | YES | | 0 | |
|
||||||
|
| queue_failed | Number of unsuccessful deliveries, used as item.delivery_queue_failed | mediumint | YES | | 0 | |
|
||||||
|
| activitypub | Number of successful deliveries via ActivityPub | mediumint | YES | | 0 | |
|
||||||
|
| dfrn | Number of successful deliveries via DFRN | mediumint | YES | | 0 | |
|
||||||
|
| legacy_dfrn | Number of successful deliveries via legacy DFRN | mediumint | YES | | 0 | |
|
||||||
|
| diaspora | Number of successful deliveries via Diaspora | mediumint | YES | | 0 | |
|
||||||
|
| ostatus | Number of successful deliveries via OStatus | mediumint | YES | | 0 | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -0,0 +1,27 @@
|
||||||
|
Table post-media
|
||||||
|
===========
|
||||||
|
Attached media
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
|
| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | | | |
|
||||||
|
| url | Media URL | varbinary(511) | YES | | | |
|
||||||
|
| type | Media type | tinyint unsigned | YES | | 0 | |
|
||||||
|
| mimetype | | varchar(60) | NO | | | |
|
||||||
|
| height | Height of the media | smallint unsigned | NO | | | |
|
||||||
|
| width | Width of the media | smallint unsigned | NO | | | |
|
||||||
|
| size | Media size | int unsigned | NO | | | |
|
||||||
|
| preview | Preview URL | varbinary(255) | NO | | | |
|
||||||
|
| preview-height | Height of the preview picture | smallint unsigned | NO | | | |
|
||||||
|
| preview-width | Width of the preview picture | smallint unsigned | NO | | | |
|
||||||
|
| description | | text | NO | | | |
|
||||||
|
| name | Name of the media | varchar(255) | NO | | | |
|
||||||
|
| author-url | URL of the author of the media | varbinary(255) | NO | | | |
|
||||||
|
| author-name | Name of the author of the media | varchar(255) | NO | | | |
|
||||||
|
| author-image | Image of the author of the media | varbinary(255) | NO | | | |
|
||||||
|
| publisher-url | URL of the publisher of the media | varbinary(255) | NO | | | |
|
||||||
|
| publisher-name | Name of the publisher of the media | varchar(255) | NO | | | |
|
||||||
|
| publisher-image | Image of the publisher of the media | varbinary(255) | NO | | | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -0,0 +1,12 @@
|
||||||
|
Table post-tag
|
||||||
|
===========
|
||||||
|
post relation to tags
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | PRI | | |
|
||||||
|
| type | | tinyint unsigned | YES | PRI | 0 | |
|
||||||
|
| tid | | int unsigned | YES | PRI | 0 | |
|
||||||
|
| cid | Contact id of the mentioned public contact | int unsigned | YES | PRI | 0 | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -0,0 +1,31 @@
|
||||||
|
Table post-thread-user
|
||||||
|
===========
|
||||||
|
Thread related data per user
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | PRI | | |
|
||||||
|
| owner-id | Item owner | int unsigned | YES | | 0 | |
|
||||||
|
| author-id | Item author | int unsigned | YES | | 0 | |
|
||||||
|
| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | NO | | | |
|
||||||
|
| network | | char(4) | YES | | | |
|
||||||
|
| created | | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
| received | | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
| changed | Date that something in the conversation changed, indicating clients should fetch the conversation again | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
| commented | | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
| uid | Owner id which owns this copy of the item | mediumint unsigned | YES | PRI | 0 | |
|
||||||
|
| pinned | The thread is pinned on the profile page | boolean | YES | | 0 | |
|
||||||
|
| starred | | boolean | YES | | 0 | |
|
||||||
|
| ignored | Ignore updates for this thread | boolean | YES | | 0 | |
|
||||||
|
| wall | This item was posted to the wall of uid | boolean | YES | | 0 | |
|
||||||
|
| mention | | boolean | YES | | 0 | |
|
||||||
|
| pubmail | | boolean | YES | | 0 | |
|
||||||
|
| forum_mode | | tinyint unsigned | YES | | 0 | |
|
||||||
|
| contact-id | contact.id | int unsigned | YES | | 0 | |
|
||||||
|
| unseen | post has not been seen | boolean | YES | | 1 | |
|
||||||
|
| hidden | Marker to hide the post from the user | boolean | YES | | 0 | |
|
||||||
|
| origin | item originated at this site | boolean | YES | | 0 | |
|
||||||
|
| psid | ID of the permission set of this post | int unsigned | NO | | | |
|
||||||
|
| post-user-id | Id of the post-user table | int unsigned | NO | | | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -0,0 +1,17 @@
|
||||||
|
Table post-thread
|
||||||
|
===========
|
||||||
|
Thread related data
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | PRI | | |
|
||||||
|
| owner-id | Item owner | int unsigned | YES | | 0 | |
|
||||||
|
| author-id | Item author | int unsigned | YES | | 0 | |
|
||||||
|
| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | NO | | | |
|
||||||
|
| network | | char(4) | YES | | | |
|
||||||
|
| created | | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
| received | | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
| changed | Date that something in the conversation changed, indicating clients should fetch the conversation again | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
| commented | | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -0,0 +1,11 @@
|
||||||
|
Table post-user-notification
|
||||||
|
===========
|
||||||
|
User post notifications
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | PRI | | |
|
||||||
|
| uid | Owner id which owns this copy of the item | mediumint unsigned | YES | PRI | | |
|
||||||
|
| notification-type | | tinyint unsigned | YES | | 0 | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -0,0 +1,38 @@
|
||||||
|
Table post-user
|
||||||
|
===========
|
||||||
|
User specific post data
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| id | | int unsigned | YES | PRI | | auto_increment |
|
||||||
|
| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | | | |
|
||||||
|
| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | NO | | | |
|
||||||
|
| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | NO | | | |
|
||||||
|
| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | NO | | | |
|
||||||
|
| created | Creation timestamp. | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
| edited | Date of last edit (default is created) | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
| received | datetime | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
| gravity | | tinyint unsigned | YES | | 0 | |
|
||||||
|
| network | Network from where the item comes from | char(4) | YES | | | |
|
||||||
|
| owner-id | Link to the contact table with uid=0 of the owner of this item | int unsigned | YES | | 0 | |
|
||||||
|
| author-id | Link to the contact table with uid=0 of the author of this item | int unsigned | YES | | 0 | |
|
||||||
|
| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | NO | | | |
|
||||||
|
| post-type | Post type (personal note, image, article, ...) | tinyint unsigned | YES | | 0 | |
|
||||||
|
| post-reason | Reason why the post arrived at the user | tinyint unsigned | YES | | 0 | |
|
||||||
|
| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | NO | | | |
|
||||||
|
| private | 0=public, 1=private, 2=unlisted | tinyint unsigned | YES | | 0 | |
|
||||||
|
| global | | boolean | YES | | 0 | |
|
||||||
|
| visible | | boolean | YES | | 0 | |
|
||||||
|
| deleted | item has been marked for deletion | boolean | YES | | 0 | |
|
||||||
|
| uid | Owner id which owns this copy of the item | mediumint unsigned | YES | | | |
|
||||||
|
| protocol | Protocol used to deliver the item for this user | tinyint unsigned | NO | | | |
|
||||||
|
| contact-id | contact.id | int unsigned | YES | | 0 | |
|
||||||
|
| event-id | Used to link to the event.id | int unsigned | NO | | | |
|
||||||
|
| unseen | post has not been seen | boolean | YES | | 1 | |
|
||||||
|
| hidden | Marker to hide the post from the user | boolean | YES | | 0 | |
|
||||||
|
| notification-type | | tinyint unsigned | YES | | 0 | |
|
||||||
|
| wall | This item was posted to the wall of uid | boolean | YES | | 0 | |
|
||||||
|
| origin | item originated at this site | boolean | YES | | 0 | |
|
||||||
|
| psid | ID of the permission set of this post | int unsigned | NO | | | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -0,0 +1,26 @@
|
||||||
|
Table post
|
||||||
|
===========
|
||||||
|
Structure for all posts
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | YES | PRI | | |
|
||||||
|
| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | NO | | | |
|
||||||
|
| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | NO | | | |
|
||||||
|
| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | NO | | | |
|
||||||
|
| created | Creation timestamp. | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
| edited | Date of last edit (default is created) | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
| received | datetime | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
| gravity | | tinyint unsigned | YES | | 0 | |
|
||||||
|
| network | Network from where the item comes from | char(4) | YES | | | |
|
||||||
|
| owner-id | Link to the contact table with uid=0 of the owner of this item | int unsigned | YES | | 0 | |
|
||||||
|
| author-id | Link to the contact table with uid=0 of the author of this item | int unsigned | YES | | 0 | |
|
||||||
|
| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | NO | | | |
|
||||||
|
| post-type | Post type (personal note, image, article, ...) | tinyint unsigned | YES | | 0 | |
|
||||||
|
| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | NO | | | |
|
||||||
|
| private | 0=public, 1=private, 2=unlisted | tinyint unsigned | YES | | 0 | |
|
||||||
|
| global | | boolean | YES | | 0 | |
|
||||||
|
| visible | | boolean | YES | | 0 | |
|
||||||
|
| deleted | item has been marked for deletion | boolean | YES | | 0 | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -0,0 +1,11 @@
|
||||||
|
Table process
|
||||||
|
===========
|
||||||
|
Currently running system processes
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| pid | | int unsigned | YES | PRI | | |
|
||||||
|
| command | | varbinary(32) | YES | | | |
|
||||||
|
| created | | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -1,48 +1,50 @@
|
||||||
Table profile
|
Table profile
|
||||||
=============
|
===========
|
||||||
|
user profiles data
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|--------------|-----------------------------------------------|--------------|------|-----|---------------------|----------------|
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment |
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
| uid | user.id of the owner of this data | int(11) | NO | | 0 | |
|
| uid | Owner User id | mediumint unsigned | YES | | 0 | |
|
||||||
| profile-name | Name of the profile | varchar(255) | NO | | | |
|
| profile-name | Deprecated | varchar(255) | NO | | | |
|
||||||
| is-default | Mark this profile as default profile | tinyint(1) | NO | | 0 | |
|
| is-default | Deprecated | boolean | NO | | | |
|
||||||
| hide-friends | Hide friend list from viewers of this profile | tinyint(1) | NO | | 0 | |
|
| hide-friends | Hide friend list from viewers of this profile | boolean | YES | | 0 | |
|
||||||
| name | | varchar(255) | NO | | | |
|
| name | | varchar(255) | YES | | | |
|
||||||
| pdesc | Deprecated | varchar(255) | NO | | | |
|
| pdesc | Deprecated | varchar(255) | NO | | | |
|
||||||
| dob | Day of birth | varchar(32) | NO | | 0001-01-01 | |
|
| dob | Day of birth | varchar(32) | YES | | 0000-00-00 | |
|
||||||
| address | | varchar(255) | NO | | | |
|
| address | | varchar(255) | YES | | | |
|
||||||
| locality | | varchar(255) | NO | | | |
|
| locality | | varchar(255) | YES | | | |
|
||||||
| region | | varchar(255) | NO | | | |
|
| region | | varchar(255) | YES | | | |
|
||||||
| postal-code | | varchar(32) | NO | | | |
|
| postal-code | | varchar(32) | YES | | | |
|
||||||
| country-name | | varchar(255) | NO | | | |
|
| country-name | | varchar(255) | YES | | | |
|
||||||
| hometown | Deprecated | varchar(255) | NO | MUL | | |
|
| hometown | Deprecated | varchar(255) | NO | | | |
|
||||||
| gender | Deprecated | varchar(32) | NO | | | |
|
| gender | Deprecated | varchar(32) | NO | | | |
|
||||||
| marital | Deprecated | varchar(255) | NO | | | |
|
| marital | Deprecated | varchar(255) | NO | | | |
|
||||||
| with | Deprecated | text | NO | | NULL | |
|
| with | Deprecated | text | NO | | | |
|
||||||
| howlong | Deprecated | datetime | NO | | 0001-01-01 00:00:00 | |
|
| howlong | Deprecated | datetime | NO | | | |
|
||||||
| sexual | Deprecated | varchar(255) | NO | | | |
|
| sexual | Deprecated | varchar(255) | NO | | | |
|
||||||
| politic | Deprecated | varchar(255) | NO | | | |
|
| politic | Deprecated | varchar(255) | NO | | | |
|
||||||
| religion | Deprecated | varchar(255) | NO | | | |
|
| religion | Deprecated | varchar(255) | NO | | | |
|
||||||
| pub_keywords | | text | NO | | NULL | |
|
| pub_keywords | | text | NO | | | |
|
||||||
| prv_keywords | | text | NO | | NULL | |
|
| prv_keywords | | text | NO | | | |
|
||||||
| likes | Deprecated | text | NO | | NULL | |
|
| likes | Deprecated | text | NO | | | |
|
||||||
| dislikes | Deprecated | text | NO | | NULL | |
|
| dislikes | Deprecated | text | NO | | | |
|
||||||
| about | Profile description | text | NO | | | |
|
| about | Profile description | text | NO | | | |
|
||||||
| summary | Deprecated | varchar(255) | NO | | | |
|
| summary | Deprecated | varchar(255) | NO | | | |
|
||||||
| music | Deprecated | text | NO | | NULL | |
|
| music | Deprecated | text | NO | | | |
|
||||||
| book | Deprecated | text | NO | | NULL | |
|
| book | Deprecated | text | NO | | | |
|
||||||
| tv | Deprecated | text | NO | | NULL | |
|
| tv | Deprecated | text | NO | | | |
|
||||||
| film | Deprecated | text | NO | | NULL | |
|
| film | Deprecated | text | NO | | | |
|
||||||
| interest | Deprecated | text | NO | | NULL | |
|
| interest | Deprecated | text | NO | | | |
|
||||||
| romance | Deprecated | text | NO | | NULL | |
|
| romance | Deprecated | text | NO | | | |
|
||||||
| work | Deprecated | text | NO | | NULL | |
|
| work | Deprecated | text | NO | | | |
|
||||||
| education | Deprecated | text | NO | | NULL | |
|
| education | Deprecated | text | NO | | | |
|
||||||
| contact | Deprecated | text | NO | | NULL | |
|
| contact | Deprecated | text | NO | | | |
|
||||||
| homepage | | varchar(255) | NO | | | |
|
| homepage | | varchar(255) | YES | | | |
|
||||||
| photo | | varchar(255) | NO | | | |
|
| xmpp | | varchar(255) | YES | | | |
|
||||||
| thumb | | varchar(255) | NO | | | |
|
| photo | | varchar(255) | YES | | | |
|
||||||
| publish | publish default profile in local directory | tinyint(1) | NO | | 0 | |
|
| thumb | | varchar(255) | YES | | | |
|
||||||
| net-publish | publish profile in global directory | tinyint(1) | NO | | 0 | |
|
| publish | publish default profile in local directory | boolean | YES | | 0 | |
|
||||||
|
| net-publish | publish profile in global directory | boolean | YES | | 0 | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
Table profile_check
|
Table profile_check
|
||||||
===================
|
===========
|
||||||
|
DFRN remote auth use
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| -------- | ------------- | ---------------- | ---- | --- | ------- | --------------- |
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| id | sequential ID | int(10) unsigned | NO | PRI | NULL | auto_increment |
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
| uid | user.id | int(10) unsigned | NO | | 0 | |
|
| uid | User id | mediumint unsigned | YES | | 0 | |
|
||||||
| cid | contact.id | int(10) unsigned | NO | | 0 | |
|
| cid | contact.id | int unsigned | YES | | 0 | |
|
||||||
| dfrn_id | | varchar(255) | NO | | | |
|
| dfrn_id | | varchar(255) | YES | | | |
|
||||||
| sec | | varchar(255) | NO | | 0 | |
|
| sec | | varchar(255) | YES | | | |
|
||||||
| expire | | int(11) | NO | | NULL | |
|
| expire | | int unsigned | YES | | 0 | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
Table profile_field
|
||||||
|
===========
|
||||||
|
Custom profile fields
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
|
| uid | Owner user id | mediumint unsigned | YES | | 0 | |
|
||||||
|
| order | Field ordering per user | mediumint unsigned | YES | | 1 | |
|
||||||
|
| psid | ID of the permission set of this profile field - 0 = public | int unsigned | NO | | | |
|
||||||
|
| label | Label of the field | varchar(255) | YES | | | |
|
||||||
|
| value | Value of the field | text | NO | | | |
|
||||||
|
| created | creation time | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
| edited | last edit time | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -1,10 +1,18 @@
|
||||||
Table push_subscriber
|
Table push_subscriber
|
||||||
=====================
|
===========
|
||||||
|
Used for OStatus: Contains feed subscribers
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|---------|------------------|---------|------|-----|---------|----------------|
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment |
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
| poll_id | | int(11) | NO | MUL | 0 | |
|
| uid | User id | mediumint unsigned | YES | | 0 | |
|
||||||
| choice | | int(11) | NO | MUL | 0 | |
|
| callback_url | | varchar(255) | YES | | | |
|
||||||
|
| topic | | varchar(255) | YES | | | |
|
||||||
|
| nickname | | varchar(255) | YES | | | |
|
||||||
|
| push | Retrial counter | tinyint | YES | | 0 | |
|
||||||
|
| last_update | Date of last successful trial | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
| next_try | Next retrial date | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
| renewed | Date of last subscription renewal | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
| secret | | varchar(255) | YES | | | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
Table queue
|
|
||||||
===========
|
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
|
||||||
|---------|------------------|-------------|------|-----|---------------------|----------------|
|
|
||||||
| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment |
|
|
||||||
| cid | | int(11) | NO | MUL | 0 | |
|
|
||||||
| network | | varchar(32) | NO | MUL | | |
|
|
||||||
| created | | datetime | NO | MUL | 0001-01-01 00:00:00 | |
|
|
||||||
| last | | datetime | NO | MUL | 0001-01-01 00:00:00 | |
|
|
||||||
| content | | mediumtext | NO | | NULL | |
|
|
||||||
| batch | | tinyint(1) | NO | MUL | 0 | |
|
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
|
|
@ -1,13 +1,15 @@
|
||||||
Table register
|
Table register
|
||||||
==============
|
===========
|
||||||
|
registrations requiring admin approval
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| -------- | ------------- | ---------------- | ---- | --- | ------------------- | --------------- |
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| id | sequential ID | int(11) unsigned | NO | PRI | NULL | auto_increment |
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
| hash | | varchar(255) | NO | | | |
|
| hash | | varchar(255) | YES | | | |
|
||||||
| created | | datetime | NO | | 0001-01-01 00:00:00 | |
|
| created | | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| uid | user.id | int(11) unsigned | NO | | | |
|
| uid | User id | mediumint unsigned | YES | | 0 | |
|
||||||
| password | | varchar(255) | NO | | | |
|
| password | | varchar(255) | YES | | | |
|
||||||
| language | | varchar(16) | NO | | | |
|
| language | | varchar(16) | YES | | | |
|
||||||
|
| note | | text | NO | | | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
Table search
|
Table search
|
||||||
============
|
===========
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
|
||||||
|-------|------------------|--------------|------|-----|---------|----------------|
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment |
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| uid | | int(11) | NO | MUL | 0 | |
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
| term | | varchar(255) | NO | MUL | | |
|
| uid | User id | mediumint unsigned | YES | | 0 | |
|
||||||
|
| term | | varchar(255) | YES | | | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
Table session
|
Table session
|
||||||
=============
|
===========
|
||||||
|
web session storage
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| ------ | ------------- | ------------------- | ---- | --- | ------- | --------------- |
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| id | sequential ID | bigint(20) unsigned | NO | PRI | NULL | auto_increment |
|
| id | sequential ID | bigint unsigned | YES | PRI | | auto_increment |
|
||||||
| sid | | varchar(255) | NO | MUL | | |
|
| sid | | varbinary(255) | YES | | | |
|
||||||
| data | | text | NO | | NULL | |
|
| data | | text | NO | | | |
|
||||||
| expire | | int(10) unsigned | NO | MUL | 0 | |
|
| expire | | int unsigned | YES | | 0 | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
Table sign
|
|
||||||
==========
|
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
|
||||||
| ------------ | ------------- | ---------------- | ---- | --- | ------- | --------------- |
|
|
||||||
| id | sequential ID | int(10) unsigned | NO | PRI | NULL | auto_increment |
|
|
||||||
| iid | item.id | int(10) unsigned | NO | MUL | 0 | |
|
|
||||||
| signed_text | | mediumtext | NO | | NULL | |
|
|
||||||
| signature | | text | NO | | NULL | |
|
|
||||||
| signer | | varchar(255) | NO | | | |
|
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
Table storage
|
||||||
|
===========
|
||||||
|
Data stored by Database storage backend
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| id | Auto incremented image data id | int unsigned | YES | PRI | | auto_increment |
|
||||||
|
| data | file data | longblob | YES | | | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -0,0 +1,11 @@
|
||||||
|
Table tag
|
||||||
|
===========
|
||||||
|
tags and mentions
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| id | | int unsigned | YES | PRI | | auto_increment |
|
||||||
|
| name | | varchar(96) | YES | | | |
|
||||||
|
| url | | varbinary(255) | YES | | | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -1,19 +0,0 @@
|
||||||
Table term
|
|
||||||
==========
|
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
|
||||||
|----------| ------------- |---------------------|------|-----|---------------------|----------------|
|
|
||||||
| tid | | int(10) unsigned | NO | PRI | NULL | auto_increment |
|
|
||||||
| oid | | int(10) unsigned | NO | MUL | 0 | |
|
|
||||||
| otype | | tinyint(3) unsigned | NO | MUL | 0 | |
|
|
||||||
| type | | tinyint(3) unsigned | NO | MUL | 0 | |
|
|
||||||
| term | | varchar(255) | NO | | | |
|
|
||||||
| url | | varchar(255) | NO | | | |
|
|
||||||
| aid | | int(10) unsigned | NO | | 0 | |
|
|
||||||
| uid | | int(10) unsigned | NO | MUL | 0 | |
|
|
||||||
| guid | | varchar(255) | NO | MUL | | |
|
|
||||||
| created | | datetime | NO | | 0001-01-01 00:00:00 | |
|
|
||||||
| received | | datetime | NO | | 0001-01-01 00:00:00 | |
|
|
||||||
| global | | tinyint(1) | NO | | 0 | |
|
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
|
|
@ -1,33 +0,0 @@
|
||||||
Table thread
|
|
||||||
============
|
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
|
||||||
|-------------|------------------|------------------|------|-----|---------------------|-------|
|
|
||||||
| iid | sequential ID | int(10) unsigned | NO | PRI | 0 | |
|
|
||||||
| uid | | int(10) unsigned | NO | MUL | 0 | |
|
|
||||||
| contact-id | | int(11) unsigned | NO | | 0 | |
|
|
||||||
| gcontact-id | Global Contact | int(11) unsigned | NO | | 0 | |
|
|
||||||
| owner-id | Item owner | int(11) unsigned | NO | MUL | 0 | |
|
|
||||||
| author-id | Item author | int(11) unsigned | NO | MUL | 0 | |
|
|
||||||
| created | | datetime | NO | MUL | 0001-01-01 00:00:00 | |
|
|
||||||
| edited | | datetime | NO | | 0001-01-01 00:00:00 | |
|
|
||||||
| commented | | datetime | NO | MUL | 0001-01-01 00:00:00 | |
|
|
||||||
| received | | datetime | NO | | 0001-01-01 00:00:00 | |
|
|
||||||
| changed | | datetime | NO | | 0001-01-01 00:00:00 | |
|
|
||||||
| wall | | tinyint(1) | NO | MUL | 0 | |
|
|
||||||
| private | | tinyint(1) | NO | | 0 | |
|
|
||||||
| pubmail | | tinyint(1) | NO | | 0 | |
|
|
||||||
| moderated | | tinyint(1) | NO | | 0 | |
|
|
||||||
| visible | | tinyint(1) | NO | | 0 | |
|
|
||||||
| spam | | tinyint(1) | NO | | 0 | |
|
|
||||||
| starred | | tinyint(1) | NO | | 0 | |
|
|
||||||
| ignored | | tinyint(1) | NO | | 0 | |
|
|
||||||
| bookmark | | tinyint(1) | NO | | 0 | |
|
|
||||||
| unseen | | tinyint(1) | NO | | 1 | |
|
|
||||||
| deleted | | tinyint(1) | NO | | 0 | |
|
|
||||||
| origin | | tinyint(1) | NO | | 0 | |
|
|
||||||
| forum_mode | | tinyint(1) | NO | | 0 | |
|
|
||||||
| mention | | tinyint(1) | NO | | 0 | |
|
|
||||||
| network | | varchar(32) | NO | | | |
|
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
|
|
@ -1,13 +1,14 @@
|
||||||
Table tokens
|
Table tokens
|
||||||
============
|
===========
|
||||||
|
OAuth usage
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
| ---------- | ----------- | ------------ | ---- | --- | ------- | ----- |
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| id | | varchar(40) | NO | PRI | NULL | |
|
| id | | varchar(40) | YES | PRI | | |
|
||||||
| secret | | text | NO | | NULL | |
|
| secret | | text | NO | | | |
|
||||||
| client_id | | varchar(20) | NO | | | |
|
| client_id | | varchar(20) | YES | | | |
|
||||||
| expires | | int(11) | NO | | 0 | |
|
| expires | | int | YES | | 0 | |
|
||||||
| scope | | varchar(200) | NO | | | |
|
| scope | | varchar(200) | YES | | | |
|
||||||
| uid | | int(11) | NO | | 0 | |
|
| uid | User id | mediumint unsigned | YES | | 0 | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
Table user-contact
|
||||||
|
===========
|
||||||
|
User specific public contact data
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| cid | Contact id of the linked public contact | int unsigned | YES | PRI | 0 | |
|
||||||
|
| uid | User id | mediumint unsigned | YES | PRI | 0 | |
|
||||||
|
| blocked | Contact is completely blocked for this user | boolean | NO | | | |
|
||||||
|
| ignored | Posts from this contact are ignored | boolean | NO | | | |
|
||||||
|
| collapsed | Posts from this contact are collapsed | boolean | NO | | | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -1,77 +1,53 @@
|
||||||
Table user
|
Table user
|
||||||
==========
|
===========
|
||||||
|
The local users
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|--------------------------|-----------------------------------------------------------------------------------------|---------------------|------|-----|---------------------|----------------|
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| uid | sequential ID | int(11) | NO | PRI | NULL | auto_increment |
|
| uid | sequential ID | mediumint unsigned | YES | PRI | | auto_increment |
|
||||||
| guid | A unique identifier for this user | varchar(64) | NO | | | |
|
| parent-uid | The parent user that has full control about this user | mediumint unsigned | NO | | | |
|
||||||
| username | Name that this user is known by | varchar(255) | NO | | | |
|
| guid | A unique identifier for this user | varchar(64) | YES | | | |
|
||||||
| password | encrypted password | varchar(255) | NO | | | |
|
| username | Name that this user is known by | varchar(255) | YES | | | |
|
||||||
| nickname | nick- and user name | varchar(255) | NO | MUL | | |
|
| password | encrypted password | varchar(255) | YES | | | |
|
||||||
| email | the users email address | varchar(255) | NO | | | |
|
| legacy_password | Is the password hash double-hashed? | boolean | YES | | 0 | |
|
||||||
| openid | | varchar(255) | NO | | | |
|
| nickname | nick- and user name | varchar(255) | YES | | | |
|
||||||
| timezone | PHP-legal timezone | varchar(128) | NO | | | |
|
| email | the users email address | varchar(255) | YES | | | |
|
||||||
| language | default language | varchar(32) | NO | | en | |
|
| openid | | varchar(255) | YES | | | |
|
||||||
| register_date | timestamp of registration | datetime | NO | | 0001-01-01 00:00:00 | |
|
| timezone | PHP-legal timezone | varchar(128) | YES | | | |
|
||||||
| login_date | timestamp of last login | datetime | NO | | 0001-01-01 00:00:00 | |
|
| language | default language | varchar(32) | YES | | en | |
|
||||||
| default-location | Default for item.location | varchar(255) | NO | | | |
|
| register_date | timestamp of registration | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| allow_location | 1 allows to display the location | tinyint(1) | NO | | 0 | |
|
| login_date | timestamp of last login | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| theme | user theme preference | varchar(255) | NO | | | |
|
| default-location | Default for item.location | varchar(255) | YES | | | |
|
||||||
| pubkey | RSA public key 4096 bit | text | NO | | NULL | |
|
| allow_location | 1 allows to display the location | boolean | YES | | 0 | |
|
||||||
| prvkey | RSA private key 4096 bit | text | NO | | NULL | |
|
| theme | user theme preference | varchar(255) | YES | | | |
|
||||||
| spubkey | | text | NO | | NULL | |
|
| pubkey | RSA public key 4096 bit | text | NO | | | |
|
||||||
| sprvkey | | text | NO | | NULL | |
|
| prvkey | RSA private key 4096 bit | text | NO | | | |
|
||||||
| verified | user is verified through email | tinyint(1) unsigned | NO | | 0 | |
|
| spubkey | | text | NO | | | |
|
||||||
| blocked | 1 for user is blocked | tinyint(1) unsigned | NO | | 0 | |
|
| sprvkey | | text | NO | | | |
|
||||||
| blockwall | Prohibit contacts to post to the profile page of the user | tinyint(1) unsigned | NO | | 0 | |
|
| verified | user is verified through email | boolean | YES | | 0 | |
|
||||||
| hidewall | Hide profile details from unkown viewers | tinyint(1) unsigned | NO | | 0 | |
|
| blocked | 1 for user is blocked | boolean | YES | | 0 | |
|
||||||
| blocktags | Prohibit contacts to tag the post of this user | tinyint(1) unsigned | NO | | 0 | |
|
| blockwall | Prohibit contacts to post to the profile page of the user | boolean | YES | | 0 | |
|
||||||
| unkmail | Permit unknown people to send private mails to this user | tinyint(1) | NO | | 0 | |
|
| hidewall | Hide profile details from unkown viewers | boolean | YES | | 0 | |
|
||||||
| cntunkmail | | int(11) | NO | | 10 | |
|
| blocktags | Prohibit contacts to tag the post of this user | boolean | YES | | 0 | |
|
||||||
| notify-flags | email notification options | int(11) unsigned | NO | | 65535 | |
|
| unkmail | Permit unknown people to send private mails to this user | boolean | YES | | 0 | |
|
||||||
| page-flags | page/profile type | int(11) unsigned | NO | | 0 | |
|
| cntunkmail | | int unsigned | YES | | 10 | |
|
||||||
| prvnets | | tinyint(1) | NO | | 0 | |
|
| notify-flags | email notification options | smallint unsigned | YES | | 65535 | |
|
||||||
| pwdreset | | varchar(255) | NO | | | |
|
| page-flags | page/profile type | tinyint unsigned | YES | | 0 | |
|
||||||
| maxreq | | int(11) | NO | | 10 | |
|
| account-type | | tinyint unsigned | YES | | 0 | |
|
||||||
| expire | | int(11) unsigned | NO | | 0 | |
|
| prvnets | | boolean | YES | | 0 | |
|
||||||
| account_removed | if 1 the account is removed | tinyint(1) | NO | | 0 | |
|
| pwdreset | Password reset request token | varchar(255) | NO | | | |
|
||||||
| account_expired | | tinyint(1) | NO | | 0 | |
|
| pwdreset_time | Timestamp of the last password reset request | datetime | NO | | | |
|
||||||
| account_expires_on | timestamp when account expires and will be deleted | datetime | NO | | 0001-01-01 00:00:00 | |
|
| maxreq | | int unsigned | YES | | 10 | |
|
||||||
| expire_notification_sent | timestamp of last warning of account expiration | datetime | NO | | 0001-01-01 00:00:00 | |
|
| expire | | int unsigned | YES | | 0 | |
|
||||||
| def_gid | | int(11) | NO | | 0 | |
|
| account_removed | if 1 the account is removed | boolean | YES | | 0 | |
|
||||||
| allow_cid | default permission for this user | mediumtext | NO | | NULL | |
|
| account_expired | | boolean | YES | | 0 | |
|
||||||
| allow_gid | default permission for this user | mediumtext | NO | | NULL | |
|
| account_expires_on | timestamp when account expires and will be deleted | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| deny_cid | default permission for this user | mediumtext | NO | | NULL | |
|
| expire_notification_sent | timestamp of last warning of account expiration | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| deny_gid | default permission for this user | mediumtext | NO | | NULL | |
|
| def_gid | | int unsigned | YES | | 0 | |
|
||||||
| openidserver | | text | NO | | NULL | |
|
| allow_cid | default permission for this user | mediumtext | NO | | | |
|
||||||
|
| allow_gid | default permission for this user | mediumtext | NO | | | |
|
||||||
```
|
| deny_cid | default permission for this user | mediumtext | NO | | | |
|
||||||
/**
|
| deny_gid | default permission for this user | mediumtext | NO | | | |
|
||||||
* page-flags
|
| openidserver | | text | NO | | | |
|
||||||
*/
|
|
||||||
define ( 'PAGE_NORMAL', 0 );
|
|
||||||
define ( 'PAGE_SOAPBOX', 1 );
|
|
||||||
define ( 'PAGE_COMMUNITY', 2 );
|
|
||||||
define ( 'PAGE_FREELOVE', 3 );
|
|
||||||
define ( 'PAGE_BLOG', 4 );
|
|
||||||
define ( 'PAGE_PRVGROUP', 5 );
|
|
||||||
|
|
||||||
/**
|
|
||||||
* notify-flags
|
|
||||||
*/
|
|
||||||
define ( 'NOTIFY_INTRO', 0x0001 );
|
|
||||||
define ( 'NOTIFY_CONFIRM', 0x0002 );
|
|
||||||
define ( 'NOTIFY_WALL', 0x0004 );
|
|
||||||
define ( 'NOTIFY_COMMENT', 0x0008 );
|
|
||||||
define ( 'NOTIFY_MAIL', 0x0010 );
|
|
||||||
define ( 'NOTIFY_SUGGEST', 0x0020 );
|
|
||||||
define ( 'NOTIFY_PROFILE', 0x0040 );
|
|
||||||
define ( 'NOTIFY_TAGSELF', 0x0080 );
|
|
||||||
define ( 'NOTIFY_TAGSHARE', 0x0100 );
|
|
||||||
define ( 'NOTIFY_POKE', 0x0200 );
|
|
||||||
define ( 'NOTIFY_SHARE', 0x0400 );
|
|
||||||
|
|
||||||
define ( 'NOTIFY_SYSTEM', 0x8000 );
|
|
||||||
```
|
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
Table userd
|
Table userd
|
||||||
===========
|
===========
|
||||||
|
Deleted usernames
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|----------|------------------|--------------|------|-----|---------|----------------|
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment |
|
| id | sequential ID | int unsigned | YES | PRI | | auto_increment |
|
||||||
| username | | varchar(255) | NO | MUL | NULL | |
|
| username | | varchar(255) | YES | | | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
Table verb
|
||||||
|
===========
|
||||||
|
Activity Verbs
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| id | | smallint unsigned | YES | PRI | | auto_increment |
|
||||||
|
| name | | varchar(100) | YES | | | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -0,0 +1,10 @@
|
||||||
|
Table worker-ipc
|
||||||
|
===========
|
||||||
|
Inter process communication between the frontend and the worker
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
| key | | int | YES | PRI | | |
|
||||||
|
| jobs | Flag for outstanding jobs | boolean | NO | | | |
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -1,14 +1,18 @@
|
||||||
Table workerqueue
|
Table workerqueue
|
||||||
=================
|
===========
|
||||||
|
Background tasks queue entries
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|-----------|------------------|---------------------|------|-----|---------------------|----------------|
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment |
|
| id | Auto incremented worker task id | int unsigned | YES | PRI | | auto_increment |
|
||||||
| parameter | | text | NO | | NULL | |
|
| command | Task command | varchar(100) | NO | | | |
|
||||||
| priority | | tinyint(3) unsigned | NO | | 0 | |
|
| parameter | Task parameter | mediumtext | NO | | | |
|
||||||
| created | | datetime | NO | MUL | 0001-01-01 00:00:00 | |
|
| priority | Task priority | tinyint unsigned | YES | | 0 | |
|
||||||
| pid | | int(11) | NO | | 0 | |
|
| created | Creation date | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
| executed | | datetime | NO | | 0001-01-01 00:00:00 | |
|
| pid | Process id of the worker | int unsigned | YES | | 0 | |
|
||||||
| done | set to 1 if done | tinyint(1) | NO | | 0 | |
|
| executed | Execution date | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
| next_try | Next retrial date | datetime | YES | | 0001-01-01 00:00:00 | |
|
||||||
|
| retrial | Retrial counter | tinyint | YES | | 0 | |
|
||||||
|
| done | Marked 1 when the task was done - will be deleted later | boolean | YES | | 0 | |
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
Return to [database documentation](help/database)
|
||||||
|
|
|
@ -120,6 +120,7 @@ HELP;
|
||||||
$output = ob_get_clean();
|
$output = ob_get_clean();
|
||||||
break;
|
break;
|
||||||
case "dumpsql":
|
case "dumpsql":
|
||||||
|
DBStructure::writeStructure();
|
||||||
ob_start();
|
ob_start();
|
||||||
DBStructure::printStructure($basePath);
|
DBStructure::printStructure($basePath);
|
||||||
$output = ob_get_clean();
|
$output = ob_get_clean();
|
||||||
|
|
|
@ -24,6 +24,7 @@ namespace Friendica\Database;
|
||||||
use Exception;
|
use Exception;
|
||||||
use Friendica\Core\Hook;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
|
use Friendica\Core\Renderer;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
use Friendica\Model\Item;
|
use Friendica\Model\Item;
|
||||||
use Friendica\Model\User;
|
use Friendica\Model\User;
|
||||||
|
@ -159,6 +160,41 @@ class DBStructure
|
||||||
return DI::l10n()->t('Errors encountered performing database changes: ') . $message . EOL;
|
return DI::l10n()->t('Errors encountered performing database changes: ') . $message . EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function writeStructure()
|
||||||
|
{
|
||||||
|
Renderer::registerTemplateEngine('Friendica\Render\FriendicaSmartyEngine');
|
||||||
|
|
||||||
|
$tables = [];
|
||||||
|
foreach (self::definition(null) as $name => $definition) {
|
||||||
|
$fields = [];
|
||||||
|
foreach ($definition['fields'] as $key => $value) {
|
||||||
|
$field = [];
|
||||||
|
$field['name'] = $key;
|
||||||
|
$field['comment'] = $value['comment'] ?? '';
|
||||||
|
$field['type'] = $value['type'];
|
||||||
|
$field['notnull'] = ($value['not null'] ?? false) ? 'YES' : 'NO';
|
||||||
|
$field['primary'] = ($value['primary'] ?? false) ? 'PRI' : '';
|
||||||
|
$field['default'] = $value['default'] ?? '';
|
||||||
|
$field['extra'] = $value['extra'] ?? '';
|
||||||
|
|
||||||
|
$fields[] = $field;
|
||||||
|
}
|
||||||
|
$tables[] = ['name' => $name, 'comment' => $definition['comment']];
|
||||||
|
$content = Renderer::replaceMacros(Renderer::getMarkupTemplate('structure.tpl'), [
|
||||||
|
'$name' => $name,
|
||||||
|
'$comment' => $definition['comment'],
|
||||||
|
'$fields' => $fields,
|
||||||
|
]);
|
||||||
|
$filename = DI::basePath() . '/doc/database/db_' . $name . '.md';
|
||||||
|
file_put_contents($filename, $content);
|
||||||
|
}
|
||||||
|
$content = Renderer::replaceMacros(Renderer::getMarkupTemplate('tables.tpl'), [
|
||||||
|
'$tables' => $tables,
|
||||||
|
]);
|
||||||
|
$filename = DI::basePath() . '/doc/database.md';
|
||||||
|
file_put_contents($filename, $content);
|
||||||
|
}
|
||||||
|
|
||||||
public static function printStructure($basePath)
|
public static function printStructure($basePath)
|
||||||
{
|
{
|
||||||
$database = self::definition($basePath, false);
|
$database = self::definition($basePath, false);
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
Table {{$name}}
|
||||||
|
===========
|
||||||
|
{{$comment}}
|
||||||
|
|
||||||
|
| Field | Description | Type | Null | Key | Default | Extra |
|
||||||
|
| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
|
||||||
|
{{foreach $fields as $field}}
|
||||||
|
| {{$field.name}} | {{$field.comment}} | {{$field.type}} | {{$field.notnull}} | {{$field.primary}} | {{$field.default}} | {{$field.extra}} |
|
||||||
|
{{/foreach}}
|
||||||
|
|
||||||
|
Return to [database documentation](help/database)
|
|
@ -0,0 +1,10 @@
|
||||||
|
Database Tables
|
||||||
|
===============
|
||||||
|
|
||||||
|
* [Home](help)
|
||||||
|
|
||||||
|
| Table | Description |
|
||||||
|
|-------|-------------|
|
||||||
|
{{foreach $tables as $table}}
|
||||||
|
| [{{$table.name}}](help/database/db_{{$table.name}}) | {{$table.comment}} |
|
||||||
|
{{/foreach}}
|
Loading…
Reference in New Issue
Block a user