From 4e8c603d89ea14929e31b66d37cd584ecd838284 Mon Sep 17 00:00:00 2001 From: Julien Liabeuf Date: Thu, 28 Aug 2014 11:18:30 +0700 Subject: [PATCH] Add database --- openpeek.sql | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 openpeek.sql diff --git a/openpeek.sql b/openpeek.sql new file mode 100644 index 0000000..543f289 --- /dev/null +++ b/openpeek.sql @@ -0,0 +1,70 @@ +-- phpMyAdmin SQL Dump +-- version 4.0.4 +-- http://www.phpmyadmin.net +-- +-- Host: localhost +-- Generation Time: Aug 27, 2014 at 10:34 AM +-- Server version: 5.6.12-log +-- PHP Version: 5.4.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: `openpeek` +-- +CREATE DATABASE IF NOT EXISTS `openpeek` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; +USE `openpeek`; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `images` +-- + +CREATE TABLE IF NOT EXISTS `images` ( + `image_id` int(11) NOT NULL AUTO_INCREMENT, + `hash` text NOT NULL, + `date_added` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + `name` text NOT NULL, + `source` text NOT NULL, + `preview_url` text NOT NULL, + `link` text NOT NULL, + `site` text NOT NULL, + PRIMARY KEY (`image_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `relationship` +-- + +CREATE TABLE IF NOT EXISTS `relationship` ( + `ID` int(11) NOT NULL AUTO_INCREMENT, + `image_id` int(11) NOT NULL, + `tag_id` int(11) NOT NULL, + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tags` +-- + +CREATE TABLE IF NOT EXISTS `tags` ( + `tag_id` int(11) NOT NULL AUTO_INCREMENT, + `tag` text NOT NULL, + PRIMARY KEY (`tag_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; + +/*!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 */;