#6148: Add generic support for database schemas
---------------------------------------------------+------------------------
          Reporter:  ikelly                        |         Owner:  kmpm       
                    
            Status:  assigned                      |     Milestone:             
                    
         Component:  Database layer (models, ORM)  |       Version:  SVN        
                    
        Resolution:                                |      Keywords:  oracle 
postgresql mysql schemas
             Stage:  Accepted                      |     Has_patch:  1          
                    
        Needs_docs:  0                             |   Needs_tests:  0          
                    
Needs_better_patch:  1                             |  
---------------------------------------------------+------------------------
Comment (by akaihola):

 Replying to [comment:47 k4ml]:
 > That would only work with read operation. When you trying to write to
 the db, it would failed because the Django assume the sequence as
 `"schema.tablename"_column_id_seq`, so you have to escape it as
 `'schema\".\"tablename'`.

 A minor annoyance in the quote trick is that creating indexes with the
 `db_index` field attribute doesn't work:
 {{{
 Installing index for myschema.mymodel model
 Failed to install index for myschema.mymodel model: syntax error at or
 near "."
 LINE 1: CREATE INDEX "myschema"."mymodel_myfield" ON ...
                                ^
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/6148#comment:51>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--

You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.


Reply via email to