added update db script
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
from lapp import create_app
|
||||
import sqlalchemy as sa
|
||||
from models import db, Item
|
||||
|
||||
app = create_app()
|
||||
app.app_context().push()
|
||||
query = sa.select(Item) #.where(Item.quantity == 0)
|
||||
items = db.session.scalars(query).all()
|
||||
|
||||
# items=Item.query.filter_by(quantity='').all()
|
||||
for i in items:
|
||||
print(f"{i.label} {i.quantity} {i.unit}")
|
||||
Reference in New Issue
Block a user