"""
Ryan Faulkner, 2014

Schema definitions for sqlalchemy
"""

from sqlalchemy import Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base

Base = declarative_base()


class User(Base):

    __tablename__ = 'Users'

    uid = Column(Integer, primary_key=True, autoincrement=True)
    handle = Column(String(32))
    email = Column(String(24))
    firstname = Column(String(24))
    lastname = Column(String(24))
    password = Column(String(64))
    date_join = Column(Integer)

    def __repr__(self):
        return "<User(name='%s', fullname='%s', password='%s')>" % (
            self.name, self.fullname, self.password)

@@ -242,16 +242,20 @@
 '%0A%0A    u
+ser_
 id = Col
@@ -305,16 +305,16 @@
 t=True)%0A
-
     hand
@@ -550,19 +550,21 @@
  %22%3CUser(
-nam
+handl
 e='%25s', 
@@ -568,30 +568,23 @@
 ', f
-ullname
+irst
 ='%25s', 
-password
+last
 ='%25s
@@ -609,19 +609,21 @@
    self.
-nam
+handl
 e, self.
@@ -627,11 +627,12 @@
 lf.f
-ull
+irst
 name
@@ -642,14 +642,304 @@
 elf.
-password)%0A
+lastname)%0A%0A%0Aclass Photo(Base):%0A%0A    __tablename__ = 'Photos'%0A%0A    photo_id = Column(Integer)%0A    article_name = Column(String(32))%0A    votes = Column(Integer)%0A%0A    def __repr__(self):%0A        return %22%3CPhoto(photo='%25s', article='%25s', votes='%25s')%3E%22 %25 (%0A            self.photo, self.article, self.votes)

add - Photos to schema