Advertisement
Guest User

Untitled

a guest
Sep 15th, 2015
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 1.09 KB | None | 0 0
  1. CREATE DATABASE `strikeironstudio_db`;
  2. USE `strikeironstudio_db`;
  3.  
  4. CREATE TABLE IF NOT EXISTS `questions` (
  5.    `id` int UNIQUE NOT NULL AUTO_INCREMENT,
  6.    `text` text,
  7.    `deleted` boolean NOT NULL DEFAULT 0,
  8.    PRIMARY KEY(id)
  9. );
  10.  
  11. CREATE TABLE IF NOT EXISTS `column` (
  12.    `id` int UNIQUE NOT NULL AUTO_INCREMENT,
  13.    `text` text(),
  14.    `deleted` boolean NOT NULL DEFAULT 0,
  15.    PRIMARY KEY(id)
  16. );
  17.  
  18. CREATE TABLE IF NOT EXISTS `questions__column` (
  19.     `question_id` int,
  20.     `column_id` int,
  21.     `false_value` float DEFAULT 1.0,
  22.     `true_value` float,
  23. );
  24.  
  25. CREATE TABLE IF NOT EXISTS `column_result` (
  26.     `column_id` int,
  27.     `min` float,
  28.     `min_inclusive` boolean,
  29.     `max` float,
  30.     `max_inclusive` boolean,
  31.     `img` text(),
  32.     `html` text(),
  33. );
  34.  
  35. INSERT INTO questions VALUES(1,'I only want a sulfate-free product.');
  36. INSERT INTO questions VALUES(2,'I have allergies to milk.');
  37. INSERT INTO questions VALUES(3,'My hair is very oily.');
  38.  
  39. INSERT INTO column VALUES(1,'Product 1');
  40. INSERT INTO column VALUES(2,'Additional Weight');
  41. INSERT INTO column VALUES(3,'Disqualifier');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement