Disable autoincrement for MoveMetaAilment.
[zzz-pokedex.git] / pokedex / db / tables.py
index 71ce534..c60c259 100644 (file)
@@ -16,13 +16,8 @@ Columns have a info dictionary with these keys:
     for translation.
   - latex: A formula in LaTeX syntax.
 
-A localizable text column is visible as two properties:
-The plural-name property (e.g. Pokemon.names) is a language-to-name dictionary:
-  bulbasaur.names['en'] == "Bulbasaur" and bulbasaur.names['de'] == "Bisasam".
-  You can use Pokemon.names['en'] to filter a query.
-The singular-name property returns the name in the default language, English.
-  For example bulbasaur.name == "Bulbasaur"
-  Setting pokedex.db.tables.default_lang changes the default language.
+See `pokedex.db.multilang` for how localizable text columns work.  The session
+classes in that module can be used to change the default language.
 """
 # XXX: Check if "gametext" is set correctly everywhere
 
@@ -72,7 +67,7 @@ TableBase = declarative_base(metadata=metadata, cls=TableSuperclass)
 ### Need Language first, to create the partial() below
 
 class Language(TableBase):
-    u"""A language the Pokémon games have been transleted into
+    u"""A language the Pokémon games have been translated into
     """
     __tablename__ = 'languages'
     __singlename__ = 'language'
@@ -855,7 +850,7 @@ class MoveMetaAilment(TableBase):
     """
     __tablename__ = 'move_meta_ailments'
     __singlename__ = 'move_meta_ailment'
-    id = Column(Integer, primary_key=True, nullable=False,
+    id = Column(Integer, primary_key=True, nullable=False, autoincrement=False,
         info=dict(description="A numeric ID"))
     identifier = Column(Unicode(24), nullable=False,
         info=dict(description="An identifier", format='identifier'))
@@ -1538,6 +1533,8 @@ class Stat(TableBase):
         info=dict(description=u"For offensive and defensive stats, the damage this stat relates to; otherwise None (the NULL value)"))
     identifier = Column(Unicode(16), nullable=False,
         info=dict(description=u"An identifier", format='identifier'))
+    is_battle_only = Column(Boolean, nullable=False,
+        info=dict(description=u"Whether this stat only exists within a battle"))
 
 create_translation_table('stat_names', Stat, 'names',
     relation_lazy='joined',