CREATE TABLE traveltime_notifications (
	id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
	name VARCHAR(255) NOT NULL UNIQUE
) ENGINE=InnoDB;

CREATE TABLE traveltime_notification_history (
	notification_id INT NOT NULL,
	service_number INT NOT NULL,
	sent TIMESTAMP NOT NULL,
	FOREIGN KEY fk_notification (notification_id) REFERENCES traveltime_notifications (id),
	INDEX idx_service_number (service_number)
);


INSERT INTO traveltime_notifications (name) VALUES ('manager_documentation');

DELETE FROM permission_roles WHERE name LIKE 'commcare%';
DELETE FROM permission_resources WHERE name LIKE 'commcare%';

DELETE FROM permission_rules WHERE role_id = 2 AND resource_id = 1 AND name = 'edit_all';