-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvisualizeData.py
More file actions
95 lines (67 loc) · 2.3 KB
/
Copy pathvisualizeData.py
File metadata and controls
95 lines (67 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
from requests import delete
from app import db
from app.input_sets.models import Event, Select, Business, User, ProgressMeetingCompletionInformation
#from app.routes import delete_intro_video, delete_profile_picture, delete_resume, delete_user_attributes, logData
"""for b in Business.query.all():
print(b)
"""
#print(User.query.filter_by(last_name="lisa").all())
#for u in User.query.all():
# print(u)
"""
for s in Select.query.all():
print(s)
for p in ProgressMeetingCompletionInformation.query.all():
print(p)
"""
"""
user = User.query.filter_by(first_name = "Kara").first()
#user = User.query.filter_by(first_name = "Linda").first()
delete_profile_picture(user)
delete_intro_video(user)
delete_user_attributes(user.id)
delete_resume(user)
selectEntry = None
if user.is_student: #is mentee
selectEntry = Select.query.filter_by(mentee_id=user.id).all()
for s in selectEntry:
ProgressMeetingCompletionInformation.query.filter(
ProgressMeetingCompletionInformation.select_id == s.id
).delete()
Select.query.filter_by(mentee_id=user.id).delete()
else:
selectEntry = Select.query.filter_by(mentor_id=user.id).all()
for s in selectEntry:
ProgressMeetingCompletionInformation.query.filter(
ProgressMeetingCompletionInformation.select_id == s.id
).delete()
Select.query.filter_by(mentor_id=user.id).delete()
Business.query.filter_by(id=user.business_id).first().dec_number_employees_currently_registered()
#decrease business number registered by 1 because this user has been deleted
User.query.filter_by(id=user.id).delete()
db.session.commit()
"""
#print(User.query.filter_by(first_name = "Kara").all())
"""
Event.query.filter_by(action=16).delete()
db.session.commit()
print(Event.query.filter_by(action=18).all())
print(str(len(Event.query.all())))
"""
from app.routes import delete_intro_video, delete_profile_picture, delete_resume, delete_user_attributes, logData
"""
for b in Business.query.all():
print(b)
for u in User.query.all():
<<<<<<<<< Temporary merge branch 1
print(u.email)
print(u.first_name)
=========
print(u)
>>>>>>>>> Temporary merge branch 2
"""
Event.query.filter_by(action=16).delete()
db.session.commit()
print(Event.query.filter_by(action=18).all())
print(str(len(Event.query.all())))
"""