-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Oct 14, 2019 at 09:56 AM
-- Server version: 5.6.45
-- PHP Version: 7.2.7

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
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: `txt_shorturl`
--

-- --------------------------------------------------------

--
-- Table structure for table `pointer`
--

CREATE TABLE `pointer` (
  `id` int(11) NOT NULL,
  `indexes` varchar(100) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `pointer`
--

INSERT INTO `pointer` (`id`, `indexes`) VALUES
(1, '0,0,0,0');

-- --------------------------------------------------------

--
-- Table structure for table `short_code`
--

CREATE TABLE `short_code` (
  `id` int(11) NOT NULL,
  `code` varchar(100) NOT NULL,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `short_code`
--

-- --------------------------------------------------------

--
-- Table structure for table `url_links`
--

CREATE TABLE `url_links` (
  `id` int(11) NOT NULL,
  `long_url` varchar(2000) NOT NULL,
  `short_url` varchar(400) NOT NULL,
  `webhook` text NOT NULL,
  `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `url_links`
--
--
-- Indexes for dumped tables
--

--
-- Indexes for table `pointer`
--
ALTER TABLE `pointer`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `short_code`
--
ALTER TABLE `short_code`
  ADD PRIMARY KEY (`id`),
  ADD KEY `code` (`code`);

--
-- Indexes for table `url_links`
--
ALTER TABLE `url_links`
  ADD PRIMARY KEY (`id`),
  ADD KEY `short_url` (`short_url`),
  ADD KEY `long_url` (`long_url`(1000));

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `pointer`
--
ALTER TABLE `pointer`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `short_code`
--
ALTER TABLE `short_code`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- AUTO_INCREMENT for table `url_links`
--
ALTER TABLE `url_links`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
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 */;
