Re: [sqlalchemy] Re: can I use SA to dump a table's DDL to a file?

2011-06-03 Thread Randy Syring
If anyone is interested, I have some code that writes basic details for tables, constraints, indexes, and triggers out to files. Code is here: https://bitbucket.org/rsyring/mssqlddlwriter/ -- Randy Syring Intelicom Direct: 502-276-0459 Office: 502-212-9913

[sqlalchemy] Re: can I use SA to dump a table's DDL to a file?

2011-06-02 Thread Randy Syring
Looks like I beat you to the answer by about 3 mins, thanks for answering though. :) I have a follow-up though. The foreign key constraints are not getting created with ON DELETE CASCADE as expected. I tried this in both MSSQL and Postgres. Is this expected behavior? If so, is it possible to

Re: [sqlalchemy] Re: can I use SA to dump a table's DDL to a file?

2011-06-02 Thread Michael Bayer
On Jun 2, 2011, at 3:14 AM, Randy Syring wrote: Looks like I beat you to the answer by about 3 mins, thanks for answering though. :) I have a follow-up though. The foreign key constraints are not getting created with ON DELETE CASCADE as expected. I tried this in both MSSQL and

Re: [sqlalchemy] Re: can I use SA to dump a table's DDL to a file?

2011-06-02 Thread Randy Syring
That was it, thanks. I was trying to go through the column and looking at it's foreign_keys collection. When I set those values, it didn't affect the output. Reflects my ignorance of SA, obviously. Thanks again. -- Randy Syring Intelicom Direct:

[sqlalchemy] Re: can I use SA to dump a table's DDL to a file?

2011-06-01 Thread Randy Syring
In the FAQ...sorry: http://www.sqlalchemy.org/trac/wiki/FAQ#HowcanIgettheCREATETABLEDROPTABLEoutputasastring On Jun 1, 8:01 pm, Randy Syring ra...@rcs-comp.com wrote: I'd like to be able to dump an MS SQL server's objects to text on the local file system.  I have a working solution for views,