-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Scratchcat1
authored
Feb 27, 2018
1 parent
bfaea73
commit 7efef92
Showing
24 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
CREATE TABLE User( | ||
UserID INTEGER PRIMARY KEY AUTO_INCREMENT, | ||
Username TEXT, | ||
Password TEXT, | ||
PublicVisibleFlights INT, | ||
PermissionAdder INT , | ||
ZoneCreatorPermission INT, | ||
ZoneRemoverPermission INT, | ||
ZoneModifierPermission INT) | ||
|
||
CREATE TABLE Drone( | ||
DroneID INTEGER PRIMARY KEY AUTO_INCREMENT, | ||
UserID INT, | ||
DroneName TEXT, | ||
DroneType TEXT, | ||
DroneSpeed INT, | ||
DroneRange INT, | ||
DroneWeight REAL, | ||
FlightsFlown INT, | ||
LastCoords TEXT, | ||
LastBattery REAL, | ||
FOREIGN KEY(UserID) REFERENCES User(UserID)) | ||
|
||
CREATE TABLE Monitor( | ||
MonitorID INTEGER PRIMARY KEY AUTO_INCREMENT, | ||
MonitorName TEXT, | ||
MonitorPassword TEXT) | ||
|
||
|
||
CREATE TABLE MonitorPermission( | ||
MonitorID INT , | ||
UserID INT, | ||
LastAccessed TEXT, | ||
ExpiryDate TEXT, | ||
PRIMARY KEY(MonitorID,UserID), | ||
FOREIGN KEY(MonitorID) REFERENCES Monitor(MonitorID), | ||
FOREIGN KEY(UserID) REFERENCES User(UserID)) | ||
|
||
|
||
CREATE TABLE Flight(FlightID INTEGER PRIMARY KEY AUTO_INCREMENT, | ||
DroneID INT, | ||
StartCoords TEXT, | ||
EndCoords TEXT, | ||
StartTime REAL, | ||
ETA REAL, | ||
EndTime REAL, | ||
Distance REAL, | ||
XOffset REAL , | ||
YOffset REAL , | ||
ZOffset REAL, | ||
Completed INT, | ||
FOREIGN KEY(DroneID) REFERENCES Drone(DroneID)) | ||
|
||
|
||
CREATE TABLE FlightWaypoints( | ||
FlightID INT, | ||
WaypointNumber INT, | ||
Coords TEXT, | ||
ETA REAL, | ||
BlockTime INT , | ||
PRIMARY KEY(FlightID,WaypointNumber), | ||
FOREIGN KEY(FlightID) REFERENCES Flight(FlightID)) | ||
|
||
|
||
|
||
CREATE TABLE NoFlyZone( | ||
ZoneID INTEGER PRIMARY KEY AUTO_INCREMENT, | ||
StartCoord TEXT, | ||
EndCoord TEXT, | ||
Level INT, | ||
OwnerUserID INT, | ||
FOREIGN KEY(OwnerUserID) REFERENCES User(UserID)) | ||
|
||
|
||
CREATE TABLE DroneCredentials(DroneID INTEGER PRIMARY KEY AUTO_INCREMENT , | ||
DronePassword TEXT) | ||
|
||
|
||
CREATE TABLE InputStack(chat_id INT , | ||
stack_pos INT, | ||
value TEXT, | ||
PRIMARY KEY(chat_id,stack_pos)) | ||
|
||
CREATE TABLE Sessions(chat_id INT PRIMARY KEY, | ||
UserID INT) | ||
|
||
|
||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.