I added a stringcol to the class Company(SQLObject) table but it did not auto update my database with the column. I am not sure why it is not updating. I check my SQL database with an external GUI. The database views below should be updated automatically when adding a new StringCol entry in the Company table. Correct?
*BEFORE:*
class Company(SQLObject):
class sqlmeta:
fromDatabase = True
lazyUpdate = False
cacheValues = True
Company_Name = StringCol(length = 256, default = None)
Company_Address = StringCol(length = 256, default = None)
Company_Phone = StringCol(length = 256, default = None)
[image: Inline image 1]
*AFTER:*
class Company(SQLObject):
class sqlmeta:
fromDatabase = True
lazyUpdate = False
cacheValues = True
Company_Name = StringCol(length = 256, default = None)
Company_Address = StringCol(length = 256, default = None)
Company_Phone = StringCol(length = 256, default = None)
*Company_Number = StringCol(length = 256, default = None)*
*
*
[image: Inline image 2]
class Companys():
def __init__(self):
Company.createTable(ifNotExists = True, connection=conn)
On Tue, Mar 27, 2012 at 4:43 AM, Oleg Broytman <[email protected]> wrote:
> On Mon, Mar 26, 2012 at 08:02:22PM -0500, Jeremy Hoyle wrote:
> > fromDatabase boolean doesn't seem to be performing its stated
> function.It
> > does not update the database when i enter a new column in the database.
>
> I have problems understanding the sentence. Did you add a column to
> your database and then restarted the program? The program didn't
> discover the new column? You can test the list of columns by printing
> Company.sqlmeta.columnList and Company.sqlmeta.columns.
>
> 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
>
<<image.png>>
<<image.png>>
------------------------------------------------------------------------------ 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
