Adding new columns in Django models -


this question has answer here:

i have created sample django application multiple models within , populated data.

now, need add new column 1 of models?

here concerns?

  1. what happen if syncdb after adding column model , alter table , add new column?
  2. or create new table after deleting columns?

is there better way tackle issue?

syncdb not work altering database tables. here the documentation (readup on : syncdb not alter existing tables)

a clean way achieve use 3rd party tool such django south handle migrations (handle alter table scripts in case) you.

here step step tutorial on south, , here official documentation on south


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -