-
Notifications
You must be signed in to change notification settings - Fork 0
/
sql_structure.sql
75 lines (61 loc) · 2 KB
/
sql_structure.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
-- phpMyAdmin SQL Dump
-- version 3.2.3
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 22, 2015 at 04:53 PM
-- Server version: 5.6.26
-- PHP Version: 5.4.16
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `hours`
--
-- --------------------------------------------------------
--
-- Table structure for table `exceptions`
--
CREATE TABLE IF NOT EXISTS `exceptions` (
`except_id` int(11) NOT NULL AUTO_INCREMENT,
`date` date NOT NULL,
`opentime` varchar(50) DEFAULT NULL,
`closetime` varchar(50) DEFAULT NULL,
`latenight` enum('Y','N') DEFAULT NULL,
`closed` enum('Y','N') DEFAULT NULL,
PRIMARY KEY (`except_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `presets`
--
CREATE TABLE IF NOT EXISTS `presets` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`rank` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `settings`
--
CREATE TABLE IF NOT EXISTS `settings` (
`settings_key` int(11) NOT NULL AUTO_INCREMENT,
`preset_id` int(11) DEFAULT NULL,
`day` enum('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday') DEFAULT NULL,
`opentime` varchar(50) DEFAULT NULL,
`closetime` varchar(50) DEFAULT NULL,
`latenight` enum('Y','N') NOT NULL DEFAULT 'N',
`closed` enum('Y','N') NOT NULL DEFAULT 'N',
PRIMARY KEY (`settings_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='hourse of operation - starting Aug 2015';
-- --------------------------------------------------------
--
-- Table structure for table `timeframes`
--
CREATE TABLE IF NOT EXISTS `timeframes` (
`timeframe_id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) DEFAULT NULL,
`first_date` date NOT NULL,
`last_date` date NOT NULL,
`apply_preset_id` int(11) NOT NULL,
PRIMARY KEY (`timeframe_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;