# Cannot add comments nor subtasks after update to 1.2.19

**URL:** <https://kanboard.discourse.group/t/cannot-add-comments-nor-subtasks-after-update-to-1-2-19/1818>\
**Category:** Questions\
**Created:** [May 20, 2021, 6:20am UTC](https://kanboard.discourse.group/t/cannot-add-comments-nor-subtasks-after-update-to-1-2-19/1818 "2021-05-20T06:20:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![joachim](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@joachim](https://kanboard.discourse.group/u/joachim)\
**Post date:** [May 20, 2021, 6:20am UTC](https://kanboard.discourse.group/t/cannot-add-comments-nor-subtasks-after-update-to-1-2-19/1818/1 "2021-05-20T06:20:59Z")

</div>

Hi,

I have recently updated / migrated to 1.2.19. It now seems that I can create new tasks, but a) no comments and b) no subtasks.

Two points to mention:

1. During the process, I changed the location of the installation from `<domain>/kanboard` to `kanboard.<domain>`
2. Before the update, I had to manually update the `tasks` table in SQLite to remove two leftover columns created by plugins that had blocked the database migration. I used sqlitebrowser 3.11.2-1 to do that (i.e., copy the `tasks` table etc.).

Do you have an idea how to solve this issue, or where to look in my installation?

Thanks a lot!  
Joachim

---

<div class="post-metadata">

**Author:** ![Chaosmeister](https://yyz2.discourse-cdn.com/free1/user_avatar/kanboard.discourse.group/chaosmeister/32/589_2.png) [@Chaosmeister](https://kanboard.discourse.group/u/Chaosmeister)\
**Post date:** [May 20, 2021, 12:28pm UTC](https://kanboard.discourse.group/t/cannot-add-comments-nor-subtasks-after-update-to-1-2-19/1818/2 "2021-05-20T12:28:36Z")

</div>

can you enable [debug mode](https://docs.kanboard.org/en/latest/admin_guide/config_file.html) and check if you get an error in the log?

---

<div class="post-metadata">

**Author:** ![joachim](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@joachim](https://kanboard.discourse.group/u/joachim)\
**Post date:** [May 20, 2021, 7:37pm UTC](https://kanboard.discourse.group/t/cannot-add-comments-nor-subtasks-after-update-to-1-2-19/1818/3 "2021-05-20T19:37:15Z")

</div>

Thanks, much appreciated – I had not thought of that. In fact, the debug log gives me:

```auto
Integrity constraint violation: 19 FOREIGN KEY constraint failed

```

That sounds like something went awry when I tried to update the tasks table.  
I had tried this:

* * *

```
PRAGMA foreign_keys=off;

BEGIN TRANSACTION;

ALTER TABLE tasks RENAME TO _tasks_old;

CREATE TABLE tasks (
            id INTEGER PRIMARY KEY,
            title TEXT NOCASE NOT NULL,
            description TEXT,
            date_creation INTEGER,
            color_id TEXT,
            project_id INTEGER,
            column_id INTEGER,
            owner_id INTEGER DEFAULT '0',
            position INTEGER,
            is_active INTEGER DEFAULT 1, date_completed INTEGER, score INTEGER, date_due INTEGER, category_id INTEGER DEFAULT 0, creator_id INTEGER DEFAULT '0', date_modification INTEGER DEFAULT '0', reference TEXT DEFAULT '', date_started INTEGER, time_spent NUMERIC DEFAULT 0, time_estimated NUMERIC DEFAULT 0, swimlane_id INTEGER DEFAULT 0, date_moved INTEGER DEFAULT 0, recurrence_status INTEGER NOT NULL DEFAULT 0, recurrence_trigger INTEGER NOT NULL DEFAULT 0, recurrence_factor INTEGER NOT NULL DEFAULT 0, recurrence_timeframe INTEGER NOT NULL DEFAULT 0, recurrence_basedate INTEGER NOT NULL DEFAULT 0, recurrence_parent INTEGER, recurrence_child INTEGER, priority INTEGER DEFAULT 0, external_provider TEXT, external_uri TEXT, 
            FOREIGN KEY(project_id) REFERENCES projects(id) ON DELETE CASCADE,
            FOREIGN KEY(column_id) REFERENCES columns(id) ON DELETE CASCADE
        );

INSERT INTO tasks (id,	title,	description,	date_creation,	color_id,	project_id,	column_id,	owner_id,	position,	is_active,	date_completed,	score,	date_due,	category_id,	creator_id,	date_modification,	reference,	date_started,	time_spent,	time_estimated,	swimlane_id,	date_moved,	recurrence_status,	recurrence_trigger,	recurrence_factor,	recurrence_timeframe,	recurrence_basedate,	recurrence_parent,	recurrence_child,	priority,	external_provider,	external_uri)
  SELECT id,	title,	description,	date_creation,	color_id,	project_id,	column_id,	owner_id,	position,	is_active,	date_completed,	score,	date_due,	category_id,	creator_id,	date_modification,	reference,	date_started,	time_spent,	time_estimated,	swimlane_id,	date_moved,	recurrence_status,	recurrence_trigger,	recurrence_factor,	recurrence_timeframe,	recurrence_basedate,	recurrence_parent,	recurrence_child,	priority,	external_provider,	external_uri
  FROM _tasks_old;

COMMIT;

PRAGMA foreign_keys=on;
```

---

<div class="post-metadata">

**Author:** ![joachim](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@joachim](https://kanboard.discourse.group/u/joachim)\
**Post date:** [May 21, 2021, 6:51am UTC](https://kanboard.discourse.group/t/cannot-add-comments-nor-subtasks-after-update-to-1-2-19/1818/4 "2021-05-21T06:51:40Z")

</div>

Good morning,

it really seems that my initial SQL statement messed up foreign keys in a number of other tables (because the were still referring to the old/ renamed table). I worked through the affected tables that I could identify, and I am very pleased that I can now add comments and subtasks again.

Will keep an eye on the error log for the next coupls of days. Thanks again, that was most helpful!

Joachim
