Carl Brewer wrote:
In sqlite I hand-hacked a change to the table that needed changing,
adding a field (which is not a linked field in any way), using
alter table riders add gender string(1)
That's fair enough, although you might look at the sqlalchemy-migrate or
alembic packages for more wide-ranging schema versioning...
class Riders(Base):
# the new bit ...
gender = Column(String(1)) # "M" or "F"
So, just the above line is new, right?
def __init__(self, name, email, phone, DoB, gender, coachId,
squadId, effortCounter = 0, created = datetime.datetime.now()):
Why not just use the default Declarative __init__ and specify 0 as a
default for effortCounter and datetime.datetime.now (note absence of
backets!) as a default for created?
When I ask sqlite about it gender never shows up in the schema from
.dump or .schema,
How did you ask?
cheers,
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" 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/sqlalchemy?hl=en.