Sha256: 2d56065924905bbc586a0960742aeef2d674a279957945baeba05cf838e4c717
Contents?: true
Size: 837 Bytes
Versions: 1
Compression:
Stored size: 837 Bytes
Contents
--- title: Database Migrations nav_order: 38 --- A common task is to run database migrations with newer code before deploying the code. This is easily achieved with the `ufo task` command. Here's an example: ```sh ufo task demo-web -c bundle exec rake db:migrate ``` It is nice to wrap the commands in a wrapper script in case you have to do things like to load the environment. ```sh ufo task demo-web -c bin/migrate ``` The `bin/migrate` script can look like this: ```bash #!/bin/bash bundle exec rake db:migrate ``` The `ufo task` command is generalized so you can run any one-off task. It is not just limited to running migrations. The `ufo task` command performs the following: 1. Builds the docker image and pushes it to a registry 2. Registers the ECS Task definition 3. Runs a one-off ECS Task {% include prev_next.md %}
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ufo-4.4.3 | docs/_docs/more/migrations.md |