Skip to content
infiro edited this page Jul 30, 2012 · 10 revisions

The database schema is created when the com2pgsql project has been run. Below is a list of tables and information regarding the records that are stored in each along with their description.

##Items This table contains information of a communication Item. A communication Item is a basic structure of communication network. Everything is an Item. A Thread is an Item, an Email is an Item and an Issue is an item etc.

ColumnTypeModifiers
p_idintegernot null
item_datetimestamp with time zonenot null
item_idintegernot null auto increment
bodytext
titletext
typevarchar(255)

###Notes:

Indexes:
"items_pkey"PRIMARY KEY, btree (item_id)
Foreign-key constraints:
"items_p_id_fkey"FOREIGN KEY (p_id) REFERENCES people(p_id) ON DELETE CASCADE
Referenced by:
TABLE "attachments"CONSTRAINT"attachments_item_id_fkey"FOREIGN KEY (item_id) REFERENCES items(item_id)
TABLE "dependencies"CONSTRAINT"dependencies_depends_on_id_fkey"FOREIGN KEY (depends_on_id) REFERENCES items(item_id)
TABLE "dependencies"CONSTRAINT"dependencies_item_id_fkey"FOREIGN KEY (item_id) REFERENCES items(item_id)
TABLE "issues"CONSTRAINT"issues_item_id_fkey"FOREIGN KEY (item_id) REFERENCES items(item_id)
TABLE "links"CONSTRAINT"links_item_id_fkey"FOREIGN KEY (item_id) REFERENCES items(item_id) ON DELETE CASCADE
TABLE "silents"CONSTRAINT"silents_item_id_fkey"FOREIGN KEY (item_id) REFERENCES items(item_id)
TABLE "threads"CONSTRAINT"threads_item_id_fkey"FOREIGN KEY (item_id) REFERENCES items(item_id) ON DELETE CASCADE
TABLE "threads"CONSTRAINT"threads_thread_id_fkey"FOREIGN KEY (thread_id) REFERENCES items(item_id) ON DELETE CASCADE

##Threads This table contains one-to-many relationship between a Thread and other communication Items. A Thread is a communication Item, which can be an Issue or initial Email.

ColumnTypeModifiers
item_idintegernot null
thread_idintegernot null default auto increment

###Notes

Indexes:
"threads_pkey"PRIMARY KEY, btree (item_id, thread_id)
Foreign-key constraints:
"threads_item_id_fkey"FOREIGN KEY (item_id) REFERENCES items(item_id) ON DELETE CASCADE"threads_thread_id_fkey"FOREIGN KEY (thread_id) REFERENCES items(item_id) ON DELETE CASCADE

##Issues The table contains Issue information. An Issue is a Bug Thread which can link to one to many communication items.

ColumnTypeModifiers
item_idintegernot null
statusvarchar(255)
assignee_idinteger
creation_tstime stamp with timezonecreated time
last_modified_tstime stamp with timezonelast modified time
titlevarchar(512)
descriptiontext
creator_idinteger
keywordsvarchar(512)classification of the issue
issue_numvarchar(64)unique identifier of an issue in the tracking system

###Notes

Foreign-key constraints:
"issues_assignee_id_fkey"FOREIGN KEY (assignee_id) REFERENCES people(p_id)
"issues_creator_id_fkey"FOREIGN KEY (creator_id) REFERENCES people(p_id)
"issues_item_id_fkey"FOREIGN KEY (item_id) REFERENCES items(item_id)

##People This table contains the information of a person, name and email. Email is considered as unique identifier for a person when linking to technical network.

ColumnTypeModifiers
p_idintegernot null default auto increment
namevarchar(255)not null
emailvarchar(255)not null

###Notes

Indexes:
"people_pkey"PRIMARY KEY, btree (p_id)
Referenced by:
TABLE "issues"CONSTRAINT"issues_assignee_id_fkey"FOREIGN KEY (assignee_id) REFERENCES people(p_id)
TABLE "issues"CONSTRAINT"issues_creator_id_fkey"FOREIGN KEY (creator_id) REFERENCES people(p_id)
TABLE "items"CONSTRAINT"items_p_id_fkey"FOREIGN KEY (p_id) REFERENCES people(p_id) ON DELETE CASCADE
TABLE "silents"CONSTRAINT"silents_p_id_fkey"FOREIGN KEY (p_id) REFERENCES people(p_id)

##Silents This table contains list of subscribers/followers of an item. These followers are not necessarily participate in the item discussion but they are aware of what's going on.

ColumnTypeModifiers
item_idintegernot null
p_idintegernot null

###Notes Not used for now

Foreign-key constraints:
"silents_item_id_fkey"FOREIGN KEY (item_id) REFERENCES items(item_id)
"silents_p_id_fkey"FOREIGN KEY (p_id) REFERENCES people(p_id)

##Links This table contains the result of the com2pgsql. It contains links between communication items and commits. This is a many-to-many relationship.

ColumnTypeModifiers
item_idintegernot null
commit_idvarchar(255)not null
confidencerealnot null

###Notes

Indexes:
"links_pkey"PRIMARY KEY, btree (item_id, commit_id)
Foreign-key constraints:
"links_item_id_fkey"FOREIGN KEY (item_id) REFERENCES items(item_id) ON DELETE CASCADE

##Attachments This table contains the attachments of an item. Item-Attachment is one to many relationship.

ColumnTypeModifiers
item_idintegernot null
titlevarchar(512)
bodytext

###Notes Not used for now

Foreign-key constraints:
"attachments_item_id_fkey"FOREIGN KEY (item_id) REFERENCES items(item_id)

##Dependencies This table contains the link between items. An item can be linked to other items in a parent-child relationship or sibling relationship.

ColumnTypeModifiers
item_idintegernot null
depends_on_idintegernot null

###Notes Not used for now

Foreign-key constraints:
"dependencies_depends_on_id_fkey"FOREIGN KEY (depends_on_id) REFERENCES items(item_id)
"dependencies_item_id_fkey"FOREIGN KEY (item_id) REFERENCES items(item_id)

##Frequency This table contains the link between an item and a commit id. This is many-to-many relationship.

ColumnTypeModifiers
item_idinteger
commit_idvarchar(255)

###Notes Not used for now

Clone this wiki locally