Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- phpMyAdmin SQL Dump
- -- version 5.2.1
- -- https://www.phpmyadmin.net/
- --
- -- Host: localhost
- -- Erstellungszeit: 15. Feb 2024 um 12:43
- -- Server-Version: 10.5.23-MariaDB-0+deb11u1
- -- PHP-Version: 7.4.33
- SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
- START TRANSACTION;
- SET time_zone = "+00:00";
- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
- /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
- /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
- /*!40101 SET NAMES utf8mb4 */;
- --
- -- Datenbank: `altislife`
- --
- DELIMITER $$
- --
- -- Prozeduren
- --
- CREATE DEFINER=`root`@`localhost` PROCEDURE `deleteDeadVehicles` () BEGIN
- DELETE FROM `vehicles` WHERE `alive` = 0;
- END$$
- CREATE DEFINER=`root`@`localhost` PROCEDURE `deleteOldContainers` () BEGIN
- DELETE FROM `containers` WHERE `owned` = 0;
- END$$
- CREATE DEFINER=`root`@`localhost` PROCEDURE `deleteOldGangs` () BEGIN
- DELETE FROM `gangs` WHERE `active` = 0;
- END$$
- CREATE DEFINER=`root`@`localhost` PROCEDURE `deleteOldHouses` () BEGIN
- DELETE FROM `houses` WHERE `owned` = 0;
- END$$
- CREATE DEFINER=`root`@`localhost` PROCEDURE `deleteOldWanted` () BEGIN
- DELETE FROM `wanted` WHERE `active` = 0;
- END$$
- CREATE DEFINER=`root`@`localhost` PROCEDURE `resetLifeVehicles` () BEGIN
- UPDATE `vehicles` SET `active`= 0;
- END$$
- DELIMITER ;
- -- --------------------------------------------------------
- --
- -- Tabellenstruktur für Tabelle `containers`
- --
- CREATE TABLE `containers` (
- `id` int(11) NOT NULL,
- `pid` varchar(17) NOT NULL,
- `classname` varchar(32) NOT NULL,
- `pos` varchar(32) DEFAULT NULL,
- `inventory` text NOT NULL,
- `gear` text NOT NULL,
- `dir` varchar(128) DEFAULT NULL,
- `active` tinyint(4) NOT NULL DEFAULT 0,
- `owned` tinyint(4) NOT NULL DEFAULT 0,
- `insert_time` timestamp NOT NULL DEFAULT current_timestamp()
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
- -- --------------------------------------------------------
- --
- -- Tabellenstruktur für Tabelle `gangs`
- --
- CREATE TABLE `gangs` (
- `id` int(11) NOT NULL,
- `owner` varchar(17) NOT NULL,
- `name` varchar(32) DEFAULT NULL,
- `members` text DEFAULT NULL,
- `maxmembers` int(11) DEFAULT 8,
- `bank` int(11) DEFAULT 0,
- `active` tinyint(4) NOT NULL DEFAULT 1,
- `insert_time` timestamp NOT NULL DEFAULT current_timestamp()
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
- -- --------------------------------------------------------
- --
- -- Tabellenstruktur für Tabelle `houses`
- --
- CREATE TABLE `houses` (
- `id` int(11) NOT NULL,
- `pid` varchar(17) NOT NULL,
- `pos` varchar(32) DEFAULT NULL,
- `owned` tinyint(4) DEFAULT 0,
- `garage` tinyint(4) NOT NULL DEFAULT 0,
- `insert_time` timestamp NOT NULL DEFAULT current_timestamp()
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
- -- --------------------------------------------------------
- --
- -- Tabellenstruktur für Tabelle `players`
- --
- CREATE TABLE `players` (
- `uid` int(11) NOT NULL,
- `pid` varchar(17) NOT NULL,
- `name` varchar(32) NOT NULL,
- `aliases` text NOT NULL,
- `cash` int(11) NOT NULL DEFAULT 0,
- `bankacc` int(11) NOT NULL DEFAULT 0,
- `coplevel` enum('0','1','2','3','4','5','6','7') NOT NULL DEFAULT '0',
- `mediclevel` enum('0','1','2','3','4','5') NOT NULL DEFAULT '0',
- `civ_licenses` text NOT NULL,
- `cop_licenses` text NOT NULL,
- `med_licenses` text NOT NULL,
- `civ_gear` text NOT NULL,
- `cop_gear` text NOT NULL,
- `med_gear` text NOT NULL,
- `civ_stats` varchar(25) NOT NULL DEFAULT '"[100,100,0]"',
- `cop_stats` varchar(25) NOT NULL DEFAULT '"[100,100,0]"',
- `med_stats` varchar(25) NOT NULL DEFAULT '"[100,100,0]"',
- `arrested` tinyint(4) NOT NULL DEFAULT 0,
- `adminlevel` enum('0','1','2','3','4','5') NOT NULL DEFAULT '0',
- `donorlevel` enum('0','1','2','3','4','5') NOT NULL DEFAULT '0',
- `blacklist` tinyint(4) NOT NULL DEFAULT 0,
- `civ_alive` tinyint(4) NOT NULL DEFAULT 0,
- `civ_position` varchar(32) NOT NULL DEFAULT '"[]"',
- `playtime` varchar(32) NOT NULL DEFAULT '"[0,0,0]"',
- `insert_time` timestamp NOT NULL DEFAULT current_timestamp(),
- `last_seen` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
- `applesGathered` int(11) DEFAULT 0
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
- --
- -- Daten für Tabelle `players`
- --
- INSERT INTO `players` (`uid`, `pid`, `name`, `aliases`, `cash`, `bankacc`, `coplevel`, `mediclevel`, `civ_licenses`, `cop_licenses`, `med_licenses`, `civ_gear`, `cop_gear`, `med_gear`, `civ_stats`, `cop_stats`, `med_stats`, `arrested`, `adminlevel`, `donorlevel`, `blacklist`, `civ_alive`, `civ_position`, `playtime`, `insert_time`, `last_seen`, `applesGathered`) VALUES
- (1, '76561198112725571', 'walker', '\"[`walker`]\"', 0, 3700, '0', '0', '\"[[`license_civ_driver`,0],[`license_civ_boat`,0],[`license_civ_pilot`,0],[`license_civ_trucking`,0],[`license_civ_gun`,0],[`license_civ_dive`,0],[`license_civ_home`,0],[`license_civ_oil`,0],[`license_civ_diamond`,0],[`license_civ_salt`,0],[`license_civ_sand`,0],[`license_civ_iron`,0],[`license_civ_copper`,0],[`license_civ_cement`,0],[`license_civ_medmarijuana`,0],[`license_civ_cocaine`,0],[`license_civ_heroin`,0],[`license_civ_marijuana`,0],[`license_civ_rebel`,0]]\"', '\"[]\"', '\"[]\"', '\"[`U_C_Poloshirt_tricolour`,``,``,``,``,[`ItemMap`,`ItemCompass`,`ItemWatch`],``,``,[],[],[],[],[],[],[``,``,``,``],[``,``,``,``],[[`apple`,14]]]\"', '\"[]\"', '\"[]\"', '\"[100,90,0]\"', '\"[100,100,0]\"', '\"[100,100,0]\"', 0, '5', '5', 0, 0, '\"[]\"', '\"[0,0,18]\"', '2024-02-14 22:50:07', '2024-02-14 23:22:52', 0);
- -- --------------------------------------------------------
- --
- -- Tabellenstruktur für Tabelle `vehicles`
- --
- CREATE TABLE `vehicles` (
- `id` int(11) NOT NULL,
- `pid` varchar(17) NOT NULL,
- `side` varchar(10) NOT NULL,
- `classname` varchar(64) NOT NULL,
- `type` varchar(16) NOT NULL,
- `alive` tinyint(4) NOT NULL DEFAULT 1,
- `blacklist` tinyint(4) NOT NULL DEFAULT 0,
- `active` tinyint(4) NOT NULL DEFAULT 0,
- `plate` mediumint(9) NOT NULL,
- `color` int(11) NOT NULL,
- `inventory` text NOT NULL,
- `gear` text NOT NULL,
- `fuel` double NOT NULL DEFAULT 1,
- `damage` varchar(256) NOT NULL,
- `insert_time` timestamp NOT NULL DEFAULT current_timestamp()
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
- -- --------------------------------------------------------
- --
- -- Tabellenstruktur für Tabelle `wanted`
- --
- CREATE TABLE `wanted` (
- `wantedID` varchar(17) NOT NULL,
- `wantedName` varchar(32) NOT NULL,
- `wantedCrimes` text NOT NULL,
- `wantedBounty` int(11) NOT NULL,
- `active` tinyint(4) NOT NULL DEFAULT 0,
- `insert_time` timestamp NOT NULL DEFAULT current_timestamp()
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
- --
- -- Indizes der exportierten Tabellen
- --
- --
- -- Indizes für die Tabelle `containers`
- --
- ALTER TABLE `containers`
- ADD PRIMARY KEY (`id`),
- ADD KEY `fkIdx_players_containers` (`pid`);
- --
- -- Indizes für die Tabelle `gangs`
- --
- ALTER TABLE `gangs`
- ADD PRIMARY KEY (`id`),
- ADD UNIQUE KEY `unique_name` (`name`),
- ADD KEY `fkIdx_players_gangs` (`owner`);
- --
- -- Indizes für die Tabelle `houses`
- --
- ALTER TABLE `houses`
- ADD PRIMARY KEY (`id`),
- ADD KEY `fkIdx_players_houses` (`pid`);
- --
- -- Indizes für die Tabelle `players`
- --
- ALTER TABLE `players`
- ADD PRIMARY KEY (`pid`),
- ADD UNIQUE KEY `unique_uid` (`uid`),
- ADD KEY `index_name` (`name`),
- ADD KEY `index_blacklist` (`blacklist`);
- --
- -- Indizes für die Tabelle `vehicles`
- --
- ALTER TABLE `vehicles`
- ADD PRIMARY KEY (`id`),
- ADD KEY `fkIdx_players_vehicles` (`pid`),
- ADD KEY `index_side` (`side`),
- ADD KEY `index_type` (`type`);
- --
- -- Indizes für die Tabelle `wanted`
- --
- ALTER TABLE `wanted`
- ADD PRIMARY KEY (`wantedID`);
- --
- -- AUTO_INCREMENT für exportierte Tabellen
- --
- --
- -- AUTO_INCREMENT für Tabelle `containers`
- --
- ALTER TABLE `containers`
- MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
- --
- -- AUTO_INCREMENT für Tabelle `gangs`
- --
- ALTER TABLE `gangs`
- MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
- --
- -- AUTO_INCREMENT für Tabelle `houses`
- --
- ALTER TABLE `houses`
- MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
- --
- -- AUTO_INCREMENT für Tabelle `players`
- --
- ALTER TABLE `players`
- MODIFY `uid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
- --
- -- AUTO_INCREMENT für Tabelle `vehicles`
- --
- ALTER TABLE `vehicles`
- MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
- --
- -- Constraints der exportierten Tabellen
- --
- --
- -- Constraints der Tabelle `containers`
- --
- ALTER TABLE `containers`
- ADD CONSTRAINT `FK_players_containers` FOREIGN KEY (`pid`) REFERENCES `players` (`pid`) ON DELETE CASCADE ON UPDATE CASCADE;
- --
- -- Constraints der Tabelle `gangs`
- --
- ALTER TABLE `gangs`
- ADD CONSTRAINT `FK_players_gangs` FOREIGN KEY (`owner`) REFERENCES `players` (`pid`) ON DELETE CASCADE ON UPDATE CASCADE;
- --
- -- Constraints der Tabelle `houses`
- --
- ALTER TABLE `houses`
- ADD CONSTRAINT `FK_players_houses` FOREIGN KEY (`pid`) REFERENCES `players` (`pid`) ON DELETE CASCADE ON UPDATE CASCADE;
- --
- -- Constraints der Tabelle `vehicles`
- --
- ALTER TABLE `vehicles`
- ADD CONSTRAINT `FK_players_vehicles` FOREIGN KEY (`pid`) REFERENCES `players` (`pid`) ON DELETE CASCADE ON UPDATE CASCADE;
- --
- -- Constraints der Tabelle `wanted`
- --
- ALTER TABLE `wanted`
- ADD CONSTRAINT `FK_players_wanted` FOREIGN KEY (`wantedID`) REFERENCES `players` (`pid`) ON DELETE CASCADE ON UPDATE CASCADE;
- COMMIT;
- /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
- /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
- /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
Advertisement
Add Comment
Please, Sign In to add comment