Django syncdb not updating database
Django includes support out of the box for My SQL, Postgre SQL, SQLite3, and Oracle.SQLite3 is included with Python starting with version 2.5, so we’ll use it for our project for simplicity.It will never issue ALTER TABLE statements to match changes made to a model class after installation.Changes to model classes and database schemas often involve some form of ambiguity and, in those cases, Django would have to guess at the correct changes to make.You should avoid adding imports to the settings file.You rarely need to import the settings file directly; Django imports it for you, and makes it available as Django models map (roughly) to a database table, and provide a place to encapsulate business logic.
"syncdb" not adding them of course, so I need your advices how to alter tables without deleting them and recreating again with syncdb. Run a regex replace to update any added /removed fields and then a reset of that app is possible.The SQLite backend uses the Note that the database engine is specified as a string, and not a direct reference to the Python object.This is because the settings file needs to be easily importable, without triggering any side effects.This Question is similar and might have the info i was talking about. ) in django 1.3 you will have to do a Need to try and play with it to get familiar, but sounds reasonable.Still let me know if you need and i'll dig up my old script (or write out a nice simple one) for you. When you do a find replace you only need to remove fields that you don't have any more and add fields that aren't nullable. Notes: the --indent=4 nicely formats everything for you. Of course if you have the script you mentioned and can share, it will be nice to look at it before writing my own :) But definitely will try to play with it, thanks!