Re: [SQLObject] bug in sqlobject-admin

2010-04-20 Thread Oleg Broytman
On Mon, Apr 19, 2010 at 04:11:09PM +0300, Imri Goldberg wrote: Re using sqlobject-admin: I'm curious - what is your preferred way of managing db migrations (i.e. versioning schema changes)? I seldom do a simple ADD/DELETE COLUMN. Usually when I change the schema it's more like collect some

Re: [SQLObject] bug in sqlobject-admin

2010-04-20 Thread Oleg Broytman
On Sat, Apr 17, 2010 at 01:25:59PM +0300, Imri Goldberg wrote: 1. Create a simple table with a decimal column, for example: class MyThing(sqlobject.SQLObject): bla1 = sqlobject.DecimalCol(size = 10, precision = 2) 2. Use sqlobject-admin create --egg=... -c sqlite:// 3. Use

Re: [SQLObject] bug in sqlobject-admin

2010-04-20 Thread Imri Goldberg
Heya When I checked it, it seemed to me to happen because the 'size' and 'precision' were pop()-ed from the original **kw dict passed to DecimalCol. Since the this dict is later kept as a member, when used again by CommandStatus, 'size' and 'precision' are no longer there. Hope that helps, Imri

Re: [SQLObject] bug in sqlobject-admin

2010-04-20 Thread Oleg Broytman
On Tue, Apr 20, 2010 at 08:23:39PM +0400, Oleg Broytman wrote: In this particular case it would be enough, I think, to extend columnsFromScheme to pass None's as size/precision. I will do some experiments before committing the hack. Fixed and committed in the revisions 4175-4177

Re: [SQLObject] bug in sqlobject-admin

2010-04-20 Thread Oleg Broytman
On Tue, Apr 20, 2010 at 09:00:11PM +0300, Imri Goldberg wrote: When I checked it, it seemed to me to happen because the 'size' and 'precision' were pop()-ed from the original **kw dict passed to DecimalCol. The problem was that the dictionary was simply empty. SQLiteConnection.guessClass()

Re: [SQLObject] bug in sqlobject-admin

2010-04-20 Thread Imri Goldberg
Excellent, thanks a bunch! Cheers, Imri PS, if there is some work to be done on sqlobject, I'll be happy to help :) On Tue, Apr 20, 2010 at 9:00 PM, Oleg Broytman p...@phd.pp.ru wrote: On Tue, Apr 20, 2010 at 08:23:39PM +0400, Oleg Broytman wrote: In this particular case it would be

Re: [SQLObject] bug in sqlobject-admin

2010-04-20 Thread Imri Goldberg
On Tue, Apr 20, 2010 at 9:12 PM, Oleg Broytman p...@phd.pp.ru wrote: BTW, DecimalCol is only recognized by SQLiteConnection. Oleg. -- Oleg Broytmanhttp://phd.pp.ru/p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. That's

Re: [SQLObject] bug in sqlobject-admin

2010-04-20 Thread Oleg Broytman
On Tue, Apr 20, 2010 at 09:35:12PM +0300, Imri Goldberg wrote: On Tue, Apr 20, 2010 at 9:12 PM, Oleg Broytman p...@phd.pp.ru wrote: BTW, DecimalCol is only recognized by SQLiteConnection. That's strange, as I currently use mysql. I haven't given it much thought, but it seems to work well.