Hi José,

On Tuesday 03 November 2015 12:58:54 José Tomás Tocino wrote:
> El lunes, 2 de noviembre de 2015, 13:22:17 (UTC+1), Shai Berger escribió:
> > https://code.djangoproject.com/ticket/6148
>
> That ticket seems somewhat related, but the feature we're dealing with here
> is, in my opinion, much simpler and easier to accomplish than the one
> mentioned in the ticket. What do you think?
> 
There are several points that come to mind:

1) Some progress has been made on the "support schemas" ticket lately, and I 
believe that completing that ticket may affect the way this feature is 
implemented. For example, with good schema support, it seems reasonable to 
take one argument -- the name of the schema to introspect. I'd hesitate to 
accept the feature as suggested without considering such possibilities.

2) In order to be useful to you, it is not enough to introspect the models -- 
you need to be able to use them as well. That is, essentially, ticket 6148 
without migrations, unless I am missing something.

To prove me wrong and/or encounter the further problems, there's two things 
you can do:

a) Create the relevant models manually, and try to use them from your 
application. Traditionally, this has been done by providing a quoted name with 
a schema as table name -- something like

class MyModel(Model):
        class Meta:
                table_name = '"schema"."view"'

b) Add a test that introspects a table from another schema. On Oracle, 
creating tables in another schema is probably too hard to do in a test, but 
you can try to introspect views from INFORMATION_SCHEMA (with a little care 
and luck, you may even be able to write a test that should work on all 
backends, as INFORMATION_SCHEMA is standardized).

> BTW, yesterday I added the docs and release notes to the
> PR https://github.com/django/django/pull/5530#issuecomment-152960635
> 

3) 1.9 is feature-frozen at this point -- its beta is out already. Even if the 
feature is accepted as-is, it would need to target 1.10.

HTH,
        Shai.

Reply via email to