> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bytebase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Manual Database Change with Jira

Jira is a leading issue tracking product for software development teams, aiding in planning, tracking, and releasing great software. Teams may also want to adopt Jira for the database change management process.

However, a database change workflow also involves deploying and tracking those changes, and Jira doesn't
have such capability. By integrating Bytebase, you can achieve this goal.

Bytebase is an open-source database DevSecOps solution for Developer, Security, DBA, and Platform Engineering teams. The GitLab for database DevSecOps.

<img src="https://mintcdn.com/dbx/plRlxh8LHhYaODE0/content/docs/tutorials/database-change-management-with-jira-manual/manual-jira.webp?fit=max&auto=format&n=plRlxh8LHhYaODE0&q=85&s=980820ae08e68a90f7028490f6fc69ee" alt="manual-jira" width="2614" height="1551" data-path="content/docs/tutorials/database-change-management-with-jira-manual/manual-jira.webp" />

This is a 2-series tutorials:

* Manual Database Change with Jira (this one)
* [Automate Database Change with Jira](/tutorials/database-change-management-with-jira-automated/)

## Prerequisites

* A Jira workspace
* A Bytebase workspace

## Workflow Overview

### Setup

1. Prepare a Jira project: Create a `Database Change` issue type with custom fields **SQL**, **database**.
2. Prepare a corresponding Bytebase project and database.

### Change process

1. (Jira) Developer creates a Jira `Database Change` issue filling the **SQL**, **database**, and **description** fields.
2. (Jira -> Bytebase) DBA reviews the Jira issue and goes to Bytebase to create an issue with the developer supplied **SQL**, **database**, and **description**.
3. (Jira) DBA updates the Jira issue status to indicate the change is in progress.
4. (Bytbease) DBA goes to Bytebase to deploy the database change.
5. (Jira) DBA updates the Jira issue status to indicate the change has completed.

<img src="https://mintcdn.com/dbx/plRlxh8LHhYaODE0/content/docs/tutorials/database-change-management-with-jira-manual/manual-jira.webp?fit=max&auto=format&n=plRlxh8LHhYaODE0&q=85&s=980820ae08e68a90f7028490f6fc69ee" alt="manual-jira" width="2614" height="1551" data-path="content/docs/tutorials/database-change-management-with-jira-manual/manual-jira.webp" />

## Setup

### Step 1 (Jira): Configure database change issue and custom fields

1. Create a Jira project.
   <img src="https://mintcdn.com/dbx/oKW3PElnF0snoOYf/content/docs/tutorials/database-change-management-with-jira-manual/jira-details.webp?fit=max&auto=format&n=oKW3PElnF0snoOYf&q=85&s=f6e046334db38ad1f3ecd6e0a924ca3d" alt="jira-details" width="1784" height="1204" data-path="content/docs/tutorials/database-change-management-with-jira-manual/jira-details.webp" />

2. The default issue fields `Summary`,`Description` are not enough for us to track the database changes, so we need to have a new issue type `Database Change` and customize the fields accordingly.

3. Here's the screenshot of the customized type `Database Change`. We added three additional fields:

   * Database
   * SQL
   * Bytebase issue link

   <img src="https://mintcdn.com/dbx/oKW3PElnF0snoOYf/content/docs/tutorials/database-change-management-with-jira-manual/jira-create-issue.webp?fit=max&auto=format&n=oKW3PElnF0snoOYf&q=85&s=e0b9b3a1fbddd0915a5174027cb85dcd" alt="jira-create-issue" width="1636" height="865" data-path="content/docs/tutorials/database-change-management-with-jira-manual/jira-create-issue.webp" />

### Step 2 (Bytebase): Create a project and database in Bytebase

1. Start Bytebase via Docker and register an account which will be granted `Workspace Admin` role.

   ```bash theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
   docker run --rm --init \
     --name bytebase \
     --publish 8080:8080 --pull always \
     --volume ~/.bytebase/data:/var/opt/bytebase \
     bytebase/bytebase:latest
   ```

2. Click **Projects** on the sidebar, and then click **New Project**.

   <img src="https://mintcdn.com/dbx/oKW3PElnF0snoOYf/content/docs/tutorials/database-change-management-with-jira-manual/bb-create-proj-api.webp?fit=max&auto=format&n=oKW3PElnF0snoOYf&q=85&s=3aa800b7ad163be271dc79b40c5b65f7" alt="bb-create-proj-api" width="830" height="784" data-path="content/docs/tutorials/database-change-management-with-jira-manual/bb-create-proj-api.webp" />

3. Bytebase has embedded sample database instances `Prod Sample Instance` and `Test Sample Instance` for you to explore the product.

4. Go to the project, and then click **New DB**. Select `Test Sample Instance`, fill in the database name `demodb`, and click **Create**.

   <img src="https://mintcdn.com/dbx/oKW3PElnF0snoOYf/content/docs/tutorials/database-change-management-with-jira-manual/bb-create-db.webp?fit=max&auto=format&n=oKW3PElnF0snoOYf&q=85&s=18722bd52491d2446e20fe3e75b7519b" alt="bb-create-db" width="1886" height="1038" data-path="content/docs/tutorials/database-change-management-with-jira-manual/bb-create-db.webp" />

## Change process

### Step 1 (Jira): Create a database change issue

You act as a developer, now go to the Jira project to create a `Database Change` issue, fill in the fields and click **Create**. Here's the screenshot of the issue.

<img src="https://mintcdn.com/dbx/plRlxh8LHhYaODE0/content/docs/tutorials/database-change-management-with-jira-manual/jira-todo.webp?fit=max&auto=format&n=plRlxh8LHhYaODE0&q=85&s=a19516d1b677bcd7dcf76ddb836392a8" alt="jira-todo" width="3462" height="1714" data-path="content/docs/tutorials/database-change-management-with-jira-manual/jira-todo.webp" />

### Step 2 (Jira -> Bytebase): Review the Jira issue and create a corresponding Bytebase issue

1. You act as a DBA, now visit the Jira project, and open the `Database Change` issue just created.

   <img src="https://mintcdn.com/dbx/plRlxh8LHhYaODE0/content/docs/tutorials/database-change-management-with-jira-manual/jira-todo.webp?fit=max&auto=format&n=plRlxh8LHhYaODE0&q=85&s=a19516d1b677bcd7dcf76ddb836392a8" alt="jira-todo" width="3462" height="1714" data-path="content/docs/tutorials/database-change-management-with-jira-manual/jira-todo.webp" />

   The Jira issue contains the following info:

   1. **Database**: `demodb`
   2. **SQL**: `CREATE TABLE t2024 (id INT, name TEXT);`
   3. **Description**: `Create a table t2024, first to demodb`

2. Visit Bytebase, and go to the Bytebase project, click **Database** on the sidebar, you'll see the database `demodb` just created. Select the database, and click **Edit Schema**.

   <img src="https://mintcdn.com/dbx/oKW3PElnF0snoOYf/content/docs/tutorials/database-change-management-with-jira-manual/bb-proj-db-edit.webp?fit=max&auto=format&n=oKW3PElnF0snoOYf&q=85&s=bf058ff189bee7a64fa6c61381616ff4" alt="bb-proj-db-edit" width="2308" height="1082" data-path="content/docs/tutorials/database-change-management-with-jira-manual/bb-proj-db-edit.webp" />

3. You'll be redirected to **Schema Editor**. Click **Raw SQL** tab, paste the **SQL** content in Jira issue to the text area, and then click **Preview issue**. An issue will be previewed with SQL filled in. Fill in the issue **Description**, and then click **Create**.

   <img src="https://mintcdn.com/dbx/oKW3PElnF0snoOYf/content/docs/tutorials/database-change-management-with-jira-manual/bb-schema-editor.webp?fit=max&auto=format&n=oKW3PElnF0snoOYf&q=85&s=26cde77779fe728cfeded484b9bb8c89" alt="bb-schema-editor" width="1736" height="826" data-path="content/docs/tutorials/database-change-management-with-jira-manual/bb-schema-editor.webp" />

### Step 3 (Jira): Paste the Bytebase issue URL and update the Jira issue status

Copy the Bytebase issue URL, and paste it to the **Bytebase issue link** field in Jira issue. Then update the Jira issue status to `In Progress`.

<img src="https://mintcdn.com/dbx/plRlxh8LHhYaODE0/content/docs/tutorials/database-change-management-with-jira-manual/jira-in-progress.webp?fit=max&auto=format&n=plRlxh8LHhYaODE0&q=85&s=204d327e3522712047fb218835b6aecc" alt="jira-in-progress" width="3138" height="1712" data-path="content/docs/tutorials/database-change-management-with-jira-manual/jira-in-progress.webp" />

### Step 4 (Bytebase): Deploy the database change in Bytebase

1. Go to Bytebase to deploy the database change.

   <img src="https://mintcdn.com/dbx/oKW3PElnF0snoOYf/content/docs/tutorials/database-change-management-with-jira-manual/bb-issue-jira-done.webp?fit=max&auto=format&n=oKW3PElnF0snoOYf&q=85&s=06bf7546dbc326ce84f81ff905950462" alt="bb-issue-jira-done" width="2848" height="1494" data-path="content/docs/tutorials/database-change-management-with-jira-manual/bb-issue-jira-done.webp" />

2. Once change is rolled out, Bytebase will record the change in the database **Changelog**.

   <img src="https://mintcdn.com/dbx/oKW3PElnF0snoOYf/content/docs/tutorials/database-change-management-with-jira-manual/bb-db-history.webp?fit=max&auto=format&n=oKW3PElnF0snoOYf&q=85&s=3e0b271bf7f7cad85629b4a6ad290be7" alt="bb-db-history" width="2072" height="1008" data-path="content/docs/tutorials/database-change-management-with-jira-manual/bb-db-history.webp" />

3. You can also click **View change** to view the change diff.

   <img src="https://mintcdn.com/dbx/oKW3PElnF0snoOYf/content/docs/tutorials/database-change-management-with-jira-manual/bb-view-diff-jira.webp?fit=max&auto=format&n=oKW3PElnF0snoOYf&q=85&s=9df050a5f8962bf13dccd3b92b4e2f23" alt="bb-view-diff-jira" width="2328" height="1228" data-path="content/docs/tutorials/database-change-management-with-jira-manual/bb-view-diff-jira.webp" />

### Step 5 (Jira): Update Jira status to Done

Visit Jira issue and set the status to `Done`. The whole process is completed.

<img src="https://mintcdn.com/dbx/plRlxh8LHhYaODE0/content/docs/tutorials/database-change-management-with-jira-manual/jira-done.webp?fit=max&auto=format&n=plRlxh8LHhYaODE0&q=85&s=f7780fbeac703f027925b53089b41f65" alt="jira-done" width="3134" height="1716" data-path="content/docs/tutorials/database-change-management-with-jira-manual/jira-done.webp" />

## Summary and next

In this tutorial, you have successfully set up a database change workflow with Jira and Bytebase.

* Jira takes care of the review process and the overall progress tracking.
* Bytebase takes care of the database change rollout and history tracking.

On the other hand, there are still manual steps to move the fields' information and update the status
in Jira and Bytebase. In the [next tutorial](/tutorials/database-change-management-with-jira-automated/), we will show you how to automate those by leveraging Jira/Bytebase webhook and API.
