-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcreate_db.py
More file actions
37 lines (21 loc) · 1.54 KB
/
create_db.py
File metadata and controls
37 lines (21 loc) · 1.54 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
import sqlite3
def create_db():
con = sqlite3.connect(database = r'win.db')
cur = con.cursor()
cur.execute("CREATE TABLE IF NOT EXISTS employee(eid INTEGER PRIMARY KEY AUTOINCREMENT, name text, email text, gender text, contact text, dob text, doj text, pass text, utype text, address text, salary text)")
con.commit()
cur.execute("CREATE TABLE IF NOT EXISTS employee_backup(eid INTEGER PRIMARY KEY AUTOINCREMENT, name text, email text, gender text, contact text, dob text, doj text, pass text, utype text, address text, salary text)")
con.commit()
cur.execute("CREATE TABLE IF NOT EXISTS Client(invoice INTEGER PRIMARY KEY AUTOINCREMENT, name text, contact text, desc text)")
con.commit()
cur.execute("CREATE TABLE IF NOT EXISTS Client_backup(invoice INTEGER PRIMARY KEY AUTOINCREMENT, name text, contact text, desc text)")
con.commit()
cur.execute("CREATE TABLE IF NOT EXISTS category(cid INTEGER PRIMARY KEY AUTOINCREMENT, name text)")
con.commit()
cur.execute("CREATE TABLE IF NOT EXISTS category_backup(cid INTEGER PRIMARY KEY AUTOINCREMENT, name text)")
con.commit()
cur.execute("CREATE TABLE IF NOT EXISTS project(pid INTEGER PRIMARY KEY AUTOINCREMENT, Client text, Category text, name text, stipend text, length text, status text)")
con.commit()
cur.execute("CREATE TABLE IF NOT EXISTS project_backup(pid INTEGER PRIMARY KEY AUTOINCREMENT, Client text, Category text, name text, stipend text, length text, status text)")
con.commit()
create_db()