feat(geofences): add geofence management table and default entry
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
-- Simple geofence management table
|
||||||
|
CREATE TABLE IF NOT EXISTS `geofences` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(100) NOT NULL,
|
||||||
|
`coordinates` text NOT NULL,
|
||||||
|
`is_active` tinyint(1) DEFAULT 1,
|
||||||
|
`created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- Insert current geofence as default
|
||||||
|
INSERT INTO `geofences` (`name`, `coordinates`) VALUES
|
||||||
|
('Main Work Area', '[[113.35311466293217,23.161344441258407],[113.28591534444001,23.161344441258407],[113.28591534444001,23.091366234233973],[113.35311466293217,23.091366234233973],[113.35311466293217,23.161344441258407]]');
|
||||||
Reference in New Issue
Block a user