mariuz / django-firebird-1.4

django-firebird 1.4.x exported from code.google.com/p/django-firebird
0 stars 0 forks source link

Incorrect generation of DEFAULT and CHECK tokens in CREATE TABLE statement #19

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Trying ./manage.py migrate...

I'm seeing 
DatabaseError: (-104, 'isc_dsql_prepare: \n  Dynamic SQL Error\n  SQL error 
code = -104\n  Token unknown - line 1, column 195\n  DEFAULT -- CREATE TABLE 
"CATALOGUE_PRODUCTRECOMMENDATION" ("ID" integer NOT NULL PRIMARY KEY, 
"PRIMARY_ID" integer NOT NULL, "RECOMMENDATION_ID" integer NOT NULL, "RANKING" 
smallint CHECK ("RANKING" >= 0) DEFAULT 0 NOT NULL);')

Instead of valid for FB: "DEFAULT 0 CHECK ("RANKING" >= 0)". 
Database dialect 3. 
Using Django 1.4.2, south 0.7.6, python 2.6 on Debian Squeeze. 

With best regards.

P.S. I'm not sure if it is the issue of django-firebird, but posting here...

Original issue reported on code.google.com by Sazonov....@gmail.com on 3 Dec 2012 at 3:32