· 9 years ago · Jan 12, 2017, 05:00 AM
1use `facebot`;
2
3create table if not exists `fbids` (
4 `fbid` bigint(20),
5 `sent` text,
6 `crawled` varchar(20),
7 PRIMARY KEY (`fbid`)
8) ENGINE=InnoDB;
9
10create table if not exists `users` (
11 `fbid` bigint(20),
12 `profile_url` text,
13 `name` text,
14 `contact_email` text,
15 `interests` text,
16 `birthday` varchar(20),
17 `hometown_location` text,
18 `relationship_status` text,
19 `significant_other_id` text,
20 `education` text,
21 `work` text,
22 `sex` text,
23 `devices` varchar(20)
24 PRIMARY KEY (`fbid`)
25) ENGINE=InnoDB;
26
27create table if not exists `family` (
28 `fbid` BIGINT(20),
29 `reletive_id` char(32),
30 `name` varchar(80),
31 `relationship` varchar(100),
32 PRIMARY KEY (`relative_id`)
33) ENGINE=InnoDB;
34
35create table if not exists `checkins` (
36 `checkin_id` char(32),
37 `fbid` bigint(20),
38 `message` text,
39 `coords` text,
40 `timestamp` timestamp,
41 PRIMARY KEY (`checkin_id`),
42 FOREIGN KEY (`fbid`) REFERENCES `fbids`(`fbid`)
43) ENGINE=InnoDB;