mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-03-09 15:40:09 +00:00
add basic db setup, add vm expirations and cron to handle them, and add fields for sweetalert button classes
This commit is contained in:
parent
6debe3d9fd
commit
9beecf12fa
7 changed files with 186 additions and 8 deletions
17
db_init.py
Normal file
17
db_init.py
Normal 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue