diff --git a/Mineplex.Database/000-accounteggs.sql b/Mineplex.Database/000-accounteggs.sql new file mode 100644 index 00000000..8b1aa759 --- /dev/null +++ b/Mineplex.Database/000-accounteggs.sql @@ -0,0 +1,6 @@ +create or replace table accounteggs +( + accountId int null, + eggId int null +); + diff --git a/Mineplex.Database/001-accountfriend.sql b/Mineplex.Database/001-accountfriend.sql new file mode 100644 index 00000000..e090267a --- /dev/null +++ b/Mineplex.Database/001-accountfriend.sql @@ -0,0 +1,14 @@ +create or replace table accountfriend +( + id int not null, + uuidSource varchar(100) not null, + uuidTarget varchar(100) not null, + status varchar(100) null, + created timestamp null, + sourceId int null, + targetId int null, + favourite int null, + primary key (id, uuidSource, uuidTarget) +) +charset=latin1; + diff --git a/Mineplex.Database/002-accountfrienddata.sql b/Mineplex.Database/002-accountfrienddata.sql new file mode 100644 index 00000000..cfcbc599 --- /dev/null +++ b/Mineplex.Database/002-accountfrienddata.sql @@ -0,0 +1,6 @@ +create or replace table accountfrienddata +( + accountId int not null, + status int null +); + diff --git a/Mineplex.Database/003-accountignore.sql b/Mineplex.Database/003-accountignore.sql new file mode 100644 index 00000000..784b94c6 --- /dev/null +++ b/Mineplex.Database/003-accountignore.sql @@ -0,0 +1,9 @@ +create or replace table accountignore +( + id int auto_increment + primary key, + uuidIgnorer varchar(100) not null, + uuidIgnored varchar(100) not null +) +charset=latin1; + diff --git a/Mineplex.Database/004-accountinventory.sql b/Mineplex.Database/004-accountinventory.sql new file mode 100644 index 00000000..174f5a55 --- /dev/null +++ b/Mineplex.Database/004-accountinventory.sql @@ -0,0 +1,15 @@ +create or replace table accountinventory +( + id int auto_increment + primary key, + accountId int not null, + itemId int not null, + count int not null, + constraint accountItemIndex + unique (accountId, itemId) +) +charset=latin1; + +create or replace index itemId + on accountinventory (itemId); + diff --git a/Mineplex.Database/005-accountkits.sql b/Mineplex.Database/005-accountkits.sql new file mode 100644 index 00000000..2e52312e --- /dev/null +++ b/Mineplex.Database/005-accountkits.sql @@ -0,0 +1,10 @@ +create or replace table accountkits +( + accountId int not null, + kitId int null, + active tinyint(1) not null +); + +create or replace index accountKitStats + on accountkits (kitId, accountId); + diff --git a/Mineplex.Database/006-accountkitstats.sql b/Mineplex.Database/006-accountkitstats.sql new file mode 100644 index 00000000..afa5597f --- /dev/null +++ b/Mineplex.Database/006-accountkitstats.sql @@ -0,0 +1,8 @@ +create or replace table accountkitstats +( + accountId int not null, + kitId int not null, + statId int null, + value bigint null +); + diff --git a/Mineplex.Database/007-accountpolls.sql b/Mineplex.Database/007-accountpolls.sql new file mode 100644 index 00000000..34667d80 --- /dev/null +++ b/Mineplex.Database/007-accountpolls.sql @@ -0,0 +1,16 @@ +create or replace table accountpolls +( + id int auto_increment, + accountId int not null, + pollId int not null, + value tinyint not null, + primary key (id, accountId, pollId) +) +charset=latin1; + +create or replace index accountId + on accountpolls (accountId); + +create or replace index pollId + on accountpolls (pollId); + diff --git a/Mineplex.Database/008-accountpreferences.sql b/Mineplex.Database/008-accountpreferences.sql new file mode 100644 index 00000000..c8e86956 --- /dev/null +++ b/Mineplex.Database/008-accountpreferences.sql @@ -0,0 +1,26 @@ +create or replace table accountpreferences +( + id int auto_increment, + uuid varchar(256) not null, + filterChat tinyint default 1 not null, + invisibility tinyint default 0 not null, + games tinyint default 1 not null, + visibility tinyint default 1 not null, + friendChat tinyint default 1 not null, + privateMessaging tinyint default 1 not null, + showChat tinyint default 1 not null, + partyRequests tinyint default 1 not null, + forcefield tinyint default 0 not null, + showMacReports tinyint default 0 not null, + ignoreVelocity tinyint default 0 not null, + pendingFriendRequests tinyint default 1 not null, + friendDisplayInventoryUI tinyint default 1 not null, + friendDisplayOnlineStatus tinyint default 1 not null, + friendDisplayServerName tinyint default 1 not null, + friendAllowRequests tinyint default 1 not null, + friendAllowMessaging tinyint default 1 not null, + language varchar(45) null, + primary key (id, uuid) +) +charset=latin1; + diff --git a/Mineplex.Database/009-accountpunishments.sql b/Mineplex.Database/009-accountpunishments.sql new file mode 100644 index 00000000..1f091022 --- /dev/null +++ b/Mineplex.Database/009-accountpunishments.sql @@ -0,0 +1,15 @@ +create or replace table accountpunishments +( + id int auto_increment + primary key, + target varchar(16) not null, + category varchar(100) not null, + sentence varchar(100) not null, + reason varchar(100) not null, + duration double not null, + admin varchar(16) not null, + severity int not null, + time timestamp default current_timestamp() not null +) +charset=latin1; + diff --git a/Mineplex.Database/010-accounts.sql b/Mineplex.Database/010-accounts.sql new file mode 100644 index 00000000..2c3e03ae --- /dev/null +++ b/Mineplex.Database/010-accounts.sql @@ -0,0 +1,19 @@ +create or replace table accounts +( + id int auto_increment, + uuid varchar(100) not null, + name varchar(40) not null, + gems int default 2500 null, + lastLogin timestamp default current_timestamp() not null, + totalPlayTime tinytext null, + gold int default 1000 not null, + coins int default 5000 null, + donorRank varchar(20) null, + `rank` varchar(20) default 'ALL' null, + rankPerm tinyint null, + rankExpire timestamp default current_timestamp() not null on update current_timestamp(), + constraint id + unique (id) +) +charset=latin1; + diff --git a/Mineplex.Database/011-accountstat.sql b/Mineplex.Database/011-accountstat.sql new file mode 100644 index 00000000..3ad9ebb9 --- /dev/null +++ b/Mineplex.Database/011-accountstat.sql @@ -0,0 +1,12 @@ +create or replace table accountstat +( + accountId int not null, + statId int not null, + value bigint null, + primary key (accountId, statId) +) +charset=latin1; + +create or replace index statId + on accountstat (statId); + diff --git a/Mineplex.Database/012-accountstats.sql b/Mineplex.Database/012-accountstats.sql new file mode 100644 index 00000000..48097529 --- /dev/null +++ b/Mineplex.Database/012-accountstats.sql @@ -0,0 +1,16 @@ +create or replace table accountstats +( + id int auto_increment + primary key, + accountId int not null, + statId int not null, + value bigint default 1 null +) +charset=latin1; + +create or replace index accountId + on accountstats (accountId); + +create or replace index statId + on accountstats (statId); + diff --git a/Mineplex.Database/013-accountstatsalltime.sql b/Mineplex.Database/013-accountstatsalltime.sql new file mode 100644 index 00000000..787b3b7c --- /dev/null +++ b/Mineplex.Database/013-accountstatsalltime.sql @@ -0,0 +1,7 @@ +create or replace table accountstatsalltime +( + accountId int null, + statId int null, + value int null +); + diff --git a/Mineplex.Database/014-accounttasks.sql b/Mineplex.Database/014-accounttasks.sql new file mode 100644 index 00000000..8bb4404c --- /dev/null +++ b/Mineplex.Database/014-accounttasks.sql @@ -0,0 +1,15 @@ +create or replace table accounttasks +( + id int auto_increment + primary key, + accountId int not null, + taskId int not null +) +charset=latin1; + +create or replace index accountId + on accounttasks (accountId); + +create or replace index taskId + on accounttasks (taskId); + diff --git a/Mineplex.Database/015-accounttransactions.sql b/Mineplex.Database/015-accounttransactions.sql new file mode 100644 index 00000000..b6773732 --- /dev/null +++ b/Mineplex.Database/015-accounttransactions.sql @@ -0,0 +1,17 @@ +create or replace table accounttransactions +( + id int auto_increment + primary key, + accountId int not null, + transactionId int not null, + coins int null, + gems int null +) +charset=latin1; + +create or replace index accountId + on accounttransactions (accountId); + +create or replace index transactionId + on accounttransactions (transactionId); + diff --git a/Mineplex.Database/016-activetournaments.sql b/Mineplex.Database/016-activetournaments.sql new file mode 100644 index 00000000..d4f4bcda --- /dev/null +++ b/Mineplex.Database/016-activetournaments.sql @@ -0,0 +1,11 @@ +create or replace table activetournaments +( + name varchar(100) not null + primary key, + start_date date not null, + end_date date not null, + is_gamemode int not null, + server_id tinyint unsigned not null +) +charset=latin1; + diff --git a/Mineplex.Database/017-bonus.sql b/Mineplex.Database/017-bonus.sql new file mode 100644 index 00000000..4a2259b6 --- /dev/null +++ b/Mineplex.Database/017-bonus.sql @@ -0,0 +1,9 @@ +create or replace table bonus +( + accountId int not null + primary key, + dailytime timestamp null, + ranktime date null +) +charset=latin1; + diff --git a/Mineplex.Database/018-clanserver.sql b/Mineplex.Database/018-clanserver.sql new file mode 100644 index 00000000..81ef5a01 --- /dev/null +++ b/Mineplex.Database/018-clanserver.sql @@ -0,0 +1,8 @@ +create or replace table clanserver +( + id int auto_increment, + serverName varchar(100) not null, + primary key (id, serverName) +) +charset=latin1; + diff --git a/Mineplex.Database/019-customdata.sql b/Mineplex.Database/019-customdata.sql new file mode 100644 index 00000000..2074a6f7 --- /dev/null +++ b/Mineplex.Database/019-customdata.sql @@ -0,0 +1,6 @@ +create or replace table customdata +( + id int not null, + name varchar(100) not null +); + diff --git a/Mineplex.Database/020-elorating.sql b/Mineplex.Database/020-elorating.sql new file mode 100644 index 00000000..6e3e1bc3 --- /dev/null +++ b/Mineplex.Database/020-elorating.sql @@ -0,0 +1,12 @@ +create or replace table elorating +( + id int(10) auto_increment, + uuid varchar(256) not null, + gamemode tinyint unsigned not null, + matchesPlayed int unsigned not null, + elo int not null, + gameType varchar(40) not null, + primary key (id, uuid, gamemode) +) +charset=latin1; + diff --git a/Mineplex.Database/021-fieldblock.sql b/Mineplex.Database/021-fieldblock.sql new file mode 100644 index 00000000..66e62fc8 --- /dev/null +++ b/Mineplex.Database/021-fieldblock.sql @@ -0,0 +1,16 @@ +create or replace table fieldblock +( + id int auto_increment + primary key, + server varchar(100) null, + location varchar(100) null, + blockId int null, + blockData tinyint null, + emptyId int null, + emptyData tinyint null, + stockMax int null, + stockRegenTime double null, + loot varchar(100) null +) +charset=latin1; + diff --git a/Mineplex.Database/022-fieldmonster.sql b/Mineplex.Database/022-fieldmonster.sql new file mode 100644 index 00000000..80e0ec6d --- /dev/null +++ b/Mineplex.Database/022-fieldmonster.sql @@ -0,0 +1,15 @@ +create or replace table fieldmonster +( + id int auto_increment + primary key, + server varchar(100) null, + name varchar(100) null, + type varchar(100) null, + mobMax int null, + mobRate double null, + center varchar(100) null, + radius int null, + height int null +) +charset=latin1; + diff --git a/Mineplex.Database/023-fieldore.sql b/Mineplex.Database/023-fieldore.sql new file mode 100644 index 00000000..c020a5ea --- /dev/null +++ b/Mineplex.Database/023-fieldore.sql @@ -0,0 +1,9 @@ +create or replace table fieldore +( + id int auto_increment + primary key, + server varchar(100) null, + location varchar(100) null +) +charset=latin1; + diff --git a/Mineplex.Database/024-incognitostaff.sql b/Mineplex.Database/024-incognitostaff.sql new file mode 100644 index 00000000..0dbf5b8a --- /dev/null +++ b/Mineplex.Database/024-incognitostaff.sql @@ -0,0 +1,7 @@ +create or replace table incognitostaff +( + accountId int not null + primary key, + status tinyint(1) default 0 null +); + diff --git a/Mineplex.Database/025-ipinfo.sql b/Mineplex.Database/025-ipinfo.sql new file mode 100644 index 00000000..314221e8 --- /dev/null +++ b/Mineplex.Database/025-ipinfo.sql @@ -0,0 +1,8 @@ +create or replace table ipinfo +( + id int auto_increment + primary key, + ipAddress text not null +) +charset=latin1; + diff --git a/Mineplex.Database/026-itemcategories.sql b/Mineplex.Database/026-itemcategories.sql new file mode 100644 index 00000000..cbe724b5 --- /dev/null +++ b/Mineplex.Database/026-itemcategories.sql @@ -0,0 +1,10 @@ +create or replace table itemcategories +( + id int auto_increment + primary key, + name varchar(100) null, + constraint nameIndex + unique (name) +) +charset=latin1; + diff --git a/Mineplex.Database/027-items.sql b/Mineplex.Database/027-items.sql new file mode 100644 index 00000000..36874624 --- /dev/null +++ b/Mineplex.Database/027-items.sql @@ -0,0 +1,15 @@ +create or replace table items +( + id int auto_increment + primary key, + name varchar(100) null, + categoryId int null, + rarity int null, + constraint uniqueNameCategoryIndex + unique (name, categoryId) +) +charset=latin1; + +create or replace index categoryId + on items (categoryId); + diff --git a/Mineplex.Database/028-kitpreferences.sql b/Mineplex.Database/028-kitpreferences.sql new file mode 100644 index 00000000..d1c1989a --- /dev/null +++ b/Mineplex.Database/028-kitpreferences.sql @@ -0,0 +1,7 @@ +create or replace table kitpreferences +( + accountid int null, + gameid int null, + kitid int null +); + diff --git a/Mineplex.Database/029-kitprogression.sql b/Mineplex.Database/029-kitprogression.sql new file mode 100644 index 00000000..faf89e27 --- /dev/null +++ b/Mineplex.Database/029-kitprogression.sql @@ -0,0 +1,9 @@ +create or replace table kitprogression +( + uuid varchar(36) default '1' not null, + kitId varchar(64) default '1' not null, + xp int null, + upgrade_level int null, + `default` tinyint null +); + diff --git a/Mineplex.Database/030-mail.sql b/Mineplex.Database/030-mail.sql new file mode 100644 index 00000000..d67f7e57 --- /dev/null +++ b/Mineplex.Database/030-mail.sql @@ -0,0 +1,16 @@ +create or replace table mail +( + id int auto_increment + primary key, + accountId int not null, + sender varchar(64) not null, + message varchar(1024) not null, + archived tinyint not null, + deleted tinyint not null, + timeSent timestamp default current_timestamp() not null on update current_timestamp() +) +charset=latin1; + +create or replace index accountId + on mail (accountId); + diff --git a/Mineplex.Database/031-mailbox.sql b/Mineplex.Database/031-mailbox.sql new file mode 100644 index 00000000..ce30f7fe --- /dev/null +++ b/Mineplex.Database/031-mailbox.sql @@ -0,0 +1,16 @@ +create or replace table mailbox +( + id int auto_increment + primary key, + accountId int null, + sender varchar(64) null, + message varchar(1024) null, + archived tinyint null, + deleted tinyint null, + timeSent timestamp default current_timestamp() not null on update current_timestamp() +) +charset=latin1; + +create or replace index accountId + on mailbox (accountId); + diff --git a/Mineplex.Database/032-newnpcsnew.sql b/Mineplex.Database/032-newnpcsnew.sql new file mode 100644 index 00000000..151ad0c8 --- /dev/null +++ b/Mineplex.Database/032-newnpcsnew.sql @@ -0,0 +1,25 @@ +create or replace table newnpcsnew +( + id int default 0 not null + primary key, + name varchar(255) null, + world varchar(50) not null, + x float not null, + y float not null, + z float not null, + helmet tinytext null, + chestplate tinytext null, + leggings tinytext null, + boots tinytext null, + in_hand tinytext null, + info tinytext null, + yaw float default 1 not null, + pitch float default 1 not null, + in_hand_data int null, + metadata varchar(32) null, + skin_signature varchar(700) null, + skin_value varchar(400) null, + entity_type varchar(32) null +) +charset=latin1; + diff --git a/Mineplex.Database/033-npcs.sql b/Mineplex.Database/033-npcs.sql new file mode 100644 index 00000000..39ccb37c --- /dev/null +++ b/Mineplex.Database/033-npcs.sql @@ -0,0 +1,42 @@ +create or replace table npcs +( + id int auto_increment, + server varchar(50) not null, + name varchar(255) null, + world varchar(50) not null, + x float not null, + y float not null, + z float not null, + yaw float default 1 not null comment '""', + pitch float default 1 not null, + radius float not null, + entityType varchar(100) not null, + entityMeta varchar(100) null, + adult bit not null, + helmet tinytext null, + chestplate tinytext null, + leggings tinytext null, + boots tinytext null, + inhand tinytext null, + info tinytext null, + infoRadius float null, + infoDelay int null, + in_hand_data int null, + entity_type varchar(32) null, + metadata varchar(32) null, + skin_value varchar(400) null, + skin_signature varchar(700) null, + constraint id_2 + unique (id) +) +charset=latin1; + +create or replace index id + on npcs (id); + +create or replace index id_3 + on npcs (id); + +alter table npcs + add primary key (id); + diff --git a/Mineplex.Database/034-playerinfo.sql b/Mineplex.Database/034-playerinfo.sql new file mode 100644 index 00000000..15555d6f --- /dev/null +++ b/Mineplex.Database/034-playerinfo.sql @@ -0,0 +1,10 @@ +create or replace table playerinfo +( + id int auto_increment + primary key, + uuid varchar(256) not null, + name text not null, + version text not null +) +charset=latin1; + diff --git a/Mineplex.Database/035-playerips.sql b/Mineplex.Database/035-playerips.sql new file mode 100644 index 00000000..62c12284 --- /dev/null +++ b/Mineplex.Database/035-playerips.sql @@ -0,0 +1,10 @@ +create or replace table playerips +( + id int auto_increment + primary key, + playerInfoId int not null, + ipInfoId int not null, + date text not null +) +charset=latin1; + diff --git a/Mineplex.Database/036-playerloginsessions.sql b/Mineplex.Database/036-playerloginsessions.sql new file mode 100644 index 00000000..ba053d26 --- /dev/null +++ b/Mineplex.Database/036-playerloginsessions.sql @@ -0,0 +1,10 @@ +create or replace table playerloginsessions +( + id int auto_increment + primary key, + loginTime text not null, + playerInfoId int not null, + timeInGame text not null +) +charset=latin1; + diff --git a/Mineplex.Database/037-playermap.sql b/Mineplex.Database/037-playermap.sql new file mode 100644 index 00000000..337c5261 --- /dev/null +++ b/Mineplex.Database/037-playermap.sql @@ -0,0 +1,10 @@ +create or replace table playermap +( + id int auto_increment, + playerName varchar(256) not null, + serverName varchar(256) not null, + us tinyint not null, + primary key (id, playerName) +) +charset=latin1; + diff --git a/Mineplex.Database/038-playeruniquelogins.sql b/Mineplex.Database/038-playeruniquelogins.sql new file mode 100644 index 00000000..35f3bdba --- /dev/null +++ b/Mineplex.Database/038-playeruniquelogins.sql @@ -0,0 +1,9 @@ +create or replace table playeruniquelogins +( + id int auto_increment + primary key, + playerInfoId int not null, + day text not null +) +charset=latin1; + diff --git a/Mineplex.Database/039-polls.sql b/Mineplex.Database/039-polls.sql new file mode 100644 index 00000000..553f3d98 --- /dev/null +++ b/Mineplex.Database/039-polls.sql @@ -0,0 +1,15 @@ +create or replace table polls +( + id int not null + primary key, + enabled bit null, + question varchar(256) not null, + answerA varchar(256) not null, + answerB varchar(256) null, + answerC varchar(256) null, + answerD varchar(256) null, + coinReward int not null, + displayType int not null +) +charset=latin1; + diff --git a/Mineplex.Database/040-preferences.sql b/Mineplex.Database/040-preferences.sql new file mode 100644 index 00000000..24fada52 --- /dev/null +++ b/Mineplex.Database/040-preferences.sql @@ -0,0 +1,5 @@ +create or replace table preferences +( + id int not null +); + diff --git a/Mineplex.Database/041-rankbenefits.sql b/Mineplex.Database/041-rankbenefits.sql new file mode 100644 index 00000000..efacdba5 --- /dev/null +++ b/Mineplex.Database/041-rankbenefits.sql @@ -0,0 +1,16 @@ +create or replace table rankbenefits +( + id int auto_increment, + accountId int null, + benefit varchar(100) null, + constraint id + unique (id) +) +charset=latin1; + +create or replace index accountId + on rankbenefits (accountId); + +alter table rankbenefits + add primary key (id); + diff --git a/Mineplex.Database/042-reporthandlers.sql b/Mineplex.Database/042-reporthandlers.sql new file mode 100644 index 00000000..f3baeb75 --- /dev/null +++ b/Mineplex.Database/042-reporthandlers.sql @@ -0,0 +1,7 @@ +create or replace table reporthandlers +( + reportId int null, + handlerId int null, + aborted tinyint(1) null +); + diff --git a/Mineplex.Database/043-reportreasons.sql b/Mineplex.Database/043-reportreasons.sql new file mode 100644 index 00000000..64d3f888 --- /dev/null +++ b/Mineplex.Database/043-reportreasons.sql @@ -0,0 +1,10 @@ +create or replace table reportreasons +( + reportId int null, + reporterId int null, + reason int null, + server int null, + weight int null, + time int null +); + diff --git a/Mineplex.Database/044-reportresults.sql b/Mineplex.Database/044-reportresults.sql new file mode 100644 index 00000000..359ab3fc --- /dev/null +++ b/Mineplex.Database/044-reportresults.sql @@ -0,0 +1,8 @@ +create or replace table reportresults +( + reportId int null, + resultId int null, + reason int null, + closedTime int null +); + diff --git a/Mineplex.Database/045-reports.sql b/Mineplex.Database/045-reports.sql new file mode 100644 index 00000000..fe489fa4 --- /dev/null +++ b/Mineplex.Database/045-reports.sql @@ -0,0 +1,10 @@ +create or replace table reports +( + suspectId int null, + categoryId int null, + snapshotId int null, + assignedTeam int null, + region int null, + id int null +); + diff --git a/Mineplex.Database/046-reportteammemberships.sql b/Mineplex.Database/046-reportteammemberships.sql new file mode 100644 index 00000000..2b4f1b4b --- /dev/null +++ b/Mineplex.Database/046-reportteammemberships.sql @@ -0,0 +1,6 @@ +create or replace table reportteammemberships +( + teamId int null, + accountId int null +); + diff --git a/Mineplex.Database/047-servergroupstats.sql b/Mineplex.Database/047-servergroupstats.sql new file mode 100644 index 00000000..41662eb9 --- /dev/null +++ b/Mineplex.Database/047-servergroupstats.sql @@ -0,0 +1,15 @@ +create or replace table servergroupstats +( + id int auto_increment + primary key, + serverGroup varchar(100) null, + updated mediumtext null, + players int null, + maxPlayers int null, + totalNetworkCpuUsage double(4,2) null, + totalNetworkRamUsage double(4,2) null, + totalCpu mediumint null, + totalRam mediumint null, + US tinyint(1) default 1 not null +); + diff --git a/Mineplex.Database/048-serverpassword.sql b/Mineplex.Database/048-serverpassword.sql new file mode 100644 index 00000000..9f5f4e94 --- /dev/null +++ b/Mineplex.Database/048-serverpassword.sql @@ -0,0 +1,9 @@ +create or replace table serverpassword +( + id int auto_increment + primary key, + server varchar(100) null, + password varchar(100) null +) +charset=latin1; + diff --git a/Mineplex.Database/049-spawns.sql b/Mineplex.Database/049-spawns.sql new file mode 100644 index 00000000..52699486 --- /dev/null +++ b/Mineplex.Database/049-spawns.sql @@ -0,0 +1,9 @@ +create or replace table spawns +( + id int auto_increment + primary key, + serverName varchar(100) null, + location varchar(100) null +) +charset=latin1; + diff --git a/Mineplex.Database/050-statevents.sql b/Mineplex.Database/050-statevents.sql new file mode 100644 index 00000000..1a370797 --- /dev/null +++ b/Mineplex.Database/050-statevents.sql @@ -0,0 +1,13 @@ +create or replace table statevents +( + eventId int unsigned not null, + accountId int unsigned not null, + date date not null, + gamemode tinyint unsigned not null, + serverGroup varchar(100) not null, + type tinyint unsigned not null, + value smallint unsigned not null, + primary key (eventId, accountId, date, gamemode, serverGroup, type) +) +charset=latin1; + diff --git a/Mineplex.Database/051-stats.sql b/Mineplex.Database/051-stats.sql new file mode 100644 index 00000000..d13b9086 --- /dev/null +++ b/Mineplex.Database/051-stats.sql @@ -0,0 +1,8 @@ +create or replace table stats +( + id int auto_increment, + name varchar(100) not null, + primary key (id, name) +) +charset=latin1; + diff --git a/Mineplex.Database/052-stattypes.sql b/Mineplex.Database/052-stattypes.sql new file mode 100644 index 00000000..d8fba6f1 --- /dev/null +++ b/Mineplex.Database/052-stattypes.sql @@ -0,0 +1,8 @@ +create or replace table stattypes +( + id tinyint(11) auto_increment, + name varchar(100) not null, + primary key (id, name) +) +charset=latin1; + diff --git a/Mineplex.Database/053-tasks.sql b/Mineplex.Database/053-tasks.sql new file mode 100644 index 00000000..e71b941b --- /dev/null +++ b/Mineplex.Database/053-tasks.sql @@ -0,0 +1,8 @@ +create or replace table tasks +( + id int auto_increment, + name varchar(100) not null, + primary key (id, name) +) +charset=latin1; + diff --git a/Mineplex.Database/054-tournamentlb.sql b/Mineplex.Database/054-tournamentlb.sql new file mode 100644 index 00000000..2a8a16b5 --- /dev/null +++ b/Mineplex.Database/054-tournamentlb.sql @@ -0,0 +1,9 @@ +create or replace table tournamentlb +( + `rank` int unsigned not null, + accountId int unsigned not null, + value int unsigned not null, + primary key (`rank`, accountId) +) +charset=latin1; + diff --git a/Mineplex.Database/055-transactions.sql b/Mineplex.Database/055-transactions.sql new file mode 100644 index 00000000..90af2f02 --- /dev/null +++ b/Mineplex.Database/055-transactions.sql @@ -0,0 +1,8 @@ +create or replace table transactions +( + id int auto_increment + primary key, + name varchar(60) not null +) +charset=latin1; + diff --git a/Mineplex.Database/056-accountauth.sql b/Mineplex.Database/056-accountauth.sql new file mode 100644 index 00000000..79b43702 --- /dev/null +++ b/Mineplex.Database/056-accountauth.sql @@ -0,0 +1,12 @@ +create or replace table accountauth +( + id int not null, + accountId int not null, + authKey varchar(128) not null, + constraint accountauth_ibfk_1 + foreign key (accountId) references accounts (id) +); + +create or replace index accountId + on accountauth (accountId); + diff --git a/Mineplex.Database/057-accountpurchases.sql b/Mineplex.Database/057-accountpurchases.sql new file mode 100644 index 00000000..19a9c4a9 --- /dev/null +++ b/Mineplex.Database/057-accountpurchases.sql @@ -0,0 +1,20 @@ +create or replace table accountpurchases +( + id int auto_increment + primary key, + accountId int not null, + salesPackageName varchar(30) null, + salesPackageId int null, + cost int null, + usingCredits int(1) null, + source varchar(30) null, + premium int(1) null, + coinPurchase int(1) null, + known int(1) not null, + constraint accountpurchases_ibfk_1 + foreign key (accountId) references accounts (id) +); + +create or replace index accountId + on accountpurchases (accountId); + diff --git a/Mineplex.Database/058-accountcustomdata.sql b/Mineplex.Database/058-accountcustomdata.sql new file mode 100644 index 00000000..3706aa5c --- /dev/null +++ b/Mineplex.Database/058-accountcustomdata.sql @@ -0,0 +1,11 @@ +create or replace table accountcustomdata +( + accountId int not null, + customDataId int not null, + constraint accountcustomdata_ibfk_1 + foreign key (accountId) references accounts (id) +); + +create or replace index accountId + on accountcustomdata (accountId); + diff --git a/Mineplex.Database/059-accountgemtransactions.sql b/Mineplex.Database/059-accountgemtransactions.sql new file mode 100644 index 00000000..9b139ce1 --- /dev/null +++ b/Mineplex.Database/059-accountgemtransactions.sql @@ -0,0 +1,15 @@ +create or replace table accountgemtransactions +( + id int auto_increment + primary key, + accountId int null, + reason varchar(100) null, + gems int null, + constraint accountGemTransactions_ibfk_1 + foreign key (accountId) references accounts (id) +) +charset=latin1; + +create or replace index accountId + on accountgemtransactions (accountId); + diff --git a/Mineplex.Database/060-accountamplifierthank.sql b/Mineplex.Database/060-accountamplifierthank.sql new file mode 100644 index 00000000..afc5e652 --- /dev/null +++ b/Mineplex.Database/060-accountamplifierthank.sql @@ -0,0 +1,12 @@ +create or replace table accountamplifierthank +( + accountId int not null, + amplifierId int not null, + time timestamp default current_timestamp() not null on update current_timestamp(), + constraint accountamplifierthank_ibfk_1 + foreign key (accountId) references accounts (id) +); + +create or replace index accountId + on accountamplifierthank (accountId); + diff --git a/Mineplex.Database/061-accountcrowns.sql b/Mineplex.Database/061-accountcrowns.sql new file mode 100644 index 00000000..8a3e92f9 --- /dev/null +++ b/Mineplex.Database/061-accountcrowns.sql @@ -0,0 +1,9 @@ +create or replace table accountcrowns +( + accountId int not null + primary key, + crownCount int not null, + constraint accountcrowns_ibfk_1 + foreign key (accountId) references accounts (id) +); + diff --git a/Mineplex.Database/062-accountcointransactions.sql b/Mineplex.Database/062-accountcointransactions.sql new file mode 100644 index 00000000..cedae91c --- /dev/null +++ b/Mineplex.Database/062-accountcointransactions.sql @@ -0,0 +1,15 @@ +create or replace table accountcointransactions +( + id int auto_increment + primary key, + accountId int not null, + reason varchar(100) null, + coins int null, + constraint accountCoinTransactions_ibfk_1 + foreign key (accountId) references accounts (id) +) +charset=latin1; + +create or replace index accountId + on accountcointransactions (accountId); + diff --git a/Mineplex.Database/063-accountranks.sql b/Mineplex.Database/063-accountranks.sql new file mode 100644 index 00000000..7aefc0d6 --- /dev/null +++ b/Mineplex.Database/063-accountranks.sql @@ -0,0 +1,19 @@ +create or replace table accountranks +( + id int auto_increment + primary key, + accountId int not null, + rankIdentifier varchar(40) null, + primaryGroup tinyint(1) null, + constraint additionalIndex + unique (accountId, rankIdentifier, primaryGroup), + constraint accountranks_ibfk_1 + foreign key (accountId) references accounts (id) +); + +create or replace index accountIndex + on accountranks (accountId); + +create or replace index rankIndex + on accountranks (rankIdentifier); + diff --git a/account.sql b/account.sql new file mode 100644 index 00000000..a61b33ee --- /dev/null +++ b/account.sql @@ -0,0 +1,779 @@ +create or replace table accounteggs +( + accountId int null, + eggId int null +); + +create or replace table accountfriend +( + id int not null, + uuidSource varchar(100) not null, + uuidTarget varchar(100) not null, + status varchar(100) null, + created timestamp null, + sourceId int null, + targetId int null, + favourite int null, + primary key (id, uuidSource, uuidTarget) +) + charset = latin1; + +create or replace table accountfrienddata +( + accountId int not null, + status int null +); + +create or replace table accountignore +( + id int auto_increment + primary key, + uuidIgnorer varchar(100) not null, + uuidIgnored varchar(100) not null +) + charset = latin1; + +create or replace table accountinventory +( + id int auto_increment + primary key, + accountId int not null, + itemId int not null, + count int not null, + constraint accountItemIndex + unique (accountId, itemId) +) + charset = latin1; + +create or replace index itemId + on accountinventory (itemId); + +create or replace table accountkits +( + accountId int not null, + kitId int null, + active tinyint(1) not null +); + +create or replace index accountKitStats + on accountkits (kitId, accountId); + +create or replace table accountkitstats +( + accountId int not null, + kitId int not null, + statId int null, + value bigint null +); + +create or replace table accountpolls +( + id int auto_increment, + accountId int not null, + pollId int not null, + value tinyint not null, + primary key (id, accountId, pollId) +) + charset = latin1; + +create or replace index accountId + on accountpolls (accountId); + +create or replace index pollId + on accountpolls (pollId); + +create or replace table accountpreferences +( + id int auto_increment, + uuid varchar(256) not null, + filterChat tinyint default 1 not null, + invisibility tinyint default 0 not null, + games tinyint default 1 not null, + visibility tinyint default 1 not null, + friendChat tinyint default 1 not null, + privateMessaging tinyint default 1 not null, + showChat tinyint default 1 not null, + partyRequests tinyint default 1 not null, + forcefield tinyint default 0 not null, + showMacReports tinyint default 0 not null, + ignoreVelocity tinyint default 0 not null, + pendingFriendRequests tinyint default 1 not null, + friendDisplayInventoryUI tinyint default 1 not null, + friendDisplayOnlineStatus tinyint default 1 not null, + friendDisplayServerName tinyint default 1 not null, + friendAllowRequests tinyint default 1 not null, + friendAllowMessaging tinyint default 1 not null, + language varchar(45) null, + primary key (id, uuid) +) + charset = latin1; + +create or replace table accountpunishments +( + id int auto_increment + primary key, + target varchar(16) not null, + category varchar(100) not null, + sentence varchar(100) not null, + reason varchar(100) not null, + duration double not null, + admin varchar(16) not null, + severity int not null, + time timestamp default current_timestamp() not null +) + charset = latin1; + +create or replace table accounts +( + id int auto_increment, + uuid varchar(100) not null, + name varchar(40) not null, + gems int default 2500 null, + lastLogin timestamp default current_timestamp() not null, + totalPlayTime tinytext null, + gold int default 1000 not null, + coins int default 5000 null, + donorRank varchar(20) null, + `rank` varchar(20) default 'ALL' null, + rankPerm tinyint null, + rankExpire timestamp default current_timestamp() not null on update current_timestamp(), + constraint id + unique (id) +) + charset = latin1; + +create or replace table accountamplifierthank +( + accountId int not null, + amplifierId int not null, + time timestamp default current_timestamp() not null on update current_timestamp(), + constraint accountamplifierthank_ibfk_1 + foreign key (accountId) references accounts (id) +); + +create or replace index accountId + on accountamplifierthank (accountId); + +create or replace table accountauth +( + id int not null, + accountId int not null, + authKey varchar(128) not null, + constraint accountauth_ibfk_1 + foreign key (accountId) references accounts (id) +); + +create or replace index accountId + on accountauth (accountId); + +create or replace table accountcointransactions +( + id int auto_increment + primary key, + accountId int not null, + reason varchar(100) null, + coins int null, + constraint accountCoinTransactions_ibfk_1 + foreign key (accountId) references accounts (id) +) + charset = latin1; + +create or replace index accountId + on accountcointransactions (accountId); + +create or replace table accountcrowns +( + accountId int not null + primary key, + crownCount int not null, + constraint accountcrowns_ibfk_1 + foreign key (accountId) references accounts (id) +); + +create or replace table accountcustomdata +( + accountId int not null, + customDataId int not null, + constraint accountcustomdata_ibfk_1 + foreign key (accountId) references accounts (id) +); + +create or replace index accountId + on accountcustomdata (accountId); + +create or replace table accountgemtransactions +( + id int auto_increment + primary key, + accountId int null, + reason varchar(100) null, + gems int null, + constraint accountGemTransactions_ibfk_1 + foreign key (accountId) references accounts (id) +) + charset = latin1; + +create or replace index accountId + on accountgemtransactions (accountId); + +create or replace table accountpurchases +( + id int auto_increment + primary key, + accountId int not null, + salesPackageName varchar(30) null, + salesPackageId int null, + cost int null, + usingCredits int(1) null, + source varchar(30) null, + premium int(1) null, + coinPurchase int(1) null, + known int(1) not null, + constraint accountpurchases_ibfk_1 + foreign key (accountId) references accounts (id) +); + +create or replace index accountId + on accountpurchases (accountId); + +create or replace table accountranks +( + id int auto_increment + primary key, + accountId int not null, + rankIdentifier varchar(40) null, + primaryGroup tinyint(1) null, + constraint additionalIndex + unique (accountId, rankIdentifier, primaryGroup), + constraint accountranks_ibfk_1 + foreign key (accountId) references accounts (id) +); + +create or replace index accountIndex + on accountranks (accountId); + +create or replace index rankIndex + on accountranks (rankIdentifier); + +create or replace table accountstat +( + accountId int not null, + statId int not null, + value bigint null, + primary key (accountId, statId) +) + charset = latin1; + +create or replace index statId + on accountstat (statId); + +create or replace table accountstats +( + id int auto_increment + primary key, + accountId int not null, + statId int not null, + value bigint default 1 null +) + charset = latin1; + +create or replace index accountId + on accountstats (accountId); + +create or replace index statId + on accountstats (statId); + +create or replace table accountstatsalltime +( + accountId int null, + statId int null, + value int null +); + +create or replace table accounttasks +( + id int auto_increment + primary key, + accountId int not null, + taskId int not null +) + charset = latin1; + +create or replace index accountId + on accounttasks (accountId); + +create or replace index taskId + on accounttasks (taskId); + +create or replace table accounttransactions +( + id int auto_increment + primary key, + accountId int not null, + transactionId int not null, + coins int null, + gems int null +) + charset = latin1; + +create or replace index accountId + on accounttransactions (accountId); + +create or replace index transactionId + on accounttransactions (transactionId); + +create or replace table activetournaments +( + name varchar(100) not null + primary key, + start_date date not null, + end_date date not null, + is_gamemode int not null, + server_id tinyint unsigned not null +) + charset = latin1; + +create or replace table bonus +( + accountId int not null + primary key, + dailytime timestamp null, + ranktime date null +) + charset = latin1; + +create or replace table clanserver +( + id int auto_increment, + serverName varchar(100) not null, + primary key (id, serverName) +) + charset = latin1; + +create or replace table customdata +( + id int not null, + name varchar(100) not null +); + +create or replace table elorating +( + id int(10) auto_increment, + uuid varchar(256) not null, + gamemode tinyint unsigned not null, + matchesPlayed int unsigned not null, + elo int not null, + gameType varchar(40) not null, + primary key (id, uuid, gamemode) +) + charset = latin1; + +create or replace table fieldblock +( + id int auto_increment + primary key, + server varchar(100) null, + location varchar(100) null, + blockId int null, + blockData tinyint null, + emptyId int null, + emptyData tinyint null, + stockMax int null, + stockRegenTime double null, + loot varchar(100) null +) + charset = latin1; + +create or replace table fieldmonster +( + id int auto_increment + primary key, + server varchar(100) null, + name varchar(100) null, + type varchar(100) null, + mobMax int null, + mobRate double null, + center varchar(100) null, + radius int null, + height int null +) + charset = latin1; + +create or replace table fieldore +( + id int auto_increment + primary key, + server varchar(100) null, + location varchar(100) null +) + charset = latin1; + +create or replace table incognitostaff +( + accountId int not null + primary key, + status tinyint(1) default 0 null +); + +create or replace table ipinfo +( + id int auto_increment + primary key, + ipAddress text not null +) + charset = latin1; + +create or replace table itemcategories +( + id int auto_increment + primary key, + name varchar(100) null, + constraint nameIndex + unique (name) +) + charset = latin1; + +create or replace table items +( + id int auto_increment + primary key, + name varchar(100) null, + categoryId int null, + rarity int null, + constraint uniqueNameCategoryIndex + unique (name, categoryId) +) + charset = latin1; + +create or replace index categoryId + on items (categoryId); + +create or replace table kitpreferences +( + accountid int null, + gameid int null, + kitid int null +); + +create or replace table kitprogression +( + uuid varchar(36) default '1' not null, + kitId varchar(64) default '1' not null, + xp int null, + upgrade_level int null, + `default` tinyint null +); + +create or replace table mail +( + id int auto_increment + primary key, + accountId int not null, + sender varchar(64) not null, + message varchar(1024) not null, + archived tinyint not null, + deleted tinyint not null, + timeSent timestamp default current_timestamp() not null on update current_timestamp() +) + charset = latin1; + +create or replace index accountId + on mail (accountId); + +create or replace table mailbox +( + id int auto_increment + primary key, + accountId int null, + sender varchar(64) null, + message varchar(1024) null, + archived tinyint null, + deleted tinyint null, + timeSent timestamp default current_timestamp() not null on update current_timestamp() +) + charset = latin1; + +create or replace index accountId + on mailbox (accountId); + +create or replace table newnpcsnew +( + id int default 0 not null + primary key, + name varchar(255) null, + world varchar(50) not null, + x float not null, + y float not null, + z float not null, + helmet tinytext null, + chestplate tinytext null, + leggings tinytext null, + boots tinytext null, + in_hand tinytext null, + info tinytext null, + yaw float default 1 not null, + pitch float default 1 not null, + in_hand_data int null, + metadata varchar(32) null, + skin_signature varchar(700) null, + skin_value varchar(400) null, + entity_type varchar(32) null +) + charset = latin1; + +create or replace table npcs +( + id int auto_increment, + server varchar(50) not null, + name varchar(255) null, + world varchar(50) not null, + x float not null, + y float not null, + z float not null, + yaw float default 1 not null comment '""', + pitch float default 1 not null, + radius float not null, + entityType varchar(100) not null, + entityMeta varchar(100) null, + adult bit not null, + helmet tinytext null, + chestplate tinytext null, + leggings tinytext null, + boots tinytext null, + inhand tinytext null, + info tinytext null, + infoRadius float null, + infoDelay int null, + in_hand_data int null, + entity_type varchar(32) null, + metadata varchar(32) null, + skin_value varchar(400) null, + skin_signature varchar(700) null, + constraint id_2 + unique (id) +) + charset = latin1; + +create or replace index id + on npcs (id); + +create or replace index id_3 + on npcs (id); + +alter table npcs + add primary key (id); + +create or replace table playerinfo +( + id int auto_increment + primary key, + uuid varchar(256) not null, + name text not null, + version text not null +) + charset = latin1; + +create or replace table playerips +( + id int auto_increment + primary key, + playerInfoId int not null, + ipInfoId int not null, + date text not null +) + charset = latin1; + +create or replace table playerloginsessions +( + id int auto_increment + primary key, + loginTime text not null, + playerInfoId int not null, + timeInGame text not null +) + charset = latin1; + +create or replace table playermap +( + id int auto_increment, + playerName varchar(256) not null, + serverName varchar(256) not null, + us tinyint not null, + primary key (id, playerName) +) + charset = latin1; + +create or replace table playeruniquelogins +( + id int auto_increment + primary key, + playerInfoId int not null, + day text not null +) + charset = latin1; + +create or replace table polls +( + id int not null + primary key, + enabled bit null, + question varchar(256) not null, + answerA varchar(256) not null, + answerB varchar(256) null, + answerC varchar(256) null, + answerD varchar(256) null, + coinReward int not null, + displayType int not null +) + charset = latin1; + +create or replace table preferences +( + id int not null +); + +create or replace table rankbenefits +( + id int auto_increment, + accountId int null, + benefit varchar(100) null, + constraint id + unique (id) +) + charset = latin1; + +create or replace index accountId + on rankbenefits (accountId); + +alter table rankbenefits + add primary key (id); + +create or replace table reporthandlers +( + reportId int null, + handlerId int null, + aborted tinyint(1) null +); + +create or replace table reportreasons +( + reportId int null, + reporterId int null, + reason int null, + server int null, + weight int null, + time int null +); + +create or replace table reportresults +( + reportId int null, + resultId int null, + reason int null, + closedTime int null +); + +create or replace table reports +( + suspectId int null, + categoryId int null, + snapshotId int null, + assignedTeam int null, + region int null, + id int null +); + +create or replace table reportteammemberships +( + teamId int null, + accountId int null +); + +create or replace table servergroupstats +( + id int auto_increment + primary key, + serverGroup varchar(100) null, + updated mediumtext null, + players int null, + maxPlayers int null, + totalNetworkCpuUsage double(4, 2) null, + totalNetworkRamUsage double(4, 2) null, + totalCpu mediumint null, + totalRam mediumint null, + US tinyint(1) default 1 not null +); + +create or replace table serverpassword +( + id int auto_increment + primary key, + server varchar(100) null, + password varchar(100) null +) + charset = latin1; + +create or replace table spawns +( + id int auto_increment + primary key, + serverName varchar(100) null, + location varchar(100) null +) + charset = latin1; + +create or replace table statevents +( + eventId int unsigned not null, + accountId int unsigned not null, + date date not null, + gamemode tinyint unsigned not null, + serverGroup varchar(100) not null, + type tinyint unsigned not null, + value smallint unsigned not null, + primary key (eventId, accountId, date, gamemode, serverGroup, type) +) + charset = latin1; + +create or replace table stats +( + id int auto_increment, + name varchar(100) not null, + primary key (id, name) +) + charset = latin1; + +create or replace table stattypes +( + id tinyint(11) auto_increment, + name varchar(100) not null, + primary key (id, name) +) + charset = latin1; + +create or replace table tasks +( + id int auto_increment, + name varchar(100) not null, + primary key (id, name) +) + charset = latin1; + +create or replace table tournamentlb +( + `rank` int unsigned not null, + accountId int unsigned not null, + value int unsigned not null, + primary key (`rank`, accountId) +) + charset = latin1; + +create or replace table transactions +( + id int auto_increment + primary key, + name varchar(60) not null +) + charset = latin1; + + diff --git a/fuck me b/fuck me new file mode 100644 index 00000000..49ea8062 --- /dev/null +++ b/fuck me @@ -0,0 +1,18 @@ +Danese 088a931b-509d-41a8-9469-21f6762b7da0 +ARareBlackbear 340c54ef-05fc-468f-8bdc-3de0f2e4ac68 +CSBuildTeam 53758287-b9cb-4d7f-8593-e53c23dd9353 +Red_Pikmin c6320742-dc8b-4be8-9146-2bd72c298f91 +eToast_ ab36a218-c484-411b-b924-8f714b939548 +Yellow_Pikmin 9d9246d5-f5a5-4919-b87e-8a9dca662cf3 +Pudgy012 7e6be7f2-cc9d-4d38-aac5-4965fb0b3001 +Mohawk2 a8c7e72f-1087-47be-941d-b6e2dd7ea452 +ClubRulez 8b187116-260d-4cb7-bad4-37935cb3cb2b +Uniker_19 53446f3a-0677-47fe-b423-c7db3eda3571 +Fuzzy_Pumpkin e5638611-9522-4ee3-a8ee-4116f57daee0 +Element_Uranium 74608437-78e8-438d-895d-3ad723019eeb +Basicallyaname 7b133339-2e02-48ef-9dd4-692415933dc5 +Fusafez d20119d7-6f39-4203-9445-de86d7ecb02a +Snekentine 4108fbc7-aac6-4937-8bb5-d457c0e2a4fe +rmotheram 5814f383-ad4b-447d-9ac7-319c9f30bf20 +DooDooBug25 4e941b23-6e36-48cb-97c4-24f56ea128c1 +MicrosoftEdgy afb5f841-0555-4a2e-b4ef-5c3b2c281151 diff --git a/mineplex.sql b/mineplex.sql new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/mineplex.sql @@ -0,0 +1 @@ + diff --git a/stats.sql b/stats.sql new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/stats.sql @@ -0,0 +1 @@ +