[sqlalchemy] Re: SQLAlchemy 0.6.0 released

2010-04-20 Thread Gerry Reno
Congratulations Mike and contributors. This is an important milestone in the evolution of SQLAlchemy. Thanks for all the hard work. -Gerry On Sun, Apr 18, 2010 at 8:02 PM, Michael Bayer mike...@zzzcomputing.com wrote: The first official 0.6 release of SQLAlchemy is now available. --

[sqlalchemy] Re: Show SQL that would be executed to create a table - but don't do it?

2010-04-16 Thread Gerry Reno
FAQ: http://www.sqlalchemy.org/trac/wiki/FAQ#HowcanIgettheCREATETABLEDROPTABLEoutputasastring On Apr 16, 11:04 am, Kirk Strauser k...@strauser.com wrote: Given a largish file with a lot of table definitions in it, and SQLAlchemy 0.5.7, how can I see what SQL would be generated to create one

[sqlalchemy] Re: DropConstraint exception

2010-04-15 Thread Gerry Reno
DropConstraint(c1.constraints.pop()) print DropConstraint(c2.constraints.pop()) On Apr 14, 2010, at 9:40 PM, Gerry Reno wrote: Ok, I tried with the keyword but I get this using 0.6beta1:    PrimaryKeyConstraint(id='id'),  File /usr/lib/python2.5/site-packages/sqlalchemy/schema.py, line 1391

[sqlalchemy] Re: DropConstraint exception

2010-04-15 Thread Gerry Reno
:03,676 INFO sqlalchemy.engine.base.Engine.0x...240c COMMIT -Gerry On Apr 15, 12:18 pm, Michael Bayer mike...@zzzcomputing.com wrote: On Apr 15, 2010, at 11:46 AM, Gerry Reno wrote: Upgraded to beta3. So you're saying that if we want to be able to drop a constraint later on we must

[sqlalchemy] Re: DropConstraint exception

2010-04-15 Thread Gerry Reno
15, 12:42 pm, Gerry Reno gr...@verizon.net wrote: Yep.  Works with postgresql: $ python /tmp/testthis.py 2010-04-15 12:40:03,032 INFO sqlalchemy.engine.base.Engine.0x...240c select version() 2010-04-15 12:40:03,032 INFO sqlalchemy.engine.base.Engine.0x...240c {} 2010-04-15 12:40:03,053 INFO

[sqlalchemy] drop all keys, indexes, permissions, views, etc.

2010-04-14 Thread Gerry Reno
I would like to be able to drop all foreign keys, then drop all indexes, drop all permissions, drop all views then drop all tables. I went looking for methods like DropForeignKeys, DropView, DropPermissions but there are no such method names. How can I perform all these actions in a batch

[sqlalchemy] Re: drop all keys, indexes, permissions, views, etc.

2010-04-14 Thread Gerry Reno
Thanks Mike. I'll check out the links. -Gerry -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to

[sqlalchemy] DropConstraint exception

2010-04-14 Thread Gerry Reno
Ok, I tried this: from sqlalchemy.schema import DropConstraint for table in metadata.tables.keys(): for con in metadata.tables[table].constraints: if isinstance(con, PrimaryKeyConstraint): engine.execute(DropConstraint(con)) but I'm getting an exception:

[sqlalchemy] Re: DropConstraint exception

2010-04-14 Thread Gerry Reno
The PrimaryKeyConstraints were created like this: category = Table('category', metadata, Column('name', String (64), nullable=False ), ... PrimaryKeyConstraint('name'), ) -Gerry -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post

[sqlalchemy] Re: DropConstraint exception

2010-04-14 Thread Gerry Reno
What do I do then for a composite primary key? PrimaryKeyConstraint('col1','col2') -Gerry On Apr 14, 9:13 pm, Michael Bayer mike...@zzzcomputing.com wrote: PrimaryKeyConstraint(name='name') On Apr 14, 2010, at 8:22 PM, Gerry Reno wrote: category = Table('category', metadata

[sqlalchemy] Re: DropConstraint exception

2010-04-14 Thread Gerry Reno
'id' -Gerry On Apr 14, 9:28 pm, Gerry Reno gr...@verizon.net wrote: What do I do then for a composite primary key? PrimaryKeyConstraint('col1','col2') -Gerry On Apr 14, 9:13 pm, Michael Bayer mike...@zzzcomputing.com wrote: PrimaryKeyConstraint(name='name') On Apr 14, 2010, at 8:22

[sqlalchemy] SQLAlchemy 0.6beta1: PG dialect: DropTable: (ProgrammingError) syntax error at or near CONSTRAINTS

2010-03-10 Thread Gerry Reno
Been doing great with SQLAlchemy 0.6beta1 for the past week after a couple snags migrating from 5.5. Today I hit a small problem with postgresql on DropTables: running this command: engine.execute(DropTable(table, cascade=True)) produced this error: sqlalchemy.exc.ProgrammingError:

[sqlalchemy] Re: SQLAlchemy 0.6beta1: PG dialect: DropTable: (ProgrammingError) syntax error at or near CONSTRAINTS

2010-03-10 Thread Gerry Reno
On Mar 11, 12:08 am, Gerry Reno gr...@verizon.net wrote: Been doing great with SQLAlchemy 0.6beta1 for the past week after a couple snags migrating from 5.5. Today I hit a small problem with postgresql on DropTables:     running this command:     engine.execute(DropTable(table, cascade

[sqlalchemy] SQLAlchemy 0.6beta1: TypeError: Boolean value of this clause is not defined

2010-03-01 Thread Gerry Reno
Today I tried out 0.6beta1 and I'm seeing exceptions like this: TypeError: Boolean value of this clause is not defined I don't see these in 5.5 so I'm wondering what I need to change. -Gerry -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To

[sqlalchemy] SQLAlchemy 0.6beta1: AttributeError: 'Text' object has no attribute 'get_col_spec'

2010-03-01 Thread Gerry Reno
Ok, I fixed all the boolean clause tests but now I'm getting this exception on a Text object: AttributeError: 'Text' object has no attribute 'get_col_spec' I see where the type system has been revamped but isn't get_col_spec still there? -Gerry -- You received this message because you are

[sqlalchemy] SQLAlchemy 0.6beta1: AttributeError: 'Text' object has no attribute 'get_col_spec'

2010-03-01 Thread Gerry Reno
Ok, I fixed all the boolean clause tests but now I'm getting this exception on a Text object: AttributeError: 'Text' object has no attribute 'get_col_spec' I see where the type system has been revamped but isn't get_col_spec still there? -Gerry -- You received this message because you are