ghostfolio / ghostfolio

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🀍
https://Ghostfol.io
GNU Affero General Public License v3.0
3.85k stars 362 forks source link

order.comment does not exist error on docker logs #1164

Closed JDsnyke closed 1 year ago

JDsnyke commented 1 year ago

Hi,

For a while now, I've been running into the following error. Completed database migration with nil effect. Opening up ghostfolio displays the 'Oops! Something went wrong. Please try again later.' error and no information is shown on the screen.

 β†’ 1 (()=>

   The column `Order.comment` does not exist in the current database.

 Error: 

 Invalid `this.prismaService.authDevice.findUnique()` invocation in

 /ghostfolio/apps/api/main.js:1:300028

 β†’ 1 (()=>

   The column `Order.comment` does not exist in the current database.

     at RequestHandler.handleRequestError (/ghostfolio/apps/api/node_modules/@prisma/client/runtime/index.js:28658:13)

     at RequestHandler.request (/ghostfolio/apps/api/node_modules/@prisma/client/runtime/index.js:28640:12)

     at async consumer (/ghostfolio/apps/api/node_modules/@prisma/client/runtime/index.js:29618:18)

     at async PrismaService._request (/ghostfolio/apps/api/node_modules/@prisma/client/runtime/index.js:29639:16)

 [Nest] 1  - 08/17/2022, 9:06:49 PM   ERROR [ExceptionsHandler] 

 Invalid `this.prismaService.authDevice.findUnique()` invocation in

 /ghostfolio/apps/api/main.js:1:300028

 β†’ 1 (()=>

   The column `Order.comment` does not exist in the current database.

 Error: 

 Invalid `this.prismaService.authDevice.findUnique()` invocation in

 /ghostfolio/apps/api/main.js:1:300028

 β†’ 1 (()=>

   The column `Order.comment` does not exist in the current database.

     at RequestHandler.handleRequestError (/ghostfolio/apps/api/node_modules/@prisma/client/runtime/index.js:28658:13)

     at RequestHandler.request (/ghostfolio/apps/api/node_modules/@prisma/client/runtime/index.js:28640:12)

     at async consumer (/ghostfolio/apps/api/node_modules/@prisma/client/runtime/index.js:29618:18)

     at async PrismaService._request (/ghostfolio/apps/api/node_modules/@prisma/client/runtime/index.js:29639:16)
dtslvr commented 1 year ago

Hi @JDsnyke

The column Order.comment does not exist in the current database.

It looks like the migration 20220725155238_added_comment_to_order has not been applied. Therefore the column comment is missing.

JDsnyke commented 1 year ago

So how do I fix this issue?

dtslvr commented 1 year ago

So how do I fix this issue?

Run the following command to migrate the database schema: yarn database:migrate

If it doesn't help, I would downgrade the version of Ghostfolio, export your activities, get the latest version of Ghostfolio and start from scratch. The migration process has been simplified in recent versions. After that, you can import again your activities.