forked from openmundi/world.db
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathworld.sql
39 lines (34 loc) · 1.09 KB
/
world.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
CREATE TABLE "cities" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
"title" varchar(255) NOT NULL,
"key" varchar(255) NOT NULL,
"synonyms" varchar(255),
"country_id" integer NOT NULL,
"region_id" integer,
"pop" integer,
"area" integer,
"capital" boolean DEFAULT 'f' NOT NULL,
"created_at" datetime NOT NULL,
"updated_at" datetime NOT NULL
);
CREATE TABLE "countries" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
"title" varchar(255) NOT NULL,
"key" varchar(255) NOT NULL,
"tag" varchar(255) NOT NULL,
"synonyms" varchar(255),
"pop" integer,
"area" integer,
"created_at" datetime NOT NULL,
"updated_at" datetime NOT NULL
);
CREATE TABLE "regions" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
"title" varchar(255) NOT NULL,
"key" varchar(255) NOT NULL,
"synonyms" varchar(255),
"country_id" integer NOT NULL,
"pop" integer, "area" integer,
"created_at" datetime NOT NULL,
"updated_at" datetime NOT NULL
);