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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -