-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreviewTables.js
127 lines (125 loc) · 3.24 KB
/
reviewTables.js
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
module.exports = [
{
name: 'details',
schema: `(
id varchar(22) NOT NULL,
name varchar(255) DEFAULT NULL,
neighborhood varchar(255) DEFAULT NULL,
address varchar(255) DEFAULT NULL,
city varchar(255) DEFAULT NULL,
state varchar(255) DEFAULT NULL,
postal_code varchar(255) DEFAULT NULL,
latitude float DEFAULT NULL,
longitude float DEFAULT NULL,
stars float DEFAULT NULL,
review_count int(11) DEFAULT NULL,
is_open tinyint(1) DEFAULT NULL,
iterator int(11) NOT NULL AUTO_INCREMENT,
stars_food float DEFAULT NULL,
stars_service float DEFAULT NULL,
stars_ambience float DEFAULT NULL,
stars_value float DEFAULT NULL,
noise varchar(20) DEFAULT NULL,
recommend int(11) DEFAULT NULL,
PRIMARY KEY (iterator)
) ENGINE=InnoDB AUTO_INCREMENT=268 DEFAULT CHARSET=utf8;`,
dataFile: './details.json',
fields: [
'id',
'name',
'neighborhood',
'address',
'city',
'state',
'postal_code',
'latitude',
'longitude',
'stars',
'review_count',
'is_open',
'iterator',
'stars_food',
'stars_service',
'stars_ambience',
'stars_value',
'noise',
'recommend'
]
},
{
name: 'reviews',
schema: `(
id varchar(22) NOT NULL,
business_id varchar(22) NOT NULL,
user_id varchar(22) NOT NULL,
stars int(11) DEFAULT NULL,
date datetime DEFAULT NULL,
text mediumtext,
useful int(11) DEFAULT NULL,
funny int(11) DEFAULT NULL,
cool int(11) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;`,
dataFile: './reviews.json',
fields: [
'id',
'business_id',
'user_id',
'stars',
'date',
'text',
'useful',
'funny',
'cool'
]
},
{
name: 'users',
schema: `(
id varchar(22) NOT NULL,
name varchar(255) DEFAULT NULL,
review_count int(11) DEFAULT NULL,
yelping_since datetime DEFAULT NULL,
useful int(11) DEFAULT NULL,
funny int(11) DEFAULT NULL,
cool int(11) DEFAULT NULL,
fans int(11) DEFAULT NULL,
average_stars float DEFAULT NULL,
compliment_hot int(11) DEFAULT NULL,
compliment_more int(11) DEFAULT NULL,
compliment_profile int(11) DEFAULT NULL,
compliment_cute int(11) DEFAULT NULL,
compliment_list int(11) DEFAULT NULL,
compliment_note int(11) DEFAULT NULL,
compliment_plain int(11) DEFAULT NULL,
compliment_cool int(11) DEFAULT NULL,
compliment_funny int(11) DEFAULT NULL,
compliment_writer int(11) DEFAULT NULL,
compliment_photos int(11) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;`,
dataFile: './users.json',
fields: [
'id',
'name',
'review_count',
'yelping_since',
'useful',
'funny',
'cool',
'fans',
'average_stars',
'compliment_hot',
'compliment_more',
'compliment_profile',
'compliment_cute',
'compliment_list',
'compliment_note',
'compliment_plain',
'compliment_cool',
'compliment_funny',
'compliment_writer',
'compliment_photos',
]
}
];