Created
November 9, 2017 15:39
-
-
Save steinkel/e3a1158b0f9a2fe377af973f6474f79b to your computer and use it in GitHub Desktop.
This file contains 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 4.0.10deb1 | |
-- http://www.phpmyadmin.net | |
-- | |
-- Host: 127.0.0.1 | |
-- Generation Time: Jan 29, 2015 at 12:12 AM | |
-- Server version: 5.5.40-0ubuntu0.14.04.1 | |
-- PHP Version: 5.5.9-1ubuntu4.5 | |
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: `draw` | |
-- | |
-- -------------------------------------------------------- | |
-- | |
-- Table structure for table `answers` | |
-- | |
DROP TABLE IF EXISTS `answers`; | |
CREATE TABLE IF NOT EXISTS `answers` ( | |
`id` int(11) unsigned NOT NULL AUTO_INCREMENT, | |
`user_id` int(11) unsigned NOT NULL, | |
`question_id` int(11) unsigned NOT NULL, | |
`answer` tinyint(1) NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; | |
-- -------------------------------------------------------- | |
-- | |
-- Table structure for table `elections` | |
-- | |
DROP TABLE IF EXISTS `elections`; | |
CREATE TABLE IF NOT EXISTS `elections` ( | |
`id` int(11) unsigned NOT NULL AUTO_INCREMENT, | |
`name` varchar(255) NOT NULL, | |
`year` int(4) unsigned NOT NULL, | |
`created` datetime DEFAULT NULL, | |
`modified` datetime DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; | |
-- -------------------------------------------------------- | |
-- | |
-- Table structure for table `parties` | |
-- | |
DROP TABLE IF EXISTS `parties`; | |
CREATE TABLE IF NOT EXISTS `parties` ( | |
`id` int(11) unsigned NOT NULL AUTO_INCREMENT, | |
`name` varchar(255) NOT NULL, | |
`logo` varchar(512) NOT NULL, | |
`description` text NOT NULL, | |
`url` varchar(255) DEFAULT NULL, | |
`created` datetime DEFAULT NULL, | |
`modified` datetime DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; | |
-- -------------------------------------------------------- | |
-- | |
-- Table structure for table `questions` | |
-- | |
DROP TABLE IF EXISTS `questions`; | |
CREATE TABLE IF NOT EXISTS `questions` ( | |
`id` int(11) unsigned NOT NULL AUTO_INCREMENT, | |
`title` varchar(255) NOT NULL, | |
`user_id` int(11) unsigned NOT NULL, | |
`election_id` int(11) unsigned NOT NULL, | |
`created` datetime DEFAULT NULL, | |
`modified` datetime DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; | |
-- -------------------------------------------------------- | |
-- | |
-- Table structure for table `questions_tags` | |
-- | |
DROP TABLE IF EXISTS `questions_tags`; | |
CREATE TABLE IF NOT EXISTS `questions_tags` ( | |
`question_id` int(11) unsigned NOT NULL, | |
`tag_id` int(11) unsigned NOT NULL, | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ; | |
-- -------------------------------------------------------- | |
-- | |
-- Table structure for table `tags` | |
-- | |
DROP TABLE IF EXISTS `tags`; | |
CREATE TABLE IF NOT EXISTS `tags` ( | |
`id` int(11) unsigned NOT NULL AUTO_INCREMENT, | |
`name` varchar(255) NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; | |
-- -------------------------------------------------------- | |
-- | |
-- Table structure for table `users` | |
-- | |
DROP TABLE IF EXISTS `users`; | |
CREATE TABLE IF NOT EXISTS `users` ( | |
`id` int(11) unsigned NOT NULL AUTO_INCREMENT, | |
`first_name` varchar(255) DEFAULT NULL, | |
`last_name` varchar(255) DEFAULT NULL, | |
`email` varchar(255) NOT NULL, | |
`password` varchar(255) NOT NULL, | |
`role` int(4) unsigned NOT NULL, | |
`party_id` int(11) unsigned DEFAULT NULL, | |
`created` datetime DEFAULT NULL, | |
`modified` datetime DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; | |
/*!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