-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcourse_users.sql
81 lines (66 loc) · 2.29 KB
/
course_users.sql
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
-- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 19, 2017 at 11:59 AM
-- Server version: 5.7.13-0ubuntu0.16.04.2
-- PHP Version: 5.6.26-1+deb.sury.org~xenial+1
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: `econtent`
--
-- --------------------------------------------------------
--
-- Table structure for table `course_users`
--
CREATE TABLE `course_users` (
`id` int(10) UNSIGNED NOT NULL,
`course_id` int(10) UNSIGNED NOT NULL,
`user_id` int(10) UNSIGNED NOT NULL DEFAULT '27000000',
`email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`opted_out` tinyint(4) NOT NULL DEFAULT '0',
`opted_out_date` blob,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `course_users`
--
INSERT INTO `course_users` (`id`, `course_id`, `user_id`, `email`, `opted_out`, `opted_out_date`, `created_at`, `updated_at`) VALUES
(1, 14, 1, 'inst@ischool.edu', 0, NULL, '2017-03-22 06:02:10', '2017-03-22 06:02:10');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `course_users`
--
ALTER TABLE `course_users`
ADD PRIMARY KEY (`id`),
ADD KEY `course_users_ibfk_1` (`user_id`),
ADD KEY `course_users_ibfk_2` (`course_id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `course_users`
--
ALTER TABLE `course_users`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `course_users`
--
ALTER TABLE `course_users`
ADD CONSTRAINT `course_users_ibfk_1` FOREIGN KEY (`course_id`) REFERENCES `courses` (`id`),
ADD CONSTRAINT `course_users_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);
/*!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 */;