From 54d611d2a2e65419983fa1d63cc435dddd04acb3 Mon Sep 17 00:00:00 2001 From: Jason Pellerin Date: Mon, 3 Jul 2006 20:53:36 +0000 Subject: [PATCH] [multi-db] Added builder property to creation module of all backends. Currently for all backends builder is a django.db.backends.ansi.sql.SchemaBuilder. git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3265 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/backends/ado_mssql/creation.py | 3 +++ django/db/backends/mysql/creation.py | 3 +++ django/db/backends/oracle/creation.py | 3 +++ django/db/backends/postgresql/creation.py | 3 +++ django/db/backends/sqlite3/creation.py | 3 +++ 5 files changed, 15 insertions(+) diff --git a/django/db/backends/ado_mssql/creation.py b/django/db/backends/ado_mssql/creation.py index 4d85d27ea5..3e017b37bf 100644 --- a/django/db/backends/ado_mssql/creation.py +++ b/django/db/backends/ado_mssql/creation.py @@ -1,3 +1,6 @@ +from django.db.backends.ansi import sql +builder = sql.SchemaBuilder() + DATA_TYPES = { 'AutoField': 'int IDENTITY (1, 1)', 'BooleanField': 'bit', diff --git a/django/db/backends/mysql/creation.py b/django/db/backends/mysql/creation.py index 116b490124..9329d9555d 100644 --- a/django/db/backends/mysql/creation.py +++ b/django/db/backends/mysql/creation.py @@ -1,3 +1,6 @@ +from django.db.backends.ansi import sql +builder = sql.SchemaBuilder() + # This dictionary maps Field objects to their associated MySQL column # types, as strings. Column-type strings can contain format strings; they'll # be interpolated against the values of Field.__dict__ before being output. diff --git a/django/db/backends/oracle/creation.py b/django/db/backends/oracle/creation.py index d45ceb64f5..05e6f4461b 100644 --- a/django/db/backends/oracle/creation.py +++ b/django/db/backends/oracle/creation.py @@ -1,3 +1,6 @@ +from django.db.backends.ansi import sql +builder = sql.SchemaBuilder() + DATA_TYPES = { 'AutoField': 'number(38)', 'BooleanField': 'number(1)', diff --git a/django/db/backends/postgresql/creation.py b/django/db/backends/postgresql/creation.py index 65a804ec40..3ffca28a64 100644 --- a/django/db/backends/postgresql/creation.py +++ b/django/db/backends/postgresql/creation.py @@ -1,3 +1,6 @@ +from django.db.backends.ansi import sql +builder = sql.SchemaBuilder() + # This dictionary maps Field objects to their associated PostgreSQL column # types, as strings. Column-type strings can contain format strings; they'll # be interpolated against the values of Field.__dict__ before being output. diff --git a/django/db/backends/sqlite3/creation.py b/django/db/backends/sqlite3/creation.py index e845179e64..e496a9f576 100644 --- a/django/db/backends/sqlite3/creation.py +++ b/django/db/backends/sqlite3/creation.py @@ -1,3 +1,6 @@ +from django.db.backends.ansi import sql +builder = sql.SchemaBuilder() + # SQLite doesn't actually support most of these types, but it "does the right # thing" given more verbose field definitions, so leave them as is so that # schema inspection is more useful.