2020-05-17 22:31:13 +02:00
|
|
|
SET NAMES utf8mb4;
|
|
|
|
SET foreign_key_checks = 0;
|
|
|
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `maps`;
|
|
|
|
CREATE TABLE `maps` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`name` varchar(255) NOT NULL,
|
|
|
|
`description` text NOT NULL,
|
|
|
|
`bound_south_lat` decimal(8,6) NOT NULL,
|
|
|
|
`bound_west_lng` decimal(9,6) NOT NULL,
|
|
|
|
`bound_north_lat` decimal(8,6) NOT NULL,
|
|
|
|
`bound_east_lng` decimal(9,6) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
|
|
|
|
|
|
|
|
2023-09-16 20:28:32 +02:00
|
|
|
CREATE TABLE `migrations` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`migration` varchar(255) NOT NULL,
|
|
|
|
`type` enum('structure', 'data') NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
|
|
|
|
|
|
|
|
|
2020-05-17 22:31:13 +02:00
|
|
|
DROP TABLE IF EXISTS `places`;
|
|
|
|
CREATE TABLE `places` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`map_id` int(10) unsigned NOT NULL,
|
|
|
|
`lat` decimal(8,6) NOT NULL,
|
|
|
|
`lng` decimal(9,6) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `map_id` (`map_id`),
|
|
|
|
CONSTRAINT `places_map_id` FOREIGN KEY (`map_id`) REFERENCES `maps` (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|