On Wednesday, April 2, 2014 4:09:37 AM UTC+5:30, simonb wrote:
>
> Hi
>
> Just FYI: back in 2007 GSOC there was a project to add constraints. The
> syntax was as follows:
>
The code is at https://github.com/theju/django-check-constraints/
I doubt it works as is after the SQL compiler changes. I
As I've said on other threads, fields can't define extra operations - they
must do everything inside the SchemaEditor's add_field method (operations
are not the only thing which calls the SchemaEditor, in theory). Ticket
#22022 (https://code.djangoproject.com/ticket/22022) covers this - there'll
be
On Wednesday, April 2, 2014 6:58:22 AM UTC+3, schinckel wrote:
> For that reason, I wouldn't be the fan of the exploded syntax you've
>> given; I think I'd rather just be able to supply a list of strings for my
>> constraints that are SQL themselves; there's no real benefit to abstraction
>> he
On Wednesday, April 2, 2014 3:35:24 AM UTC+10:30, Andrew Godwin wrote:
>
> Hmm, I'm not sure about this. On the one hand, during the migrations work
> I refactored check constraints for the existing stuff (e.g.
> PostitiveIntegerField) out of the type string and into a separate check
> constra
Hi
Just FYI: back in 2007 GSOC there was a project to add constraints. The
syntax was as follows:
class Manufacturer(models.Model):
mfg_name = models.CharField(maxlength=50)
car_sale_start = models.DateField()
car_sale_end = models.DateField()
quantity_sold = models.IntegerField()
car_price = mod
Hmm, I'm not sure about this. On the one hand, during the migrations work I
refactored check constraints for the existing stuff (e.g.
PostitiveIntegerField) out of the type string and into a separate check
constraints string, so some of the work is already there, especially around
making sure they'
Some years ago, I discussed adding database-level check constraints into
django: https://groups.google.com/forum/#!topic/django-developers/OJN5kpcseAg
There is also an issue: https://code.djangoproject.com/ticket/11964
I'm thinking about revisiting this, and wanted to get some discussion going