Hi Everyone,
I'm new to Pyramid and although I've found the framework intuitive so
far, I'm having a bit of trouble figuring out how to apply changes to
a database schema for an application using SQLAlchemy. Let's say I
have a table in my model for students:
class Students(Base):
__tablename__ = 'students'
id = Column(Integer, primary_key=True)
first_name = Column(Text)
last_name = Column(Text)
Later, I want to change this to require the first and last name:
class Students(Base):
__tablename__ = 'students'
id = Column(Integer, primary_key=True)
first_name = Column(Text, nullable=False)
last_name = Column(Text, nullable=False)
After making the changes, the application still accepts null values
for the first_name and last_name fields. I realize this may be an
SQLAlchemy problem and that making schema changes to an existing
database can be quite complicated. However, it seems that schema
changes occur frequently enough during an application's lifetime that
there should be some ingrained mechanism to accomplish this...maybe
I'm missing something?
Thanks in advance,
Scott
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.