-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDB-structure.sql
More file actions
94 lines (79 loc) · 2.31 KB
/
DB-structure.sql
File metadata and controls
94 lines (79 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
-- phpMyAdmin SQL Dump
-- version 4.4.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 03, 2017 at 07:45 PM
-- Server version: 5.6.25
-- PHP Version: 5.6.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: `thezoq_userbob`
--
-- --------------------------------------------------------
--
-- Table structure for table `tests`
--
CREATE TABLE IF NOT EXISTS `tests` (
`id` int(11) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`username` varchar(255) NOT NULL,
`test_name` varchar(255) NOT NULL,
`url` text NOT NULL,
`instructions` text NOT NULL,
`test_id` int(11) NOT NULL,
`is_started` int(11) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `test_results`
--
CREATE TABLE IF NOT EXISTS `test_results` (
`id` int(11) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`test_id` int(11) NOT NULL,
`result_id` int(11) NOT NULL,
`code` int(11) NOT NULL,
`recieved_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`video_id` int(11) NOT NULL,
`userbob_test_id` int(11) NOT NULL,
`worker_id` int(11) NOT NULL,
`video_url` varchar(255) NOT NULL,
`alias` varchar(255) NOT NULL,
`demographics` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `tests`
--
ALTER TABLE `tests`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `test_results`
--
ALTER TABLE `test_results`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `result_id` (`result_id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `tests`
--
ALTER TABLE `tests`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `test_results`
--
ALTER TABLE `test_results`
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 */;