-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapps.sql
51 lines (47 loc) · 1.43 KB
/
apps.sql
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
/*
Export of internaldatabase structure used by OUAppStoreRankings
*/
PRAGMA foreign_keys = false;
-- ----------------------------
-- Table structure for apps
-- ----------------------------
DROP TABLE IF EXISTS "apps";
CREATE TABLE "apps" (
"date" text(10,0) NOT NULL,
"app_id" INTEGER(11,0) NOT NULL,
"category" TEXT,
"device" TEXT,
"rank" INTEGER(11,0),
"name" TEXT(500,0) NOT NULL,
"version" TEXT(20,0),
"rating" real,
"rating_for_current_version" real,
"rating_count" INTEGER,
"rating_count_for_current_version" INTEGER,
"canonical_country" TEXT(2,0),
"categories" TEXT(500,0),
"url" TEXT(2038,0),
"support_url" TEXT,
"website_url" TEXT,
"privacy_policy_url" TEXT,
"eula_url" TEXT,
"release_date" TEXT,
"updated_date" TEXT,
"humanized_worldwide_last_month_downloads" INTEGER(11,0),
"humanized_worldwide_last_month_revenue" INTEGER(11,0),
"price" real,
"in_app_purchases" integer,
"shows_ads" integer,
"buys_ads" integer,
"apple_watch_enabled" integer,
"imessage_enabled" integer,
"icon_url" text,
CONSTRAINT "Unique combination per ranking" UNIQUE ("date" ASC, "app_id" ASC, "category" ASC, "device" ASC)
);
-- ----------------------------
-- Indexes structure for table apps
-- ----------------------------
CREATE INDEX "Date index" ON apps ("date" ASC);
CREATE INDEX "Category index" ON apps ("categorie" ASC);
CREATE INDEX "Device Index" ON apps ("device" ASC);
PRAGMA foreign_keys = true;