j...@robinlea.com wrote:
>
> Hi,
>
> I'm new to SQLAlchemy. I am trying to use Pylons to expose an existing
> database in a browser. All the introductory material assumes I am
> going to create the database from python object definitions, but I
> want to create the python object definitions from the database. Am I
> on my own, or is there a well-worn path through these woods?
>
> Thanks for any advice you may have for me.

SQLA has no assumption that it would be creating tables.   if you do call
metadata.create_all(), which itself is optional, it actually checks for
those tables already existing and will not affect them.

You can "load" the definition of existing tables using Table(...,
autoload=True), or create fully defined Table objects (or declarative
mappings) that correspond to the existing schema.   You can even leave out
columns or tables you aren't concerned about.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to