From 482ca207cb949f18cce04d3440dbe0d36804a93a Mon Sep 17 00:00:00 2001 From: Eevee Date: Sat, 12 Mar 2011 18:06:16 -0800 Subject: [PATCH] =?UTF-8?q?Fix=20some=20i18n=20schema=20issues=20when=20ru?= =?UTF-8?q?nning=20under=20a=20Real=20Database=E2=84=A2.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pokedex/db/tables.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 """