-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdb.sql
More file actions
28 lines (24 loc) · 837 Bytes
/
db.sql
File metadata and controls
28 lines (24 loc) · 837 Bytes
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
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
CREATE TABLE IF NOT EXISTS `gm_crops` (
`id` int(11) NOT NULL,
`name` varchar(64) NOT NULL,
`en_wikipedia_url` varchar(256) DEFAULT NULL,
`plantings_count` int(11) DEFAULT NULL,
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `gm_owners` (
`id` int(11) NOT NULL,
`latitude` float DEFAULT NULL,
`longitude` float DEFAULT NULL,
`login_name` varchar(64) NOT NULL,
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `gm_plantings` (
`id` int(11) NOT NULL,
`crop_id` int(11) NOT NULL,
`owner_id` int(11) NOT NULL,
`created_at` int(11) NOT NULL,
`finished_at` int(11) DEFAULT NULL,
`description` varchar(256) DEFAULT NULL,
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;