From: Eevee Date: Sun, 13 Mar 2011 02:06:16 +0000 (-0800) Subject: Fix some i18n schema issues when running under a Real Databaseā„¢. X-Git-Tag: veekun-promotions/2011041101~35^2 X-Git-Url: http://git.veekun.com/zzz-pokedex.git/commitdiff_plain/d0920eda35f242a14502a14f89e81d9d0309930f Fix some i18n schema issues when running under a Real Databaseā„¢. --- diff --git a/pokedex/db/tables.py b/pokedex/db/tables.py index 76bd753..f8afa9b 100644 --- a/pokedex/db/tables.py +++ b/pokedex/db/tables.py @@ -28,7 +28,7 @@ The singular-name property returns the name in the default language, English. import collections -from sqlalchemy import Column, ForeignKey, MetaData, PrimaryKeyConstraint, Table +from sqlalchemy import Column, ForeignKey, MetaData, PrimaryKeyConstraint, Table, UniqueConstraint from sqlalchemy.ext.declarative import ( declarative_base, declared_attr, DeclarativeMeta, ) @@ -689,6 +689,11 @@ class MoveEffectChangelog(TableBase): effect = ProseColumn(markdown.MarkdownColumn(512), plural='effects', nullable=False, info=dict(description="A description of the old behavior", format='markdown')) + __table_args__ = ( + UniqueConstraint(effect_id, changed_in_version_group_id), + {}, + ) + class MoveFlag(TableBase): u"""Maps a move flag to a move """