Django migration timeout

We had a table having more than 6 lakh records. Everytime we added a new field to the model, and ran the migration we got timeout. So, we did the following 3 step procedure

1) Opened psql with timeout options –

PGOPTIONS="-c statement_timeout=0" psql -U name

2) We extracted the sql to be executed in psql from south migrate –db-dry-run –verbosity=2

3) Then, ran the migration command with fake option

python migrate modelname –fake