text: -- phpMyAdmin SQL Dump
  -- version 5.1.1
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: Oct 31, 2021 at 01:04 PM
  -- Server version: 10.4.21-MariaDB
  -- PHP Version: 8.0.11
  
  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 */;
  
  --
  -- Database: `polls_app`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `answers`
  --
  
  CREATE TABLE `answers` (
    `id` int(11) NOT NULL,
    `poll_id` int(11) NOT NULL,
    `Answer` varchar(100) NOT NULL,
    `answer_count` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `poll`
  --
  
  CREATE TABLE `poll` (
    `id` int(11) NOT NULL,
    `owner_ip` varchar(18) NOT NULL,
    `poll_name` varchar(100) NOT NULL,
    `generated_url` varchar(20) NOT NULL,
    `answer_more_than_once` int(1) NOT NULL,
    `all_votes` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user_answers`
  --
  
  CREATE TABLE `user_answers` (
    `id` int(11) NOT NULL,
    `user_ip` varchar(18) NOT NULL,
    `poll_id` int(11) NOT NULL,
    `answer_id` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `answers`
  --
  ALTER TABLE `answers`
    ADD PRIMARY KEY (`id`),
    ADD KEY `poll_id` (`poll_id`);
  
  --
  -- Indexes for table `poll`
  --
  ALTER TABLE `poll`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `user_answers`
  --
  ALTER TABLE `user_answers`
    ADD PRIMARY KEY (`id`),
    ADD KEY `poll_id` (`poll_id`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `answers`
  --
  ALTER TABLE `answers`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=245;
  
  --
  -- AUTO_INCREMENT for table `poll`
  --
  ALTER TABLE `poll`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=224;
  
  --
  -- AUTO_INCREMENT for table `user_answers`
  --
  ALTER TABLE `user_answers`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=100;
  
  --
  -- Constraints for dumped tables
  --
  
  --
  -- Constraints for table `answers`
  --
  ALTER TABLE `answers`
    ADD CONSTRAINT `answers_ibfk_1` FOREIGN KEY (`poll_id`) REFERENCES `poll` (`id`);
  
  --
  -- Constraints for table `user_answers`
  --
  ALTER TABLE `user_answers`
    ADD CONSTRAINT `user_answers_ibfk_1` FOREIGN KEY (`poll_id`) REFERENCES `poll` (`id`);
  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 */;
  