Created
September 22, 2011 17:49
-
-
Save FinalDestiny/1235460 to your computer and use it in GitHub Desktop.
database design
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- phpMyAdmin SQL Dump | |
-- version 3.4.4 | |
-- http://www.phpmyadmin.net | |
-- | |
-- Host: localhost | |
-- Generation Time: Sep 22, 2011 at 08:43 PM | |
-- Server version: 5.5.15 | |
-- PHP Version: 5.3.8 | |
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; | |
SET time_zone = "+00:00"; | |
-- | |
-- Database: `yadb` | |
-- | |
-- -------------------------------------------------------- | |
-- | |
-- Table structure for table `categories` | |
-- | |
CREATE TABLE IF NOT EXISTS `categories` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`name` varchar(80) DEFAULT NULL, | |
`slug` varchar(80) DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; | |
-- -------------------------------------------------------- | |
-- | |
-- Table structure for table `comments` | |
-- | |
CREATE TABLE IF NOT EXISTS `comments` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`name` varchar(80) NOT NULL, | |
`comment` TEXT NOT NULL, | |
`email` varchar(100) DEFAULT NULL, | |
`website` varchar(80) DEFAULT NULL, | |
`idpost` int(11) NOT NULL, | |
`commentdate` DATETIME NOT NULL, | |
`ip` VARCHAR(16) NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; | |
-- -------------------------------------------------------- | |
-- | |
-- Table structure for table `posts` | |
-- | |
CREATE TABLE IF NOT EXISTS `posts` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`title` varchar(80) NOT NULL, | |
`content` longtext NOT NULL, | |
`excerpt` text NOT NULL, | |
`status` tinyint(2) NOT NULL, | |
`postdate` datetime NOT NULL, | |
`editeddate` datetime NOT NULL, | |
`idcategory` int(11) NOT NULL, | |
`alias` varchar(80) NOT NULL, | |
`nrratings` mediumint(9) NOT NULL DEFAULT '0', | |
`ratingsum` mediumint(9) NOT NULL DEFAULT '0', | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; | |
-- -------------------------------------------------------- | |
-- | |
-- Table structure for table `ratings` | |
-- | |
CREATE TABLE IF NOT EXISTS `ratings` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`idpost` int(11) NOT NULL, | |
`stars` tinyint(2) NOT NULL, | |
`daterating` datetime NOT NULL, | |
`ip` varchar(16) NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; | |
-- -------------------------------------------------------- | |
-- | |
-- Table structure for table `users` | |
-- | |
CREATE TABLE IF NOT EXISTS `users` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`username` varchar(50) NOT NULL, | |
`password` char(32) NOT NULL, | |
`email` varchar(100) NOT NULL, | |
`role` tinyint(2) NOT NULL DEFAULT '0', | |
`regdate` datetime NOT NULL, | |
`lastlogin` datetime NOT NULL, | |
`alias` varchar(50) DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment