add basic db setup, add vm expirations and cron to handle them, and add fields for sweetalert button classes

This commit is contained in:
Jordan Rodgers 2017-12-08 09:51:45 -05:00
parent 6debe3d9fd
commit 9beecf12fa
7 changed files with 186 additions and 8 deletions

17
db_init.py Normal file
View file

@ -0,0 +1,17 @@
from sqlalchemy import Column, ForeignKey, Integer, String, Date
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship
from sqlalchemy import create_engine
Base = declarative_base()
class VM_Expiration(Base):
__tablename__ = 'vm_expiration'
id = Column(Integer, primary_key=True)
expire_date = Column(Date, nullable=False)
engine = create_engine('sqlite:///proxstar.db')
Base.metadata.create_all(engine)