homeapi/sample_data.flaskshell

22 lines
989 B
Text
Raw Normal View History

2023-10-29 11:15:51 +01:00
from app.datamodel import *
db.create_all()
db.session.add_all([BpData(device='sampledata', sys=120, dia=70, pulse=80),
BpData(device='sampledata', sys=121, dia=71, pulse=81),
BpData(device='sampledata', sys=123, dia=72, pulse=82),
BpData(device='sampledata', sys=124, dia=73, pulse=83),
BpData(device='sampledata', sys=125, dia=74, pulse=74)
])
db.session.add_all([WeightData(device='sampledata', weight=100),
WeightData(device='sampledata', weight=101),
WeightData(device='sampledata', weight=102),
WeightData(device='sampledata', weight=103),
WeightData(device='sampledata', weight=104.1),
WeightData(device='sampledata', weight=104.2),
WeightData(device='sampledata', weight=104.3),
WeightData(device='sampledata', weight=104.4)
])
db.session.commit()