added email verified column and some notes

This commit is contained in:
David Lenwell 2013-10-04 03:04:42 -07:00
parent 2d7793510e
commit a6bb256ed0
2 changed files with 35 additions and 2 deletions

View File

@ -0,0 +1,26 @@
"""added email_verfied column
Revision ID: 2bad1445cf30
Revises: 16345354480e
Create Date: 2013-09-20 12:01:59.881027
"""
# revision identifiers, used by Alembic.
revision = '2bad1445cf30'
down_revision = '16345354480e'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.add_column('user', sa.Column('email_verified', sa.Boolean(create_constraint=False), nullable=True))
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_column('user', 'email_verified')
### end Alembic commands ###

View File

@ -48,6 +48,7 @@ class User(Base):
lazy='dynamic'))
name = Column(String(60))
email = Column(String(200), unique=True)
email_verified = Column(Boolean)
openid = Column(String(200), unique=True)
authorized = Column(Boolean, default=False)
@ -60,7 +61,11 @@ class User(Base):
return self.name
"""
Note: The vendor list will be pre-populated from the sponsoring company database.
TODO: better define the vendor object and its relationship with user
it needs the ability to facilitate a login.
"""
class Vendor(Base):
__tablename__ = 'vendor'
id = Column(Integer, primary_key=True)
@ -84,7 +89,7 @@ class Cloud(Base):
admin_endpoint = Column(String(120), unique=False)
admin_user = Column(String(80), unique=False)
admin_key = Column(String(80), unique=False)
def __init__(self,
endpoint,
test_user,
@ -111,6 +116,7 @@ class Test(Base):
config = Column(String(4096))
class TestStatus(Base):
__tablename__ = 'test_status'
id = Column(Integer, primary_key=True)
@ -122,6 +128,7 @@ class TestStatus(Base):
timestamp = Column(DateTime, default=datetime.now)
class TestResults(Base):
__tablename__ = 'test_results'
id = Column(Integer, primary_key=True)