On Sep 15, 8:27 am, integratingIt <[EMAIL PROTECTED]> wrote:
> I've seen that I can do most of this in the Python model, but there
> are a couple critical gaps that I'd really like to find a way to
> fill.  For example, everything after the column list (the physical
> characteristics of the table) is something I do not want to lose
> control of.  How can I do this in django's model.py?
>
> I've read about the arbitrary post-creation sql and the database-
> specific code files, but the physical parameters should really be part
> of the CREATE statement, not post-creation modify statements.  I will
> verify that they cannot be done afterwards.
>
> Failing the ability to modify the django tools to do this, is there a
> way to reverse-engineer a model from existing tables?  This may
> actually be the better way to go, as I don't guess our DBA's will know
> what to do with model.py files...
>
> Thanks,
> Chris

Hi Chris,

Apart from the tablespace declarations, there's currently no way to
make Django specify any of that information.  The approach we favor
here (we're also an Oracle shop) is to do our development using syncdb
as normal, without worrying about the storage details.  Then, when the
project is production-ready, we use the sqlall management command to
produce the basic sql script, and we hand that off to the DBAs to
massage as necessary.

If you prefer to create the tables manually and build models from
them, you can do that as well using the inspectdb management command.
The introspection is not perfect, so without a doubt you will need to
edit the generated models to some extent.

-Ian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to