문제

I'm still somewhat new to the whole django-thing with defining models in Models.py

My question is, my db schema is still somewhat rough and I have been changing things the past few days before committing with syncdb command, is it unsafe to basically use a program like MySql Workbench or Sequel Pro and run DDL code to alter database table info: for instance changing a field to a CHAR() or adding new columns through an external interface.

Will django become completely confused? (Since the DDL wasn't explicitly declared in models.py beforehand and syncdb run?)

If so, what is a better approach?

I still have yet to find one.

Thank you for all the information you can give me.

도움이 되었습니까?

해결책

What you want to do are named migrations, you can use south this one is very helpful

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top