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

./run_migrations.sh: no such file or directory": #215

Open
blaaaaaaa opened this issue Jun 25, 2020 · 5 comments
Open

./run_migrations.sh: no such file or directory": #215

blaaaaaaa opened this issue Jun 25, 2020 · 5 comments

Comments

@blaaaaaaa
Copy link

Sorry, this is probably quite a noob question.

Running docker-compose -f dockerfiles/docker-compose.yml run execute ./run_migrations.sh
will lead to
Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: "./run_migrations.sh": stat ./run_migrations.sh: no such file or directory": unknown
and I also so see no /run_migrations.sh.
What am I missing?

@rmulhol
Copy link
Contributor

rmulhol commented Jun 25, 2020

Thanks for reporting - looks like the path might be off there. The file you want lives here

@blaaaaaaa
Copy link
Author

Hi, thx for the help, unfortunately I still dont get it to work. How is the command suppose to look now?

@rmulhol
Copy link
Contributor

rmulhol commented Jun 25, 2020

Sorry - I was mistaken. The path is right, but the image is outdated. If you change this line to point at makerdao/vdb-execute:staging instead of makerdao/vdb-execute:latest, then the command should run successfully.

@blaaaaaaa
Copy link
Author

Hi, looks better, but hang here. Is this maybe because I tried the command earlier and it didn't work out?

admin1@admin1-H81MGV3:~/IdeaProjects/vdb-mcd-transformers$ docker-compose -f dockerfiles/docker-compose.yml run execute ./run_migrations.sh
Starting dockerfiles_db_1 ... done
Connecting with: postgresql://vdb:vdb@db:5432/vdb?sslmode=disable
2020/06/25 06:25:18 goose run: ERROR 20200416093003_create_log_sorted_offer.sql: failed to run SQL migration: failed to execute SQL query "CREATE TABLE maker.log_sorted_offer\n(\n id SERIAL PRIMARY KEY,\n log_id BIGINT NOT NULL REFERENCES public.event_logs (id) ON DELETE CASCADE,\n header_id INTEGER NOT NULL REFERENCES public.headers (id) ON DELETE CASCADE,\n address_id INTEGER NOT NULL REFERENCES public.addresses (id) ON DELETE CASCADE,\n offer_id NUMERIC,\n UNIQUE (header_id, log_id)\n);\n": pq: schema "maker" does not exist
Could not run migrations. Are the database details correct?

@rmulhol
Copy link
Contributor

rmulhol commented Jun 25, 2020

The way that's failing, it looks like the DB was already migrated - probably by another container. You'll need to wipe that DB in order for the full set of migrations to run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants