-
Notifications
You must be signed in to change notification settings - Fork 1
/
db_init.py
35 lines (34 loc) · 866 Bytes
/
db_init.py
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
import mysql.connector as sql
from modules.creds import user_pwd
from cv_schema_init import *
mycon = sql.connect(host='localhost', user='root', passwd=user_pwd)
cur = mycon.cursor()
cur.execute(CREATE_SCHEMA)
cur.execute(Create_users_Table)
cur.execute(Create_recruiter_Table)
cur.execute(Create_client_Table)
cur.execute(Create_Job_Table)
cur.execute(Create_Application_Table)
cur.execute(Create_DELJOB_Table)
cur.execute(Create_DELAPP_Table)
cur.execute(Create_NEWJOB_Table)
cur.execute(Create_NEWAPP_Table)
cur.execute(f'USE mydb')
mycon.commit()
cur.execute(CREATE_Admin)
mycon.commit()
cur.execute(JobTrig1)
mycon.commit()
cur.execute(JobTrig2)
mycon.commit()
cur.execute(AppTrig)
mycon.commit()
cur.execute(totalAPP)
mycon.commit()
cur.execute(totalJOB)
mycon.commit()
cur.execute(totalUSERS)
mycon.commit()
cur.execute(Log_View)
mycon.commit()
mycon.close()