Permalink
Browse files

Specify width of string columns for MySQL.

  • Loading branch information...
spladug committed Mar 26, 2013
1 parent 0f6a2e8 commit 950b7c7b52931a5d61f683ec85edd74501c94195
Showing with 9 additions and 9 deletions.
  1. +9 −9 postcards/models.py
View
@@ -14,14 +14,14 @@ class Postcard(db.Model):
date = db.Column(db.Date)
latitude = db.Column(db.Numeric)
longitude = db.Column(db.Numeric)
- front = db.Column(db.String)
- back = db.Column(db.String)
- front_thumb = db.Column(db.String)
- back_thumb = db.Column(db.String)
+ front = db.Column(db.String(1000))
+ back = db.Column(db.String(1000))
+ front_thumb = db.Column(db.String(1000))
+ back_thumb = db.Column(db.String(1000))
deleted = db.Column(db.Boolean)
published = db.Column(db.Boolean)
- submission = db.Column(db.String)
- json_image_info = db.Column(db.String)
+ submission = db.Column(db.String(1000))
+ json_image_info = db.Column(db.String(1000))
tags = db.relationship("Tag")
@staticmethod
@@ -39,11 +39,11 @@ class Tag(db.Model):
__tablename__ = 'tags'
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
postcard_id = db.Column(db.Integer, db.ForeignKey('postcards.id'))
- tag = db.Column(db.String)
+ tag = db.Column(db.String(1000))
class QueuedJob(db.Model):
__tablename__ = 'queue'
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
- handler = db.Column(db.String, nullable=False)
- data = db.Column(db.String, nullable=False)
+ handler = db.Column(db.String(100), nullable=False)
+ data = db.Column(db.String(1000), nullable=False)

0 comments on commit 950b7c7

Please sign in to comment.