This repository has been archived by the owner on Nov 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gardenerdiary.sql
164 lines (137 loc) · 3.5 KB
/
gardenerdiary.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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 31, 2018 at 09:39 PM
-- Server version: 5.7.14
-- PHP Version: 5.6.25
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: `gardenerdiary`
--
-- --------------------------------------------------------
--
-- Table structure for table `garden`
--
CREATE TABLE `garden` (
`id` int(11) NOT NULL,
`name` varchar(400) NOT NULL,
`region_json` text NOT NULL,
`image` text NOT NULL,
`created_at` date NOT NULL,
`updated_at` date NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `plant`
--
CREATE TABLE `plant` (
`id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`type` varchar(255) NOT NULL,
`image` varchar(255) NOT NULL,
`garden_id` int(11) NOT NULL,
`created_at` date NOT NULL,
`updated_at` date NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `setting`
--
CREATE TABLE `setting` (
`id` int(11) NOT NULL,
`name` int(11) NOT NULL,
`value` varchar(255) NOT NULL,
`created_at` date NOT NULL,
`updated_at` date NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `task`
--
CREATE TABLE `task` (
`id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`task_type_id` int(11) NOT NULL,
`plant_id` int(11) NOT NULL,
`email_reminder` tinyint(1) NOT NULL DEFAULT '0',
`completed` tinyint(1) NOT NULL DEFAULT '0',
`due_date` date NOT NULL,
`created_at` date NOT NULL,
`updated_at` date NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `task_type`
--
CREATE TABLE `task_type` (
`id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`created_at` date NOT NULL,
`updated_at` date NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `garden`
--
ALTER TABLE `garden`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `plant`
--
ALTER TABLE `plant`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `setting`
--
ALTER TABLE `setting`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `task`
--
ALTER TABLE `task`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `task_type`
--
ALTER TABLE `task_type`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `garden`
--
ALTER TABLE `garden`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `plant`
--
ALTER TABLE `plant`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `setting`
--
ALTER TABLE `setting`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `task`
--
ALTER TABLE `task`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `task_type`
--
ALTER TABLE `task_type`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
/*!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 */;