mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-05 06:50:04 +00:00
Remove excessive indentation in tables.sql
This commit is contained in:
parent
8bbf40ac95
commit
e02ef55844
284
sql/tables.sql
284
sql/tables.sql
@ -1,154 +1,154 @@
|
|||||||
CREATE TABLE IF NOT EXISTS Accounts (
|
CREATE TABLE IF NOT EXISTS Accounts (
|
||||||
AccountID INTEGER NOT NULL,
|
AccountID INTEGER NOT NULL,
|
||||||
Login TEXT NOT NULL UNIQUE,
|
Login TEXT NOT NULL UNIQUE,
|
||||||
Password TEXT NOT NULL,
|
Password TEXT NOT NULL,
|
||||||
Selected INTEGER DEFAULT 1 NOT NULL,
|
Selected INTEGER DEFAULT 1 NOT NULL,
|
||||||
AccountLevel INTEGER NOT NULL,
|
AccountLevel INTEGER NOT NULL,
|
||||||
Created INTEGER DEFAULT (strftime('%s', 'now')) NOT NULL,
|
Created INTEGER DEFAULT (strftime('%s', 'now')) NOT NULL,
|
||||||
LastLogin INTEGER DEFAULT (strftime('%s', 'now')) NOT NULL,
|
LastLogin INTEGER DEFAULT (strftime('%s', 'now')) NOT NULL,
|
||||||
BannedUntil INTEGER DEFAULT 0 NOT NULL,
|
BannedUntil INTEGER DEFAULT 0 NOT NULL,
|
||||||
BannedSince INTEGER DEFAULT 0 NOT NULL,
|
BannedSince INTEGER DEFAULT 0 NOT NULL,
|
||||||
BanReason TEXT DEFAULT '' NOT NULL,
|
BanReason TEXT DEFAULT '' NOT NULL,
|
||||||
PRIMARY KEY(AccountID AUTOINCREMENT)
|
PRIMARY KEY(AccountID AUTOINCREMENT)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS Players (
|
CREATE TABLE IF NOT EXISTS Players (
|
||||||
PlayerID INTEGER NOT NULL,
|
PlayerID INTEGER NOT NULL,
|
||||||
AccountID INTEGER NOT NULL,
|
AccountID INTEGER NOT NULL,
|
||||||
FirstName TEXT NOT NULL COLLATE NOCASE,
|
FirstName TEXT NOT NULL COLLATE NOCASE,
|
||||||
LastName TEXT NOT NULL COLLATE NOCASE,
|
LastName TEXT NOT NULL COLLATE NOCASE,
|
||||||
NameCheck INTEGER NOT NULL,
|
NameCheck INTEGER NOT NULL,
|
||||||
Slot INTEGER NOT NULL,
|
Slot INTEGER NOT NULL,
|
||||||
Created INTEGER DEFAULT (strftime('%s', 'now')) NOT NULL,
|
Created INTEGER DEFAULT (strftime('%s', 'now')) NOT NULL,
|
||||||
LastLogin INTEGER DEFAULT (strftime('%s', 'now')) NOT NULL,
|
LastLogin INTEGER DEFAULT (strftime('%s', 'now')) NOT NULL,
|
||||||
Level INTEGER DEFAULT 1 NOT NULL,
|
Level INTEGER DEFAULT 1 NOT NULL,
|
||||||
Nano1 INTEGER DEFAULT 0 NOT NULL,
|
Nano1 INTEGER DEFAULT 0 NOT NULL,
|
||||||
Nano2 INTEGER DEFAULT 0 NOT NULL,
|
Nano2 INTEGER DEFAULT 0 NOT NULL,
|
||||||
Nano3 INTEGER DEFAULT 0 NOT NULL,
|
Nano3 INTEGER DEFAULT 0 NOT NULL,
|
||||||
AppearanceFlag INTEGER DEFAULT 0 NOT NULL,
|
AppearanceFlag INTEGER DEFAULT 0 NOT NULL,
|
||||||
TutorialFlag INTEGER DEFAULT 0 NOT NULL,
|
TutorialFlag INTEGER DEFAULT 0 NOT NULL,
|
||||||
PayZoneFlag INTEGER DEFAULT 0 NOT NULL,
|
PayZoneFlag INTEGER DEFAULT 0 NOT NULL,
|
||||||
XCoordinates INTEGER NOT NULL,
|
XCoordinates INTEGER NOT NULL,
|
||||||
YCoordinates INTEGER NOT NULL,
|
YCoordinates INTEGER NOT NULL,
|
||||||
ZCoordinates INTEGER NOT NULL,
|
ZCoordinates INTEGER NOT NULL,
|
||||||
Angle INTEGER NOT NULL,
|
Angle INTEGER NOT NULL,
|
||||||
HP INTEGER NOT NULL,
|
HP INTEGER NOT NULL,
|
||||||
FusionMatter INTEGER DEFAULT 0 NOT NULL,
|
FusionMatter INTEGER DEFAULT 0 NOT NULL,
|
||||||
Taros INTEGER DEFAULT 0 NOT NULL,
|
Taros INTEGER DEFAULT 0 NOT NULL,
|
||||||
BatteryW INTEGER DEFAULT 0 NOT NULL,
|
BatteryW INTEGER DEFAULT 0 NOT NULL,
|
||||||
BatteryN INTEGER DEFAULT 0 NOT NULL,
|
BatteryN INTEGER DEFAULT 0 NOT NULL,
|
||||||
Mentor INTEGER DEFAULT 5 NOT NULL,
|
Mentor INTEGER DEFAULT 5 NOT NULL,
|
||||||
CurrentMissionID INTEGER DEFAULT 0 NOT NULL,
|
CurrentMissionID INTEGER DEFAULT 0 NOT NULL,
|
||||||
WarpLocationFlag INTEGER DEFAULT 0 NOT NULL,
|
WarpLocationFlag INTEGER DEFAULT 0 NOT NULL,
|
||||||
SkywayLocationFlag BLOB NOT NULL,
|
SkywayLocationFlag BLOB NOT NULL,
|
||||||
FirstUseFlag BLOB NOT NULL,
|
FirstUseFlag BLOB NOT NULL,
|
||||||
Quests BLOB NOT NULL,
|
Quests BLOB NOT NULL,
|
||||||
PRIMARY KEY(PlayerID AUTOINCREMENT),
|
PRIMARY KEY(PlayerID AUTOINCREMENT),
|
||||||
FOREIGN KEY(AccountID) REFERENCES Accounts(AccountID) ON DELETE CASCADE,
|
FOREIGN KEY(AccountID) REFERENCES Accounts(AccountID) ON DELETE CASCADE,
|
||||||
UNIQUE (AccountID, Slot),
|
UNIQUE (AccountID, Slot),
|
||||||
UNIQUE (FirstName, LastName)
|
UNIQUE (FirstName, LastName)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS Appearances (
|
CREATE TABLE IF NOT EXISTS Appearances (
|
||||||
PlayerID INTEGER UNIQUE NOT NULL,
|
PlayerID INTEGER UNIQUE NOT NULL,
|
||||||
Body INTEGER DEFAULT 0 NOT NULL,
|
Body INTEGER DEFAULT 0 NOT NULL,
|
||||||
EyeColor INTEGER DEFAULT 1 NOT NULL,
|
EyeColor INTEGER DEFAULT 1 NOT NULL,
|
||||||
FaceStyle INTEGER DEFAULT 1 NOT NULL,
|
FaceStyle INTEGER DEFAULT 1 NOT NULL,
|
||||||
Gender INTEGER DEFAULT 1 NOT NULL,
|
Gender INTEGER DEFAULT 1 NOT NULL,
|
||||||
HairColor INTEGER DEFAULT 1 NOT NULL,
|
HairColor INTEGER DEFAULT 1 NOT NULL,
|
||||||
HairStyle INTEGER DEFAULT 1 NOT NULL,
|
HairStyle INTEGER DEFAULT 1 NOT NULL,
|
||||||
Height INTEGER DEFAULT 0 NOT NULL,
|
Height INTEGER DEFAULT 0 NOT NULL,
|
||||||
SkinColor INTEGER DEFAULT 1 NOT NULL,
|
SkinColor INTEGER DEFAULT 1 NOT NULL,
|
||||||
FOREIGN KEY(PlayerID) REFERENCES Players(PlayerID) ON DELETE CASCADE
|
FOREIGN KEY(PlayerID) REFERENCES Players(PlayerID) ON DELETE CASCADE
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS Inventory (
|
CREATE TABLE IF NOT EXISTS Inventory (
|
||||||
PlayerID INTEGER NOT NULL,
|
PlayerID INTEGER NOT NULL,
|
||||||
Slot INTEGER NOT NULL,
|
Slot INTEGER NOT NULL,
|
||||||
ID INTEGER NOT NULL,
|
ID INTEGER NOT NULL,
|
||||||
Type INTEGER NOT NULL,
|
Type INTEGER NOT NULL,
|
||||||
Opt INTEGER NOT NULL,
|
Opt INTEGER NOT NULL,
|
||||||
TimeLimit INTEGER DEFAULT 0 NOT NULL,
|
TimeLimit INTEGER DEFAULT 0 NOT NULL,
|
||||||
FOREIGN KEY(PlayerID) REFERENCES Players(PlayerID) ON DELETE CASCADE,
|
FOREIGN KEY(PlayerID) REFERENCES Players(PlayerID) ON DELETE CASCADE,
|
||||||
UNIQUE (PlayerID, Slot)
|
UNIQUE (PlayerID, Slot)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS QuestItems (
|
CREATE TABLE IF NOT EXISTS QuestItems (
|
||||||
PlayerID INTEGER NOT NULL,
|
PlayerID INTEGER NOT NULL,
|
||||||
Slot INTEGER NOT NULL,
|
Slot INTEGER NOT NULL,
|
||||||
ID INTEGER NOT NULL,
|
ID INTEGER NOT NULL,
|
||||||
Opt INTEGER NOT NULL,
|
Opt INTEGER NOT NULL,
|
||||||
FOREIGN KEY(PlayerID) REFERENCES Players(PlayerID) ON DELETE CASCADE,
|
FOREIGN KEY(PlayerID) REFERENCES Players(PlayerID) ON DELETE CASCADE,
|
||||||
UNIQUE (PlayerID, Slot)
|
UNIQUE (PlayerID, Slot)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS Nanos (
|
CREATE TABLE IF NOT EXISTS Nanos (
|
||||||
PlayerID INTEGER NOT NULL,
|
PlayerID INTEGER NOT NULL,
|
||||||
ID INTEGER NOT NULL,
|
ID INTEGER NOT NULL,
|
||||||
Skill INTEGER NOT NULL,
|
Skill INTEGER NOT NULL,
|
||||||
Stamina INTEGER DEFAULT 150 NOT NULL,
|
Stamina INTEGER DEFAULT 150 NOT NULL,
|
||||||
FOREIGN KEY(PlayerID) REFERENCES Players(PlayerID) ON DELETE CASCADE,
|
FOREIGN KEY(PlayerID) REFERENCES Players(PlayerID) ON DELETE CASCADE,
|
||||||
UNIQUE (PlayerID, ID)
|
UNIQUE (PlayerID, ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS RunningQuests (
|
CREATE TABLE IF NOT EXISTS RunningQuests (
|
||||||
PlayerID INTEGER NOT NULL,
|
PlayerID INTEGER NOT NULL,
|
||||||
TaskID INTEGER NOT NULL,
|
TaskID INTEGER NOT NULL,
|
||||||
RemainingNPCCount1 INTEGER NOT NULL,
|
RemainingNPCCount1 INTEGER NOT NULL,
|
||||||
RemainingNPCCount2 INTEGER NOT NULL,
|
RemainingNPCCount2 INTEGER NOT NULL,
|
||||||
RemainingNPCCount3 INTEGER NOT NULL,
|
RemainingNPCCount3 INTEGER NOT NULL,
|
||||||
FOREIGN KEY(PlayerID) REFERENCES Players(PlayerID) ON DELETE CASCADE
|
FOREIGN KEY(PlayerID) REFERENCES Players(PlayerID) ON DELETE CASCADE
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS Buddyships (
|
CREATE TABLE IF NOT EXISTS Buddyships (
|
||||||
PlayerAID INTEGER NOT NULL,
|
PlayerAID INTEGER NOT NULL,
|
||||||
PlayerBID INTEGER NOT NULL,
|
PlayerBID INTEGER NOT NULL,
|
||||||
FOREIGN KEY(PlayerAID) REFERENCES Players(PlayerID) ON DELETE CASCADE,
|
FOREIGN KEY(PlayerAID) REFERENCES Players(PlayerID) ON DELETE CASCADE,
|
||||||
FOREIGN KEY(PlayerBID) REFERENCES Players(PlayerID) ON DELETE CASCADE
|
FOREIGN KEY(PlayerBID) REFERENCES Players(PlayerID) ON DELETE CASCADE
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS Blocks (
|
CREATE TABLE IF NOT EXISTS Blocks (
|
||||||
PlayerID INTEGER NOT NULL,
|
PlayerID INTEGER NOT NULL,
|
||||||
BlockedPlayerID INTEGER NOT NULL,
|
BlockedPlayerID INTEGER NOT NULL,
|
||||||
FOREIGN KEY(PlayerID) REFERENCES Players(PlayerID) ON DELETE CASCADE,
|
FOREIGN KEY(PlayerID) REFERENCES Players(PlayerID) ON DELETE CASCADE,
|
||||||
FOREIGN KEY(BlockedPlayerID) REFERENCES Players(PlayerID) ON DELETE CASCADE
|
FOREIGN KEY(BlockedPlayerID) REFERENCES Players(PlayerID) ON DELETE CASCADE
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS EmailData (
|
CREATE TABLE IF NOT EXISTS EmailData (
|
||||||
PlayerID INTEGER NOT NULL,
|
PlayerID INTEGER NOT NULL,
|
||||||
MsgIndex INTEGER NOT NULL,
|
MsgIndex INTEGER NOT NULL,
|
||||||
ReadFlag INTEGER NOT NULL,
|
ReadFlag INTEGER NOT NULL,
|
||||||
ItemFlag INTEGER NOT NULL,
|
ItemFlag INTEGER NOT NULL,
|
||||||
SenderID INTEGER NOT NULL,
|
SenderID INTEGER NOT NULL,
|
||||||
SenderFirstName TEXT NOT NULL COLLATE NOCASE,
|
SenderFirstName TEXT NOT NULL COLLATE NOCASE,
|
||||||
SenderLastName TEXT NOT NULL COLLATE NOCASE,
|
SenderLastName TEXT NOT NULL COLLATE NOCASE,
|
||||||
SubjectLine TEXT NOT NULL,
|
SubjectLine TEXT NOT NULL,
|
||||||
MsgBody TEXT NOT NULL,
|
MsgBody TEXT NOT NULL,
|
||||||
Taros INTEGER NOT NULL,
|
Taros INTEGER NOT NULL,
|
||||||
SendTime INTEGER NOT NULL,
|
SendTime INTEGER NOT NULL,
|
||||||
DeleteTime INTEGER NOT NULL,
|
DeleteTime INTEGER NOT NULL,
|
||||||
FOREIGN KEY(PlayerID) REFERENCES Players(PlayerID) ON DELETE CASCADE,
|
FOREIGN KEY(PlayerID) REFERENCES Players(PlayerID) ON DELETE CASCADE,
|
||||||
UNIQUE(PlayerID, MsgIndex)
|
UNIQUE(PlayerID, MsgIndex)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS EmailItems (
|
CREATE TABLE IF NOT EXISTS EmailItems (
|
||||||
PlayerID INTEGER NOT NULL,
|
PlayerID INTEGER NOT NULL,
|
||||||
MsgIndex INTEGER NOT NULL,
|
MsgIndex INTEGER NOT NULL,
|
||||||
Slot INTEGER NOT NULL,
|
Slot INTEGER NOT NULL,
|
||||||
ID INTEGER NOT NULL,
|
ID INTEGER NOT NULL,
|
||||||
Type INTEGER NOT NULL,
|
Type INTEGER NOT NULL,
|
||||||
Opt INTEGER NOT NULL,
|
Opt INTEGER NOT NULL,
|
||||||
TimeLimit INTEGER NOT NULL,
|
TimeLimit INTEGER NOT NULL,
|
||||||
FOREIGN KEY(PlayerID) REFERENCES Players(PlayerID) ON DELETE CASCADE,
|
FOREIGN KEY(PlayerID) REFERENCES Players(PlayerID) ON DELETE CASCADE,
|
||||||
UNIQUE (MsgIndex, Slot)
|
UNIQUE (MsgIndex, Slot)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS RaceResults(
|
CREATE TABLE IF NOT EXISTS RaceResults(
|
||||||
EPID INTEGER NOT NULL,
|
EPID INTEGER NOT NULL,
|
||||||
PlayerID INTEGER NOT NULL,
|
PlayerID INTEGER NOT NULL,
|
||||||
Score INTEGER NOT NULL,
|
Score INTEGER NOT NULL,
|
||||||
RingCount INTEGER NOT NULL,
|
RingCount INTEGER NOT NULL,
|
||||||
Time INTEGER NOT NULL,
|
Time INTEGER NOT NULL,
|
||||||
Timestamp INTEGER NOT NULL,
|
Timestamp INTEGER NOT NULL,
|
||||||
FOREIGN KEY(PlayerID) REFERENCES Players(PlayerID) ON DELETE CASCADE
|
FOREIGN KEY(PlayerID) REFERENCES Players(PlayerID) ON DELETE CASCADE
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user