Database Schema
From KnowledgeTree Document Management Made Simple
DATABASE SCHEMA
This page is auto generated - do not edit this directly - please mail an administrator.
TABLE: active_sessions
No comment.
Fields
| Fieldname | Type | Not Null | Default | Comment |
| id | int | Yes | '0' | |
| user_id | int | |||
| session_id | char(255) | |||
| lastused | datetime | |||
| ip | char(30) |
Primary Key
id
Foreign Keys
| Field Name | Field | Mapping |
| active_sessions_ibfk_1 | user_id | users (id) |
Indexes
| Index Name | Type | Fields |
| session_id_idx | key | session_id |
| active_sessions_ibfk_1 | key | user_id |
TABLE: archive_restoration_request
No comment.
Fields
| Fieldname | Type | Not Null | Default | Comment |
| id | int | Yes | '0' | |
| document_id | int | Yes | '0' | |
| request_user_id | int | Yes | '0' | |
| admin_user_id | int | Yes | '0' | |
| datetime | datetime | Yes | '0000-00-00 00:00:00' |
Primary Key
id
Foreign Keys
| Field Name | Field | Mapping |
| archive_restoration_request_ibfk_1 | document_id | documents (id) |
| archive_restoration_request_ibfk_2 | request_user_id | users (id) |
| archive_restoration_request_ibfk_3 | admin_user_id | users (id) |
Indexes
| Index Name | Type | Fields |
| archive_restoration_request_ibfk_1 | key | document_id |
| archive_restoration_request_ibfk_2 | key | request_user_id |
| archive_restoration_request_ibfk_3 | key | admin_user_id |
TABLE: archiving_settings
No comment.
Fields
| Fieldname | Type | Not Null | Default | Comment |
| id | int | Yes | '0' | |
| archiving_type_id | int | Yes | '0' | |
| expiration_date | date | |||
| document_transaction_id | int | |||
| time_period_id | int |
Primary Key
id
Foreign Keys
| Field Name | Field | Mapping |
| archiving_settings_ibfk_1 | archiving_type_id | archiving_type_lookup (id) |
| archiving_settings_ibfk_2 | document_transaction_id | document_transactions (id) |
| archiving_settings_ibfk_3 | time_period_id | time_period (id) |
Indexes
| Index Name | Type | Fields |
| archiving_settings_ibfk_1 | key | archiving_type_id |
| archiving_settings_ibfk_2 | key | document_transaction_id |
| archiving_settings_ibfk_3 | key | time_period_id |
TABLE: archiving_type_lookup
No comment.
Fields
| Fieldname | Type | Not Null | Default | Comment |
| id | int | Yes | '0' | |
| name | char(100) |
Primary Key
id
Foreign Keys
None are defined.
Indexes
None are defined.
TABLE: authentication_sources
No comment.
Fields
| Fieldname | Type | Not Null | Default | Comment |
| id | int | Yes | '0' | |
| name | varchar(50) | Yes | ||
| namespace | varchar(255) | Yes | ||
| authentication_provider | varchar(255) | Yes | ||
| config | text | Yes | ||
| is_user_source | tinyint | Yes | '0' | |
| is_group_source | tinyint | Yes | '0' |
Primary Key
id
Foreign Keys
None are defined.
Indexes
None are defined.
TABLE: column_entries
No comment.
Fields
| Fieldname | Type | Not Null | Default | Comment |
| id | int | Yes | '0' | |
| column_namespace | varchar(255) | Yes | ||
| view_namespace | varchar(255) | Yes | ||
| config_array | text | Yes | ||
| position | int | Yes | '0' | |
| required | tinyint | Yes | '0' |
Primary Key
id
Foreign Keys
None are defined.
Indexes
None are defined.
TABLE: comment_searchable_text
No comment.
Fields
| Fieldname | Type | Not Null | Default | Comment |
| comment_id | int | Yes | '0' | |
| body | text | |||
| document_id | int | Yes | '0' |
Primary Key
comment_id
Foreign Keys
| Field Name | Field | Mapping |
| comment_searchable_text_ibfk_1 | comment_id | discussion_comments (id) |
| comment_searchable_text_ibfk_2 | document_id | documents (id) |
Indexes
| Index Name | Type | Fields |
| comment_search_text | fulltext | body |
| comment_searchable_text_ibfk_1 | key | comment_id |
| comment_searchable_text_ibfk_2 | key | document_id |
TABLE: dashlet_disables
No comment.
Fields
| Fieldname | Type | Not Null | Default | Comment |
| id | int | Yes | '0' | |
| user_id | int | Yes | '0' | |
| dashlet_namespace | varchar(255) | Yes |
Primary Key
id
Foreign Keys
| Field Name | Field | Mapping |
| dashlet_disables_ibfk_1 | user_id | users (id) |
Indexes
| Index Name | Type | Fields |
| user_id | key | user_id |
| dashlet_namespace | key | dashlet_namespace |
| dashlet_disables_ibfk_1 | key | user_id |
TABLE: data_types
No comment.
Fields
| Fieldname | Type | Not Null | Default | Comment |
| id | int | Yes | '0' | |
| name | char(255) | Yes |
Primary Key
id
Foreign Keys
None are defined.
Indexes
None are defined.
TABLE: discussion_comments
No comment.
Fields
| Fieldname | Type | Not Null | Default | Comment |
| id | int | Yes | '0' | |
| thread_id | int | Yes | '0' | |
| in_reply_to | int | |||
| user_id | int | Yes | '0' | |
| subject | text | |||
| body | text | |||
| date | datetime |
Primary Key
id
Foreign Keys
| Field Name | Field | Mapping |
| discussion_comments_ibfk_1 | thread_id | discussion_threads (id) |
| discussion_comments_ibfk_2 | user_id | users (id) |
Indexes
| Index Name | Type | Fields |
| discussion_comments_ibfk_1 | key | thread_id |
| discussion_comments_ibfk_2 | key | user_id |
TABLE: discussion_threads
No comment.
Fields
| Fieldname | Type | Not Null | Default | Comment |
| id | int | Yes | '0' | |
| document_id | int | Yes | '0' | |
| first_comment_id | int | Yes | '0' | |
| last_comment_id | int | Yes | '0' | |
| views | int | Yes | '0' | |
| replies | int | Yes | '0' | |
| creator_id | int | Yes | '0' | |
| close_reason | text | Yes | ||
| close_metadata_version | int | Yes | '0' | |
| state | int | Yes | '0' |
Primary Key
id
Foreign Keys
| Field Name | Field | Mapping |
| discussion_threads_ibfk_1 | document_id | documents (id) |
| discussion_threads_ibfk_2 | first_comment_id | discussion_comments (id) |
| discussion_threads_ibfk_3 | last_comment_id | discussion_comments (id) |
| discussion_threads_ibfk_4 | creator_id | users (id) |
Indexes
| Index Name | Type | Fields |
| discussion_threads_ibfk_1 | key | document_id |
| discussion_threads_ibfk_2 | key | first_comment_id |
| discussion_threads_ibfk_3 | key | last_comment_id |
| discussion_threads_ibfk_4 | key | creator_id |
TABLE: document_archiving_link
No comment.
Fields
| Fieldname | Type | Not Null | Default | Comment |
| id | int | Yes | '0' | |
| document_id | int | Yes | '0' | |
| archiving_settings_id | int | Yes | '0' |
Primary Key
id
Foreign Keys
| Field Name | Field | Mapping |
| document_archiving_link_ibfk_1 | document_id | documents (id) |
| document_archiving_link_ibfk_2 | archiving_settings_id | archiving_settings (id) |
Indexes
| Index Name | Type | Fields |
| document_archiving_link_ibfk_1 | key | document_id |
| document_archiving_link_ibfk_2 | key | archiving_settings_id |
TABLE: document_content_version
No comment.
Fields
| Fieldname | Type | Not Null | Default | Comment |
| id | int | Yes | '0' | |
| document_id | int | Yes | '0' | |
| filename | text | Yes | ||
| size | bigint | Yes | '0' | |
| mime_id | int | Yes | '0' | |
| major_version | int | Yes | '0' | |
| minor_version | int | Yes | '0' | |
| storage_path | varchar(250) |
Primary Key
id
Foreign Keys
| Field Name | Field | Mapping |
| document_content_version_ibfk_1 | document_id | documents (id) |
| document_content_version_ibfk_2 | mime_id | mime_types (id) |
Indexes
| Index Name | Type | Fields |
| storage_path | key | storage_path |
| document_id | key | document_id |
| document_content_version_ibfk_1 | key | document_id |
| document_content_version_ibfk_2 | key | mime_id |
TABLE: document_fields
No comment.
Fields
| Fieldname | Type | Not Null | Default | Comment |
| id | int | Yes | '0' | |
| name | varchar(255) | Yes | ||
| data_type | varchar(100) | Yes | ||
| is_generic | tinyint | |||
| has_lookup | tinyint | |||
| has_lookuptree | tinyint | |||
| parent_fieldset | int | |||
| is_mandatory | tinyint | Yes | '0' | |
| description | text | Yes |
Primary Key
id
Foreign Keys
| Field Name | Field | Mapping |
| document_fields_ibfk_1 | parent_fieldset | fieldsets (id) |
Indexes
| Index Name | Type | Fields |
| parent_fieldset | key | parent_fieldset |
TABLE: document_fields_link
No comment.
Fields
| Fieldname | Type | Not Null | Default | Comment |
| id | int | Yes | '0' | |
| document_field_id | int | Yes | '0' | |
| value | char(255) | Yes | ||
| metadata_version_id | int |
Primary Key
id
Foreign Keys
| Field Name | Field | Mapping |
| document_fields_link_ibfk_2 | document_field_id | document_fields (id) |
| document_fields_link_ibfk_1 | metadata_version_id | document_metadata_version (id) |
Indexes
| Index Name | Type | Fields |
| document_field_id | key | document_field_id |
| metadata_version_id | key | metadata_version_id |
| document_fields_link_ibfk_1 | key | metadata_version_id |
TABLE: document_incomplete
No comment.
Fields
| Fieldname | Type | Not Null | Default | Comment |
| id | int UNSIGNED | Yes | '0' | |
| contents | tinyint UNSIGNED | Yes | '0' | |
| metadata | tinyint UNSIGNED | Yes | '0' |
Primary Key
id
Foreign Keys
None are defined.
Indexes
None are defined.
TABLE: document_link
No comment.
Fields
| Fieldname | Type | Not Null | Default | Comment |
| id | int | Yes | '0' | |
| parent_document_id | int | Yes | '0' | |
| child_document_id | int | Yes | '0' | |
| link_type_id | int | Yes | '0' |
Primary Key
id
Foreign Keys
| Field Name | Field | Mapping |
| document_link_ibfk_1 | parent_document_id | documents (id) |
| document_link_ibfk_2 | child_document_id | documents (id) |
| document_link_ibfk_3 | link_type_id | document_link_types (id) |
Indexes
| Index Name | Type | Fields |
| document_link_ibfk_1 | key | parent_document_id |
| document_link_ibfk_2 | key | child_document_id |
| document_link_ibfk_3 | key | link_type_id |
TABLE: document_link_types
No comment.
Fields
| Fieldname | Type | Not Null | Default | Comment |
| id | int | Yes | '0' | |
| name | char(100) | Yes | ||
| reverse_name | char(100) | Yes | ||
| description | char(255) | Yes |
Primary Key
id
Foreign Keys
None are defined.
Indexes
None are defined.
TABLE: document_metadata_version
No comment.
Fields
| Fieldname | Type | Not Null | Default | Comment |
| id | int | Yes | '0' | |
| document_id | int | Yes | '0' | |
| content_version_id | int | Yes | '0' | |
| document_type_id | int | Yes | '0' | |
| name | text | Yes | ||
| description | varchar(200) | Yes | ||
| status_id | int | |||
| metadata_version | int | Yes | '0' | |
| version_created | datetime | Yes | '0000-00-00 00:00:00' | |
| version_creator_id | int | Yes | '0' | |
| workflow_id | int | |||
| workflow_state_id | int |
Primary Key
id
Foreign Keys
| Field Name | Field | Mapping |
| document_metadata_version_ibfk_4 | document_id | documents (id) |
| document_metadata_version_ibfk_5 | document_type_id | document_types_lookup (id) |
| document_metadata_version_ibfk_6 | status_id | status_lookup (id) |
| document_metadata_version_ibfk_7 | version_creator_id | users (id) |
| document_metadata_version_ibfk_8 | workflow_id | workflows (id) |
| document_metadata_version_ibfk_9 | workflow_state_id | workflow_states (id) |
| document_metadata_version_ibfk_1 | content_version_id | document_content_version (id) |
Indexes
| Index Name | Type | Fields |
| fk_document_type_id | key | document_type_id |
| fk_status_id | key | status_id |
| document_id | key | document_id |
| version_created | key | version_created |
| version_creator_id | key | version_creator_id |
| content_version_id | key | content_version_id |
| workflow_id | key | workflow_id |
| workflow_state_id | key | workflow_state_id |
| document_metadata_version_ibfk_1 | key | content_version_id |
TABLE: document_role_allocations
No comment.
Fields
| Fieldname | Type | Not Null | Default | Comment |
| id | int | Yes | '0' | |
| document_id | int | Yes | '0' | |
| role_id | int | Yes | '0' | |
| permission_descriptor_id | int | Yes | '0' |
Primary Key
id
Foreign Keys
| Field Name | Field | Mapping |
| document_role_allocations_ibfk_1 | document_id | documents (id) |
| document_role_allocations_ibfk_2 | role_id | roles (id) |
| document_role_allocations_ibfk_3 | permission_descriptor_id | permission_descriptors (id) |
Indexes
| Index Name | Type | Fields |
| document_id | key | document_id |
| document_role_allocations_ibfk_1 | key | document_id |
| document_role_allocations_ibfk_2 | key | role_id |
| document_role_allocations_ibfk_3 | key | permission_descriptor_id |
TABLE: document_searchable_text
No comment.
Fields
| Fieldname | Type | Not Null | Default | Comment |
| document_id | int | |||
| document_text | text |
Primary Key
Nothing specified.
Foreign Keys
| Field Name | Field | Mapping |
| document_searchable_text_ibfk_1 | document_id | documents (id) |
Indexes
| Index Name | Type | Fields |
| document_text_document_id_indx | key | document_id |
| document_text | fulltext | document_text |
| document_searchable_text_ibfk_1 | key | document_id |
TABLE: document_subscriptions
No comment.
Fields
| Fieldname | Type | Not Null | Default | Comment |
| id | int | Yes | '0' | |
| user_id | int | Yes | '0' | |
| document_id | int | Yes | '0' | |
| is_alerted | tinyint |
Primary Key
id
Foreign Keys
| Field Name | Field | Mapping |
| document_subscriptions_ibfk_1 | user_id | users (id) |
| document_subscriptions_ibfk_2 | document_id | documents (id) |
Indexes
| Index Name | Type | Fields |
| document_subscriptions_ibfk_1 | key | user_id |
| document_subscriptions_ibfk_2 | key | document_id |
TABLE: document_text
No comment.
Fields
| Fieldname | Type | Not Null | Default | Comment |
| document_id | int | |||
| document_text | text |
Primary Key
Nothing specified.
Foreign Keys
| Field Name | Field | Mapping |
| document_text_ibfk_1 | document_id | documents (id) |
Indexes
| Index Name | Type | Fields |
| document_text_document_id_indx | key | document_id |
| document_text | fulltext | document_text |
| document_text_ibfk_1 | key | document_id |
TABLE: document_transaction_text
No comment.
Fields
| Fieldname | Type | Not Null | Default | Comment |
| document_id | int | |||
| document_text | text |
Primary Key
Nothing specified.
Foreign Keys
| Field Name | Field | Mapping |
| document_transaction_text_ibfk_1 | document_id | documents (id) |
Indexes
| Index Name | Type | Fields |
| document_text_document_id_indx | key | document_id |
| document_text | fulltext | document_text |
| document_transaction_text_ibfk_1 | key | document_id |
TABLE: document_transaction_types_lookup
No comment.
Fields
| Fieldname | Type | Not Null | Default | Comment |
| id | int | Yes | '0' | |
| name | varchar(100) | Yes | ||
| namespace | varchar(250) | Yes |
Primary Key
id
Foreign Keys
None are defined.
Indexes
None are defined.
TABLE: document_transactions
No comment.
Fields
| Fieldname | Type | Not Null | Default | Comment |
| id | int | Yes | '0' | |
| document_id | int | Yes | '0' | |
| version | char(50) | |||
| user_id | int | Yes | '0' | |
| datetime | datetime | Yes | '0000-00-00 00:00:00' | |
| ip | char(30) | |||
| filename | char(255) | Yes | ||
| comment | char(255) | Yes | ||
| transaction_namespace | char(255) | Yes | 'ktcore.transactions.event' | |
| session_id | int | |||
| admin_mode | tinyint | Yes | '0' |
Primary Key
id
Foreign Keys
| Field Name | Field | Mapping |
| document_transactions_ibfk_1 | document_id | documents (id) |
| document_transactions_ibfk_2 | user_id | users (id) |
Indexes
| Index Name | Type | Fields |
| fk_document_id | key | document_id |
| fk_user_id | key | user_id |
| session_id | key | session_id |
| document_transactions_ibfk_1 | key | document_id |
| document_transactions_ibfk_2 | key | user_id |
TABLE: document_type_fields_link
No comment.