On Thu, Oct 1, 2009 at 5:14 PM, Geobase Isoscale <isosc...@gmail.com> wrote: > Hi Everyone, > > I would like to know how to Add a new Collumn to an already created table in > Django.
As noted by Rama - the answer here is either to use raw ALTER statements, or to use a tool like South or Django Evolution to automate (or semi-automate) the schema update process. > I would like to know whether one can create database triggers, > create database functions, database Index and database views using Django > ORM. Django produces indices automatically in some circumstances (such as foreign key columns). You can also direct Django to generate indices on columns that you know will need to support lookups. See the documentation about the db_index attribute on fields. As for triggers, database functions and views - Django doesn't provide built-in support for any of these. However, you can define custom SQL for your Django tables, and this custom SQL can define triggers etc. You can also define models that wrap views that you define yourself - look for the "managed" attribute on models. > I'm investigation to what extend does Django support database > consistency. Depends on exactly what you mean. Django will define database-level constraints for things like foreign keys, but it doesn't apply any database-level data validation hooks. > If anyone has more information on the pros and cons of ORM with > regard to database design. I'm connected Postgres database with its PostGIS > extention. This is a completely open ended question - ultimately, you are the only person who can answer this sort of question for your own circumstances. The ORM is powerful, but it does have limitations. Whether those limitations will matter to you will depend entirely on your expectations and your use case. Yours, Russ Magee %-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---