﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
17957	If engine for default DB alias has interprets_empty_strings_as_nulls (i.e. Oracle) it affects DDL SQL for model fields null=False in other DBs	bhuztez	nobody	"My settings.py looks like this
{{{#!python
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
    },
    'other': {
        'ENGINE': 'django.db.backends.sqlite3', 
    }
}

INSTALLED_APPS = (
    'django.contrib.sites',
)
}}}

Run `python manage.py sql sites --database=other`
{{{#!sql
BEGIN;
CREATE TABLE ""django_site"" (
    ""id"" integer NOT NULL PRIMARY KEY,
    ""domain"" varchar(100) NOT NULL,
    ""name"" varchar(50) NOT NULL
)
;
COMMIT;
}}}

Change default database engine to `django.db.backends.oracle`. Run again `python manage.py sql sites --database=other`
{{{#!sql
BEGIN;
CREATE TABLE ""django_site"" (
    ""id"" integer NOT NULL PRIMARY KEY,
    ""domain"" varchar(100),
    ""name"" varchar(50)
)
;
COMMIT;
}}}

Disclaimer: I do not have an oracle db. I actually change dummy backend's feature.interprets_empty_strings_as_nulls to True, and set default db engine to dummy.
"	Bug	closed	Database layer (models, ORM)	dev	Normal	fixed	oracle	anssi.kaariainen@…	Ready for checkin	1	0	0	0	0	0
