Re: SqlObject Sqlmeta fromDatabase problem

Jeremy Hoyle <[email protected]>
Newsgroups gmane.comp.python.sqlobject
Message-ID <CAJPMze+vz2ew377zgD-3+WG6gqRbKPDhY9xySp2OxfmZARnHhQ@mail.gmail.com>
Ok.. thank you. I was under the impression that this function will add an
column automatically to my database after I included it in my class. I
might code this functionality into sqlmeta. I would find this to be very
useful for future changes.

Jeremy

On Tue, Mar 27, 2012 at 5:32 AM, Oleg Broytman <[email protected]> wrote:

> On Tue, Mar 27, 2012 at 05:27:45AM -0500, Jeremy Hoyle wrote:
> > I added a stringcol to the class Company(SQLObject) table but it did not
> > auto update my database with the column.
>
>    You've got it in the reverse direction. fromDatase gets the list of
> columns *from* database. If you want to add a column from python to
> database you ought to use sqlmeta.addColumn() with changeSchema set to
> True.
>
> Oleg.
> --
>     Oleg Broytman            http://phdru.name/            [email protected]
>           Programmers don't die, they just GOSUB without RETURN.
>
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> sqlobject-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
>

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure

_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.