Skip to content

Instantly share code, notes, and snippets.

@phanngoc
Created July 27, 2015 15:22
Show Gist options
  • Select an option

  • Save phanngoc/6db66951afcb238ea7d1 to your computer and use it in GitHub Desktop.

Select an option

Save phanngoc/6db66951afcb238ea7d1 to your computer and use it in GitHub Desktop.
-- phpMyAdmin SQL Dump
-- version 4.4.12
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 27, 2015 at 10:21 PM
-- Server version: 5.5.44-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.11
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 */;
--
-- Database: `elearnpub`
--
-- --------------------------------------------------------
--
-- Table structure for table `bill`
--
CREATE TABLE IF NOT EXISTS `bill` (
`id` int(11) NOT NULL,
`user_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `books`
--
CREATE TABLE IF NOT EXISTS `books` (
`id` int(11) NOT NULL,
`title` varchar(200) NOT NULL,
`subtitle` varchar(500) NOT NULL,
`description` text NOT NULL,
`thankyoumessage` text NOT NULL,
`bookurl` varchar(200) NOT NULL,
`language_id` int(11) NOT NULL,
`google_analytic` varchar(200) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `book_author`
--
CREATE TABLE IF NOT EXISTS `book_author` (
`id` int(11) NOT NULL,
`book_id` int(11) NOT NULL,
`author_id` int(11) NOT NULL,
`is_main` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `carts`
--
CREATE TABLE IF NOT EXISTS `carts` (
`id` int(11) NOT NULL,
`book_id` int(11) NOT NULL,
`count` int(11) NOT NULL,
`bill_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `chapters`
--
CREATE TABLE IF NOT EXISTS `chapters` (
`id` int(11) NOT NULL,
`title` varchar(200) NOT NULL,
`book_id` int(11) NOT NULL,
`content` text NOT NULL,
`is_sample` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `landingpage`
--
CREATE TABLE IF NOT EXISTS `landingpage` (
`id` int(11) NOT NULL,
`youtube_url` varchar(100) NOT NULL,
`vimeo_url` varchar(100) NOT NULL,
`meta_description` varchar(500) NOT NULL,
`about` text NOT NULL,
`isshowreadcount` int(11) NOT NULL,
`feedback_display` int(11) NOT NULL,
`statusbook_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `prices`
--
CREATE TABLE IF NOT EXISTS `prices` (
`id` int(11) NOT NULL,
`count` int(11) NOT NULL,
`price` int(11) NOT NULL,
`book_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `role`
--
CREATE TABLE IF NOT EXISTS `role` (
`id` int(11) NOT NULL,
`name` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `statusbook`
--
CREATE TABLE IF NOT EXISTS `statusbook` (
`id` int(11) NOT NULL,
`name` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL,
`username` varchar(50) NOT NULL,
`firstname` varchar(50) NOT NULL,
`lastname` varchar(50) NOT NULL,
`email` varchar(60) NOT NULL,
`role_id` int(11) NOT NULL,
`avatar` varchar(100) NOT NULL,
`blurb` text NOT NULL,
`twitter_id` varchar(60) NOT NULL,
`github` varchar(60) NOT NULL,
`googleplus` varchar(60) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `user_meta`
--
CREATE TABLE IF NOT EXISTS `user_meta` (
`id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`meta_key` varchar(50) NOT NULL,
`meta_value` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `bill`
--
ALTER TABLE `bill`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `books`
--
ALTER TABLE `books`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `book_author`
--
ALTER TABLE `book_author`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `carts`
--
ALTER TABLE `carts`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `chapters`
--
ALTER TABLE `chapters`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `landingpage`
--
ALTER TABLE `landingpage`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `prices`
--
ALTER TABLE `prices`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `role`
--
ALTER TABLE `role`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `statusbook`
--
ALTER TABLE `statusbook`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `user_meta`
--
ALTER TABLE `user_meta`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `bill`
--
ALTER TABLE `bill`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `books`
--
ALTER TABLE `books`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `book_author`
--
ALTER TABLE `book_author`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `carts`
--
ALTER TABLE `carts`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `chapters`
--
ALTER TABLE `chapters`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `landingpage`
--
ALTER TABLE `landingpage`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `prices`
--
ALTER TABLE `prices`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `role`
--
ALTER TABLE `role`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `statusbook`
--
ALTER TABLE `statusbook`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `user_meta`
--
ALTER TABLE `user_meta`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
/*!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