I want to update directus version of existing project from 9.15.1 to latest one

I want to update directus version of existing project from 9.15.1 to latest one. I have tried steps but facing this issue. Please help me to resolve this issue.
[12:33:32.112] INFO: Running migrations…
[12:33:32.142] INFO: Applying Add Origin to Accountability…
[12:33:32.149] ERROR: alter table “directus_activity” add column “origin” varchar(255) null - column “origin” of relation “directus_activity” already exists
err: {
“type”: “DatabaseError”,
“message”: “alter table “directus_activity” add column “origin” varchar(255) null - column “origin” of relation “directus_activity” already exists”,
“stack”:
error: alter table “directus_activity” add column “origin” varchar(255) null - column “origin” of relation “directus_activity” already exists
at Parser.parseErrorMessage (/home/bhawna/upgrade-directus-version/db-backend/node_modules/pg-protocol/dist/parser.js:285:98)
at Parser.handlePacket (/home/bhawna/upgrade-directus-version/db-backend/node_modules/pg-protocol/dist/parser.js:122:29)
at Parser.parse (/home/bhawna/upgrade-directus-version/db-backend/node_modules/pg-protocol/dist/parser.js:35:38)
at Socket. (/home/bhawna/upgrade-directus-version/db-backend/node_modules/pg-protocol/dist/index.js:11:42)
at Socket.emit (node:events:517:28)
at addChunk (node:internal/streams/readable:368:12)
at readableAddChunk (node:internal/streams/readable:341:9)
at Readable.push (node:internal/streams/readable:278:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
“length”: 142,
“name”: “error”,
“severity”: “ERROR”,
“code”: “42701”,
“file”: “tablecmds.c”,
“line”: “6932”,
“routine”: “check_for_column_name_collision”
}

Hi there,

This seems to an issue with running migrations while the migrations have already been ran.
Most of the time i fix this by looking at the query that its trying to execute:

  1. query analyzing
    ERROR: alter table “directus_activity” add column “origin” varchar(255) null
    This indicates that it tries to add the colom “origin” on the table “directus_activity”.
    The issue is that its already existing so the migration cannot run.
  2. Fixing the issue
    If you open the database (for example with PGAdmin if your using postgres) you can remove the origin column by hand. (i am assuming that there is no (valuable) data in this column yet)

After that you should be able to (re)start Directus and it should be fixed.