- # There are some dynamic things that can only be set at class
- # creation time because of declarative metaclass magic.
- # So create class dynamically.
- Strings = type(name, (TableBase, LanguageSpecific), fields)
+ table = Table(tablename, metadata,
+ Column(safe_name + '_id', Integer, ForeignKey(object_table.id),
+ primary_key=True, nullable=False),
+ Column('language_id', Integer, ForeignKey(Language.id),
+ primary_key=True, nullable=False),
+ *(column for name, plural, column in columns)
+ )