debridmediamanager / debrid-media-manager

Curate an inifinite media library
https://debridmediamanager.com/
520 stars 29 forks source link

The table `Search` does not exist in the current database. #129

Open MFYDev opened 3 months ago

MFYDev commented 3 months ago

Hi, I am trying to selfhost and got this error when I search

The table `Search` does not exist in the current database.
    at In.handleRequestError (/app/node_modules/@prisma/client/runtime/library.js:122:6854)
    at In.handleAndLogRequestError (/app/node_modules/@prisma/client/runtime/library.js:122:6188)
    at In.request (/app/node_modules/@prisma/client/runtime/library.js:122:5896)
    at async l (/app/node_modules/@prisma/client/runtime/library.js:127:11167)
    at async PlanetScaleCache.getSearchResults (/app/.next/server/chunks/9432.js:1:3913)
    at async handler (/app/.next/server/pages/api/search/title.js:1:3867) {
  code: 'P2021',
  clientVersion: '5.13.0',
  meta: { modelName: 'Search', table: 'Search' }
}
encountered a search issue PrismaClientKnownRequestError: 
Invalid `prisma.search.findUnique()` invocation:

I am using docker compose and here is mine

services:
  tor:
    image: debridmediamanager/tor
    container_name: debridmediamanager-tor
    restart: always
    deploy:
      replicas: 1

  web:
    image: debridmediamanager/debrid-media-manager:latest
    container_name: debridmediamanager
    restart: always
    ports:
      - 9898:3000
    env_file:
      - .env
    depends_on:
      - mysql
      - tor
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure

  mysql:
    image: mysql:latest
    container_name: debridmediamanager-mysql
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: debridmediamanager
      MYSQL_DATABASE: debridmediamanager
      MYSQL_USER: debridmediamanager
      MYSQL_PASSWORD: debridmediamanager
    volumes:
      - ./mysql:/var/lib/mysql
MMagTech commented 2 months ago

Self hosting here as well. Had the same issue. You need to use an app like adminer and add all the columns and table manually to the database. You can find the entires needed and how they are input here https://github.com/debridmediamanager/debrid-media-manager/blob/main/prisma/schema.prisma

Ends up looking like this as an exapmle.

Screenshot 2024-08-19 141752

Screenshot 2024-08-19 141445

phirestalker commented 2 months ago

Oh I see the first four entries didn't look like tables to me. Key and value threw me off. Also, does the unique property translate to primary key?

On Mon, Aug 19, 2024, 6:43 PM MMagTech @.***> wrote:

Self hosting here as well. Had the same issue. You need to use an app like adminer and add all the columns and table manually to the database. You can find the entires needed and how they are input here https://github.com/debridmediamanager/debrid-media-manager/blob/main/prisma/schema.prisma

Ends up looking like this as an exapmle.

Screenshot.2024-08-19.141752.png (view on web) https://github.com/user-attachments/assets/41c0cea1-3adb-4141-b002-255450ad74f7

Screenshot.2024-08-19.141445.png (view on web) https://github.com/user-attachments/assets/ea2ffa24-c54c-4dae-82c8-7661d6c8aa27

— Reply to this email directly, view it on GitHub https://github.com/debridmediamanager/debrid-media-manager/issues/129#issuecomment-2297804903, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZBOZ6YC44SCXU4J7TLOJTZSKNMPAVCNFSM6AAAAABK4ZTZRGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJXHAYDIOJQGM . You are receiving this because you are subscribed to this thread.Message ID: @.*** com>