-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdb.sql
More file actions
101 lines (80 loc) · 2.65 KB
/
db.sql
File metadata and controls
101 lines (80 loc) · 2.65 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
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
--
-- Database: `androidreviews`
--
-- --------------------------------------------------------
--
-- Table structure for table `apps`
--
CREATE TABLE IF NOT EXISTS `apps` (
`id` varchar(42) NOT NULL,
`packageName` varchar(255) NOT NULL,
`title` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`icon` varchar(255) NOT NULL,
`creator` varchar(255) NOT NULL,
`rating` float NOT NULL,
`ratingsCount` int(11) NOT NULL,
`description` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`contactEmail` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `apps_tracker`
--
CREATE TABLE IF NOT EXISTS `apps_tracker` (
`app_id` varchar(42) NOT NULL,
`user` varchar(254) NOT NULL,
PRIMARY KEY (`app_id`,`user`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `reviews`
--
CREATE TABLE IF NOT EXISTS `reviews` (
`id` varchar(255) NOT NULL COMMENT 'appId + authorId + CreationTime',
`app_id` varchar(42) NOT NULL,
`creationTime` bigint(20) NOT NULL,
`author` varchar(32) NOT NULL,
`text` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`rating` smallint(6) NOT NULL,
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `reviews_tracker`
--
CREATE TABLE IF NOT EXISTS `reviews_tracker` (
`review_id` varchar(255) NOT NULL,
`user` varchar(42) NOT NULL,
`read` tinyint(1) NOT NULL,
PRIMARY KEY (`review_id`,`user`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
UNIQUE KEY `email` (`email`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `apps_countries`
--
CREATE TABLE IF NOT EXISTS `apps_countries` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`app_id` varchar(42) NOT NULL,
`country` varchar(16) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `app_id` (`app_id`,`country`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
-- --------------------------------------------------------
--
-- Table structure for table `forgot_password`
--
CREATE TABLE IF NOT EXISTS `forgot_password` (
`email` varchar(255) NOT NULL,
`code` varchar(255) NOT NULL,
PRIMARY KEY (`email`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;