calcom / docker

The Docker configuration for Cal.com is an effort powered by people within the community. Cal.com, Inc. does not provide official support for Docker, but we will accept fixes and documentation. Use at your own risk.
MIT License
619 stars 323 forks source link

invalid prisma user? #346

Closed sekroots closed 3 months ago

sekroots commented 3 months ago

Hello,

I cant login anymore on my self hosted cal.com running on docker due to this error:

https://myownhost/api/auth/error?error=%0AInvalid%20%60prisma.user.findUnique()%60%20invocation%3A%0A%0A%0AThe%20column%20%60Team.isOrganization%60%20does%20not%20exist%20in%20the%20current%20database."

How do I solve it please?

sekroots commented 3 months ago

How can I fix it on my postgres database?

docker exec -it -u0 docker-calcom-1 bash root@0d3694256697:/calcom# yarn db-deploy • Packages in scope: @calcom/alby, @calcom/amie, @calcom/app-store, @calcom/app-store-cli, @calcom/applecalendar, @calcom/around, @calcom/atoms, @calcom/basecamp3, @calcom/cal-ai, @calcom/caldavcalendar, @calcom/campfire, @calcom/closecom, @calcom/config, @calcom/core, @calcom/cron, @calcom/dailyvideo, @calcom/dayjs, @calcom/debugging, @calcom/deel, @calcom/demodesk, @calcom/discord, @calcom/ee, @calcom/eightxeight, @calcom/element-call, @calcom/emails, @calcom/embed-core, @calcom/embed-react, @calcom/embed-snippet, @calcom/eslint-plugin-eslint, @calcom/exchange2013calendar, @calcom/exchange2016calendar, @calcom/exchangecalendar, @calcom/facetime, @calcom/fathom, @calcom/feature-auth, @calcom/features, @calcom/feishucalendar, @calcom/ga4, @calcom/giphy, @calcom/googlecalendar, @calcom/googlevideo, @calcom/gtm, @calcom/hubspot, @calcom/huddle01video, @calcom/ics-feed, @calcom/intercom, @calcom/jelly, @calcom/jitsivideo, @calcom/larkcalendar, @calcom/lib, @calcom/linear, @calcom/make, @calcom/matomo, @calcom/metapixel, @calcom/mirotalk, @calcom/mock-payment-app, @calcom/n8n, @calcom/office365calendar, @calcom/office365video, @calcom/paypal, @calcom/ping, @calcom/pipedream, @calcom/pipedrive-crm, @calcom/plausible, @calcom/prisma, @calcom/qr_code, @calcom/raycast, @calcom/riverside, @calcom/roam, @calcom/routing-forms, @calcom/salesforce, @calcom/salesroom, @calcom/sendgrid, @calcom/shimmer-video, @calcom/signal, @calcom/sirius_video, @calcom/stripepayment, @calcom/sylapsvideo, @calcom/tandemvideo, @calcom/telegram, @calcom/trpc, @calcom/tsconfig, @calcom/typeform, @calcom/types, @calcom/ui, @calcom/vimcal, @calcom/vital, @calcom/weather_in_your_calendar, @calcom/web, @calcom/webex, @calcom/whatsapp, @calcom/whereby, @calcom/wordpress, @calcom/zapier, @calcom/zoho-bigin, @calcom/zohocalendar, @calcom/zohocrm, @calcom/zoomvideo, WipeMyCal • Running db-deploy in 99 packages • Remote caching disabled @calcom/prisma:db-deploy: cache bypass, force executing 0dac30e013e714ec @calcom/prisma:db-deploy: Prisma schema loaded from schema.prisma @calcom/prisma:db-deploy: Datasource "db": PostgreSQL database "calendso", schema "public" at "database:5432" @calcom/prisma:db-deploy: @calcom/prisma:db-deploy: 262 migrations found in prisma/migrations @calcom/prisma:db-deploy: @calcom/prisma:db-deploy: Error: P3009 @calcom/prisma:db-deploy: @calcom/prisma:db-deploy: migrate found failed migrations in the target database, new migrations will not be applied. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve @calcom/prisma:db-deploy: The20240213220617_drop_deprecated_passwords` migration started at 2024-02-26 15:41:51.686845 UTC failed @calcom/prisma:db-deploy: @calcom/prisma:db-deploy: @calcom/prisma:db-deploy: ERROR: command finished with error: command (/calcom/packages/prisma) yarn run db-deploy exited (1) command (/calcom/packages/prisma) yarn run db-deploy exited (1)

Tasks: 0 successful, 1 total Cached: 0 cached, 1 total Time: 2.531s Failed: @calcom/prisma#db-deploy

ERROR run failed: command exited (1) root@0d3694256697:/calcom# `

sekroots commented 3 months ago

I got it. I found a solution at https://github.com/prisma/studio/issues/370

I run: npx prisma db push --skip-generate