Michael Bayer wrote:
> [email protected] 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.

Thanks again. It sounds like there's no problem dealing with an existing 
database.



-- 
John Francis Lee
1025/37 Thanon Jet Yod
Mueang Chiangrai 57000

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

Reply via email to