-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.sql
148 lines (139 loc) · 2.74 KB
/
init.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
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
CREATE TABLE abilities (
id INTEGER PRIMARY KEY,
name_en VARCHAR,
name_jp VARCHAR,
name_fr VARCHAR,
name_gr VARCHAR,
name_kr VARCHAR
);
CREATE TABLE items (
id INTEGER PRIMARY KEY,
name_en VARCHAR,
name_jp VARCHAR,
name_fr VARCHAR,
name_gr VARCHAR,
name_kr VARCHAR
);
CREATE TABLE types (
id INTEGER PRIMARY KEY,
name_en VARCHAR,
name_jp VARCHAR,
name_fr VARCHAR,
name_gr VARCHAR,
name_kr VARCHAR
);
CREATE TABLE egg_groups (
id INTEGER PRIMARY KEY,
name_en VARCHAR
-- name_jp VARCHAR,
-- name_fr VARCHAR,
-- name_gr VARCHAR
);
CREATE TABLE species (
id INTEGER PRIMARY KEY,
name_en VARCHAR,
name_jp VARCHAR,
name_fr VARCHAR,
name_gr VARCHAR,
name_kr VARCHAR,
hp SMALLINT,
atk SMALLINT,
def SMALLINT,
spa SMALLINT,
spd SMALLINT,
spe SMALLINT,
type1 SMALLINT REFERENCES types,
type2 SMALLINT REFERENCES types,
capture_rate SMALLINT,
stage SMALLINT,
ev_hp SMALLINT,
ev_atk SMALLINT,
ev_def SMALLINT,
ev_spa SMALLINT,
ev_spd SMALLINT,
ev_spe SMALLINT,
item1 SMALLINT REFERENCES items,
item2 SMALLINT REFERENCES items,
item3 SMALLINT REFERENCES items,
gender_rate SMALLINT,
hatch_cycles SMALLINT,
base_happiness SMALLINT,
exp_group VARCHAR,
egg_group1 SMALLINT REFERENCES egg_groups,
egg_group2 SMALLINT REFERENCES egg_groups,
ability1 SMALLINT,
ability2 SMALLINT,
ability_hidden SMALLINT,
escape_rate SMALLINT,
alt_id SMALLINT,
multiplicity SMALLINT,
color VARCHAR,
base_exp INTEGER,
height FLOAT,
weight FLOAT,
local_variant BOOLEAN
);
CREATE TABLE forms (
id INTEGER PRIMARY KEY,
species INTEGER REFERENCES species,
name_en VARCHAR,
name_jp VARCHAR,
name_fr VARCHAR,
name_gr VARCHAR,
name_kr VARCHAR
);
CREATE TABLE evolution (
id INTEGER PRIMARY KEY,
species INTEGER REFERENCES species,
method INTEGER,
auxiliary INTEGER,
target INTEGER REFERENCES species,
target_form SMALLINT,
level SMALLINT
);
CREATE TABLE moves (
id INTEGER PRIMARY KEY,
name_en VARCHAR,
name_jp VARCHAR,
name_fr VARCHAR,
name_gr VARCHAR,
name_kr VARCHAR,
type SMALLINT REFERENCES types,
category VARCHAR,
style SMALLINT,
power SMALLINT,
accuracy SMALLINT,
pp SMALLINT,
priority SMALLINT,
min_hits SMALLINT,
max_hits SMALLINT,
effect INTEGER,
effect_chance SMALLINT,
effect_min_turns SMALLINT,
effect_max_turns SMALLINT,
crit_chance SMALLINT,
flinch_chance SMALLINT,
recoil SMALLINT,
drain SMALLINT,
heal SMALLINT,
damage SMALLINT,
stat1 SMALLINT,
stat2 SMALLINT,
stat3 SMALLINT,
stat1_num SMALLINT,
stat2_num SMALLINT,
stat3_num SMALLINT,
stat1_chance SMALLINT,
stat2_chance SMALLINT,
stat3_chance SMALLINT,
dance BOOLEAN
);
CREATE TABLE levelup (
species INTEGER REFERENCES species,
move INTEGER REFERENCES moves,
level SMALLINT
);
CREATE TABLE egg_moves (
species INTEGER,
move INTEGER REFERENCES moves
);