Are possible docker run migrate with only one specific migration_file?

Viewed 158

I tried to migrate using docker at my golang app with mysql database. But i just want to do one specific migration_file not whole migration_files.

Source: https://github.com/golang-migrate/migrate

What i found:

docker run -v {{ migration dir }}:/migrations --network host migrate/migrate
    -path=/migrations/ -database "mysql://user:password@tcp(host:port)/database up 2

note: 2 mean's the first 2 migration_files

What i used:

sudo docker run -v /home/user/app/schema:/migrations --network host migrate/migrate 
    -path=/migrations/ -database "mysql://root:root@tcp(localhost:8080)/my_db" up

I want docker run migrate the last/newest migration_file/specific migration_file, but i don't know how.

0 Answers
Related