diff --git a/geofence_simple.sql b/geofence_simple.sql new file mode 100644 index 0000000..238ffa8 --- /dev/null +++ b/geofence_simple.sql @@ -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]]');