# Create, update and delete

{% hint style="info" %}
Catana emphasizes keeping your codebase as the source of truth, therefore it doesn't have a UI for creating, updating, or deleting TODOs.
{% endhint %}

Create, update and delete operations are inferred from Git commits whenever a Git push occurs on the main branch (also known as the release branch) of an enrolled repository.\
\
This page will outline the operation Catana will perform based on what a user changed.

### A TODO is added

Catana creates a new Todo Item record in its database.

<figure><img src="https://2920834341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvC5eZACoQiLmi7enAypu%2Fuploads%2FtViBtq4XCHEgaySTETlQ%2Faddition-line.png?alt=media&#x26;token=4a29d60e-3a9f-466e-acee-2e5934d339f6" alt="" width="563"><figcaption></figcaption></figure>

### A TODO is removed

Catana destroys the Todo Item record and closes any associated ticket in your issue tracker (in the event where a ticket was created for this TODO).

<figure><img src="https://2920834341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvC5eZACoQiLmi7enAypu%2Fuploads%2FVY8E4k2otQR8ozRailCR%2Fdeletion-line.png?alt=media&#x26;token=d1dfd5d5-6c6e-48f7-9ce7-a4e2f0e8f8bc" alt="" width="563"><figcaption></figcaption></figure>

### A TODO is added and removed

Two different outcome may happen:

#### Update

If the **changes occurs on the same line**, Catana considers that you are trying to update a TODO.

<figure><img src="https://2920834341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvC5eZACoQiLmi7enAypu%2Fuploads%2FYedRTHTMRlLbret697DD%2Fupdate-line1.png?alt=media&#x26;token=3db7a072-6508-4dd0-8001-86310ef56a09" alt="" width="563"><figcaption></figcaption></figure>

If the changes occurs **on a different line but the TODO itself doesn't change**, Catana considers that the existing TODO is moving location in the file and will update its record accordingly.

<figure><img src="https://2920834341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvC5eZACoQiLmi7enAypu%2Fuploads%2FPH3IZk9ALANsZLFFl65G%2Fupdate-line2.png?alt=media&#x26;token=29522610-3e85-4b68-994f-7fe4a4c452a4" alt="" width="563"><figcaption></figcaption></figure>

#### Destroy and create&#x20;

In all other scenarios from the "Update existing TODO" paragraph, Catana will consider that it needs to destroy and create a new Todo Item record.

<figure><img src="https://2920834341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvC5eZACoQiLmi7enAypu%2Fuploads%2FlOBva8JUCsN6MR8bVKI3%2Fdestroy-create.png?alt=media&#x26;token=b747b6f2-7c7b-4712-80a6-49aea4e1a161" alt="" width="563"><figcaption></figcaption></figure>
