Rate this page:
The following PDFs show the database schemas for different Jira versions:
The database schema is also described in
entitymodel.xml in the Jira web application.
entitymodel.xml file has an XML definition of all Jira database tables, table columns, and their data type.
Some of the relationships between tables also appear in the file.
To generate schema information for the Jira database, for example, like the previous PDFs, follow the instructions below. You can generate schema information in PDF, TXT, and DOT formats. Note that if you want to generate the schema in PDF format, you need to have Graphviz installed.
Jira uses Entity Engine module of the OfBiz suite to communicate with the database. To learn more, read the online documentation.
If you use Jira API, you will notice that a lot of code deals with
GenericValue objects. The
is an OfBiz Entity Engine object. Each
GenericValue object represents a record in the database.
To get a value of a field from a
GenericValue, you will need to use the relevant getter method for the field's type.
GenericValue project = ... String name = project.getString("name"); Long id = project.getLong("id");
The list of valid fields for each entity can be obtained by looking for the entity's definition in the
WEB-INF/classes/entitydefs/entitymodel.xml file. For the above example, you need to look at the "Project" entity.
Notes about working with the Jira database
Direct database queries are not recommended in Jira. Instead, we recommend adding or modifying data via Jira's REST APIs. Check the Command Line Interface for existing remote scripting tools. If you absolutely must modify data in your database via direct database queries, always back up your data before performing any modification to the database.
For a great way to watch Jira database queries in action, try adding SQL Logging.
Custom fields have their own set of tables. For details, see Database – Custom fields.
Work log entries are kept in the
worklog table. For instance, some worklogs in Jira
(from JRA-10393) are stored in
worklog table in the following way.
Implemented method to calculate number of active users + tests
Implemented a method to check if the user limit of the license has been exceeded.
Added new license types
|firstname.lastname@example.org||Integrate new license types in JIRA.||2008-01-22 23:51:email@example.com||200|
timeworkedis in seconds
Whenever a worklog entry is added, the
jiraissue.timeestimate values are incremented
and decremented respectively.
Some of the relationships between Jira's tables in the database are documented in the following sections:
Rate this page: