diff --git a/doc/database/db_2fa_app_specific_password.md b/doc/database/db_2fa_app_specific_password.md index 9d9c7ca45..66dd77c95 100644 --- a/doc/database/db_2fa_app_specific_password.md +++ b/doc/database/db_2fa_app_specific_password.md @@ -18,9 +18,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| --------------- | --------------------- | +| PRIMARY | id | | uid_description | uid, description(190) | Foreign Keys diff --git a/doc/database/db_2fa_recovery_codes.md b/doc/database/db_2fa_recovery_codes.md index e7c1940d8..69c34e654 100644 --- a/doc/database/db_2fa_recovery_codes.md +++ b/doc/database/db_2fa_recovery_codes.md @@ -16,8 +16,8 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| +| Name | Fields | +| ------- | --------- | | PRIMARY | uid, code | Foreign Keys diff --git a/doc/database/db_2fa_trusted_browser.md b/doc/database/db_2fa_trusted_browser.md index 9e12dabc7..d12d9e1fc 100644 --- a/doc/database/db_2fa_trusted_browser.md +++ b/doc/database/db_2fa_trusted_browser.md @@ -17,10 +17,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| +| Name | Fields | +| ------- | ----------- | | PRIMARY | cookie_hash | -| uid | uid | +| uid | uid | Foreign Keys ------------ diff --git a/doc/database/db_addon.md b/doc/database/db_addon.md index 21fae66f3..7233b8009 100644 --- a/doc/database/db_addon.md +++ b/doc/database/db_addon.md @@ -19,11 +19,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| -------------- | --------------- | +| PRIMARY | id | | installed_name | installed, name | -| name | UNIQUE, name | +| name | UNIQUE, name | Return to [database documentation](help/database) diff --git a/doc/database/db_apcontact.md b/doc/database/db_apcontact.md index cb2f8327a..5f5d21e4e 100644 --- a/doc/database/db_apcontact.md +++ b/doc/database/db_apcontact.md @@ -36,15 +36,15 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | url | -| addr | addr(32) | -| alias | alias(190) | -| followers | followers(190) | -| baseurl | baseurl(190) | +| Name | Fields | +| ----------- | ---------------- | +| PRIMARY | url | +| addr | addr(32) | +| alias | alias(190) | +| followers | followers(190) | +| baseurl | baseurl(190) | | sharedinbox | sharedinbox(190) | -| gsid | gsid | +| gsid | gsid | Foreign Keys ------------ diff --git a/doc/database/db_application-token.md b/doc/database/db_application-token.md index 15f85f06e..9899a5e8b 100644 --- a/doc/database/db_application-token.md +++ b/doc/database/db_application-token.md @@ -22,10 +22,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| +| Name | Fields | +| ------- | ------------------- | | PRIMARY | application-id, uid | -| uid_id | uid, application-id | +| uid_id | uid, application-id | Foreign Keys ------------ diff --git a/doc/database/db_application.md b/doc/database/db_application.md index 2099b3374..0a91e703a 100644 --- a/doc/database/db_application.md +++ b/doc/database/db_application.md @@ -23,9 +23,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| --------- | ----------------- | +| PRIMARY | id | | client_id | UNIQUE, client_id | diff --git a/doc/database/db_attach.md b/doc/database/db_attach.md index baef7c89d..9eb0f36e9 100644 --- a/doc/database/db_attach.md +++ b/doc/database/db_attach.md @@ -27,10 +27,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| uid | uid | +| Name | Fields | +| ------- | ------ | +| PRIMARY | id | +| uid | uid | Foreign Keys ------------ diff --git a/doc/database/db_auth_codes.md b/doc/database/db_auth_codes.md index df53a5b28..a1d28e096 100644 --- a/doc/database/db_auth_codes.md +++ b/doc/database/db_auth_codes.md @@ -17,9 +17,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| --------- | --------- | +| PRIMARY | id | | client_id | client_id | Foreign Keys diff --git a/doc/database/db_cache.md b/doc/database/db_cache.md index 770b4ab44..27a11daa6 100644 --- a/doc/database/db_cache.md +++ b/doc/database/db_cache.md @@ -16,9 +16,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | k | +| Name | Fields | +| --------- | ---------- | +| PRIMARY | k | | k_expires | k, expires | diff --git a/doc/database/db_challenge.md b/doc/database/db_challenge.md index a9f17bc63..161838909 100644 --- a/doc/database/db_challenge.md +++ b/doc/database/db_challenge.md @@ -18,10 +18,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| expire | expire | +| Name | Fields | +| ------- | ------ | +| PRIMARY | id | +| expire | expire | Return to [database documentation](help/database) diff --git a/doc/database/db_clients.md b/doc/database/db_clients.md index 29f9fe52f..a97e796ed 100644 --- a/doc/database/db_clients.md +++ b/doc/database/db_clients.md @@ -18,10 +18,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| +| Name | Fields | +| ------- | --------- | | PRIMARY | client_id | -| uid | uid | +| uid | uid | Foreign Keys ------------ diff --git a/doc/database/db_config.md b/doc/database/db_config.md index 32396dc74..7d7618794 100644 --- a/doc/database/db_config.md +++ b/doc/database/db_config.md @@ -16,10 +16,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| cat_k | UNIQUE, cat, k | +| Name | Fields | +| ------- | -------------- | +| PRIMARY | id | +| cat_k | UNIQUE, cat, k | Return to [database documentation](help/database) diff --git a/doc/database/db_contact-relation.md b/doc/database/db_contact-relation.md index d9f74a40a..8628b1ef6 100644 --- a/doc/database/db_contact-relation.md +++ b/doc/database/db_contact-relation.md @@ -17,10 +17,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | cid, relation-cid | -| relation-cid | relation-cid | +| Name | Fields | +| ------------ | ----------------- | +| PRIMARY | cid, relation-cid | +| relation-cid | relation-cid | Foreign Keys ------------ diff --git a/doc/database/db_contact.md b/doc/database/db_contact.md index 0cca0ed11..0e04c1ece 100644 --- a/doc/database/db_contact.md +++ b/doc/database/db_contact.md @@ -92,31 +92,31 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| uid_name | uid, name(190) | -| self_uid | self, uid | -| alias_uid | alias(128), uid | -| pending_uid | pending, uid | -| blocked_uid | blocked, uid | -| uid_rel_network_poll | uid, rel, network, poll(64), archive | -| uid_network_batch | uid, network, batch(64) | -| batch_contact-type | batch(64), contact-type | -| addr_uid | addr(128), uid | -| nurl_uid | nurl(128), uid | -| nick_uid | nick(128), uid | -| attag_uid | attag(96), uid | -| dfrn-id | dfrn-id(64) | -| issued-id | issued-id(64) | -| network_uid_lastupdate | network, uid, last-update | -| uid_network_self_lastupdate | uid, network, self, last-update | -| uid_lastitem | uid, last-item | -| baseurl | baseurl(64) | -| uid_contact-type | uid, contact-type | -| uid_self_contact-type | uid, self, contact-type | -| self_network_uid | self, network, uid | -| gsid | gsid | +| Name | Fields | +| --------------------------- | ------------------------------------ | +| PRIMARY | id | +| uid_name | uid, name(190) | +| self_uid | self, uid | +| alias_uid | alias(128), uid | +| pending_uid | pending, uid | +| blocked_uid | blocked, uid | +| uid_rel_network_poll | uid, rel, network, poll(64), archive | +| uid_network_batch | uid, network, batch(64) | +| batch_contact-type | batch(64), contact-type | +| addr_uid | addr(128), uid | +| nurl_uid | nurl(128), uid | +| nick_uid | nick(128), uid | +| attag_uid | attag(96), uid | +| dfrn-id | dfrn-id(64) | +| issued-id | issued-id(64) | +| network_uid_lastupdate | network, uid, last-update | +| uid_network_self_lastupdate | uid, network, self, last-update | +| uid_lastitem | uid, last-item | +| baseurl | baseurl(64) | +| uid_contact-type | uid, contact-type | +| uid_self_contact-type | uid, self, contact-type | +| self_network_uid | self, network, uid | +| gsid | gsid | Foreign Keys ------------ diff --git a/doc/database/db_conv.md b/doc/database/db_conv.md index f53918291..c1d50b5de 100644 --- a/doc/database/db_conv.md +++ b/doc/database/db_conv.md @@ -20,10 +20,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| uid | uid | +| Name | Fields | +| ------- | ------ | +| PRIMARY | id | +| uid | uid | Foreign Keys ------------ diff --git a/doc/database/db_conversation.md b/doc/database/db_conversation.md index 308d5ee2b..504b0dd4a 100644 --- a/doc/database/db_conversation.md +++ b/doc/database/db_conversation.md @@ -20,11 +20,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | item-uri | +| Name | Fields | +| ---------------- | ---------------- | +| PRIMARY | item-uri | | conversation-uri | conversation-uri | -| received | received | +| received | received | Return to [database documentation](help/database) diff --git a/doc/database/db_delayed-post.md b/doc/database/db_delayed-post.md index d9faab289..fe3251f70 100644 --- a/doc/database/db_delayed-post.md +++ b/doc/database/db_delayed-post.md @@ -16,9 +16,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| ------- | --------------------- | +| PRIMARY | id | | uid_uri | UNIQUE, uid, uri(190) | Foreign Keys diff --git a/doc/database/db_diaspora-interaction.md b/doc/database/db_diaspora-interaction.md index f56a72abd..4ac432590 100644 --- a/doc/database/db_diaspora-interaction.md +++ b/doc/database/db_diaspora-interaction.md @@ -14,8 +14,8 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| +| Name | Fields | +| ------- | ------ | | PRIMARY | uri-id | Foreign Keys diff --git a/doc/database/db_event.md b/doc/database/db_event.md index b222dc915..d8b009639 100644 --- a/doc/database/db_event.md +++ b/doc/database/db_event.md @@ -32,11 +32,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| --------- | ---------- | +| PRIMARY | id | | uid_start | uid, start | -| cid | cid | +| cid | cid | Foreign Keys ------------ diff --git a/doc/database/db_fcontact.md b/doc/database/db_fcontact.md index e3cf61fa5..43a073f61 100644 --- a/doc/database/db_fcontact.md +++ b/doc/database/db_fcontact.md @@ -29,11 +29,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| addr | addr(32) | -| url | UNIQUE, url(190) | +| Name | Fields | +| ------- | ---------------- | +| PRIMARY | id | +| addr | addr(32) | +| url | UNIQUE, url(190) | Return to [database documentation](help/database) diff --git a/doc/database/db_fsuggest.md b/doc/database/db_fsuggest.md index 37d63c7c6..6ccf73297 100644 --- a/doc/database/db_fsuggest.md +++ b/doc/database/db_fsuggest.md @@ -21,11 +21,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| cid | cid | -| uid | uid | +| Name | Fields | +| ------- | ------ | +| PRIMARY | id | +| cid | cid | +| uid | uid | Foreign Keys ------------ diff --git a/doc/database/db_group.md b/doc/database/db_group.md index 23150bdcb..1892de3e4 100644 --- a/doc/database/db_group.md +++ b/doc/database/db_group.md @@ -17,10 +17,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| uid | uid | +| Name | Fields | +| ------- | ------ | +| PRIMARY | id | +| uid | uid | Foreign Keys ------------ diff --git a/doc/database/db_group_member.md b/doc/database/db_group_member.md index 2dd9fb41d..a544f3b0e 100644 --- a/doc/database/db_group_member.md +++ b/doc/database/db_group_member.md @@ -15,10 +15,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| contactid | contact-id | +| Name | Fields | +| ------------- | ----------------------- | +| PRIMARY | id | +| contactid | contact-id | | gid_contactid | UNIQUE, gid, contact-id | Foreign Keys diff --git a/doc/database/db_gserver-tag.md b/doc/database/db_gserver-tag.md index bce171f11..82b0ccc88 100644 --- a/doc/database/db_gserver-tag.md +++ b/doc/database/db_gserver-tag.md @@ -14,10 +14,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| +| Name | Fields | +| ------- | --------------- | | PRIMARY | gserver-id, tag | -| tag | tag | +| tag | tag | Foreign Keys ------------ diff --git a/doc/database/db_gserver.md b/doc/database/db_gserver.md index 66339427e..905602b3b 100644 --- a/doc/database/db_gserver.md +++ b/doc/database/db_gserver.md @@ -35,12 +35,12 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| nurl | UNIQUE, nurl(190) | -| next_contact | next_contact | -| network | network | +| Name | Fields | +| ------------ | ----------------- | +| PRIMARY | id | +| nurl | UNIQUE, nurl(190) | +| next_contact | next_contact | +| network | network | Return to [database documentation](help/database) diff --git a/doc/database/db_hook.md b/doc/database/db_hook.md index 622695a26..0ad0981f0 100644 --- a/doc/database/db_hook.md +++ b/doc/database/db_hook.md @@ -17,10 +17,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| priority | priority | +| Name | Fields | +| ------------------ | ---------------------------- | +| PRIMARY | id | +| priority | priority | | hook_file_function | UNIQUE, hook, file, function | diff --git a/doc/database/db_host.md b/doc/database/db_host.md index bccea5f87..4b2d4d1e5 100644 --- a/doc/database/db_host.md +++ b/doc/database/db_host.md @@ -14,10 +14,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| name | UNIQUE, name | +| Name | Fields | +| ------- | ------------ | +| PRIMARY | id | +| name | UNIQUE, name | Return to [database documentation](help/database) diff --git a/doc/database/db_inbox-status.md b/doc/database/db_inbox-status.md index 7f6a5d599..3b82cf46a 100644 --- a/doc/database/db_inbox-status.md +++ b/doc/database/db_inbox-status.md @@ -19,9 +19,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | url | +| Name | Fields | +| ------- | ------ | +| PRIMARY | url | Return to [database documentation](help/database) diff --git a/doc/database/db_intro.md b/doc/database/db_intro.md index 5ea923fce..426d8579d 100644 --- a/doc/database/db_intro.md +++ b/doc/database/db_intro.md @@ -23,11 +23,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| ---------- | ---------- | +| PRIMARY | id | | contact-id | contact-id | -| uid | uid | +| uid | uid | Foreign Keys ------------ diff --git a/doc/database/db_item-uri.md b/doc/database/db_item-uri.md index c49ef3813..c6d1c4c37 100644 --- a/doc/database/db_item-uri.md +++ b/doc/database/db_item-uri.md @@ -15,11 +15,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| uri | UNIQUE, uri | -| guid | guid | +| Name | Fields | +| ------- | ----------- | +| PRIMARY | id | +| uri | UNIQUE, uri | +| guid | guid | Return to [database documentation](help/database) diff --git a/doc/database/db_locks.md b/doc/database/db_locks.md index 821db5fee..dc5371184 100644 --- a/doc/database/db_locks.md +++ b/doc/database/db_locks.md @@ -17,9 +17,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| ------------ | ------------- | +| PRIMARY | id | | name_expires | name, expires | diff --git a/doc/database/db_mail.md b/doc/database/db_mail.md index 0558cff69..460c03bf6 100644 --- a/doc/database/db_mail.md +++ b/doc/database/db_mail.md @@ -34,18 +34,18 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| uid_seen | uid, seen | -| convid | convid | -| uri | uri(64) | -| parent-uri | parent-uri(64) | -| contactid | contact-id(32) | -| author-id | author-id | -| uri-id | uri-id | -| parent-uri-id | parent-uri-id | -| thr-parent-id | thr-parent-id | +| Name | Fields | +| ------------- | -------------- | +| PRIMARY | id | +| uid_seen | uid, seen | +| convid | convid | +| uri | uri(64) | +| parent-uri | parent-uri(64) | +| contactid | contact-id(32) | +| author-id | author-id | +| uri-id | uri-id | +| parent-uri-id | parent-uri-id | +| thr-parent-id | thr-parent-id | Foreign Keys ------------ diff --git a/doc/database/db_mailacct.md b/doc/database/db_mailacct.md index dba0fd958..59f34250c 100644 --- a/doc/database/db_mailacct.md +++ b/doc/database/db_mailacct.md @@ -25,10 +25,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| uid | uid | +| Name | Fields | +| ------- | ------ | +| PRIMARY | id | +| uid | uid | Foreign Keys ------------ diff --git a/doc/database/db_manage.md b/doc/database/db_manage.md index ccfa7170d..8a2228a5e 100644 --- a/doc/database/db_manage.md +++ b/doc/database/db_manage.md @@ -15,11 +15,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| ------- | ---------------- | +| PRIMARY | id | | uid_mid | UNIQUE, uid, mid | -| mid | mid | +| mid | mid | Foreign Keys ------------ diff --git a/doc/database/db_notification.md b/doc/database/db_notification.md index b5c0d7b1e..ff059c344 100644 --- a/doc/database/db_notification.md +++ b/doc/database/db_notification.md @@ -21,15 +21,15 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| ----------------------------------- | ----------------------------------------------- | +| PRIMARY | id | | uid_vid_type_actor-id_target-uri-id | UNIQUE, uid, vid, type, actor-id, target-uri-id | -| vid | vid | -| actor-id | actor-id | -| target-uri-id | target-uri-id | -| parent-uri-id | parent-uri-id | -| seen_uid | seen, uid | +| vid | vid | +| actor-id | actor-id | +| target-uri-id | target-uri-id | +| parent-uri-id | parent-uri-id | +| seen_uid | seen, uid | Foreign Keys ------------ diff --git a/doc/database/db_notify-threads.md b/doc/database/db_notify-threads.md index 5a0157d84..82ed225f7 100644 --- a/doc/database/db_notify-threads.md +++ b/doc/database/db_notify-threads.md @@ -18,12 +18,12 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| -------------------- | -------------------- | +| PRIMARY | id | | master-parent-uri-id | master-parent-uri-id | -| receiver-uid | receiver-uid | -| notify-id | notify-id | +| receiver-uid | receiver-uid | +| notify-id | notify-id | Foreign Keys ------------ diff --git a/doc/database/db_notify.md b/doc/database/db_notify.md index f1eb35881..250734e56 100644 --- a/doc/database/db_notify.md +++ b/doc/database/db_notify.md @@ -30,14 +30,14 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| seen_uid_date | seen, uid, date | -| uid_date | uid, date | +| Name | Fields | +| ------------- | -------------------- | +| PRIMARY | id | +| seen_uid_date | seen, uid, date | +| uid_date | uid, date | | uid_type_link | uid, type, link(190) | -| uri-id | uri-id | -| parent-uri-id | parent-uri-id | +| uri-id | uri-id | +| parent-uri-id | parent-uri-id | Foreign Keys ------------ diff --git a/doc/database/db_oembed.md b/doc/database/db_oembed.md index f3a6a0231..8304a32f4 100644 --- a/doc/database/db_oembed.md +++ b/doc/database/db_oembed.md @@ -16,10 +16,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| +| Name | Fields | +| ------- | ------------- | | PRIMARY | url, maxwidth | -| created | created | +| created | created | Return to [database documentation](help/database) diff --git a/doc/database/db_openwebauth-token.md b/doc/database/db_openwebauth-token.md index 05313df62..c330623d9 100644 --- a/doc/database/db_openwebauth-token.md +++ b/doc/database/db_openwebauth-token.md @@ -18,10 +18,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| uid | uid | +| Name | Fields | +| ------- | ------ | +| PRIMARY | id | +| uid | uid | Foreign Keys ------------ diff --git a/doc/database/db_parsed_url.md b/doc/database/db_parsed_url.md index 1bb408357..67ea5caeb 100644 --- a/doc/database/db_parsed_url.md +++ b/doc/database/db_parsed_url.md @@ -19,11 +19,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| +| Name | Fields | +| ------- | -------------------------- | | PRIMARY | url_hash, guessing, oembed | -| created | created | -| expires | expires | +| created | created | +| expires | expires | Return to [database documentation](help/database) diff --git a/doc/database/db_pconfig.md b/doc/database/db_pconfig.md index f1e031f2a..cf9b0d781 100644 --- a/doc/database/db_pconfig.md +++ b/doc/database/db_pconfig.md @@ -17,9 +17,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| --------- | ------------------- | +| PRIMARY | id | | uid_cat_k | UNIQUE, uid, cat, k | Foreign Keys diff --git a/doc/database/db_permissionset.md b/doc/database/db_permissionset.md index a9e237429..107cedea1 100644 --- a/doc/database/db_permissionset.md +++ b/doc/database/db_permissionset.md @@ -18,9 +18,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| ----------------------------------------- | ------------------------------------------------------------- | +| PRIMARY | id | | uid_allow_cid_allow_gid_deny_cid_deny_gid | uid, allow_cid(50), allow_gid(30), deny_cid(50), deny_gid(30) | Foreign Keys diff --git a/doc/database/db_photo.md b/doc/database/db_photo.md index 964530d7e..aad26bdbe 100644 --- a/doc/database/db_photo.md +++ b/doc/database/db_photo.md @@ -39,15 +39,15 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| contactid | contact-id | -| uid_contactid | uid, contact-id | -| uid_profile | uid, profile | -| uid_album_scale_created | uid, album(32), scale, created | +| Name | Fields | +| ----------------------------- | ------------------------------------ | +| PRIMARY | id | +| contactid | contact-id | +| uid_contactid | uid, contact-id | +| uid_profile | uid, profile | +| uid_album_scale_created | uid, album(32), scale, created | | uid_album_resource-id_created | uid, album(32), resource-id, created | -| resource-id | resource-id | +| resource-id | resource-id | Foreign Keys ------------ diff --git a/doc/database/db_post-category.md b/doc/database/db_post-category.md index 2d758905f..b825a8f4b 100644 --- a/doc/database/db_post-category.md +++ b/doc/database/db_post-category.md @@ -16,11 +16,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| +| Name | Fields | +| ------- | ---------------------- | | PRIMARY | uri-id, uid, type, tid | -| uri-id | tid | -| uid | uid | +| uri-id | tid | +| uid | uid | Foreign Keys ------------ diff --git a/doc/database/db_post-content.md b/doc/database/db_post-content.md index 2e055d820..0addf43a3 100644 --- a/doc/database/db_post-content.md +++ b/doc/database/db_post-content.md @@ -29,11 +29,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | uri-id | -| plink | plink(191) | -| resource-id | resource-id | +| Name | Fields | +| -------------------------- | -------------------------------------- | +| PRIMARY | uri-id | +| plink | plink(191) | +| resource-id | resource-id | | title-content-warning-body | FULLTEXT, title, content-warning, body | Foreign Keys diff --git a/doc/database/db_post-delivery-data.md b/doc/database/db_post-delivery-data.md index f7273b5ef..ad4ca6af3 100644 --- a/doc/database/db_post-delivery-data.md +++ b/doc/database/db_post-delivery-data.md @@ -23,8 +23,8 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| +| Name | Fields | +| ------- | ------ | | PRIMARY | uri-id | Foreign Keys diff --git a/doc/database/db_post-media.md b/doc/database/db_post-media.md index a6c151d03..e17a04e5f 100644 --- a/doc/database/db_post-media.md +++ b/doc/database/db_post-media.md @@ -31,9 +31,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| ---------- | ------------------- | +| PRIMARY | id | | uri-id-url | UNIQUE, uri-id, url | Foreign Keys diff --git a/doc/database/db_post-tag.md b/doc/database/db_post-tag.md index 5d4caad22..7811f32e0 100644 --- a/doc/database/db_post-tag.md +++ b/doc/database/db_post-tag.md @@ -16,11 +16,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| +| Name | Fields | +| ------- | ---------------------- | | PRIMARY | uri-id, type, tid, cid | -| tid | tid | -| cid | cid | +| tid | tid | +| cid | cid | Foreign Keys ------------ diff --git a/doc/database/db_post-thread-user.md b/doc/database/db_post-thread-user.md index 9b6accc23..3efb5a77a 100644 --- a/doc/database/db_post-thread-user.md +++ b/doc/database/db_post-thread-user.md @@ -35,23 +35,23 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | uid, uri-id | -| uri-id | uri-id | -| owner-id | owner-id | -| author-id | author-id | -| causer-id | causer-id | -| uid | uid | -| contact-id | contact-id | -| psid | psid | -| post-user-id | post-user-id | -| commented | commented | -| uid_received | uid, received | -| uid_pinned | uid, pinned | +| Name | Fields | +| ------------- | -------------- | +| PRIMARY | uid, uri-id | +| uri-id | uri-id | +| owner-id | owner-id | +| author-id | author-id | +| causer-id | causer-id | +| uid | uid | +| contact-id | contact-id | +| psid | psid | +| post-user-id | post-user-id | +| commented | commented | +| uid_received | uid, received | +| uid_pinned | uid, pinned | | uid_commented | uid, commented | -| uid_starred | uid, starred | -| uid_mention | uid, mention | +| uid_starred | uid, starred | +| uid_mention | uid, mention | Foreign Keys ------------ diff --git a/doc/database/db_post-thread.md b/doc/database/db_post-thread.md index c13be54ba..96fd0d427 100644 --- a/doc/database/db_post-thread.md +++ b/doc/database/db_post-thread.md @@ -21,13 +21,13 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | uri-id | -| owner-id | owner-id | +| Name | Fields | +| --------- | --------- | +| PRIMARY | uri-id | +| owner-id | owner-id | | author-id | author-id | | causer-id | causer-id | -| received | received | +| received | received | | commented | commented | Foreign Keys diff --git a/doc/database/db_post-user-notification.md b/doc/database/db_post-user-notification.md index db024b621..36edd4a28 100644 --- a/doc/database/db_post-user-notification.md +++ b/doc/database/db_post-user-notification.md @@ -15,10 +15,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| +| Name | Fields | +| ------- | ----------- | | PRIMARY | uid, uri-id | -| uri-id | uri-id | +| uri-id | uri-id | Foreign Keys ------------ diff --git a/doc/database/db_post-user.md b/doc/database/db_post-user.md index a3b30c9b1..5fbc3e985 100644 --- a/doc/database/db_post-user.md +++ b/doc/database/db_post-user.md @@ -42,28 +42,28 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| uid_uri-id | UNIQUE, uid, uri-id | -| uri-id | uri-id | -| parent-uri-id | parent-uri-id | -| thr-parent-id | thr-parent-id | -| external-id | external-id | -| owner-id | owner-id | -| author-id | author-id | -| causer-id | causer-id | -| vid | vid | -| contact-id | contact-id | -| event-id | event-id | -| psid | psid | -| author-id_uid | author-id, uid | -| author-id_received | author-id, received | -| parent-uri-id_uid | parent-uri-id, uid | -| uid_contactid | uid, contact-id | +| Name | Fields | +| -------------------- | ----------------------- | +| PRIMARY | id | +| uid_uri-id | UNIQUE, uid, uri-id | +| uri-id | uri-id | +| parent-uri-id | parent-uri-id | +| thr-parent-id | thr-parent-id | +| external-id | external-id | +| owner-id | owner-id | +| author-id | author-id | +| causer-id | causer-id | +| vid | vid | +| contact-id | contact-id | +| event-id | event-id | +| psid | psid | +| author-id_uid | author-id, uid | +| author-id_received | author-id, received | +| parent-uri-id_uid | parent-uri-id, uid | +| uid_contactid | uid, contact-id | | uid_unseen_contactid | uid, unseen, contact-id | -| uid_unseen | uid, unseen | -| uid_hidden_uri-id | uid, hidden, uri-id | +| uid_unseen | uid, unseen | +| uid_hidden_uri-id | uid, hidden, uri-id | Foreign Keys ------------ diff --git a/doc/database/db_post.md b/doc/database/db_post.md index 8d7410052..303269b1c 100644 --- a/doc/database/db_post.md +++ b/doc/database/db_post.md @@ -30,16 +30,16 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | uri-id | +| Name | Fields | +| ------------- | ------------- | +| PRIMARY | uri-id | | parent-uri-id | parent-uri-id | | thr-parent-id | thr-parent-id | -| external-id | external-id | -| owner-id | owner-id | -| author-id | author-id | -| causer-id | causer-id | -| vid | vid | +| external-id | external-id | +| owner-id | owner-id | +| author-id | author-id | +| causer-id | causer-id | +| vid | vid | Foreign Keys ------------ diff --git a/doc/database/db_process.md b/doc/database/db_process.md index fb76d998e..062e6ff22 100644 --- a/doc/database/db_process.md +++ b/doc/database/db_process.md @@ -15,9 +15,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | pid | +| Name | Fields | +| ------- | ------- | +| PRIMARY | pid | | command | command | diff --git a/doc/database/db_profile.md b/doc/database/db_profile.md index d0bbcb6d2..4ea3b5600 100644 --- a/doc/database/db_profile.md +++ b/doc/database/db_profile.md @@ -54,11 +54,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| uid_is-default | uid, is-default | -| pub_keywords | FULLTEXT, pub_keywords | +| Name | Fields | +| -------------- | ---------------------- | +| PRIMARY | id | +| uid_is-default | uid, is-default | +| pub_keywords | FULLTEXT, pub_keywords | Foreign Keys ------------ diff --git a/doc/database/db_profile_check.md b/doc/database/db_profile_check.md index 96931618c..4049bd604 100644 --- a/doc/database/db_profile_check.md +++ b/doc/database/db_profile_check.md @@ -18,11 +18,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| uid | uid | -| cid | cid | +| Name | Fields | +| ------- | ------ | +| PRIMARY | id | +| uid | uid | +| cid | cid | Foreign Keys ------------ diff --git a/doc/database/db_profile_field.md b/doc/database/db_profile_field.md index e2fbad303..56e8e3d0b 100644 --- a/doc/database/db_profile_field.md +++ b/doc/database/db_profile_field.md @@ -20,12 +20,12 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| uid | uid | -| order | order | -| psid | psid | +| Name | Fields | +| ------- | ------ | +| PRIMARY | id | +| uid | uid | +| order | order | +| psid | psid | Foreign Keys ------------ diff --git a/doc/database/db_push_subscriber.md b/doc/database/db_push_subscriber.md index ffcf56f88..4ba50a4d1 100644 --- a/doc/database/db_push_subscriber.md +++ b/doc/database/db_push_subscriber.md @@ -22,11 +22,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| -------- | -------- | +| PRIMARY | id | | next_try | next_try | -| uid | uid | +| uid | uid | Foreign Keys ------------ diff --git a/doc/database/db_register.md b/doc/database/db_register.md index 2367b9d9f..8ace3c199 100644 --- a/doc/database/db_register.md +++ b/doc/database/db_register.md @@ -19,10 +19,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| uid | uid | +| Name | Fields | +| ------- | ------ | +| PRIMARY | id | +| uid | uid | Foreign Keys ------------ diff --git a/doc/database/db_search.md b/doc/database/db_search.md index 42c179a04..157d09ecb 100644 --- a/doc/database/db_search.md +++ b/doc/database/db_search.md @@ -15,11 +15,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| -------- | ------------- | +| PRIMARY | id | | uid_term | uid, term(64) | -| term | term(64) | +| term | term(64) | Foreign Keys ------------ diff --git a/doc/database/db_session.md b/doc/database/db_session.md index 775088c0a..794e49c6a 100644 --- a/doc/database/db_session.md +++ b/doc/database/db_session.md @@ -16,11 +16,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| sid | sid(64) | -| expire | expire | +| Name | Fields | +| ------- | ------- | +| PRIMARY | id | +| sid | sid(64) | +| expire | expire | Return to [database documentation](help/database) diff --git a/doc/database/db_storage.md b/doc/database/db_storage.md index 9c8495967..55911e28a 100644 --- a/doc/database/db_storage.md +++ b/doc/database/db_storage.md @@ -14,9 +14,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| ------- | ------ | +| PRIMARY | id | Return to [database documentation](help/database) diff --git a/doc/database/db_tag.md b/doc/database/db_tag.md index a7c47e9fc..8c742917a 100644 --- a/doc/database/db_tag.md +++ b/doc/database/db_tag.md @@ -15,11 +15,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| ------------- | ----------------- | +| PRIMARY | id | | type_name_url | UNIQUE, name, url | -| url | url | +| url | url | Return to [database documentation](help/database) diff --git a/doc/database/db_tokens.md b/doc/database/db_tokens.md index 3620f5fb5..7cf9bba4c 100644 --- a/doc/database/db_tokens.md +++ b/doc/database/db_tokens.md @@ -18,11 +18,11 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| --------- | --------- | +| PRIMARY | id | | client_id | client_id | -| uid | uid | +| uid | uid | Foreign Keys ------------ diff --git a/doc/database/db_user-contact.md b/doc/database/db_user-contact.md index 69adc0c6b..35d140cff 100644 --- a/doc/database/db_user-contact.md +++ b/doc/database/db_user-contact.md @@ -17,10 +17,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| +| Name | Fields | +| ------- | -------- | | PRIMARY | uid, cid | -| cid | cid | +| cid | cid | Foreign Keys ------------ diff --git a/doc/database/db_user.md b/doc/database/db_user.md index a2f9d931d..611fb76b0 100644 --- a/doc/database/db_user.md +++ b/doc/database/db_user.md @@ -57,13 +57,13 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | uid | -| nickname | nickname(32) | -| parent-uid | parent-uid | -| guid | guid | -| email | email(64) | +| Name | Fields | +| ---------- | ------------ | +| PRIMARY | uid | +| nickname | nickname(32) | +| parent-uid | parent-uid | +| guid | guid | +| email | email(64) | Foreign Keys ------------ diff --git a/doc/database/db_userd.md b/doc/database/db_userd.md index 7fce9ce9a..17a81b408 100644 --- a/doc/database/db_userd.md +++ b/doc/database/db_userd.md @@ -14,9 +14,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | +| Name | Fields | +| -------- | ------------ | +| PRIMARY | id | | username | username(32) | diff --git a/doc/database/db_verb.md b/doc/database/db_verb.md index 887f5fc4e..43507053b 100644 --- a/doc/database/db_verb.md +++ b/doc/database/db_verb.md @@ -14,10 +14,10 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| name | name | +| Name | Fields | +| ------- | ------ | +| PRIMARY | id | +| name | name | Return to [database documentation](help/database) diff --git a/doc/database/db_worker-ipc.md b/doc/database/db_worker-ipc.md index be9a07d0f..1635981d7 100644 --- a/doc/database/db_worker-ipc.md +++ b/doc/database/db_worker-ipc.md @@ -14,9 +14,9 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | key | +| Name | Fields | +| ------- | ------ | +| PRIMARY | key | Return to [database documentation](help/database) diff --git a/doc/database/db_workerqueue.md b/doc/database/db_workerqueue.md index 81596192c..a479ecbca 100644 --- a/doc/database/db_workerqueue.md +++ b/doc/database/db_workerqueue.md @@ -22,17 +22,17 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| -| PRIMARY | id | -| command | command | -| done_command_parameter | done, command, parameter(64) | -| done_executed | done, executed | +| Name | Fields | +| ----------------------------- | -------------------------------- | +| PRIMARY | id | +| command | command | +| done_command_parameter | done, command, parameter(64) | +| done_executed | done, executed | | done_priority_retrial_created | done, priority, retrial, created | -| done_priority_next_try | done, priority, next_try | -| done_pid_next_try | done, pid, next_try | -| done_pid_retrial | done, pid, retrial | -| done_pid_priority_created | done, pid, priority, created | +| done_priority_next_try | done, priority, next_try | +| done_pid_next_try | done, pid, next_try | +| done_pid_retrial | done, pid, retrial | +| done_pid_priority_created | done, pid, priority, created | Return to [database documentation](help/database) diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index 864f2ded3..9af6100a0 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -166,11 +166,28 @@ class DBStructure $tables = []; foreach (self::definition(null) as $name => $definition) { - $indexes = []; + $indexes = [[ + 'name' => 'Name', + 'fields' => 'Fields', + ], + [ + 'name' => '-', + 'fields' => '-', + ]]; + + $lengths = ['name' => 4, 'fields' => 6]; foreach ($definition['indexes'] as $key => $value) { - $indexes[] = ['name' => $key, 'fields' => implode(', ', $value)]; + $fieldlist = implode(', ', $value); + $indexes[] = ['name' => $key, 'fields' => $fieldlist]; + $lengths['name'] = max($lengths['name'], strlen($key)); + $lengths['fields'] = max($lengths['fields'], strlen($fieldlist)); } + array_walk_recursive($indexes, function(&$value, $key) use ($lengths) + { + $value = str_pad($value, $lengths[$key], $value === '-' ? '-' : ' '); + }); + $foreign = []; $fields = [[ 'name' => 'Field', diff --git a/view/templates/structure.tpl b/view/templates/structure.tpl index 77ee1e85a..954712f12 100644 --- a/view/templates/structure.tpl +++ b/view/templates/structure.tpl @@ -13,8 +13,6 @@ Fields Indexes ------------ -| Name | Fields | -|------|--------| {{foreach $indexes as $index}} | {{$index.name}} | {{$index.fields}} | {{/foreach}}