-
Notifications
You must be signed in to change notification settings - Fork 0
/
db_info.txt
64 lines (51 loc) · 1.78 KB
/
db_info.txt
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
CREATE TABLE `admin` (
`email` varchar(30) NOT NULL,
`password` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `appointments` (
`appointment_no` int(30) NOT NULL,
`patient_id` int(30) NOT NULL,
`speciality` varchar(30) NOT NULL,
`medical_condition` text,
`doctors_suggestion` varchar(30) DEFAULT NULL,
`payment_amount` int(199) DEFAULT NULL,
`case_closed` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `clerks` (
`email` varchar(30) NOT NULL,
`password` varchar(30) NOT NULL,
`fullname` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='stores information about clerk';
CREATE TABLE `doctors` (
`email` varchar(30) NOT NULL,
`password` varchar(30) NOT NULL,
`fullname` varchar(30) NOT NULL,
`speciality` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `patient_info` (
`patient_Id` int(20) NOT NULL,
`full_name` varchar(20) NOT NULL,
`DOB` int(10) NOT NULL,
`weight` int(8) NOT NULL,
`phone_no` varchar(30) NOT NULL,
`address` varchar(260) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='patient';
CREATE TABLE `users` (
`email` varchar(30) NOT NULL,
`password` varchar(30) NOT NULL,
`fullname` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `appointments`
ADD PRIMARY KEY (`appointment_no`);
ALTER TABLE `clerks`
ADD UNIQUE KEY `email` (`email`);
ALTER TABLE `doctors`
ADD UNIQUE KEY `email` (`email`);
ALTER TABLE `patient_info`
ADD PRIMARY KEY (`patient_Id`);
ALTER TABLE `users`
ADD UNIQUE KEY `username` (`email`);
ALTER TABLE `appointments`
MODIFY `appointment_no` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=59;
ALTER TABLE `patient_info`
MODIFY `patient_Id` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=85;