diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-10-21 22:38:40 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-10-21 22:38:40 +0000 |
| commit | 431149d54284c161e03166eeddc7deefdf2f0520 (patch) | |
| tree | 12f933a3d7ace74911e9954ca7f1147c33a545c0 /examples/vertical | |
| parent | 9497e738909c586f3922a0970722612a05a8953d (diff) | |
| download | sqlalchemy-431149d54284c161e03166eeddc7deefdf2f0520.tar.gz | |
tweak for Table.create() not having a return value
Diffstat (limited to 'examples/vertical')
| -rw-r--r-- | examples/vertical/vertical.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/vertical/vertical.py b/examples/vertical/vertical.py index d4c8b9cae..4f0f5a15c 100644 --- a/examples/vertical/vertical.py +++ b/examples/vertical/vertical.py @@ -13,7 +13,7 @@ e = BoundMetaData('sqlite://', echo=True) entities = Table('entities', e, Column('entity_id', Integer, primary_key=True), Column('title', String(100), nullable=False), - ).create() + ) # this table represents dynamic fields that can be associated # with values attached to an Entity. @@ -21,7 +21,7 @@ entities = Table('entities', e, entity_fields = Table('entity_fields', e, Column('field_id', Integer, primary_key=True), Column('name', String(40), nullable=False), - Column('datatype', String(30), nullable=False)).create() + Column('datatype', String(30), nullable=False)) # this table represents attributes that are attached to an # Entity object. It combines a row from entity_fields with an actual value. @@ -34,7 +34,9 @@ entity_values = Table('entity_values', e, Column('int_value', Integer), Column('string_value', String(500)), Column('binary_value', PickleType), - Column('datetime_value', DateTime)).create() + Column('datetime_value', DateTime)) + +e.create_all() class EntityDict(dict): """this is a dictionary that implements an append() and an __iter__ method. |
