hi

I'm not sure if this is a dev question or it should be posted here. 
Probably I did something dumb, so I hope you can help me doscover what that 
is:

I'm trying to syncdb to an empty Oracle DB. Many tables, triggers and 
sequences are made but then this:
----------------------------------
...
Synchronizing apps without migrations:
  Creating tables...
    Running deferred SQL...
  Installing custom SQL...
Running migrations:
  Rendering model states... DONE
  Applying contenttypes.0002_remove_content_type_name...DEBUG ALTER TABLE 
"DJANGO_CONTENT_TYPE" MODIFY "NAME" NULL; (params [])
DEBUG (0.055) QUERY = u'ALTER TABLE "DJANGO_CONTENT_TYPE" MODIFY "NAME" 
NULL' - PARAMS = (); args=[]
Traceback (most recent call last):
...
...
django.db.utils.DatabaseError: ORA-01451: column to be modified to NULL 
cannot be modified to NULL
----------------------------------

Indeed if I run this in oracle directly:
ALTER TABLE "DJANGO_CONTENT_TYPE" MODIFY "NAME" NULL;
I get the same error: you cannot change a NULL column into NULL

I don't understand why django wants to alter a column name of a table it 
just made a few seconds before, but still. 
What seems to happen is that it changes a column to NULL, but because it 
already is NULL, the statement fails.
Workaround is to manually set: 
ALTER TABLE "DJANGO_CONTENT_TYPE" MODIFY ("NAME" NOT NULL);
Then run syncdb again and the error is gone.

I can see this is sillyness of oracle, but theres not much I can do about 
that. Is this a bug that I should report with the devs?

thanks
Joris

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0ebae0c4-f6d1-4552-b71d-1afeb5c52e8d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to