Re: [SQLObject] bug in sqlobject-admin

2010-04-26 Thread Oleg Broytman
Hi! On Mon, Apr 26, 2010 at 09:13:01PM +0300, Imri Goldberg wrote: > I am considering switching to your way of doing schema changes. > I would very much appreciate more information regarding the process you use > to do these things. > > For instance, given that I have a working MyThing class, to

Re: [SQLObject] bug in sqlobject-admin

2010-04-26 Thread Imri Goldberg
Hi Oleg! I am considering switching to your way of doing schema changes. I would very much appreciate more information regarding the process you use to do these things. For instance, given that I have a working MyThing class, to which I'd like to add a field my_field - would you write the upgrade

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 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. If c

Re: [SQLObject] bug in sqlobject-admin

2010-04-20 Thread Imri Goldberg
On Tue, Apr 20, 2010 at 9:12 PM, Oleg Broytman 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 strange, as I

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 wrote: > On Tue, Apr 20, 2010 at 08:23:39PM +0400, Oleg Broytman wrote: > >In this particular case it would be enough, I think,

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 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 (branc

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 O

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 s

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-19 Thread Imri Goldberg
Heya I'll be happy to help you work it, and also to solve the bug. Re using sqlobject-admin: I'm curious - what is your preferred way of managing db migrations (i.e. versioning schema changes)? Cheers, Imri On Mon, Apr 19, 2010 at 12:58 PM, Oleg Broytman wrote: > On Sat, Apr 17, 2010 at 01:25:5

Re: [SQLObject] bug in sqlobject-admin

2010-04-19 Thread Oleg Broytman
On Sat, Apr 17, 2010 at 01:25:59PM +0300, Imri Goldberg wrote: > I've worked a bit with sqlobject-admin, and there's a bug in the > implementation of the status command. Thank you for reporting. I have never used sqlobject-admin so I have to learn how to use it to reproduce the bug. Oleg. --

[SQLObject] bug in sqlobject-admin

2010-04-17 Thread Imri Goldberg
Heya I've worked a bit with sqlobject-admin, and there's a bug in the implementation of the status command. Steps to reproduce: 1. Create a simple table with a decimal column, for example: class MyThing(sqlobject.SQLObject): bla1 = sqlobject.DecimalCol(size = 10, precision = 2) 2. Use sqlobj