You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
In this part we will start changing our solution to make it better.
As you can remember we created the user_managers table in the database using a Postgres database manager. This is a bad solution because:
How could we create our database table in a better way?
You can find the
entitymodel.xml file. This file contains the description of tables in the Jira database. Here is an example:
We can add our own table via this file. We could also define the primary key of our table, indexes but for the sake of simplicity we will use just this definition:
<entity entity-name="user_managers" table-name="user_manager" package-name=""> <field name="user" col-name="user" type="long-varchar"/> <field name="manager" col-name="manager" type="long-varchar"/> </entity>
Also we need also to add information for our table into
<entity-group group="default" entity="user_managers"/>
Now we need to restart our Jira server. After it you can find the user_managers table in the Jira database.
Why is this way to create a table in the Jira database better than the first one?
Because right now you can take a backup of your Jira and restore your Jira without loosing the user_managers table. But what are the drawbacks?
As you can see we still have many things to handle. I would not recommend this solution. We will talk later what would be a better solution.
1,574 accepted answers