From 717e52b66ae2e37f33c7410bf13a4b938ad94b3a Mon Sep 17 00:00:00 2001 From: Andrew Ekstedt Date: Sat, 16 Nov 2013 16:27:12 -0800 Subject: [PATCH] Limit Unicode columns to 4000 characters. Fixes #102. This is the maximum length of an NVARCHAR column in SQL Server 2012.[1] Our longest bit of prose is currently Substitute's effect, at 3180 characters. [1]: http://technet.microsoft.com/en-us/library/ms186939.aspx --- pokedex/db/tables.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pokedex/db/tables.py b/pokedex/db/tables.py index 762c959..b24ea86 100644 --- a/pokedex/db/tables.py +++ b/pokedex/db/tables.py @@ -130,7 +130,7 @@ create_translation_table('ability_names', Ability, 'names', info=dict(description="The name", format='plaintext', official=True, ripped=True)), ) create_translation_table('ability_prose', Ability, 'prose', - effect = Column(Unicode(5120), nullable=True, + effect = Column(Unicode(4000), nullable=True, info=dict(description="A detailed description of this ability's effect", format='markdown', string_getter=markdown.MarkdownString)), short_effect = Column(Unicode(512), nullable=True, info=dict(description="A short summary of this ability's effect", format='markdown', string_getter=markdown.MarkdownString)), @@ -347,7 +347,7 @@ class ConquestMoveEffect(TableBase): create_translation_table('conquest_move_effect_prose', ConquestMoveEffect, 'prose', short_effect = Column(Unicode(256), nullable=True, info=dict(description="A short summary of the effect", format='markdown')), - effect = Column(Unicode(5120), nullable=True, + effect = Column(Unicode(1024), nullable=True, info=dict(description="A detailed description of the effect", format='markdown')), ) @@ -920,7 +920,7 @@ create_translation_table('item_names', Item, 'names', create_translation_table('item_prose', Item, 'prose', short_effect = Column(Unicode(256), nullable=True, info=dict(description="A short summary of the effect", format='markdown', string_getter=markdown.MarkdownString)), - effect = Column(Unicode(5120), nullable=True, + effect = Column(Unicode(4000), nullable=True, info=dict(description=u"Detailed description of the item's effect.", format='markdown', string_getter=markdown.MarkdownString)), ) create_translation_table('item_flavor_summaries', Item, 'flavor_summaries', @@ -1219,7 +1219,7 @@ class MoveEffect(TableBase): create_translation_table('move_effect_prose', MoveEffect, 'prose', short_effect = Column(Unicode(256), nullable=True, info=dict(description="A short summary of the effect", format='markdown')), - effect = Column(Unicode(5120), nullable=True, + effect = Column(Unicode(4000), nullable=True, info=dict(description="A detailed description of the effect", format='markdown')), )