Skip to content

Instantly share code, notes, and snippets.

@cipherself
Last active August 29, 2015 14:04
Show Gist options
  • Save cipherself/20d06d63d3b138a05f8d to your computer and use it in GitHub Desktop.
Save cipherself/20d06d63d3b138a05f8d to your computer and use it in GitHub Desktop.

Revisions

  1. cipherself revised this gist Aug 6, 2014. 2 changed files with 39 additions and 38 deletions.
    38 changes: 0 additions & 38 deletions south.md
    Original file line number Diff line number Diff line change
    @@ -1,38 +0,0 @@
    # South

    ### Initial app migration

    ```python
    ./manage.py schemamigration myapp --initial
    ```

    ### Common migrations

    ```python
    ./manage.py schemamigration myapp --auto
    ./manage.py migrate myapp
    ```

    ### Update most recent migration

    ```python
    ./manage.py schemamigration myapp --auto --update
    ./manage.py migrate myapp
    ```

    ### List all migrations

    ```python
    ./manage.py migrate --list
    ```

    ### List migrations from a single app

    ```python
    ./manage.py migrate myapp --list

    ### List applied migrations only

    ```python
    ./manage.py migrate --list | grep -v "*"
    ```
    39 changes: 39 additions & 0 deletions south_cheatsheet.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,39 @@
    # South

    ### Initial app migration

    ```python
    ./manage.py schemamigration myapp --initial
    ```

    ### Common migrations

    ```python
    ./manage.py schemamigration myapp --auto
    ./manage.py migrate myapp
    ```

    ### Update most recent migration

    ```python
    ./manage.py schemamigration myapp --auto --update
    ./manage.py migrate myapp
    ```

    ### List all migrations

    ```python
    ./manage.py migrate --list
    ```

    ### List migrations from a single app

    ```python
    ./manage.py migrate myapp --list
    ```

    ### List applied migrations only

    ```python
    ./manage.py migrate --list | grep -v "*"
    ```
  2. cipherself revised this gist Aug 6, 2014. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions south.md
    Original file line number Diff line number Diff line change
    @@ -2,9 +2,9 @@

    ### Initial app migration

    ```python
    ./manage.py schemamigration myapp --initial
    ```
    ```python
    ./manage.py schemamigration myapp --initial
    ```

    ### Common migrations

  3. cipherself created this gist Aug 6, 2014.
    38 changes: 38 additions & 0 deletions south.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,38 @@
    # South

    ### Initial app migration

    ```python
    ./manage.py schemamigration myapp --initial
    ```

    ### Common migrations

    ```python
    ./manage.py schemamigration myapp --auto
    ./manage.py migrate myapp
    ```

    ### Update most recent migration

    ```python
    ./manage.py schemamigration myapp --auto --update
    ./manage.py migrate myapp
    ```

    ### List all migrations

    ```python
    ./manage.py migrate --list
    ```

    ### List migrations from a single app

    ```python
    ./manage.py migrate myapp --list

    ### List applied migrations only

    ```python
    ./manage.py migrate --list | grep -v "*"
    ```