From fc569fa42d3dd1f8709103c7dae7e995597072ca Mon Sep 17 00:00:00 2001
From: cirakg <ciraboxkg@gmail.com>
Date: Mon, 2 Jan 2023 16:34:46 +0100
Subject: Po zavrsetu igre se dodaje u history u bazi.

---
 pokemon.sql | 120 +++++++++++++++++++++++++++++++++++++++++++++---------------
 1 file changed, 90 insertions(+), 30 deletions(-)

(limited to 'pokemon.sql')

diff --git a/pokemon.sql b/pokemon.sql
index f7972b7..63abc1c 100644
--- a/pokemon.sql
+++ b/pokemon.sql
@@ -1,11 +1,11 @@
 -- phpMyAdmin SQL Dump
--- version 5.0.2
+-- version 5.2.0
 -- https://www.phpmyadmin.net/
 --
--- Host: 127.0.0.1:3306
--- Generation Time: Dec 22, 2022 at 01:40 AM
--- Server version: 5.7.31
--- PHP Version: 7.4.9
+-- Host: 127.0.0.1
+-- Generation Time: Jan 02, 2023 at 04:34 PM
+-- Server version: 10.4.27-MariaDB
+-- PHP Version: 8.1.12
 
 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
 START TRANSACTION;
@@ -29,16 +29,14 @@ USE `pokemon`;
 -- Table structure for table `ability`
 --
 
-DROP TABLE IF EXISTS `ability`;
-CREATE TABLE IF NOT EXISTS `ability` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
+CREATE TABLE `ability` (
+  `id` int(11) NOT NULL,
   `monsterId` int(11) NOT NULL,
   `name` varchar(255) NOT NULL,
   `description` varchar(255) NOT NULL,
   `type` int(11) NOT NULL,
-  `power` float NOT NULL,
-  PRIMARY KEY (`id`)
-) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
+  `power` float NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
 
 --
 -- Dumping data for table `ability`
@@ -64,15 +62,25 @@ INSERT INTO `ability` (`id`, `monsterId`, `name`, `description`, `type`, `power`
 -- Table structure for table `history`
 --
 
-DROP TABLE IF EXISTS `history`;
-CREATE TABLE IF NOT EXISTS `history` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
+CREATE TABLE `history` (
+  `id` int(11) NOT NULL,
   `player` int(11) NOT NULL,
   `pokemon` int(11) NOT NULL,
   `time` date NOT NULL,
-  `result` int(11) NOT NULL,
-  PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+  `result` int(11) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
+
+--
+-- Dumping data for table `history`
+--
+
+INSERT INTO `history` (`id`, `player`, `pokemon`, `time`, `result`) VALUES
+(1, 5, 2, '2023-01-02', 1),
+(2, 2, 1, '2023-01-02', 0),
+(3, 5, 2, '2023-01-02', 0),
+(4, 2, 1, '2023-01-02', 1),
+(5, 2, 1, '2023-01-02', 1),
+(6, 4, 3, '2023-01-02', 0);
 
 -- --------------------------------------------------------
 
@@ -80,15 +88,13 @@ CREATE TABLE IF NOT EXISTS `history` (
 -- Table structure for table `monster`
 --
 
-DROP TABLE IF EXISTS `monster`;
-CREATE TABLE IF NOT EXISTS `monster` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
+CREATE TABLE `monster` (
+  `id` int(11) NOT NULL,
   `name` varchar(255) NOT NULL,
   `description` varchar(255) NOT NULL,
   `hp` int(11) NOT NULL,
-  `base64Image` varchar(15000) NOT NULL,
-  PRIMARY KEY (`id`)
-) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
+  `base64Image` varchar(15000) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
 
 --
 -- Dumping data for table `monster`
@@ -105,15 +111,13 @@ INSERT INTO `monster` (`id`, `name`, `description`, `hp`, `base64Image`) VALUES
 -- Table structure for table `user`
 --
 
-DROP TABLE IF EXISTS `user`;
-CREATE TABLE IF NOT EXISTS `user` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
+CREATE TABLE `user` (
+  `id` int(11) NOT NULL,
   `username` varchar(255) NOT NULL,
   `password` varchar(255) NOT NULL,
   `admin` tinyint(1) NOT NULL,
-  `pokemonId` int(11) DEFAULT NULL,
-  PRIMARY KEY (`id`)
-) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
+  `pokemonId` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
 
 --
 -- Dumping data for table `user`
@@ -122,9 +126,65 @@ CREATE TABLE IF NOT EXISTS `user` (
 INSERT INTO `user` (`id`, `username`, `password`, `admin`, `pokemonId`) VALUES
 (3, 'cirakg', '$2a$10$tElFyUJsnb9xWuV3PRWOW.HPZ8qwLebQEpfu61eqozUcxC3ydEv7.', 1, NULL),
 (2, 'cirakg1', '$2a$10$TJHJfYbgZO97r0CJi2eKpeEhOW8wKEO5BGXQBpR33js3R5rM98Y3W', 0, 1),
-(4, 'cirakg2', '$2a$10$LQsWtrn7OqrNU8wSSfg/6uo47lzQqw27T3ubUDRqFQVZhI6F0uBli', 0, NULL),
+(4, 'cirakg2', '$2a$10$LQsWtrn7OqrNU8wSSfg/6uo47lzQqw27T3ubUDRqFQVZhI6F0uBli', 0, 3),
 (5, 'cirakg5', '$2a$10$cO0oAPi5O4hoVQWTHuw0fOXXBYLqwJ2V5qrHy32ZjpmR9fTpNBGHy', 0, 2),
 (6, 'cirakg10', '$2a$10$IiK5l7wFvi/KPliiCpNMCOAuehXvJFofN6ARotiSN.5FuRpjke32G', 0, NULL);
+
+--
+-- Indexes for dumped tables
+--
+
+--
+-- Indexes for table `ability`
+--
+ALTER TABLE `ability`
+  ADD PRIMARY KEY (`id`);
+
+--
+-- Indexes for table `history`
+--
+ALTER TABLE `history`
+  ADD PRIMARY KEY (`id`);
+
+--
+-- Indexes for table `monster`
+--
+ALTER TABLE `monster`
+  ADD PRIMARY KEY (`id`);
+
+--
+-- Indexes for table `user`
+--
+ALTER TABLE `user`
+  ADD PRIMARY KEY (`id`);
+
+--
+-- AUTO_INCREMENT for dumped tables
+--
+
+--
+-- AUTO_INCREMENT for table `ability`
+--
+ALTER TABLE `ability`
+  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
+
+--
+-- AUTO_INCREMENT for table `history`
+--
+ALTER TABLE `history`
+  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
+
+--
+-- AUTO_INCREMENT for table `monster`
+--
+ALTER TABLE `monster`
+  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
+
+--
+-- AUTO_INCREMENT for table `user`
+--
+ALTER TABLE `user`
+  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
 COMMIT;
 
 /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
-- 
cgit v1.2.3

