text: -- phpMyAdmin SQL Dump
  -- version 4.5.1
  -- http://www.phpmyadmin.net
  --
  -- Värd: 127.0.0.1
  -- Tid vid skapande: 23 jan 2017 kl 15:01
  -- Serverversion: 10.1.16-MariaDB
  -- PHP-version: 7.0.9
  
  SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  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 */;
  
  --
  -- Databas: `kajes_linkify`
  --
  CREATE DATABASE IF NOT EXISTS `kajes_linkify` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
  USE `kajes_linkify`;
  
  -- --------------------------------------------------------
  
  --
  -- Tabellstruktur `posts`
  --
  
  DROP TABLE IF EXISTS `posts`;
  CREATE TABLE `posts` (
    `postID` int(10) UNSIGNED NOT NULL,
    `authorID` int(10) UNSIGNED NOT NULL,
    `post_title` varchar(255) DEFAULT NULL,
    `post_link` varchar(255) DEFAULT NULL,
    `post_content` text,
    `posted_on` datetime DEFAULT NULL,
    `updated_on` datetime DEFAULT NULL,
    `voteCount` int(11) DEFAULT '0',
    `parent_id` int(11) NOT NULL DEFAULT '0'
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- --------------------------------------------------------
  
  --
  -- Tabellstruktur `tokens`
  --
  
  DROP TABLE IF EXISTS `tokens`;
  CREATE TABLE `tokens` (
    `cookieID` int(10) UNSIGNED NOT NULL,
    `uid` int(10) UNSIGNED NOT NULL,
    `first` varchar(128) DEFAULT NULL,
    `second` varchar(256) DEFAULT NULL,
    `expire` datetime DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- --------------------------------------------------------
  
  --
  -- Tabellstruktur `users`
  --
  
  DROP TABLE IF EXISTS `users`;
  CREATE TABLE `users` (
    `uid` int(10) UNSIGNED NOT NULL,
    `name` varchar(255) NOT NULL,
    `email` varchar(255) NOT NULL,
    `password` varchar(60) NOT NULL,
    `bio` mediumtext,
    `avatarID` varchar(100) DEFAULT NULL,
    `avatarImageType` varchar(4) DEFAULT NULL,
    `votedOn` varchar(1000) NOT NULL DEFAULT '[]'
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  --
  -- Index för dumpade tabeller
  --
  
  --
  -- Index för tabell `posts`
  --
  ALTER TABLE `posts`
    ADD PRIMARY KEY (`postID`),
    ADD KEY `authorID` (`authorID`);
  
  --
  -- Index för tabell `tokens`
  --
  ALTER TABLE `tokens`
    ADD PRIMARY KEY (`cookieID`),
    ADD KEY `uid` (`uid`);
  
  --
  -- Index för tabell `users`
  --
  ALTER TABLE `users`
    ADD PRIMARY KEY (`uid`);
  
  --
  -- AUTO_INCREMENT för dumpade tabeller
  --
  
  --
  -- AUTO_INCREMENT för tabell `posts`
  --
  ALTER TABLE `posts`
    MODIFY `postID` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=45;
  --
  -- AUTO_INCREMENT för tabell `tokens`
  --
  ALTER TABLE `tokens`
    MODIFY `cookieID` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;
  --
  -- AUTO_INCREMENT för tabell `users`
  --
  ALTER TABLE `users`
    MODIFY `uid` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
  --
  -- Restriktioner för dumpade tabeller
  --
  
  --
  -- Restriktioner för tabell `posts`
  --
  ALTER TABLE `posts`
    ADD CONSTRAINT `posts_ibfk_1` FOREIGN KEY (`authorID`) REFERENCES `users` (`uid`);
  
  --
  -- Restriktioner för tabell `tokens`
  --
  ALTER TABLE `tokens`
    ADD CONSTRAINT `tokens_ibfk_1` FOREIGN KEY (`uid`) REFERENCES `users` (`uid`);
  
  /*!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 */;
  