feat(geofences): add geofence management table and default entry

This commit is contained in:
sudomarcma
2025-07-16 17:57:02 +08:00
parent 4587fad562
commit 46f508c1ae
+13
View File
@@ -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]]');