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
|
table! {
activation_keys (code) {
code -> Varchar,
userid -> Int4,
}
}
table! {
allegiances (gameid, userid) {
gameid -> Int4,
userid -> Int4,
allegiance -> Nullable<Varchar>,
ordernum -> Int2,
playing -> Nullable<Int2>,
}
}
table! {
borders (nationid, borderid) {
nationid -> Int4,
borderid -> Int4,
}
}
table! {
games (gameid) {
gameid -> Int4,
title -> Varchar,
gametypeid -> Int4,
players -> Int2,
waitfor -> Int4,
lastturn -> Nullable<Date>,
gamestate -> Nullable<Int4>,
}
}
table! {
games_nationstates (gameid, nationid) {
gameid -> Int4,
nationid -> Int4,
userid -> Int4,
}
}
table! {
nationstates (nationid) {
nationid -> Int4,
regionid -> Int4,
name -> Varchar,
abbreviation -> Nullable<Bpchar>,
}
}
table! {
regions (regionid) {
regionid -> Int4,
name -> Varchar,
abbreviation -> Nullable<Bpchar>,
bonus -> Int4,
}
}
table! {
users (userid) {
userid -> Int4,
email -> Varchar,
firstname -> Varchar,
lastname -> Varchar,
password -> Varchar,
joindate -> Nullable<Date>,
activated -> Nullable<Bit>,
}
}
joinable!(activation_keys -> users (userid));
joinable!(allegiances -> games (gameid));
joinable!(allegiances -> users (userid));
joinable!(games_nationstates -> games (gameid));
joinable!(games_nationstates -> nationstates (nationid));
joinable!(games_nationstates -> users (userid));
joinable!(nationstates -> regions (regionid));
allow_tables_to_appear_in_same_query!(
activation_keys,
allegiances,
borders,
games,
games_nationstates,
nationstates,
regions,
users,
);
|