On Sat, 2007-03-03 at 18:51 +0000, akonsu wrote: > hello, > > is there any way to set a database-level check constraint on a table? > validators do not solve the problem because database can be altered > directly.
See here: http://www.djangoproject.com/documentation/model_api/#providing-initial-sql-data Note that whereas the examples in that section talk about INSERT statements, you can also put ALTER TABLE statements in there and add the constraints to your table that way. If you need the low-level access, though, you can get at it easily with the above method. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---