from sqlalchemy import (
    Column,
    Index,
    Integer,
    Text,
    String,
    DateTime
)

from webserver.db import Base


class VersionInfo(Base):
    __tablename__ = 'ver_info'
    id = Column(Integer, primary_key=True)
    VersionNo = Column(String(30), nullable=False, unique=True)
    Description = Column(Text)
    CommitTime = Column(DateTime, nullable=False)
    Package = Column(String(255), nullable=False)


Index('version_no', VersionInfo.VersionNo, unique=True, mysql_length=30)
