Update 'server:db:migrate' not found #303

Closed
opened 2026-02-04 18:27:53 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @Nearly9924 on GitHub (Apr 5, 2023).

I can't find any working documentation for updating from 1.9.0 to 1.9.1.
I think the same problem is with 1.9.2, 1.10.0 and 1.10.3.

The release notes say I need to update the DB npm run server:db:migrate.
When I run
docker exec -it planka npm run server:db:migrate
I get "npm ERR! Missing script: "server:db:migrate"".

my docker-compose.yml:

version: '3'

services:
  planka:
    image: ghcr.io/plankanban/planka:1.9.1
    container_name: planka
    command: >
      bash -c
        "for i in `seq 1 30`; do
          ./start.sh &&
          s=$$? && break || s=$$?;
          echo \"Tried $$i times. Waiting 5 seconds...\";
          sleep 5;
        done; (exit $$s)"
    restart: unless-stopped
    volumes:
      - ./user-avatars:/app/public/user-avatars
      - ./project-background-images:/app/public/project-background-images
      - ./attachments:/app/public/attachments
    environment:
      - BASE_URL=http://192.168.212.107
      - DATABASE_URL=postgresql://postgres@postgres/planka
      - SECRET_KEY=*****************************
    depends_on:
      - postgres
    networks:
      - npm-network
      - internal

  postgres:
    image: postgres:13-alpine  #alpine  
    restart: unless-stopped
    volumes:
      - ./db:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=planka
      - POSTGRES_HOST_AUTH_METHOD=trust
    networks:
      - internal

networks:
  npm-network:
    external: true
  internal:
    external: false

The problem was the migration directory was corrupted

I have fixid is with
docker exec -it planka wget https://raw.githubusercontent.com/plankanban/planka/d6cb1f6683774ffa52012f42b6483a8a93e704d1/server/db/migrations/20180721234154_create_project_membership_table.js -P db/migrations

Originally created by @Nearly9924 on GitHub (Apr 5, 2023). I can't find any working documentation for updating from 1.9.0 to 1.9.1. I think the same problem is with 1.9.2, 1.10.0 and 1.10.3. The release notes say I need to update the DB `npm run server:db:migrate`. When I run `docker exec -it planka npm run server:db:migrate` I get "npm ERR! Missing script: "server:db:migrate"". my docker-compose.yml: ```` version: '3' services: planka: image: ghcr.io/plankanban/planka:1.9.1 container_name: planka command: > bash -c "for i in `seq 1 30`; do ./start.sh && s=$$? && break || s=$$?; echo \"Tried $$i times. Waiting 5 seconds...\"; sleep 5; done; (exit $$s)" restart: unless-stopped volumes: - ./user-avatars:/app/public/user-avatars - ./project-background-images:/app/public/project-background-images - ./attachments:/app/public/attachments environment: - BASE_URL=http://192.168.212.107 - DATABASE_URL=postgresql://postgres@postgres/planka - SECRET_KEY=***************************** depends_on: - postgres networks: - npm-network - internal postgres: image: postgres:13-alpine #alpine restart: unless-stopped volumes: - ./db:/var/lib/postgresql/data environment: - POSTGRES_DB=planka - POSTGRES_HOST_AUTH_METHOD=trust networks: - internal networks: npm-network: external: true internal: external: false ```` The problem was the migration directory was corrupted I have fixid is with ` docker exec -it planka wget https://raw.githubusercontent.com/plankanban/planka/d6cb1f6683774ffa52012f42b6483a8a93e704d1/server/db/migrations/20180721234154_create_project_membership_table.js -P db/migrations`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#303