Hello,
I have this dummy models.py
from django.db import models
class Foo(models.Model):
bar = models.IntegerField(),
// more integer fields here...
xyz = models.IntegerField()
And I want to know the SQL code generated for PostgreSQL, executing:
python manage.py sqlall myapp
No south involved. Just Django 1.5.4. And this is the SQL output
BEGIN;
CREATE TABLE "myapp_foo" (
"id" serial NOT NULL PRIMARY KEY,
"xyz" integer NOT NULL
)
;
COMMIT;
Just the internal id and the last specified field were generated. The rest are ignored. No matter how many fields or what fields. Just takes the last one, and generates that output.
Does it make any sense? I'm running Django 1.5.4 under a virtualenv, using Python 2.7 in Ubuntu 12.04. This is the complete output of pip freeze in my virtualenv
Django==1.5.4
Jinja2==2.7.1
MarkupSafe==0.18
PIL==1.1.7
Pygments==1.6
Sphinx==1.1.3
Unipath==1.0
argparse==1.2.1
distribute==0.6.24
django-admin-tools==0.5.1
django-appconf==0.6
django-bootstrap3==2.0.0
django-colorful==0.1.3
django-compressor==1.3
django-extensions==1.2.5
django-geojson==2.1.1
django-guardian==1.1.1
django-leaflet==0.8.2
django-model-utils==1.5.0
django-secure==1.0
django-sorting==0.1
django-waffle==0.9.2
docutils==0.11
feedparser==5.1.3
psycopg2==2.5.1
requests==2.0.1
six==1.4.1
wsgiref==0.1.2
This is just... weird. Any clues?
Many thanks in advance