You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
('Welcome to Flare!', 'Thank You for installing Flare, the Crew Center made for Infinite Flight and integrated with VANet. Before you get your pilots set up with Flare, here are some things to keep in mind.\r\n\r\nFirst of all, if it\'s you\'re not a fan of the orange (kudos if you get the reference), you can change the color theme in site settings.\r\nNext, it\'s worth keeping in mind you can add transfer hours and transfer flights to your pilots. This means you can bring over hours and the number of PIREPs a pilot has filed from another Crew Center. This can be done in the admin panel.\r\nFinally, if you\'re confused with Flare at all check out the tutorials available at https://vanet.app/tutorials.\r\n\r\nEnjoy!', 'Flare Installer');
75
+
CREATETABLE `notifications` (
76
+
`id`int(11) NOT NULL AUTO_INCREMENT,
77
+
`pilotid`int(11) NOT NULL,
78
+
`icon`varchar(20) NOT NULL,
79
+
`subject`varchar(20) NOT NULL,
80
+
`content`varchar(60) NOT NULL,
81
+
`datetime` datetime NOT NULL DEFAULT current_timestamp(),
82
+
PRIMARY KEY (`id`)
83
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
84
+
85
+
CREATETABLE `options` (
86
+
`name`varchar(120) NOT NULL,
87
+
`value`textNOT NULL,
88
+
PRIMARY KEY (`name`)
89
+
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
90
+
91
+
CREATETABLE `permissions` (
92
+
`id`int(11) NOT NULL AUTO_INCREMENT,
93
+
`name`varchar(120) NOT NULL,
94
+
`userid`int(11) NOT NULL,
95
+
PRIMARY KEY (`id`)
96
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
25
97
26
-
CREATETABLEIF NOT EXISTS `pilots` (
98
+
CREATETABLE `pilots` (
27
99
`id`int(11) NOT NULL AUTO_INCREMENT,
28
100
`callsign`varchar(120) NOT NULL,
29
101
`name`textNOT NULL,
30
102
`ifc`textNOT NULL,
31
103
`ifuserid`varchar(36) DEFAULT NULL,
32
104
`email`textNOT NULL,
33
105
`password`textNOT NULL,
34
-
`transhours`int(11) NOT NULL DEFAULT '0',
35
-
`transflights`int(11) NOT NULL DEFAULT '0',
106
+
`transhours`int(11) NOT NULL DEFAULT 0,
107
+
`transflights`int(11) NOT NULL DEFAULT 0,
36
108
`violand` double DEFAULT NULL,
37
109
`grade`int(11) DEFAULT NULL,
38
110
`notes`varchar(1200) NOT NULL DEFAULT '',
39
-
`status`int(3) NOT NULL DEFAULT '0',
40
-
`joined` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
111
+
`status`int(11) NOT NULL DEFAULT 0,
112
+
`joined` datetime NOT NULL DEFAULT current_timestamp(),
113
+
`vanet_id`text DEFAULT NULL,
114
+
`vanet_accesstoken`text DEFAULT NULL,
115
+
`vanet_refreshtoken`text DEFAULT NULL,
116
+
`vanet_expiry` datetime DEFAULT NULL,
117
+
`vanet_memberid`text DEFAULT NULL,
41
118
PRIMARY KEY (`id`)
42
-
);
119
+
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
43
120
44
-
CREATETABLEIF NOT EXISTS `permissions` (
45
-
`id`intNOT NULL AUTO_INCREMENT,
46
-
`name`textNOT NULL,
47
-
`userid`intNOT NULL,
121
+
CREATETABLE `pilot_hubs` (
122
+
`id`int(11) NOT NULL AUTO_INCREMENT,
123
+
`pilotId`int(11) NOT NULL,
124
+
`hub`varchar(4) NOT NULL,
125
+
`isCaptain`tinyint(1) NOT NULL DEFAULT 0,
48
126
PRIMARY KEY (`id`)
49
-
);
127
+
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
50
128
51
-
CREATETABLEIF NOT EXISTS `pireps` (
129
+
CREATETABLE `pireps` (
52
130
`id`int(11) NOT NULL AUTO_INCREMENT,
53
-
`flightnum`TEXTNOT NULL,
131
+
`flightnum`text DEFAULTNULL,
54
132
`departure`varchar(4) NOT NULL,
55
133
`arrival`varchar(4) NOT NULL,
56
134
`flighttime`int(11) NOT NULL,
@@ -59,106 +137,52 @@ CREATE TABLE IF NOT EXISTS `pireps` (
59
137
`aircraftid`int(11) NOT NULL,
60
138
`fuelused`int(11) NOT NULL,
61
139
`multi`textNOT NULL,
62
-
`status`int(11) DEFAULT '0',
140
+
`status`int(11) DEFAULT 0,
63
141
PRIMARY KEY (`id`)
64
-
);
142
+
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
65
143
66
-
CREATETABLEIF NOT EXISTS `ranks` (
144
+
CREATETABLE `pireps_comments` (
145
+
`id`int(11) NOT NULL AUTO_INCREMENT,
146
+
`pirepid`int(11) NOT NULL,
147
+
`userid`int(11) NOT NULL,
148
+
`content`textNOT NULL,
149
+
`dateposted` datetime NOT NULL DEFAULT current_timestamp(),
150
+
PRIMARY KEY (`id`)
151
+
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
152
+
153
+
CREATETABLE `ranks` (
67
154
`id`int(11) NOT NULL AUTO_INCREMENT,
68
155
`name`varchar(120) NOT NULL,
69
156
`timereq`int(11) NOT NULL,
70
157
PRIMARY KEY (`id`)
71
-
);
158
+
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
72
159
73
-
INSERT INTO`ranks` (`name`, `timereq`) VALUES
74
-
('Cadet', 0);
75
-
76
-
INSERT INTO`ranks` (`name`, `timereq`) VALUES
77
-
('Second Officer', 25);
78
-
79
-
CREATETABLEIF NOT EXISTS `routes` (
160
+
CREATETABLE `routes` (
80
161
`id`int(11) NOT NULL AUTO_INCREMENT,
81
-
`fltnum`TEXTNOT NULL,
162
+
`fltnum`text DEFAULTNULL,
82
163
`dep`varchar(4) NOT NULL,
83
164
`arr`varchar(4) NOT NULL,
84
165
`duration`int(11) NOT NULL,
85
-
`notes`textNULL DEFAULT NULL,
86
-
PRIMARY KEY (`id`)
87
-
);
88
-
89
-
CREATETABLEIF NOT EXISTS `route_aircraft` (
90
-
`id`INTNOT NULL AUTO_INCREMENT,
91
-
`routeid`INTNOT NULL,
92
-
`aircraftid`INTNOT NULL,
93
-
PRIMARY KEY (`id`)
94
-
);
95
-
96
-
CREATETABLEIF NOT EXISTS `notifications` (
97
-
`id`INTNOT NULL AUTO_INCREMENT,
98
-
`pilotid`INTNOT NULL,
99
-
`icon`VARCHAR(20) NOT NULL,
100
-
`subject`VARCHAR(20) NOT NULL,
101
-
`content`VARCHAR(60) NOT NULL,
102
-
`datetime` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
166
+
`notes`text DEFAULT NULL,
103
167
PRIMARY KEY (`id`)
104
-
);
168
+
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
105
169
106
-
CREATETABLEIF NOT EXISTS `multipliers` (
170
+
CREATETABLE`route_aircraft` (
107
171
`id`int(11) NOT NULL AUTO_INCREMENT,
108
-
`code`int(11) NOT NULL,
109
-
`multiplier` double NOT NULL,
110
-
`name`varchar(120) NOT NULL,
111
-
PRIMARY KEY (`id`),
112
-
UNIQUE KEY `code` (`code`)
113
-
);
172
+
`routeid`int(11) NOT NULL,
173
+
`aircraftid`int(11) NOT NULL,
174
+
PRIMARY KEY (`id`)
175
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
114
176
115
-
CREATETABLEIF NOT EXISTS `options` (
116
-
`name`varchar(120) NOT NULL,
117
-
`value`textNOT NULL,
118
-
PRIMARY KEY (`name`)
119
-
);
120
-
121
-
CREATETABLEIF NOT EXISTS `notifications` (
122
-
`id`INTNOT NULL AUTO_INCREMENT,
123
-
`pilotid`INTNOT NULL,
124
-
`icon`VARCHAR(20) NOT NULL,
125
-
`subject`VARCHAR(20) NOT NULL,
126
-
`content`VARCHAR(60) NOT NULL,
127
-
`datetime` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
('Welcome to Flare!', 'Thank You for installing Flare, the Crew Center made for Infinite Flight and integrated with VANet. Before you get your pilots set up with Flare, here are some things to keep in mind.\r\n\r\nFirst of all, if it\'s you\'re not a fan of the orange (kudos if you get the reference), you can change the color theme in site settings.\r\nNext, it\'s worth keeping in mind you can add transfer hours and transfer flights to your pilots. This means you can bring over hours and the number of PIREPs a pilot has filed from another Crew Center. This can be done in the admin panel.\r\nFinally, if you\'re confused with Flare at all check out the tutorials available at https://vanet.app/tutorials.\r\n\r\nEnjoy!', 'Flare Installer');
145
180
146
-
CREATETABLEIF NOT EXISTS `awards_granted` (
147
-
`id`INTNOT NULL AUTO_INCREMENT,
148
-
`awardid`INTNOT NULL,
149
-
`pilotid`INTNOT NULL,
150
-
`dateawarded`DATENOT NULL,
151
-
PRIMARY KEY (`id`)
152
-
);
181
+
INSERT INTO`ranks` (`name`, `timereq`) VALUES
182
+
('Cadet', 0);
153
183
154
-
CREATETABLEIF NOT EXISTS `pireps_comments` (
155
-
`id`INTNOT NULL AUTO_INCREMENT,
156
-
`pirepid`INTNOT NULL,
157
-
`userid`INTNOT NULL,
158
-
`content`TEXTNOT NULL,
159
-
`dateposted` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
0 commit comments