-
Notifications
You must be signed in to change notification settings - Fork 4
/
database.sql
executable file
·119 lines (99 loc) · 3.29 KB
/
database.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
-- phpMyAdmin SQL Dump
-- version 3.1.3.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 27, 2011 at 11:57 AM
-- Server version: 5.1.56
-- PHP Version: 5.2.12
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `go`
--
-- --------------------------------------------------------
--
-- Table structure for table `alias`
--
CREATE TABLE IF NOT EXISTS `alias` (
`name` varchar(255) NOT NULL DEFAULT '',
`code` varchar(255) NOT NULL DEFAULT '',
`institution` varchar(255) NOT NULL DEFAULT 'middlebury.edu',
`updated` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`name`,`institution`),
KEY `updated` (`updated`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `code`
--
CREATE TABLE IF NOT EXISTS `code` (
`name` varchar(255) NOT NULL DEFAULT '',
`url` text,
`description` text,
`institution` varchar(255) NOT NULL DEFAULT 'middlebury.edu',
`public` tinyint(1) NOT NULL DEFAULT '1',
`url2` text,
`updated` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`name`,`institution`),
KEY `updated` (`updated`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `flag`
--
CREATE TABLE IF NOT EXISTS `flag` (
`code` varchar(255) NOT NULL,
`user` varchar(255) NOT NULL,
`ipaddress` varchar(255) NOT NULL,
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`institution` varchar(255) NOT NULL,
`url` text NOT NULL,
`comment` text NOT NULL,
`completed` varchar(255) NOT NULL DEFAULT '0',
`completed_on` datetime NOT NULL,
`notes` varchar(2000) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `log`
--
CREATE TABLE IF NOT EXISTS `log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`tstamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`code` varchar(255) NOT NULL,
`alias` varchar(255) DEFAULT NULL,
`institution` varchar(255) NOT NULL,
`description` text NOT NULL,
`user_id` varchar(255) NOT NULL,
`user_display_name` varchar(255) NOT NULL,
`request` text,
`referer` text,
PRIMARY KEY (`id`),
KEY `tstamp` (`tstamp`),
KEY `code` (`code`),
KEY `alias` (`alias`),
KEY `institution` (`institution`),
KEY `user_id` (`user_id`),
KEY `user_display_name` (`user_display_name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7570 ;
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE IF NOT EXISTS `user` (
`name` varchar(128) NOT NULL DEFAULT '0',
`notify` tinyint(2) NOT NULL DEFAULT '1',
PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `user_to_code`
--
CREATE TABLE IF NOT EXISTS `user_to_code` (
`code` varchar(255) NOT NULL DEFAULT '',
`user` varchar(128) NOT NULL DEFAULT '0',
`institution` varchar(255) NOT NULL DEFAULT 'middlebury.edu',
`updated` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`code`,`user`,`institution`),
KEY `updated` (`updated`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;