How can I initialize a MySQL database with schema in a Docker container?

I am trying to create a container with a MySQL database and add a schema to these database. My current Dockerfile is: FROM mysql MAINTAINER (me) <email> # Copy the database schema to the /data directory COPY files/epcis_schema.sql /data/epcis_schema.sql # Change the working directory WORKDIR data CMD mysql -u $MYSQL_USER -p $MYSQL_PASSWORD $MYSQL_DATABASE < epcis_schema.sql … Read more

How to rollback a specific migration?

I have the following migration file db\migrate\20100905201547_create_blocks.rb How can I specifically rollback that migration file? 15 s 15 rake db:rollback STEP=1 Is a way to do this, if the migration you want to rollback is the last one applied. You can substitute 1 for however many migrations you want to go back. For example: rake … Read more