image-host-server/db/model/image_table.py

19 lines
373 B
Python
Raw Normal View History

2022-03-11 18:09:49 +01:00
import sqlalchemy as db
from db import connector
engine = connector.create_engine
metadata_obj = db.MetaData()
profile = db.Table(
'images',
metadata_obj,
db.Column('id', db.Integer, primary_key=True),
db.Column('location', db.String),
db.Column('copyright', db.String),
db.Column('date_added', db.TIMESTAMP),
)
metadata_obj.create_all(engine)