-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtable_create.sql
18 lines (9 loc) · 1.16 KB
/
table_create.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
CREATE TABLE USER (id integer primary key autoincrement, name text, phone_no text);
CREATE TABLE doctor (id integer primary key autoincrement, name text, phone_no text, email text unique, registration_no integer not null, medical_council text not null, latitude decimal(10,8), longitude decimal(11,8), password text);
create table conference(conf_id integer primary key autoincrement, zoom_id text not null, start_timestamp timestamp, end_timestamp timestamp, title text, host_doctor_id integer, foreign key (host_doctor_id) references doctor(id));
create table blogpost(blog_id integer primary key autoincrement, title text not null, author_id not null, published_at timestamp, body text not null);
-- dummy data insertion
insert into user values(NULL, "Kaustubh Damania", "1234567890");
insert into user values(NULL, "Gaurav Bhagwanani", "2345678901");
insert into doctor values(NULL, "Deep Dama", "3456789012", "[email protected]" ,"1234567890", "Maharashtra", 19.116884428986182, 72.93164483021962, "abcdef");
insert into doctor values(NULL, "KD", "3456789012", "[email protected]" ,"1234567890", "Maharashtra", 19.10123794041552, 72.91207824204169, "abcdef");