From da87925da621f45ed72d8e3aa7b79d3d8eb9a0ca Mon Sep 17 00:00:00 2001 From: emkael Date: Fri, 17 Oct 2014 16:56:44 +0200 Subject: * DB generation from model metadata --- f1elo/model.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'f1elo/model.py') diff --git a/f1elo/model.py b/f1elo/model.py index 7b340fa..b60ff85 100644 --- a/f1elo/model.py +++ b/f1elo/model.py @@ -9,8 +9,8 @@ class Driver(Base): __tablename__ = 'drivers' id = Column(Integer, primary_key=True) - driver = Column(String) - country = Column(String) + driver = Column(String(1024)) + country = Column(String(255)) rankings = relationship('Ranking', order_by='Ranking.rank_date', back_populates='driver') @@ -34,8 +34,8 @@ class Entry(Base): __tablename__ = 'entries' id = Column(Integer, primary_key=True) - result = Column(String) - car_no = Column(String) + result = Column(String(255)) + car_no = Column(String(255)) result_group = Column(Integer) _race = Column(Integer, ForeignKey('races.id')) @@ -49,7 +49,7 @@ class Race(Base): __tablename__ = 'races' id = Column(Integer, primary_key=True) - race = Column(String) + race = Column(String(1024)) date = Column(Date) ranked = Column(Boolean) @@ -62,10 +62,10 @@ class Race(Base): class RaceType(Base): __tablename__ = 'race_types' - + id = Column(Integer, primary_key=True) - code = Column(String) - description = Column(String) + code = Column(String(255)) + description = Column(String(1024)) races = relationship('Race', back_populates='type') -- cgit v1.2.3