Skip to content

Instantly share code, notes, and snippets.

@majackson
majackson / migrations.md
Last active November 14, 2024 15:33
Django migrations without downtime

Django Migrations without Downtime

The following instructions describe a set of processes allowing you to run Django database migrations against a production database without having to bring the web service down.

Note that in the below instructions, migrations are all run manually at explicit points, and are not an automatic part of the deployment process.

Adding Fields or Tables

Adding a (nullable) field or a new table

  1. Make the model or column addition in your code.
@anubhavsinha
anubhavsinha / main.yml
Created March 12, 2015 22:33
newrelic server monitoring ansible role for Ubuntu
# Install newrelic server monitoring
# Add newrelic repository
- apt_repository: repo='deb http://apt.newrelic.com/debian/ newrelic non-free' state=present
# Trust the New Relic GPG key.
- apt_key: url=https://download.newrelic.com/548C16BF.gpg state=present
# Update and install apt packages
- name: Run apt-get update
apt: update_cache=yes