Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 168 lines (138 sloc) 4.929 kB
7066226 adding database schema for easy creating of tables
Jill Earles authored
1 -- phpMyAdmin SQL Dump
2 -- version 3.2.5
3 -- http://www.phpmyadmin.net
4 --
5 -- Host: localhost
6 -- Generation Time: May 31, 2012 at 02:43 PM
7 -- Server version: 5.5.17
8 -- PHP Version: 5.3.8
9
10 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
11
12
13 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
14 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
15 /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
16 /*!40101 SET NAMES utf8 */;
17
18 --
19 -- Database: `staffdirectory`
20 --
21
22 -- --------------------------------------------------------
23
24 --
25 -- Table structure for table `divisions`
26 --
27
28 CREATE TABLE IF NOT EXISTS `divisions` (
29 `id` int(11) NOT NULL DEFAULT '0',
30 `division_name` varchar(100) DEFAULT NULL,
31 `fax` varchar(100) DEFAULT NULL,
32 `short_location_name` varchar(100) DEFAULT NULL,
33 `is_branch` tinyint(11) NOT NULL DEFAULT '0',
34 `is_hours_location` tinyint(11) NOT NULL DEFAULT '0',
35 PRIMARY KEY (`id`)
36 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
37
38 -- --------------------------------------------------------
39
40 --
41 -- Table structure for table `hour_categories`
42 --
43
44 CREATE TABLE IF NOT EXISTS `hour_categories` (
45 `id` int(11) NOT NULL AUTO_INCREMENT,
46 `category` varchar(30) NOT NULL,
47 `description` text NOT NULL,
48 PRIMARY KEY (`id`)
49 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ;
50
51 -- --------------------------------------------------------
52
53 --
54 -- Table structure for table `hour_date_ranges`
55 --
56
57 CREATE TABLE IF NOT EXISTS `hour_date_ranges` (
58 `id` int(11) NOT NULL AUTO_INCREMENT,
59 `description` varchar(250) CHARACTER SET utf8 DEFAULT NULL,
60 `begin_date` date NOT NULL,
61 `end_date` date NOT NULL,
62 `modified_by` varchar(50) CHARACTER SET utf8 NOT NULL,
63 `modified_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
64 PRIMARY KEY (`id`)
65 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=89 ;
66
67 -- --------------------------------------------------------
68
69 --
70 -- Table structure for table `hour_days`
71 --
72
73 CREATE TABLE IF NOT EXISTS `hour_days` (
74 `id` int(11) NOT NULL AUTO_INCREMENT,
75 `hour_grouping_id` int(11) NOT NULL,
76 `day_of_week` varchar(10) COLLATE utf8_bin NOT NULL,
77 `open_time` time NOT NULL,
78 `close_time` time NOT NULL,
79 `is_closed` int(1) NOT NULL,
80 `is_tbd` int(1) NOT NULL,
81 `modified_by` varchar(50) COLLATE utf8_bin NOT NULL,
82 `modified_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
83 PRIMARY KEY (`id`)
84 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=5110 ;
85
86 -- --------------------------------------------------------
87
88 --
89 -- Table structure for table `hour_groupings`
90 --
91
92 CREATE TABLE IF NOT EXISTS `hour_groupings` (
93 `id` int(11) NOT NULL AUTO_INCREMENT,
94 `hour_date_range_id` int(11) NOT NULL,
95 `hour_location_id` int(11) NOT NULL,
96 `hour_type_id` int(11) NOT NULL,
97 `hour_category_id` int(11) NOT NULL,
98 `modified_by` varchar(50) DEFAULT NULL,
99 `modified_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
100 PRIMARY KEY (`id`)
101 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=637 ;
102
103 -- --------------------------------------------------------
104
105 --
106 -- Table structure for table `hour_locations`
107 --
108
109 CREATE TABLE IF NOT EXISTS `hour_locations` (
110 `id` int(11) NOT NULL AUTO_INCREMENT,
111 `display_position` int(2) NOT NULL,
112 `sub_location` int(1) NOT NULL DEFAULT '0',
113 `parent_hour_location_id` int(11) DEFAULT NULL,
114 `location_id` int(11) DEFAULT NULL,
115 `division_id` int(11) DEFAULT NULL,
116 `map_code` text,
117 `name` varchar(150) DEFAULT NULL,
118 `description` text,
119 `address` text,
120 `phone` varchar(30) DEFAULT NULL,
121 `url` varchar(250) DEFAULT NULL,
122 `accessibility_url` varchar(500) DEFAULT NULL,
123 `hours_notes` text,
124 `modified_by` varchar(150) DEFAULT NULL,
125 `modified_timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
126 `display` int(1) NOT NULL COMMENT 'a way to check yes/no for display',
127 `widget_note` text,
128 `login` varchar(15) NOT NULL,
129 PRIMARY KEY (`id`)
130 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=27 ;
131
132 --
133 -- RELATIONS FOR TABLE `hour_locations`:
134 -- `division_id`
135 -- `divisions` -> `id`
136 -- `location_id`
137 -- `locations` -> `id`
138 -- `parent_hour_location_id`
139 -- `hour_locations` -> `id`
140 --
141
142 -- --------------------------------------------------------
143
144 --
145 -- Table structure for table `hour_types`
146 --
147
148 CREATE TABLE IF NOT EXISTS `hour_types` (
149 `id` int(11) NOT NULL AUTO_INCREMENT,
150 `type` varchar(10) NOT NULL,
151 PRIMARY KEY (`id`)
152 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
153
154 -- --------------------------------------------------------
155
156 --
157 -- Table structure for table `locations`
158 --
159
160 CREATE TABLE IF NOT EXISTS `locations` (
161 `id` int(11) NOT NULL DEFAULT '0',
162 `location_name` varchar(100) DEFAULT NULL,
163 `address` varchar(300) DEFAULT NULL,
164 `postal_code` varchar(100) DEFAULT NULL,
165 `ubc_map_id` varchar(20) DEFAULT NULL,
166 PRIMARY KEY (`id`)
167 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Something went wrong with that request. Please try again.