#!/usr/bin/perl

#
# We added a new support module for jobs.  SO we need to add that module
# and then give people permissions to it.
#
#
#

use lib '/app/tools/common/lib';
use lib '/app/tools/job/lib';
use Common::RSApp;
use Common::RSDB;
use Job::DB::Item::Job;

my $app = Common::RSApp->new(clientID => 0);


my $sql = <<"sql";
INSERT INTO module (module_id, name, slug, display_order) VALUES ( 4, "Job Queue", "job_queue", 4);
INSERT INTO module_page (module_page_id, module_id, display_order, development, name, command) VALUES ( 11, 4, 0, 0, "Display", "list" ), (12, 4, 2, 0, "Edit Rules", "rules" );
INSERT INTO module_access (module_id, support_role_id, can_read, can_write) VALUES (4, 1, 1, 1), (4, 2, 1, 0), (4, 3, 1, 0), (4, 4, 1, 0);

sql

my $sth = Common::RSApp::GetCommonDB();

print "Running Commands: \n$sql\n";

#$sth->DoCmd( $sql );
