Skip to content

Commit 5e70fb5

Browse files
committed
Add db setup sql
Give defined method for setting up the table structure
1 parent d436ec4 commit 5e70fb5

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

db-setup.sql

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
-- phpMyAdmin SQL Dump
2+
-- version 4.7.9
3+
-- https://www.phpmyadmin.net/
4+
--
5+
-- Host: 127.0.0.1:3306
6+
-- Generation Time: Mar 08, 2019 at 07:00 PM
7+
-- Server version: 5.7.21
8+
-- PHP Version: 7.1.16
9+
10+
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
11+
SET AUTOCOMMIT = 0;
12+
START TRANSACTION;
13+
SET time_zone = "+00:00";
14+
15+
16+
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
17+
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
18+
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
19+
/*!40101 SET NAMES utf8mb4 */;
20+
21+
--
22+
-- Database: `prissy_pig`
23+
--
24+
25+
-- --------------------------------------------------------
26+
27+
--
28+
-- Table structure for table `events`
29+
--
30+
31+
DROP TABLE IF EXISTS `events`;
32+
CREATE TABLE IF NOT EXISTS `events` (
33+
`id` int(11) NOT NULL AUTO_INCREMENT,
34+
`name` varchar(191) DEFAULT NULL,
35+
`location` varchar(191) DEFAULT NULL,
36+
`description` varchar(191) DEFAULT NULL,
37+
`start_date` DATE DEFAULT NULL,
38+
`start_time` varchar(191) DEFAULT NULL,
39+
`end_date` DATE DEFAULT NULL,
40+
`end_time` varchar(191) DEFAULT NULL,
41+
`repeat_id` varchar(191) DEFAULT NULL,
42+
PRIMARY KEY (`id`),
43+
KEY `id` (`id`),
44+
KEY `start_date asc` (`start_date`)
45+
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
46+
47+
-- --------------------------------------------------------
48+
49+
--
50+
-- Table structure for table `repeat_events`
51+
--
52+
53+
DROP TABLE IF EXISTS `repeat_events`;
54+
CREATE TABLE IF NOT EXISTS `repeat_events` (
55+
`id` int(11) NOT NULL AUTO_INCREMENT,
56+
`freq` varchar(191) DEFAULT NULL,
57+
`interval_num` int(191) NOT NULL,
58+
PRIMARY KEY (`id`),
59+
KEY `id` (`id`),
60+
KEY `freq_id_interval_num` (`freq`,`id`,`interval_num`)
61+
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
62+
COMMIT;
63+
64+
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
65+
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
66+
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

0 commit comments

Comments
 (0)