-- sql values for DEV slack integration

INSERT INTO product_conf (name, valtype, strval) VALUES ('SlackToken', 3, 'xoxb-1808067617635-1793350365879-VBItPh1OfDVfMQsx1DFJ88gv');
INSERT INTO product_conf (name, valtype, strval) VALUES ('SlackChannel', 3, 'app');

-- default alert - trigger when at least 1 device in the 'all' group (=1 or more devices out of all) has data age greater than 1
-- now disabled as there are three pre-defined alerts in production already
-- INSERT INTO alerts (name, target_type, target_spec, target_amount, target_mongrp_id, target_device_id, oper_first, num_first, enabled, version) VALUES ("first", 4, 2, 1, 1, NULL, 5, 1, 1, 1);

-- sql table for testing out db_prepstuffer
CREATE TABLE prepstuffer_test_table (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
flag BOOLEAN DEFAULT false,
devid SMALLINT DEFAULT 0,
text VARCHAR(64) DEFAULT NULL,
bnum BIGINT DEFAULT 0,
fnum FLOAT DEFAULT 0
);

INSERT INTO auth_profiles (profile_name, username, ssh_pwd, pwd_salt, pwd_pepper, pwd_chilli, pwd_version) VALUES ("Dev default with root as pwd", "root", "B_^E", 9099361, 4774757, 10925685, 1);

-- prepare custom script testing
INSERT INTO custom_scripts (description, code) VALUES ('DEV test 1', '#!/bin/bash\necho "custom_num1=1"'),
('DEV test 2', '#!/bin/bash\necho "custom_num1=2"\n'),
('DEV test 3', '#!/bin/bash\necho "custom_num1=3"'),
('DEV test 4', '#!/bin/bash\necho "custom_num1=4"\necho "custom_flo2=3.14"\necho "custom_txt2=\\"go jo\\""
');
INSERT INTO custom_scripts_devtype_map (script, dev_type) VALUES (1, 1), (1, 2), (2, 1), (3, 2);
INSERT INTO custom_scripts_aprof_map (script, agent_profile) VALUES (1, 2), (2, 3), (3, 2), (3, 3);

INSERT INTO snmp_devices(address, community_string, protocol_version) VALUES ("172.17.2.1", "public", 2), ("172.17.2.2", "public", 2), ("teltonika1", "public", 2);
