1
0
Fork 0
mirror of https://gitlab.com/Shinobi-Systems/ShinobiCE.git synced 2025-03-09 15:40:15 +00:00

Shinobi CE officially lands on Gitlab

This commit is contained in:
Moe 2018-06-07 23:21:38 -07:00
commit f1406d4eec
431 changed files with 118157 additions and 0 deletions

2
sql/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
monitors.sql
users.sql

20
sql/default_data.sql Normal file
View file

@ -0,0 +1,20 @@
-- --------------------------------------------------------
-- Host: 66.51.132.100
-- Server version: 5.7.16-0ubuntu0.16.04.1 - (Ubuntu)
-- Server OS: Linux
-- HeidiSQL Version: 9.3.0.4984
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- Dumping data for table ccio.Users: ~0 rows (approximately)
/*!40000 ALTER TABLE `Users` DISABLE KEYS */;
INSERT INTO `Users` (`ke`, `uid`, `auth`, `mail`, `pass`, `details`) VALUES
('2Df5hBE', 'XDf5hB3', 'ec49f05c1ddc7d818c61b3343c98cbc6', 'ccio@m03.ca', '5f4dcc3b5aa765d61d8327deb882cf99', '{"days":"10"}');
INSERT INTO `Monitors` (`mid`, `ke`, `name`, `shto`, `shfr`, `details`, `type`, `ext`, `protocol`, `host`, `path`, `port`, `fps`, `mode`, `width`, `height`) VALUES ('bunny', '2Df5hBE', 'Bunny', '[]', '[]', '{"fatal_max":"","notes":"","dir":"","rtsp_transport":"tcp","muser":"","mpass":"","port_force":"0","sfps":"","aduration":"1000000","probesize":"1000000","accelerator":"0","hwaccel":null,"hwaccel_vcodec":"","hwaccel_device":"","stream_type":"hls","stream_mjpeg_clients":"","stream_vcodec":"copy","stream_acodec":"no","hls_time":"","preset_stream":"","hls_list_size":"","signal_check":"","signal_check_log":null,"stream_quality":"","stream_fps":"1","stream_scale_x":"","stream_scale_y":"","rotate_stream":null,"svf":"","stream_timestamp":"0","stream_timestamp_font":"","stream_timestamp_font_size":"","stream_timestamp_color":"","stream_timestamp_box_color":"","stream_timestamp_x":"","stream_timestamp_y":"","stream_watermark":"0","stream_watermark_location":"","stream_watermark_position":null,"snap":"1","snap_fps":"","snap_scale_x":"","snap_scale_y":"","snap_vf":"","vcodec":"copy","crf":"","preset_record":"","acodec":"libvorbis","dqf":null,"cutoff":"10","rotate_record":null,"vf":"","timestamp":"1","timestamp_font":"","timestamp_font_size":"","timestamp_color":"","timestamp_box_color":"","timestamp_x":"","timestamp_y":"","watermark":null,"watermark_location":"","watermark_position":null,"cust_input":"","cust_snap":"","cust_detect":"","cust_stream":"","cust_stream_server":"","cust_record":"","custom_output":"","detector":"0","detector_webhook":null,"detector_webhook_url":"","detector_command_enable":null,"detector_command":"","detector_command_timeout":"","detector_lock_timeout":"","detector_save":null,"detector_frame_save":null,"detector_mail":null,"detector_mail_timeout":"","detector_record_method":null,"detector_trigger":null,"detector_trigger_record_fps":"","detector_timeout":"","watchdog_reset":null,"detector_delete_motionless_videos":null,"detector_send_frames":null,"detector_fps":"","detector_scale_x":"","detector_scale_y":"","detector_use_motion":null,"detector_use_detect_object":null,"detector_frame":null,"detector_sensitivity":"","cords":"","detector_lisence_plate":null,"detector_lisence_plate_country":null,"detector_notrigger":null,"detector_notrigger_mail":null,"detector_notrigger_timeout":"","control":"0","control_base_url":"","control_stop":null,"control_url_stop_timeout":"","control_url_center":"","control_url_left":"","control_url_left_stop":"","control_url_right":"","control_url_right_stop":"","control_url_up":"","control_url_up_stop":"","control_url_down":"","control_url_down_stop":"","control_url_enable_nv":"","control_url_disable_nv":"","control_url_zoom_out":"","control_url_zoom_out_stop":"","control_url_zoom_in":"","control_url_zoom_in_stop":"","groups":"","loglevel":"warning","sqllog":"0","detector_cascades":""}', 'mjpeg', 'mp4', 'http', 'came3.nkansai.ne.jp', '/nphMotionJpeg?Resolution=640x480&Quality=Motion', 81, 15, 'start', 640, 480);
/*!40000 ALTER TABLE `Users` ENABLE KEYS */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

113
sql/docker/01-framework.sql Normal file
View file

@ -0,0 +1,113 @@
-- --------------------------------------------------------
-- Host: 192.168.88.58
-- Server version: 5.7.17-0ubuntu0.16.04.1 - (Ubuntu)
-- Server OS: Linux
-- HeidiSQL Version: 9.3.0.4984
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- Dumping structure for table ccio.API
CREATE TABLE IF NOT EXISTS `API` (
`ke` varchar(50) DEFAULT NULL,
`uid` varchar(50) DEFAULT NULL,
`ip` tinytext,
`code` varchar(100) DEFAULT NULL,
`details` text,
`time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Events
CREATE TABLE IF NOT EXISTS `Events` (
`ke` varchar(50) DEFAULT NULL,
`mid` varchar(50) DEFAULT NULL,
`details` text,
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Logs
CREATE TABLE IF NOT EXISTS `Logs` (
`ke` varchar(50) DEFAULT NULL,
`mid` varchar(50) DEFAULT NULL,
`info` text,
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Monitors
CREATE TABLE IF NOT EXISTS `Monitors` (
`mid` varchar(50) DEFAULT NULL,
`ke` varchar(50) DEFAULT NULL,
`name` varchar(50) DEFAULT NULL,
`shto` text,
`shfr` text,
`details` longtext,
`type` varchar(50) DEFAULT 'jpeg',
`ext` varchar(50) DEFAULT 'webm',
`protocol` varchar(50) DEFAULT 'http',
`host` varchar(100) DEFAULT '0.0.0.0',
`path` varchar(100) DEFAULT '/',
`port` int(8) DEFAULT '80',
`fps` int(8) DEFAULT '1',
`mode` varchar(15) DEFAULT NULL,
`width` int(11) DEFAULT '640',
`height` int(11) DEFAULT '360'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Presets
CREATE TABLE IF NOT EXISTS `Presets` (
`ke` varchar(50) DEFAULT NULL,
`name` text,
`details` text,
`type` enum('monitor','event','user') DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Users
CREATE TABLE IF NOT EXISTS `Users` (
`ke` varchar(50) DEFAULT NULL,
`uid` varchar(50) DEFAULT NULL,
`auth` varchar(50) DEFAULT NULL,
`mail` varchar(100) DEFAULT NULL,
`pass` varchar(100) DEFAULT NULL,
`details` longtext,
UNIQUE KEY `mail` (`mail`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Videos
CREATE TABLE IF NOT EXISTS `Videos` (
`mid` varchar(50) DEFAULT NULL,
`ke` varchar(50) DEFAULT NULL,
`ext` enum('webm','mp4') DEFAULT NULL,
`time` timestamp NULL DEFAULT NULL,
`duration` float DEFAULT NULL,
`size` float DEFAULT NULL,
`frames` int(11) DEFAULT NULL,
`end` timestamp NULL DEFAULT NULL,
`status` int(1) DEFAULT '0' COMMENT '0:Building,1:Complete,2:Read,3:Archive',
`details` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

107
sql/framework.sql Normal file
View file

@ -0,0 +1,107 @@
-- --------------------------------------------------------
-- Host: 192.168.88.37
-- Server version: 10.1.25-MariaDB- - Ubuntu 17.04
-- Server OS: debian-linux-gnu
-- HeidiSQL Version: 9.4.0.5125
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- Dumping database structure for ccio
CREATE DATABASE IF NOT EXISTS `ccio` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `ccio`;
-- Dumping structure for table ccio.API
CREATE TABLE IF NOT EXISTS `API` (
`ke` varchar(50) DEFAULT NULL,
`uid` varchar(50) DEFAULT NULL,
`ip` tinytext,
`code` varchar(100) DEFAULT NULL,
`details` text,
`time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Events
CREATE TABLE IF NOT EXISTS `Events` (
`ke` varchar(50) DEFAULT NULL,
`mid` varchar(50) DEFAULT NULL,
`details` text,
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Logs
CREATE TABLE IF NOT EXISTS `Logs` (
`ke` varchar(50) DEFAULT NULL,
`mid` varchar(50) DEFAULT NULL,
`info` text,
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Monitors
CREATE TABLE IF NOT EXISTS `Monitors` (
`mid` varchar(50) DEFAULT NULL,
`ke` varchar(50) DEFAULT NULL,
`name` varchar(50) DEFAULT NULL,
`shto` text,
`shfr` text,
`details` longtext,
`type` varchar(50) DEFAULT 'jpeg',
`ext` varchar(50) DEFAULT 'webm',
`protocol` varchar(50) DEFAULT 'http',
`host` varchar(100) DEFAULT '0.0.0.0',
`path` varchar(100) DEFAULT '/',
`port` int(8) DEFAULT '80',
`fps` int(8) DEFAULT '1',
`mode` varchar(15) DEFAULT NULL,
`width` int(11) DEFAULT '640',
`height` int(11) DEFAULT '360'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Presets
CREATE TABLE IF NOT EXISTS `Presets` (
`ke` varchar(50) DEFAULT NULL,
`name` text,
`details` text,
`type` enum('monitor','event','user') DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Users
CREATE TABLE IF NOT EXISTS `Users` (
`ke` varchar(50) DEFAULT NULL,
`uid` varchar(50) DEFAULT NULL,
`auth` varchar(50) DEFAULT NULL,
`mail` varchar(100) DEFAULT NULL,
`pass` varchar(100) DEFAULT NULL,
`details` longtext,
UNIQUE KEY `mail` (`mail`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Videos
CREATE TABLE IF NOT EXISTS `Videos` (
`mid` varchar(50) DEFAULT NULL,
`ke` varchar(50) DEFAULT NULL,
`ext` enum('webm','mp4') DEFAULT NULL,
`time` timestamp NULL DEFAULT NULL,
`duration` float DEFAULT NULL,
`size` float DEFAULT NULL,
`frames` int(11) DEFAULT NULL,
`end` timestamp NULL DEFAULT NULL,
`status` int(1) DEFAULT '0' COMMENT '0:Building,1:Complete,2:Read,3:Archive',
`details` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

View file

@ -0,0 +1,20 @@
-- --------------------------------------------------------
-- Host: 66.51.132.100
-- Server version: 5.7.16-0ubuntu0.16.04.1 - (Ubuntu)
-- Server OS: Linux
-- HeidiSQL Version: 9.3.0.4984
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- Dumping data for table ccio.Users: ~0 rows (approximately)
/*!40000 ALTER TABLE `Users` DISABLE KEYS */;
INSERT INTO Users ([ke], [uid], [auth], [mail], [pass], [details]) VALUES
('2Df5hBE', 'XDf5hB3', 'ec49f05c1ddc7d818c61b3343c98cbc6', 'ccio@m03.ca', '5f4dcc3b5aa765d61d8327deb882cf99', '{"days":"10"}');
INSERT INTO Monitors ([mid], [ke], [name], [shto], [shfr], [details], [type], [ext], [protocol], [host], [path], [port], [fps], [mode], [width], [height]) VALUES ('bunny', '2Df5hBE', 'Bunny', '[]', '[]', '{"fatal_max":"","notes":"","dir":"","rtsp_transport":"tcp","muser":"","mpass":"","port_force":"0","sfps":"","aduration":"1000000","probesize":"1000000","accelerator":"0","hwaccel":null,"hwaccel_vcodec":"","hwaccel_device":"","stream_type":"hls","stream_mjpeg_clients":"","stream_vcodec":"copy","stream_acodec":"no","hls_time":"","preset_stream":"","hls_list_size":"","signal_check":"","signal_check_log":null,"stream_quality":"","stream_fps":"1","stream_scale_x":"","stream_scale_y":"","rotate_stream":null,"svf":"","stream_timestamp":"0","stream_timestamp_font":"","stream_timestamp_font_size":"","stream_timestamp_color":"","stream_timestamp_box_color":"","stream_timestamp_x":"","stream_timestamp_y":"","stream_watermark":"0","stream_watermark_location":"","stream_watermark_position":null,"snap":"1","snap_fps":"","snap_scale_x":"","snap_scale_y":"","snap_vf":"","vcodec":"copy","crf":"","preset_record":"","acodec":"libvorbis","dqf":null,"cutoff":"10","rotate_record":null,"vf":"","timestamp":"1","timestamp_font":"","timestamp_font_size":"","timestamp_color":"","timestamp_box_color":"","timestamp_x":"","timestamp_y":"","watermark":null,"watermark_location":"","watermark_position":null,"cust_input":"","cust_snap":"","cust_detect":"","cust_stream":"","cust_stream_server":"","cust_record":"","custom_output":"","detector":"0","detector_webhook":null,"detector_webhook_url":"","detector_command_enable":null,"detector_command":"","detector_command_timeout":"","detector_lock_timeout":"","detector_save":null,"detector_frame_save":null,"detector_mail":null,"detector_mail_timeout":"","detector_record_method":null,"detector_trigger":null,"detector_trigger_record_fps":"","detector_timeout":"","watchdog_reset":null,"detector_delete_motionless_videos":null,"detector_send_frames":null,"detector_fps":"","detector_scale_x":"","detector_scale_y":"","detector_use_motion":null,"detector_use_detect_object":null,"detector_frame":null,"detector_sensitivity":"","cords":"","detector_lisence_plate":null,"detector_lisence_plate_country":null,"detector_notrigger":null,"detector_notrigger_mail":null,"detector_notrigger_timeout":"","control":"0","control_base_url":"","control_stop":null,"control_url_stop_timeout":"","control_url_center":"","control_url_left":"","control_url_left_stop":"","control_url_right":"","control_url_right_stop":"","control_url_up":"","control_url_up_stop":"","control_url_down":"","control_url_down_stop":"","control_url_enable_nv":"","control_url_disable_nv":"","control_url_zoom_out":"","control_url_zoom_out_stop":"","control_url_zoom_in":"","control_url_zoom_in_stop":"","groups":"","loglevel":"warning","sqllog":"0","detector_cascades":""}', 'mjpeg', 'mp4', 'http', 'came3.nkansai.ne.jp', '/nphMotionJpeg?Resolution=640x480&Quality=Motion', 81, 15, 'start', 640, 480);
/*!40000 ALTER TABLE `Users` ENABLE KEYS */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

107
sql/mssql/framework.sql Normal file
View file

@ -0,0 +1,107 @@
-- --------------------------------------------------------
-- Host: 192.168.88.37
-- Server version: 10.1.25-MariaDB- - Ubuntu 17.04
-- Server OS: debian-linux-gnu
-- HeidiSQL Version: 9.4.0.5125
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- Dumping database structure for ccio
CREATE DATABASE `ccio` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE ccio;
-- Dumping structure for table ccio.API
CREATE TABLE API (
ke varchar(50) DEFAULT NULL,
uid varchar(50) DEFAULT NULL,
ip varchar(255),
code varchar(100) DEFAULT NULL,
details varchar(max),
time datetime2(0) NULL DEFAULT GETDATE()
) ;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Events
CREATE TABLE Events (
ke varchar(50) DEFAULT NULL,
mid varchar(50) DEFAULT NULL,
details varchar(max),
time datetime2(0) NOT NULL DEFAULT GETDATE()
) ;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Logs
CREATE TABLE Logs (
ke varchar(50) DEFAULT NULL,
mid varchar(50) DEFAULT NULL,
info varchar(max),
time datetime2(0) NOT NULL DEFAULT GETDATE()
) ;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Monitors
CREATE TABLE Monitors (
mid varchar(50) DEFAULT NULL,
ke varchar(50) DEFAULT NULL,
name varchar(50) DEFAULT NULL,
shto varchar(max),
shfr varchar(max),
details varchar(max),
type varchar(50) DEFAULT 'jpeg',
ext varchar(50) DEFAULT 'webm',
protocol varchar(50) DEFAULT 'http',
host varchar(100) DEFAULT '0.0.0.0',
path varchar(100) DEFAULT '/',
port int DEFAULT '80',
fps int DEFAULT '1',
mode varchar(15) DEFAULT NULL,
width int DEFAULT '640',
height int DEFAULT '360'
) ;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Presets
CREATE TABLE Presets (
ke varchar(50) DEFAULT NULL,
name varchar(max),
details varchar(max),
type enum('monitor','event','user') DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Users
CREATE TABLE Users (
ke varchar(50) DEFAULT NULL,
uid varchar(50) DEFAULT NULL,
auth varchar(50) DEFAULT NULL,
mail varchar(100) DEFAULT NULL,
pass varchar(100) DEFAULT NULL,
details varchar(max),
CONSTRAINT mail UNIQUE (mail)
) ;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Videos
CREATE TABLE Videos (
mid varchar(50) DEFAULT NULL,
ke varchar(50) DEFAULT NULL,
ext enum('webm','mp4') DEFAULT NULL,
time datetime2(0) NULL DEFAULT NULL,
duration float DEFAULT NULL,
size float DEFAULT NULL,
frames int DEFAULT NULL,
end datetime2(0) NULL DEFAULT NULL,
status int DEFAULT '0' ,
details varchar(max)
) ;
-- Data exporting was unselected.
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

3
sql/mssql/user.sql Normal file
View file

@ -0,0 +1,3 @@
CREATE USER 'majesticflame'@'127.0.0.1' IDENTIFIED BY '';
GRANT ALL PRIVILEGES ON ccio.* TO 'majesticflame'@'127.0.0.1';
FLUSH PRIVILEGES;

View file

@ -0,0 +1,20 @@
-- --------------------------------------------------------
-- Host: 66.51.132.100
-- Server version: 5.7.16-0ubuntu0.16.04.1 - (Ubuntu)
-- Server OS: Linux
-- HeidiSQL Version: 9.3.0.4984
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- Dumping data for table ccio.Users: ~0 rows (approximately)
/*!40000 ALTER TABLE `Users` DISABLE KEYS */;
INSERT INTO Users (ke, uid, auth, mail, pass, details) VALUES
('2Df5hBE', 'XDf5hB3', 'ec49f05c1ddc7d818c61b3343c98cbc6', 'ccio@m03.ca', '5f4dcc3b5aa765d61d8327deb882cf99', '{"days":"10"}');
INSERT INTO Monitors (mid, ke, name, shto, shfr, details, type, ext, protocol, host, path, port, fps, mode, width, height) VALUES ('bunny', '2Df5hBE', 'Bunny', '[]', '[]', '{"fatal_max":"","notes":"","dir":"","rtsp_transport":"tcp","muser":"","mpass":"","port_force":"0","sfps":"","aduration":"1000000","probesize":"1000000","accelerator":"0","hwaccel":null,"hwaccel_vcodec":"","hwaccel_device":"","stream_type":"hls","stream_mjpeg_clients":"","stream_vcodec":"copy","stream_acodec":"no","hls_time":"","preset_stream":"","hls_list_size":"","signal_check":"","signal_check_log":null,"stream_quality":"","stream_fps":"1","stream_scale_x":"","stream_scale_y":"","rotate_stream":null,"svf":"","stream_timestamp":"0","stream_timestamp_font":"","stream_timestamp_font_size":"","stream_timestamp_color":"","stream_timestamp_box_color":"","stream_timestamp_x":"","stream_timestamp_y":"","stream_watermark":"0","stream_watermark_location":"","stream_watermark_position":null,"snap":"1","snap_fps":"","snap_scale_x":"","snap_scale_y":"","snap_vf":"","vcodec":"copy","crf":"","preset_record":"","acodec":"libvorbis","dqf":null,"cutoff":"10","rotate_record":null,"vf":"","timestamp":"1","timestamp_font":"","timestamp_font_size":"","timestamp_color":"","timestamp_box_color":"","timestamp_x":"","timestamp_y":"","watermark":null,"watermark_location":"","watermark_position":null,"cust_input":"","cust_snap":"","cust_detect":"","cust_stream":"","cust_stream_server":"","cust_record":"","custom_output":"","detector":"0","detector_webhook":null,"detector_webhook_url":"","detector_command_enable":null,"detector_command":"","detector_command_timeout":"","detector_lock_timeout":"","detector_save":null,"detector_frame_save":null,"detector_mail":null,"detector_mail_timeout":"","detector_record_method":null,"detector_trigger":null,"detector_trigger_record_fps":"","detector_timeout":"","watchdog_reset":null,"detector_delete_motionless_videos":null,"detector_send_frames":null,"detector_fps":"","detector_scale_x":"","detector_scale_y":"","detector_use_motion":null,"detector_use_detect_object":null,"detector_frame":null,"detector_sensitivity":"","cords":"","detector_lisence_plate":null,"detector_lisence_plate_country":null,"detector_notrigger":null,"detector_notrigger_mail":null,"detector_notrigger_timeout":"","control":"0","control_base_url":"","control_stop":null,"control_url_stop_timeout":"","control_url_center":"","control_url_left":"","control_url_left_stop":"","control_url_right":"","control_url_right_stop":"","control_url_up":"","control_url_up_stop":"","control_url_down":"","control_url_down_stop":"","control_url_enable_nv":"","control_url_disable_nv":"","control_url_zoom_out":"","control_url_zoom_out_stop":"","control_url_zoom_in":"","control_url_zoom_in_stop":"","groups":"","loglevel":"warning","sqllog":"0","detector_cascades":""}', 'mjpeg', 'mp4', 'http', 'came3.nkansai.ne.jp', '/nphMotionJpeg?Resolution=640x480&Quality=Motion', 81, 15, 'start', 640, 480);
/*!40000 ALTER TABLE `Users` ENABLE KEYS */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

View file

@ -0,0 +1,107 @@
-- --------------------------------------------------------
-- Host: 192.168.88.37
-- Server version: 10.1.25-MariaDB- - Ubuntu 17.04
-- Server OS: debian-linux-gnu
-- HeidiSQL Version: 9.4.0.5125
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- Dumping database structure for ccio
CREATE DATABASE `ccio` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE ccio;
-- Dumping structure for table ccio.API
CREATE TABLE IF NOT EXISTS API (
ke varchar(50) DEFAULT NULL,
uid varchar(50) DEFAULT NULL,
ip tinytext,
code varchar(100) DEFAULT NULL,
details text,
time timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP
) ;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Events
CREATE TABLE IF NOT EXISTS Events (
ke varchar(50) DEFAULT NULL,
mid varchar(50) DEFAULT NULL,
details text,
time timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP
) ;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Logs
CREATE TABLE IF NOT EXISTS Logs (
ke varchar(50) DEFAULT NULL,
mid varchar(50) DEFAULT NULL,
info text,
time timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP
) ;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Monitors
CREATE TABLE IF NOT EXISTS Monitors (
mid varchar(50) DEFAULT NULL,
ke varchar(50) DEFAULT NULL,
name varchar(50) DEFAULT NULL,
shto text,
shfr text,
details text,
type varchar(50) DEFAULT 'jpeg',
ext varchar(50) DEFAULT 'webm',
protocol varchar(50) DEFAULT 'http',
host varchar(100) DEFAULT '0.0.0.0',
path varchar(100) DEFAULT '/',
port int DEFAULT '80',
fps int DEFAULT '1',
mode varchar(15) DEFAULT NULL,
width int DEFAULT '640',
height int DEFAULT '360'
) ;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Presets
CREATE TABLE IF NOT EXISTS Presets (
ke varchar(50) DEFAULT NULL,
name text,
details text,
type enum('monitor','event','user') DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Users
CREATE TABLE IF NOT EXISTS Users (
ke varchar(50) DEFAULT NULL,
uid varchar(50) DEFAULT NULL,
auth varchar(50) DEFAULT NULL,
mail varchar(100) DEFAULT NULL,
pass varchar(100) DEFAULT NULL,
details text,
CONSTRAINT mail UNIQUE (mail)
) ;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Videos
CREATE TABLE IF NOT EXISTS Videos (
mid varchar(50) DEFAULT NULL,
ke varchar(50) DEFAULT NULL,
ext enum('webm','mp4') DEFAULT NULL,
time timestamp(0) NULL DEFAULT NULL,
duration double precision DEFAULT NULL,
size double precision DEFAULT NULL,
frames int DEFAULT NULL,
end timestamp(0) NULL DEFAULT NULL,
status int DEFAULT '0' ,
details text
) ;
-- Data exporting was unselected.
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

3
sql/postgresql/user.sql Normal file
View file

@ -0,0 +1,3 @@
CREATE USER 'majesticflame'@'127.0.0.1' IDENTIFIED BY '';
GRANT ALL PRIVILEGES ON ccio.* TO 'majesticflame'@'127.0.0.1';
FLUSH PRIVILEGES;

BIN
sql/shinobi.sample.sqlite Normal file

Binary file not shown.

1
sql/sqllog.txt Normal file
View file

@ -0,0 +1 @@
update-5-6-2017.sql - allows Idle mode options and future proofs the mode field for other modes.

84
sql/tables.sql Normal file
View file

@ -0,0 +1,84 @@
-- Dumping structure for table ccio.API
CREATE TABLE IF NOT EXISTS `API` (
`ke` varchar(50) DEFAULT NULL,
`uid` varchar(50) DEFAULT NULL,
`ip` tinytext,
`code` varchar(100) DEFAULT NULL,
`details` text,
`time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Events
CREATE TABLE IF NOT EXISTS `Events` (
`ke` varchar(50) DEFAULT NULL,
`mid` varchar(50) DEFAULT NULL,
`details` text,
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Logs
CREATE TABLE IF NOT EXISTS `Logs` (
`ke` varchar(50) DEFAULT NULL,
`mid` varchar(50) DEFAULT NULL,
`info` text,
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Monitors
CREATE TABLE IF NOT EXISTS `Monitors` (
`mid` varchar(50) DEFAULT NULL,
`ke` varchar(50) DEFAULT NULL,
`name` varchar(50) DEFAULT NULL,
`shto` text,
`shfr` text,
`details` longtext,
`type` varchar(50) DEFAULT 'jpeg',
`ext` varchar(50) DEFAULT 'webm',
`protocol` varchar(50) DEFAULT 'http',
`host` varchar(100) DEFAULT '0.0.0.0',
`path` varchar(100) DEFAULT '/',
`port` int(8) DEFAULT '80',
`fps` int(8) DEFAULT '1',
`mode` varchar(15) DEFAULT NULL,
`width` int(11) DEFAULT '640',
`height` int(11) DEFAULT '360'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Presets
CREATE TABLE IF NOT EXISTS `Presets` (
`ke` varchar(50) DEFAULT NULL,
`name` text,
`details` text,
`type` enum('monitor','event','user') DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Users
CREATE TABLE IF NOT EXISTS `Users` (
`ke` varchar(50) DEFAULT NULL,
`uid` varchar(50) DEFAULT NULL,
`auth` varchar(50) DEFAULT NULL,
`mail` varchar(100) DEFAULT NULL,
`pass` varchar(100) DEFAULT NULL,
`details` longtext,
UNIQUE KEY `mail` (`mail`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
-- Dumping structure for table ccio.Videos
CREATE TABLE IF NOT EXISTS `Videos` (
`mid` varchar(50) DEFAULT NULL,
`ke` varchar(50) DEFAULT NULL,
`ext` enum('webm','mp4') DEFAULT NULL,
`time` timestamp NULL DEFAULT NULL,
`duration` float DEFAULT NULL,
`size` float DEFAULT NULL,
`frames` int(11) DEFAULT NULL,
`end` timestamp NULL DEFAULT NULL,
`status` int(1) DEFAULT '0' COMMENT '0:Building,1:Complete,2:Read,3:Archive',
`details` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

11
sql/update-1-1-2017.sql Normal file
View file

@ -0,0 +1,11 @@
USE ccio;
ALTER TABLE Monitors MODIFY ext VARCHAR(50);
CREATE TABLE IF NOT EXISTS `API` (
`ke` varchar(50) DEFAULT NULL,
`uid` varchar(50) DEFAULT NULL,
`ip` tinytext,
`code` varchar(100) DEFAULT NULL,
`details` text,
`time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

2
sql/update-13-7-2017.sql Normal file
View file

@ -0,0 +1,2 @@
USE `ccio`;
ALTER TABLE Videos CHANGE end end TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP;

17
sql/update-17-5-2017.sql Normal file
View file

@ -0,0 +1,17 @@
CREATE DATABASE IF NOT EXISTS `ccio`;
USE `ccio`;
CREATE TABLE IF NOT EXISTS `BackupVideos` (
`mid` varchar(50) DEFAULT NULL,
`ke` varchar(50) DEFAULT NULL,
`ext` varchar(15) DEFAULT NULL,
`time` timestamp NULL DEFAULT NULL,
`end` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`size` float DEFAULT NULL,
`details` longtext
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE Videos MODIFY COLUMN `ext` varchar(15);
ALTER TABLE Videos ADD `details` longtext;
ALTER TABLE Videos DROP COLUMN `frames`;
ALTER TABLE Videos DROP COLUMN `duration`;

28
sql/update-2-2-2017.sql Normal file
View file

@ -0,0 +1,28 @@
-- --------------------------------------------------------
-- Host: 192.168.88.58
-- Server version: 5.7.17-0ubuntu0.16.04.1 - (Ubuntu)
-- Server OS: Linux
-- HeidiSQL Version: 9.3.0.4984
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- Dumping database structure for ccio
USE ccio;
ALTER TABLE `Monitors` CHANGE COLUMN `protocol` `protocol` VARCHAR(50) NULL DEFAULT 'http' AFTER `ext`;
-- Dumping structure for table ccio.Events
CREATE TABLE IF NOT EXISTS `Events` (
`ke` varchar(50) DEFAULT NULL,
`mid` varchar(50) DEFAULT NULL,
`details` text,
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
-- Data exporting was unselected.
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

View file

@ -0,0 +1,2 @@
use ccio
ALTER TABLE `Videos` ADD COLUMN `details` TEXT NULL DEFAULT NULL AFTER `status`;

3
sql/update-5-6-2017.sql Normal file
View file

@ -0,0 +1,3 @@
USE `ccio`;
ALTER TABLE Monitors MODIFY COLUMN `mode` varchar(15);

3
sql/user.sql Normal file
View file

@ -0,0 +1,3 @@
CREATE USER 'majesticflame'@'127.0.0.1' IDENTIFIED BY '';
GRANT ALL PRIVILEGES ON ccio.* TO 'majesticflame'@'127.0.0.1';
FLUSH PRIVILEGES;