from application import db, app
from application.dashboard.models import AllowedPlate, LoggedItem, datetime
from application.auth.models import User

with app.app_context():
    AllowedPlate.query.delete()
    db.session.add(AllowedPlate("MUN389"))
    db.session.commit()

with app.app_context():
    LoggedItem.query.delete()
    db.session.add(LoggedItem("MUN389", datetime.now(), True))
    db.session.add(LoggedItem("MUN389", datetime.now(), False))
    db.session.commit()

with app.app_context():
    User.query.delete()
    db.session.add(User(username="admin", password="admin"))
    db.session.commit()
