Hi,

Apologies for lowering the general IQ of the list, I'm very new to web apps
and databases.

I had a declarative table:

class ArkContact(Base):
    """
    table of all contacts
    """
    __tablename__ = 'contacts'

    id = Column(Integer, primary_key=True)
    project_id = Column(Integer, ForeignKey('projects.id'))
    client_id = Column(Integer, ForeignKey('clients.id'))
    firstname = Column(String)
    lastname = Column(String)
    email1 = Column(String)
    email2 = Column(String)
    workphone = Column(Integer)
    mobile = Column(Integer)
    project = relation(ArkProject, backref=backref('contacts',
order_by=func.lower(firstname)))
    client = relation(ArkClient, backref=backref('contacts',
order_by=func.lower(firstname)))

All is good,

I added a new column in:

    lastcontact = Column(DateTime)

Now I'm getting errors when I try to connect:

<class 'sqlalchemy.exc.OperationalError'>: (OperationalError) no such
column: contacts.lastcontact u'SELECT contacts.id AS contacts_id,
contacts.project_id AS contacts_project_id, contacts.client_id AS
contacts_client_id, contacts.firstname AS contacts_firstname,
contacts.lastname AS contacts_lastname, contacts.email1 AS contacts_email1,
contacts.email2 AS contacts_email2, contacts.workphone AS
contacts_workphone, contacts.mobile AS contacts_mobile, contacts.lastcontact
AS contacts_lastcontact \nFROM contacts ORDER BY lower(contacts.firstname)'
[]  

Am I being extremely naive in thinking there would be some way of 'updating'
the table to show the new column?

Many thanks,

Jules


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to