[sqlalchemy] Re: Creating column comments on the database

2008-06-05 Thread Christoph Zwerschke
Lukasz Szybalski schrieb: I think I prefer info dictionary rather then a string. Dict info which I use already have something like this: sqlalchemy.Column('DRIVE_TRAIN', sqlalchemy.Unicode(4) ,info={description:DRIVE TRAIN TYPE [AWD,4WD,FWD,RWD]}), sqlalchemy.Column('FUEL_SYS',

[sqlalchemy] data warehouse

2008-06-05 Thread PopCorn
Hi all, A very good day to all of you. Currently, i am working on data warehouse. I am using MS SQL. I have done quite a big of research online recentlhy. However, all i could find are defination of data warehouse and designing of data warehouse. I had both fact and dimension tables ready, but

[sqlalchemy] Re: Creating column comments on the database

2008-06-05 Thread Lukasz Szybalski
On Thu, Jun 5, 2008 at 2:37 AM, Christoph Zwerschke [EMAIL PROTECTED] wrote: Lukasz Szybalski schrieb: I think I prefer info dictionary rather then a string. Dict info which I use already have something like this: sqlalchemy.Column('DRIVE_TRAIN', sqlalchemy.Unicode(4)

[sqlalchemy] 0.4.6 tar balls on SF and pypi are different?

2008-06-05 Thread Dryice Liu
I just noticed the tarballs on SF and pypi are different. The one on SF: MD5 (SQLAlchemy-0.4.6.tar.gz) = 3043efb59000887ebe13fdcd6b6efadb SIZE (SQLAlchemy-0.4.6.tar.gz) = 1311544 The one on PYPI: MD5 (SQLAlchemy-0.4.6.tar.gz) = 3d1e737bb408de25b2fadb19a736b40e SIZE (SQLAlchemy-0.4.6.tar.gz) =

[sqlalchemy] Re: Unknown inheritance type question

2008-06-05 Thread Michael Bayer
this mapping: transaction_sale_join = join(transactions, sales) mapper(Sale, transaction_sale_join, inherits=transactions_mapper, polymorphic_identity=3, properties={ 'line_items': relation(LineItem, backref='sale', cascade='all, delete-orphan') }) is incorrect. The

[sqlalchemy] Re: 0.4.6 tar balls on SF and pypi are different?

2008-06-05 Thread Michael Bayer
On Jun 5, 2008, at 10:13 AM, Dryice Liu wrote: I just noticed the tarballs on SF and pypi are different. The one on SF: MD5 (SQLAlchemy-0.4.6.tar.gz) = 3043efb59000887ebe13fdcd6b6efadb SIZE (SQLAlchemy-0.4.6.tar.gz) = 1311544 The one on PYPI: MD5 (SQLAlchemy-0.4.6.tar.gz) =

[sqlalchemy] Inheritance and self-relation in child

2008-06-05 Thread Tomer
Hi, I have two tables: Image and PersistentImage, where the latter inherits the former. In addition, PersistentImage has a foreign key to itself (ie, all PersistentImage objects form a hierarchy among themselves). I haven't been able to get this to work - first it complained about wanting a

[sqlalchemy] Re: Unknown inheritance type question

2008-06-05 Thread Brad Wells
Thank you very much. again. -brad On Jun 5, 10:57 am, Michael Bayer [EMAIL PROTECTED] wrote: this mapping: transaction_sale_join = join(transactions, sales) mapper(Sale, transaction_sale_join, inherits=transactions_mapper, polymorphic_identity=3, properties={

[sqlalchemy] Re: Inheritance and self-relation in child

2008-06-05 Thread Michael Bayer
On Jun 5, 2008, at 11:18 AM, Tomer wrote: Hi, I have two tables: Image and PersistentImage, where the latter inherits the former. In addition, PersistentImage has a foreign key to itself (ie, all PersistentImage objects form a hierarchy among themselves). I haven't been able to get this

[sqlalchemy] Re: Inheritance and self-relation in child

2008-06-05 Thread Tomer
Worked like magic!! Thanks! BTW, why wasn't SQLA able to determine this automatically like it usually does? On Jun 5, 11:30 am, Michael Bayer [EMAIL PROTECTED] wrote: On Jun 5, 2008, at 11:18 AM, Tomer wrote: Hi, I have two tables: Image and PersistentImage, where the latter

[sqlalchemy] Re: Inheritance and self-relation in child

2008-06-05 Thread Michael Bayer
On Jun 5, 2008, at 11:42 AM, Tomer wrote: Worked like magic!! Thanks! BTW, why wasn't SQLA able to determine this automatically like it usually does? when you join PersistentImage-PersistentImage, theres two ways to join on foreign keys between those (remember that a PersistentImage is

[sqlalchemy] Re: Inheritance and self-relation in child

2008-06-05 Thread Tomer
Right, I missed that part. Thanks for the explanation... On Jun 5, 12:02 pm, Michael Bayer [EMAIL PROTECTED] wrote: On Jun 5, 2008, at 11:42 AM, Tomer wrote: Worked like magic!! Thanks! BTW, why wasn't SQLA able to determine this automatically like it usually does? when you join

[sqlalchemy] Optimizing a slow query

2008-06-05 Thread beewee
Hi, we're writing a bulleting board using sqlalchemy at the moment, but we have the problem, that the database query for viewing a topic is quite slow for big topics. These are the relevant table definitions and mappings: http://paste.pocoo.org/show/62703/ This is the query that is slow:

[sqlalchemy] Re: Optimizing a slow query

2008-06-05 Thread Michael Bayer
for starters I'd combine post_table and post_text_table into onenot much is accomplished there by having two tables. Also make sure forum_post.topic_id is indexed. On Jun 5, 2008, at 1:37 PM, beewee wrote: Hi, we're writing a bulleting board using sqlalchemy at the moment, but we

[sqlalchemy] out of range / locate column / lost connection

2008-06-05 Thread braydon fuller
I am having some database problems (attached below), any recommendations to either recover from or fix these from happening? I am not sure why it would work OK at first, and then at some point run bad... Any recommendations on a technique to debug this would be much appreciated. Full source code

[sqlalchemy] Re: Schema and database migration: how to diff?

2008-06-05 Thread Yannick Gingras
[EMAIL PROTECTED] writes: see dbcook.misc.metadata.diff.py as an attempt to do this over 2 metadata's. svn co https://dbcook.svn.sourceforge.net/svnroot/dbcook/trunk/dbcook/misc/metadata It works pretty well. How about a small cleanup to make it truly general an a promotion to a package

[sqlalchemy] Re: 0.4.6 tar balls on SF and pypi are different?

2008-06-05 Thread Dryice Liu
Michael Bayer [EMAIL PROTECTED] wrote: On Jun 5, 2008, at 10:13 AM, Dryice Liu wrote: I just noticed the tarballs on SF and pypi are different. The one on SF: MD5 (SQLAlchemy-0.4.6.tar.gz) = 3043efb59000887ebe13fdcd6b6efadb SIZE (SQLAlchemy-0.4.6.tar.gz) = 1311544 The one on PYPI: