Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ’₯ [DevOps] Backend – Command yarn db:migrate up doesn't work #8146

Open
Tirokk opened this issue Jan 16, 2025 · 1 comment
Open

Comments

@Tirokk
Copy link
Member

Tirokk commented Jan 16, 2025

πŸ’₯ DevOps ticket

Command yarn db:migrate up doesn't work

On running command in running backend the following error occurs:

# in folder backend
$ yarn db:migrate up
yarn run v1.22.19
$ yarn run __migrate --store ./src/db/migrate/store.ts up
$ migrate --compiler 'ts:./src/db/compiler.ts' --migrations-dir ./src/db/migrations --store ./src/db/migrate/store.ts up
  error : Error: Missing migration file: 20231017141022-fix-event-dates.js
Error: Missing migration file: 20231017141022-fix-event-dates.js
    at /Users/wolfgang/Documents/Programming/busFaktor/Ocelot-Social-Community/Ocelot-Social/backend/node_modules/migrate/lib/load-migrations.js:83:44
    at Array.forEach (<anonymous>)
    at /Users/wolfgang/Documents/Programming/busFaktor/Ocelot-Social-Community/Ocelot-Social/backend/node_modules/migrate/lib/load-migrations.js:81:44
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@Tirokk Tirokk moved this to Sprint Backlog in Kanban Board Ocelot-Social Software Jan 16, 2025
@Tirokk Tirokk changed the title πŸ’₯ [DevOps] Command yarn db:migrate up doesn't work πŸ’₯ [DevOps] Backend – Command yarn db:migrate up doesn't work Jan 16, 2025
@mahula
Copy link
Contributor

mahula commented Jan 19, 2025

I could not reproduce this error.

What I did (oriented by the Readme files):

# in root directory
git checkout master
git pull
docker compose up neo4j -d
# change into backend directory
cd backend
cp .env.template .env
nvm use
yarn install
yarn run db:migrate init
yarn run db:migrate up

That worked as expected
Image

Maybe there were some local db changes?
Please try again using yarn run db:reset (see backend Readme) before the db commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Sprint Backlog
Development

No branches or pull requests

2 participants