| | 133 | == Columns, Columns, Everywhere! == |
| | 134 | |
| | 135 | Of course, most of your work won't be adding new tables, but rather new columns. As of version 0.4/revision [109], South has an `--add-field` option to `./manage.py startmigration`. |
| | 136 | |
| | 137 | Like the `--model` example above, you call startmigration with an app and migration name: |
| | 138 | |
| | 139 | {{{ |
| | 140 | ./manage.py startmigration app_name add_foo --add-field MyModel.foo |
| | 141 | }}} |
| | 142 | |
| | 143 | Note that you must provide the field name as `ModelName.field_name`, since South won't know what model you want otherwise! You should also have already written that column's definition in models.py. |
| | 144 | |
| | 145 | As with --model, you can use --add-field many times in a single call if you want to add a lot of columns: |
| | 146 | |
| | 147 | {{{ |
| | 148 | ./manage.py startmigration mitest some_cols --add-field user.age --add-field user.profile --add-field post.user |
| | 149 | }}} |
| | 150 | |
| | 151 | (also note here that you're free to write the model class names in lowercase; they're actually stored that way in Django) |
| | 152 | |