1
0
Fork 0
mirror of https://github.com/veekun/pokedex.git synced 2024-08-20 18:16:34 +00:00

Update test_schema to the new API. Add some missing column metadata.

This commit is contained in:
Petr Viktorin 2011-03-29 20:44:43 +03:00 committed by Eevee
parent c4dc27732d
commit 97bf4cfe45
3 changed files with 24 additions and 20 deletions
pokedex/db

View file

@ -77,9 +77,11 @@ def create_translation_table(_table_name, foreign_class, relation_name,
# Create the table object
table = Table(_table_name, foreign_class.__table__.metadata,
Column(foreign_key_name, Integer, ForeignKey(foreign_class.id),
primary_key=True, nullable=False),
primary_key=True, nullable=False,
info=dict(description="ID of the %s these texts relate to" % foreign_class.__singlename__)),
Column('local_language_id', Integer, ForeignKey(language_class.id),
primary_key=True, nullable=False),
primary_key=True, nullable=False,
info=dict(description="Language these texts are in")),
)
Translations.__table__ = table