Skip to content

Instantly share code, notes, and snippets.

@hemache
Created February 21, 2016 20:13
Show Gist options
  • Save hemache/7b2f4f226e04183fd788 to your computer and use it in GitHub Desktop.
Save hemache/7b2f4f226e04183fd788 to your computer and use it in GitHub Desktop.
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Feb 21, 2016 at 09:12 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
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 utf8 */;
--
-- Database: `kindafunny`
--
-- --------------------------------------------------------
--
-- Table structure for table `games`
--
CREATE TABLE IF NOT EXISTS `games` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`image_url` text COLLATE utf8mb4_unicode_ci NOT NULL,
`date` date NOT NULL,
`year` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL,
`month` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL,
`day` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id_2` (`id`),
KEY `title` (`title`(191)),
KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `platforms`
--
CREATE TABLE IF NOT EXISTS `platforms` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `supports`
--
CREATE TABLE IF NOT EXISTS `supports` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`game_id` int(11) NOT NULL,
`platform_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `game_id` (`game_id`),
KEY `platform_id` (`platform_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `supports`
--
ALTER TABLE `supports`
ADD CONSTRAINT `supports_ibfk_1` FOREIGN KEY (`game_id`) REFERENCES `games` (`id`),
ADD CONSTRAINT `supports_ibfk_2` FOREIGN KEY (`platform_id`) REFERENCES `platforms` (`id`);
/*!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 */;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment