<commit_before>SET QUOTED_IDENTIFIER ON

--DROP TABLE approvers;
--DROP TABLE reportActions;
--DROP TABLE positionRelationships;
--DROP TABLE reportTasks;
--DROP TABLE reportPeople;
--DROP TABLE reportTags;
--DROP TABLE peoplePositions;
--DROP TABLE savedSearches;
--DROP TABLE positions;
--DROP TABLE tasks;
--DROP TABLE comments;
--DROP TABLE reports;
--DROP TABLE people;
--DROP TABLE approvalSteps;
--DROP TABLE locations;
--DROP TABLE organizations;
--DROP TABLE adminSettings;
--DROP TABLE pendingEmails;
--DROP TABLE tags;
--DROP TABLE authorizationGroupPositions;
--DROP TABLE authorizationGroups;
--DROP TABLE reportAuthorizationGroups;
--DROP TABLE notes;
--DROP TABLE noteRelatedObjects;
--DROP TABLE DATABASECHANGELOG;
--DROP TABLE DATABASECHANGELOGLOCK;

TRUNCATE TABLE peoplePositions;
TRUNCATE TABLE approvers;
TRUNCATE TABLE reportActions;
TRUNCATE TABLE positionRelationships;
TRUNCATE TABLE reportTasks;
TRUNCATE TABLE reportPeople;
TRUNCATE TABLE reportTags;
TRUNCATE TABLE comments;
TRUNCATE TABLE savedSearches;
TRUNCATE TABLE reportsSensitiveInformation;
TRUNCATE TABLE authorizationGroupPositions;
TRUNCATE TABLE reportAuthorizationGroups;
TRUNCATE TABLE noteRelatedObjects;
DELETE FROM positions;
DELETE FROM tasks WHERE customFieldRef1Uuid IS NOT NULL;
DELETE FROM tasks WHERE customFieldRef1Uuid IS NULL;
DELETE FROM reports;
DELETE FROM people;
DELETE FROM approvalSteps;
DELETE FROM locations;
DELETE FROM organizations;
DELETE FROM adminSettings;
DELETE FROM tags;
DELETE FROM authorizationGroups;
DELETE FROM notes;

--Advisors
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, domainUsername, country, gender, endOfTourDate, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 0, '<EMAIL>', '123-456-78960', 'OF-9', 'Jack is an advisor in EF 2.1', 'jack', 'Germany', 'MALE', DATEADD(year, 1, CURRENT_TIMESTAMP), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, domainUsername, country, gender, endOfTourDate, createdAt, updatedAt)
	VALUES (lower(newid()), 'E<NAME>', 0, 0, '<EMAIL>', '+1-777-7777', 'Capt', 'Elizabeth is a test advisor we have in the database who is in EF 1.1', 'elizabeth', 'United States of America', 'FEMALE', DATEADD(year, 1, CURRENT_TIMESTAMP), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, domainUsername, country, gender, endOfTourDate, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 0, '<EMAIL>', '+9-23-2323-2323', 'CIV', 'Erin is an Advisor in EF 2.2 who can approve reports', 'erin', 'Australia', 'FEMALE', DATEADD(year, 1, CURRENT_TIMESTAMP), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, domainUsername, country, gender, endOfTourDate, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 0, '<EMAIL>', '+23-23-11222', 'CIV', 'Reina is an Advisor in EF 2.2', 'reina', 'Italy', 'FEMALE', DATEADD(year, 1, CURRENT_TIMESTAMP), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, domainUsername, country, gender, endOfTourDate, createdAt, updatedAt)
	VALUES (lower(newid()), 'DVISOR, A', 0, 0, '<EMAIL>', '+444-44-4444', 'OF-2', 'A Divisor was born for this job', 'advisor', 'Canada', 'FEMALE', DATEADD(year, 1, CURRENT_TIMESTAMP), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
-- Principals
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, country, gender, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 1, '<EMAIL>', '+011-232-12324', 'LtCol', 'this is a sample person who could be a Principal!', 'Afghanistan', 'MALE', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, country, gender, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 1, '<EMAIL>', '+1-412-7324', 'Maj', 'Roger is another test person we have in the database', 'Afghanistan', 'MALE', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, country, gender, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 1, '<EMAIL>', '+1-422222222', 'CIV', 'Christopf works in the MoD Office', 'Afghanistan', 'MALE', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
-- Super Users
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, domainUsername, country, gender, endOfTourDate, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 0, '<EMAIL>', '+1-444-7324', 'CIV', 'Bob is a Super User in EF 1.1', 'bob', 'United States of America', 'MALE', DATEADD(year, 1, CURRENT_TIMESTAMP), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, domainUsername, country, gender, endOfTourDate, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 0, '<EMAIL>', '+2-456-7324', 'BGen', 'Henry is a Super User in EF 2.1', 'henry', 'United States of America', 'MALE', DATEADD(year, 1, CURRENT_TIMESTAMP), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, domainUsername, country, gender, endOfTourDate, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 0, '<EMAIL>', '+2-456-7324', 'CIV', 'Jacob is a Super User in EF 2.2', 'jacob', 'Italy', 'MALE', DATEADD(year, 1, CURRENT_TIMESTAMP), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, domainUsername, country, gender, endOfTourDate, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 0, '<EMAIL>', '+2-456-7324', 'CTR', 'Rebecca is a Super User in EF 2.2', 'rebecca', 'Germany', 'FEMALE', DATEADD(year, 1, CURRENT_TIMESTAMP), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, domainUsername, country, gender, endOfTourDate, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 0, '<EMAIL>', '+1-412-7324', 'CIV', 'Andrew is the EF 1 Manager', 'andrew', 'United States of America', 'MALE', DATEADD(year, 1, CURRENT_TIMESTAMP), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
-- Administrator
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, domainUsername, country, gender, endOfTourDate, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', '0', '0', '<EMAIL>', NULL, 'CIV', 'An administrator', 'arthur', 'Albania', 'MALE', DATEADD(year, 1, CURRENT_TIMESTAMP), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);

--People
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, country, gender, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 1, '<EMAIL>', '+1-412-9314', 'CIV', '', 'United States of America', 'MALE', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, domainUsername, country, gender, endOfTourDate, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 0, '<EMAIL>', '+1-202-7324', 'CIV', '', 'nick', 'United States of America', 'MALE', DATEADD(year, 1, CURRENT_TIMESTAMP), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, country, gender, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 1, 1, '<EMAIL>', '+99-9999-9999', 'CIV', '', 'Italy', 'MALE', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);

INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'ANET Administrator', 3, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1 Manager', 2, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1.1 Advisor A', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1.1 Advisor B', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1.1 Advisor C', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1.1 Advisor D', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1.1 Advisor E', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1.1 Advisor F', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1.1 Advisor for Agriculture', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1.1 Old Inactive Advisor', 0, 1, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1.1 Advisor for Mining', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1.1 Advisor for Space Issues', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1.1 Advisor for Interagency Advising', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1.1 SuperUser', 2, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 2.1 Advisor B', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 2.1 Advisor for Accounting', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 2.1 Advisor for Kites', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 2.1 SuperUser', 2, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 2.2 Advisor C', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 2.2 Advisor D', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 2.2 Old and Inactive', 0, 1, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 2.2 Advisor Sewing Facilities', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 2.2 Advisor Local Kebabs', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 2.2 Super User', 2, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 2.2 Final Reviewer', 2, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 4.1 Advisor E', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 4.1 Advisor for Coffee', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 4.1 Advisor on Software Engineering', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 4.1 Advisor E', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 4.1 Advisor old - dont use', 0, 1, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 9 Advisor <empty>', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);


-- Put Andrew in the EF 1 Manager Billet
INSERT INTO peoplePositions (positionUuid, personUuid, createdAt)
	VALUES ((SELECT uuid from positions where name = 'EF 1 Manager'), (SELECT uuid from people where emailAddress = '<EMAIL>'), CURRENT_TIMESTAMP);
UPDATE positions SET currentPersonUuid = (SELECT uuid from people where emailAddress = '<EMAIL>') WHERE name = 'EF 1 Manager';

-- Put Bob into the Super User Billet in EF 1
INSERT INTO peoplePositions (positionUuid, personUuid, createdAt)
	VALUES ((SELECT uuid from positions where name = 'EF 1.1 SuperUser'), (SELECT uuid from people where emailAddress = '<EMAIL>'), CURRENT_TIMESTAMP);
UPDATE positions SET currentPersonUuid = (SELECT uuid from people where emailAddress = '<EMAIL>') WHERE name = 'EF 1.1 SuperUser';

-- Put Henry into the Super User Billet in EF 2
INSERT INTO peoplePositions (positionUuid, personUuid, createdAt)
	VALUES ((SELECT uuid from positions where name = 'EF 2.1 SuperUser'), (SELECT uuid from people where emailAddress = '<EMAIL>'), CURRENT_TIMESTAMP);
UPDATE positions SET currentPersonUuid = (SELECT uuid from people where emailAddress = '<EMAIL>') WHERE name = 'EF 2.1 SuperUser';

-- Rotate an advisor through a billet ending up with Jack in the EF 2 Advisor Billet
INSERT INTO peoplePositions (positionUuid, personUuid, createdAt)
	VALUES ((SELECT uuid from positions where name = 'EF 2.1 Advisor B'), (SELECT uuid from people where emailAddress = '<EMAIL>'), CURRENT_TIMESTAMP);
UPDATE positions SET currentPersonUuid = (SELECT uuid from people where emailAddress = '<EMAIL>') WHERE name = 'EF 2.1 Advisor B';
INSERT INTO peoplePositions (positionUuid, personUuid, createdAt)
	VALUES ((SELECT uuid from positions where name = 'EF 2.1 Advisor B'), (SELECT uuid from people where emailAddress = '<EMAIL>'), CURRENT_TIMESTAMP);
UPDATE positions SET currentPersonUuid = (SELECT uuid from people where emailAddress = '<EMAIL>') WHERE name = 'EF 2.1 Advisor B';

-- Put Elizabeth into the EF 1 Advisor Billet
INSERT INTO peoplePositions (positionUuid, personUuid, createdAt)
	VALUES ((SELECT uuid from positions where name = 'EF 1.1 Advisor A'), (SELECT uuid from people where emailAddress = '<EMAIL>'), CURRENT_TIMESTAMP);
UPDATE positions SET currentPersonUuid = (SELECT uuid from people where emailAddress = '<EMAIL>') WHERE name = 'EF 1.1 Advisor A';

-- Put Reina into the EF 2.2 Advisor Billet
INSERT INTO peoplePositions (positionUuid, personUuid, createdAt)
	VALUES ((SELECT uuid from positions where name = 'EF 2.2 Advisor C'), (SELECT uuid from people where emailAddress = '<EMAIL>'), CURRENT_TIMESTAMP);
UPDATE positions SET currentPersonUuid = (SELECT uuid from people where emailAddress = '<EMAIL>') WHERE name = 'EF 2.2 Advisor C';

-- Put Erin into the EF 2.2 Advisor Billet
INSERT INTO peoplePositions (positionUuid, personUuid, createdAt)
	VALUES ((SELECT uuid from positions where name = 'EF 2.2 Advisor D'), (SELECT uuid from people where emailAddress = '<EMAIL>'), CURRENT_TIMESTAMP);
UPDATE positions SET currentPersonUuid = (SELECT uuid from people where emailAddress = '<EMAIL>') WHERE name = 'EF 2.2 Advisor D';

-- Put Jacob in the EF 2.2 Super User Billet
INSERT INTO peoplePositions (positionUuid, personUuid, createdAt)
	VALUES ((SELECT uuid from positions where name = 'EF 2.2 Super User'), (SELECT uuid from people where emailAddress = '<EMAIL>'), CURRENT_TIMESTAMP);
UPDATE positions SET currentPersonUuid = (SELECT uuid from people where emailAddress = '<EMAIL>') WHERE name = 'EF 2.2 Super User';

-- Put Rebecca in the EF 2.2 Final Reviewer Position
INSERT INTO peoplePositions (positionUuid, personUuid, createdAt)
	VALUES ((SELECT uuid from positions where name = 'EF 2.2 Final Reviewer'), (SELECT uuid from people where emailAddress = '<EMAIL>'), CURRENT_TIMESTAMP);
UPDATE positions SET currentPersonUuid = (SELECT uuid from people where emailAddress = '<EMAIL>') WHERE name = 'EF 2.2 Final Reviewer';

-- Put Arthur into the Admin Billet
INSERT INTO peoplePositions (positionUuid, personUuid, createdAt)
	VALUES ((SELECT uuid from positions where name = 'ANET Administrator'), (SELECT uuid from people where emailAddress = '<EMAIL>'), CURRENT_TIMESTAMP);
UPDATE positions SET currentPersonUuid = (SELECT uuid from people where emailAddress = '<EMAIL>') WHERE name = 'ANET Administrator';


INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'ANET Administrators','', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1', 'Planning Programming, Budgeting and Execution', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
	INSERT INTO organizations(uuid, shortName, longName, type, parentOrgUuid, createdAt, updatedAt)
		VALUES (lower(newid()), 'EF 1.1', '',0, (SELECT uuid from organizations WHERE shortName ='EF 1'), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 2', '',0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
	INSERT INTO organizations(uuid, shortName, longName, type, parentOrgUuid, createdAt, updatedAt)
		VALUES (lower(newid()), 'EF 2.1', '', 0, (SELECT uuid from organizations WHERE shortName ='EF 2'), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
	INSERT INTO organizations(uuid, shortName, longName, type, parentOrgUuid, createdAt, updatedAt)
		VALUES (lower(newid()), 'EF 2.2', '', 0, (SELECT uuid from organizations WHERE shortName ='EF 2'), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 3', '', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 4', '', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
	INSERT INTO organizations(uuid, shortName, longName, type, parentOrgUuid, createdAt, updatedAt)
		VALUES (lower(newid()), 'EF 4.1', '', 0 , (SELECT uuid FROM organizations WHERE shortName = 'EF 4'), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
	INSERT INTO organizations(uuid, shortName, longName, type, parentOrgUuid, createdAt, updatedAt)
		VALUES (lower(newid()), 'EF 4.2', '', 0 , (SELECT uuid FROM organizations WHERE shortName = 'EF 4'), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
	INSERT INTO organizations(uuid, shortName, longName, type, parentOrgUuid, createdAt, updatedAt)
		VALUES (lower(newid()), 'EF 4.3', '', 0 , (SELECT uuid FROM organizations WHERE shortName = 'EF 4'), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
	INSERT INTO organizations(uuid, shortName, longName, type, parentOrgUuid, createdAt, updatedAt)
		VALUES (lower(newid()), 'EF 4.4', '', 0 , (SELECT uuid FROM organizations WHERE shortName = 'EF 4'), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 5', '', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
	INSERT INTO organizations(uuid, shortName, longName, type, parentOrgUuid, createdAt, updatedAt)
		VALUES (lower(newid()), 'EF 5.1', '', 0 , (SELECT uuid FROM organizations WHERE shortName = 'EF 4'), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
	INSERT INTO organizations(uuid, shortName, longName, type, parentOrgUuid, createdAt, updatedAt)
		VALUES (lower(newid()), 'EF 5.2', '', 0 , (SELECT uuid FROM organizations WHERE shortName = 'EF 5'), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
	INSERT INTO organizations(uuid, shortName, longName, type, parentOrgUuid, createdAt, updatedAt)
		VALUES (lower(newid()), 'EF 5.3', '', 0 , (SELECT uuid FROM organizations WHERE shortName = 'EF 5'), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
	INSERT INTO organizations(uuid, shortName, longName, type, parentOrgUuid, createdAt, updatedAt)
		VALUES (lower(newid()), 'EF 5.4', '', 0 , (SELECT uuid FROM organizations WHERE shortName = 'EF 5'), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 6', '', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
	INSERT INTO organizations(uuid, shortName, longName, type, parentOrgUuid, createdAt, updatedAt)
		VALUES (lower(newid()), 'EF 6.1', '', 0 , (SELECT uuid FROM organizations WHERE shortName = 'EF 6'), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
	INSERT INTO organizations(uuid, shortName, longName, type, parentOrgUuid, createdAt, updatedAt)
		VALUES (lower(newid()), 'EF 6.2', '', 0 , (SELECT uuid FROM organizations WHERE shortName = 'EF 6'), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF7', '', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF8', '', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF9', 'Gender', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'TAAC-N', '', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'TAAC-S', '', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'TAAC-W', '', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'TAAC-E', '', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'TAAC-C', '', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'TAAC Air', '', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);

UPDATE positions SET organizationUuid = (SELECT uuid FROM organizations WHERE shortName ='EF 1') WHERE name LIKE 'EF 1 %';
UPDATE positions SET organizationUuid = (SELECT uuid FROM organizations WHERE shortName ='EF 1.1') WHERE name LIKE 'EF 1.1%';
UPDATE positions SET organizationUuid = (SELECT uuid FROM organizations WHERE shortName ='EF 2.1') WHERE name LIKE 'EF 2.1%';
UPDATE positions SET organizationUuid = (SELECT uuid FROM organizations WHERE shortName ='EF 2.2') WHERE name LIKE 'EF 2.2%';
UPDATE positions SET organizationUuid = (SELECT uuid FROM organizations WHERE shortName ='EF 3') WHERE name LIKE 'EF 3%';
UPDATE positions SET organizationUuid = (SELECT uuid FROM organizations WHERE shortName ='EF 4') WHERE name LIKE 'EF 4%';
UPDATE positions SET organizationUuid = (SELECT uuid FROM organizations WHERE shortName='ANET Administrators') where name = 'ANET Administrator';

-- Create the EF 1.1 approval process
INSERT INTO approvalSteps (uuid, advisorOrganizationUuid, name)
	VALUES (lower(newid()), (SELECT uuid from organizations where shortName='EF 1.1'), 'EF 1.1 Approvers');
INSERT INTO approvers (approvalStepUuid, positionUuid)
	VALUES ((SELECT uuid from approvalSteps WHERE name='EF 1.1 Approvers'), (SELECT uuid from positions where name = 'EF 1.1 SuperUser'));

-- Create the EF 2.2 approval process
DECLARE @approvalStepUuid varchar(36);
SET @approvalStepUuid = lower(newid());
INSERT INTO approvalSteps (uuid, name, advisorOrganizationUuid)
	VALUES (@approvalStepUuid, 'EF 2.2 Secondary Reviewers', (SELECT uuid from organizations where shortName='EF 2.2'));
INSERT INTO approvalSteps (uuid, name, advisorOrganizationUuid, nextStepUuid)
	VALUES (lower(newid()), 'EF 2.2 Initial Approvers', (SELECT uuid from organizations where shortName='EF 2.2'), @approvalStepUuid);

INSERT INTO approvers (approvalStepUuid, positionUuid)
	VALUES ((SELECT uuid from approvalSteps WHERE name='EF 2.2 Initial Approvers'), (SELECT uuid from positions where name = 'EF 2.2 Super User'));
INSERT INTO approvers (approvalStepUuid, positionUuid)
	VALUES ((SELECT uuid from approvalSteps WHERE name='EF 2.2 Initial Approvers'), (SELECT uuid from positions where name = 'EF 2.2 Advisor D'));
INSERT INTO approvers (approvalStepUuid, positionUuid)
	VALUES ((SELECT uuid from approvalSteps WHERE name='EF 2.2 Secondary Reviewers'), (SELECT uuid from positions where name = 'EF 2.2 Final Reviewer'));

INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)	VALUES (N'1145e584-4485-4ce0-89c4-2fa2e1fe846a', 'EF 1', 'Budget and Planning', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid)
	VALUES (N'fdf107e7-a88a-4dc4-b744-748e9aaffabc', '1.1', 'Budgeting in the MoD', 'Sub-EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 1'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'7b2ad5c3-018b-48f5-b679-61fbbda21693', '1.1.A', 'Milestone the First in EF 1.1', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 1.1'), (SELECT uuid from organizations where shortName='EF 1.1'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'1b5eb36b-456c-46b7-ae9e-1c89e9075292', '1.1.B', 'Milestone the Second in EF 1.1', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 1.1'), (SELECT uuid from organizations where shortName='EF 1.1'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'7fdef880-1bf3-4e56-8476-79166324023f', '1.1.C', 'Milestone the Third in EF 1.1', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 1.1'), (SELECT uuid from organizations where shortName='EF 1.1'));

INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'fe6b6b2f-d2a1-4ce1-9aa7-05361812a4d0', 'EF 1.2', 'Budgeting in the MoI', 'Sub-EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 1'), (SELECT uuid from organizations WHERE shortName='EF 1.2'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'953e0b0b-25e6-44b6-bc77-ef98251d046a', '1.2.A', 'Milestone the First in EF 1.2', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 1.2'), (SELECT uuid from organizations where shortName='EF 1.2'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'9d3da7f4-8266-47af-b518-995f587250c9', '1.2.B', 'Milestone the Second in EF 1.2', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 1.2'), (SELECT uuid from organizations where shortName='EF 1.2'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'6bbb1be9-4655-48d7-83f2-bc474781544a', '1.2.C', 'Milestone the Third in EF 1.2', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 1.2'), (SELECT uuid from organizations where shortName='EF 1.2'));

INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'ac466253-1456-4fc8-9b14-a3643746e5a6', 'EF 1.3', 'Budgeting in the Police?', 'Sub-EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 1'), (SELECT uuid FROM organizations WHERE shortName='EF 1.3'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'076793eb-9950-4ea6-bbd5-2d8b8827828c', '1.3.A', 'Getting a budget in place', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 1.3'), (SELECT uuid from organizations where shortName='EF 1.3'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'30bc5708-c12d-4a21-916c-5acd7f6f11da', '1.3.B', 'Tracking your expenses', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 1.3'), (SELECT uuid from organizations where shortName='EF 1.3'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'df920c99-10ea-44e8-940f-cb1d1cbd22da', '1.3.C', 'Knowing when you run out of money', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 1.3'), (SELECT uuid from organizations where shortName='EF 1.3'));

INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, organizationUuid)
	VALUES (N'cd35abe7-a5c9-4b3e-885b-4c72bf564ed7', 'EF 2', 'Transparency, Accountability, O (TAO)', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from organizations where shortName='EF 2'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'75d4009d-7c79-42e0-aa2f-d79d158ec8d6', '2.A', 'This is the first Milestone in EF 2', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 2'), (SELECT uuid from organizations where shortName='EF 2'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'2200a820-c4c7-4c9c-946c-f0c9c9e045c5', '2.B', 'This is the second Milestone in EF 2', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 2'), (SELECT uuid from organizations where shortName='EF 2'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'0701a964-5d79-4090-8f35-a40856556675', '2.C', 'This is the third Milestone in EF 2', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 2'), (SELECT uuid from organizations where shortName='EF 2'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'42afd501-1a2c-4758-9da5-f996b2c97156', '2.D', 'Keep track of the petty cash drawer', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 2'), (SELECT uuid from organizations where shortName='EF 2'));

INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)
	VALUES (N'44089923-7367-4e97-82c3-dfe6b270d493', 'EF 3', 'Rule of Law', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'39d0c437-720c-4d78-8768-7f3dee5b3cd0', '3.a', 'Get some Lawyers to read a book', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 3'), (SELECT uuid from organizations where shortName='EF 3'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'a710a076-be5c-4982-b870-50dd5d340eb3', '3.b', 'Get some Lawyers to wear a suit to court', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 3'), (SELECT uuid from organizations where shortName='EF 3'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'c00633c5-5479-41b2-b188-89d2a9922924', '3.c', 'Get some Lawyers to cross-examine witnesses in a non-hostile fashion', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 3'), (SELECT uuid from organizations where shortName='EF 3'));

INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)
	VALUES (N'dbe26c4f-7f92-451a-a9b5-8e43fc9cd6c9', 'EF 4', 'Force Gen (Training)', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'c098a5b3-8d80-429d-ada2-fd57dc331e2a', '4.a', 'Get a website for people to apply on', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 4'), (SELECT uuid from organizations where shortName='EF 4'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'eddf19f6-f6e1-44f5-9093-f3e2ade59428', '4.b', 'Hire People', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 4'), (SELECT uuid from organizations where shortName='EF 4'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'0cb03167-2772-4d3e-8382-5870da58022a', '4.b.1', 'Get an HR team', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 4'), (SELECT uuid from organizations where shortName='EF 4'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'df8fd269-b382-486e-9bc6-f3f4b77a03b0', '4.b.2', 'Review resumes for hiring', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 4'), (SELECT uuid from organizations where shortName='EF 4'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'17f35bc6-a0f3-4f79-8813-2176a7d7ca2f', '4.b.3', 'Invite people to come interview', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 4'), (SELECT uuid from organizations where shortName='EF 4'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'32788f96-b72c-4314-8286-7f59b683cba2', '4.b.4', 'Interview candidates', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 4'), (SELECT uuid from organizations where shortName='EF 4'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'cca1678a-58d7-4213-9c67-f894879df776', '4.b.5', 'Extend Job Offers to successful candidates', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 4'), (SELECT uuid from organizations where shortName='EF 4'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'98342fa0-9106-4ef1-bc47-e4af2f5da330', '4.c', 'Onboard new Employees', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 4'), (SELECT uuid from organizations where shortName='EF 4'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)
	VALUES (N'242efaa3-d5de-4970-996d-50ca90ef6480', 'EF 5', 'Force Sustainment (Logistics)', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)
	VALUES (N'12b8dbcc-8f31-444a-9437-00fe00fc1f7b', 'EF6', 'C2 Operations', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)
	VALUES (N'19364d81-3203-483d-a6bf-461d58888c76', 'EF7', 'Intelligence', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)
	VALUES (N'9b9f4205-0721-4893-abf8-69e020d4db23', 'EF8', 'Stratcom', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)
	VALUES (N'5173f34b-16f5-4e18-aa3d-def55c40e36d', 'Gender', '', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)
	VALUES (lower(newid()), 'TAAC-N', '', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)
	VALUES (lower(newid()), 'TAAC-S', '', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)
	VALUES (lower(newid()), 'TAAC-E', '', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)
	VALUES (lower(newid()), 'TAAC-W', '', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)
	VALUES (lower(newid()), 'TAAC-C', '', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)
	VALUES (lower(newid()), 'TAAC Air', '', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);

INSERT INTO locations (uuid, name, lat, lng, createdAt, updatedAt)
	VALUES (N'cc49bb27-4d8f-47a8-a9ee-af2b68b992ac', 'St Johns Airport', 47.613442, -52.740936, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, lat, lng, createdAt, updatedAt)
	VALUES (N'8c138750-91ce-41bf-9b4c-9f0ddc73608b', 'Murray''s Hotel', 47.561517, -52.708760, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, lat, lng, createdAt, updatedAt)
	VALUES (N'9c982685-5946-4dad-a7ee-0f5a12f5e170', 'Wishingwells Park', 47.560040, -52.736962, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, lat, lng, createdAt, updatedAt)
	VALUES (N'0855fb0a-995e-4a79-a132-4024ee2983ff', 'General Hospital', 47.571772, -52.741935, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, lat, lng, createdAt, updatedAt)
	VALUES (N'95446f93-249b-4aa9-b98a-7bd2c4680718', 'Portugal Cove Ferry Terminal', 47.626718, -52.857241, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, lat, lng, createdAt, updatedAt)
	VALUES (N'c8fdb53f-6f93-46fc-b0fa-f005c7b49667', 'Cabot Tower', 47.570010, -52.681770, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, lat, lng, createdAt, updatedAt)
	VALUES (N'c7a9f420-457a-490c-a810-b504c022cf1e', 'Fort Amherst', 47.563763, -52.680590, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, lat, lng, createdAt, updatedAt)
	VALUES (N'7339f9e3-99d1-497a-9e3b-1269c4c287fe', 'Harbour Grace Police Station', 47.705133, -53.214422, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, lat, lng, createdAt, updatedAt)
	VALUES (N'f2207d9b-204b-4cb5-874d-3fe6bc6f8acd', 'Conception Bay South Police Station', 47.526784, -52.954739, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'e0ff0d6c-e663-4639-a44d-b075bf1e690d', 'MoD Headquarters Kabul', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'5046a870-6c2a-40a7-9681-61a1d6eeaa07', 'MoI Headquarters Kabul', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'c15eb29e-2965-401e-9f36-6ac8b9cc3842', 'President''s Palace', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'0585f158-5121-46a2-b099-799fe980aa9c', 'Kabul Police Academy', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'053ab2ad-132a-4a62-8cbb-20827f50ec34', 'Police HQ Training Facility', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'e87f145b-32e9-47ec-a0f4-e0dcf18e8a8c', 'Kabul Hospital', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'6465dd40-9fec-41db-a3b9-652fa52c7d21', 'MoD Army Training Base 123', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'2a59dd78-0c29-4b3f-bc94-7c98ff80b197', 'MoD Location the Second', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'18c9be38-bf68-40e2-80d8-aac47f5ff7cf', 'MoI Office Building ABC', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'8a34768c-aa15-41e4-ab79-6cf2740d555e', 'MoI Training Center', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'9f364c59-953e-4c17-919c-648ea3a74e36', 'MoI Adminstrative Office', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'dfc3918d-c2e3-4308-b161-2445cde77b3f', 'MoI Senior Executive Suite', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'3652e114-ad16-43f0-b179-cc1bce6958d5', 'MoI Coffee Shop', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'5ac4078d-d445-416a-a93e-5941562359bb', 'MoI Herat Office', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'22b0137c-4d89-43eb-ac95-a9f68aba884f', 'MoI Jalalabad Office', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'60f4084f-3304-4cd5-89df-353edef07d18', 'MoI Kandahar Office', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'c136bf89-cc24-43a5-8f51-0f41dfc9ab77', 'MoI Mazar-i-Sharif', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'b0979678-0ed0-4b42-9b26-9976fcfa1b81', 'MoI Office Building ABC', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);


INSERT INTO organizations (uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'MoD', 'Ministry of Defense', 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations (uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'MoI', 'Ministry of Interior', 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);<commit_msg>nci-agency/anet#1777: Add sample identification codes to sample database<commit_after>SET QUOTED_IDENTIFIER ON

--DROP TABLE approvers;
--DROP TABLE reportActions;
--DROP TABLE positionRelationships;
--DROP TABLE reportTasks;
--DROP TABLE reportPeople;
--DROP TABLE reportTags;
--DROP TABLE peoplePositions;
--DROP TABLE savedSearches;
--DROP TABLE positions;
--DROP TABLE tasks;
--DROP TABLE comments;
--DROP TABLE reports;
--DROP TABLE people;
--DROP TABLE approvalSteps;
--DROP TABLE locations;
--DROP TABLE organizations;
--DROP TABLE adminSettings;
--DROP TABLE pendingEmails;
--DROP TABLE tags;
--DROP TABLE authorizationGroupPositions;
--DROP TABLE authorizationGroups;
--DROP TABLE reportAuthorizationGroups;
--DROP TABLE notes;
--DROP TABLE noteRelatedObjects;
--DROP TABLE DATABASECHANGELOG;
--DROP TABLE DATABASECHANGELOGLOCK;

TRUNCATE TABLE peoplePositions;
TRUNCATE TABLE approvers;
TRUNCATE TABLE reportActions;
TRUNCATE TABLE positionRelationships;
TRUNCATE TABLE reportTasks;
TRUNCATE TABLE reportPeople;
TRUNCATE TABLE reportTags;
TRUNCATE TABLE comments;
TRUNCATE TABLE savedSearches;
TRUNCATE TABLE reportsSensitiveInformation;
TRUNCATE TABLE authorizationGroupPositions;
TRUNCATE TABLE reportAuthorizationGroups;
TRUNCATE TABLE noteRelatedObjects;
DELETE FROM positions;
DELETE FROM tasks WHERE customFieldRef1Uuid IS NOT NULL;
DELETE FROM tasks WHERE customFieldRef1Uuid IS NULL;
DELETE FROM reports;
DELETE FROM people;
DELETE FROM approvalSteps;
DELETE FROM locations;
DELETE FROM organizations;
DELETE FROM adminSettings;
DELETE FROM tags;
DELETE FROM authorizationGroups;
DELETE FROM notes;

--Advisors
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, domainUsername, country, gender, endOfTourDate, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 0, '<EMAIL>', '123-456-78960', 'OF-9', 'Jack is an advisor in EF 2.1', 'jack', 'Germany', 'MALE', DATEADD(year, 1, CURRENT_TIMESTAMP), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, domainUsername, country, gender, endOfTourDate, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 0, '<EMAIL>', '+1-777-7777', 'Capt', 'Elizabeth is a test advisor we have in the database who is in EF 1.1', 'elizabeth', 'United States of America', 'FEMALE', DATEADD(year, 1, CURRENT_TIMESTAMP), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, domainUsername, country, gender, endOfTourDate, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 0, '<EMAIL>', '+9-23-2323-2323', 'CIV', 'Erin is an Advisor in EF 2.2 who can approve reports', 'erin', 'Australia', 'FEMALE', DATEADD(year, 1, CURRENT_TIMESTAMP), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, domainUsername, country, gender, endOfTourDate, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 0, '<EMAIL>', '+23-23-11222', 'CIV', 'Reina is an Advisor in EF 2.2', 'reina', 'Italy', 'FEMALE', DATEADD(year, 1, CURRENT_TIMESTAMP), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, domainUsername, country, gender, endOfTourDate, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 0, '<EMAIL>', '+444-44-4444', 'OF-2', 'A Divisor was born for this job', 'advisor', 'Canada', 'FEMALE', DATEADD(year, 1, CURRENT_TIMESTAMP), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
-- Principals
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, country, gender, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 1, '<EMAIL>', '+011-232-12324', 'LtCol', 'this is a sample person who could be a Principal!', 'Afghanistan', 'MALE', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, country, gender, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 1, '<EMAIL>', '+1-412-7324', 'Maj', 'Roger is another test person we have in the database', 'Afghanistan', 'MALE', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, country, gender, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 1, '<EMAIL>', '+1-422222222', 'CIV', 'Christopf works in the MoD Office', 'Afghanistan', 'MALE', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
-- Super Users
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, domainUsername, country, gender, endOfTourDate, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 0, '<EMAIL>', '+1-444-7324', 'CIV', 'Bob is a Super User in EF 1.1', 'bob', 'United States of America', 'MALE', DATEADD(year, 1, CURRENT_TIMESTAMP), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, domainUsername, country, gender, endOfTourDate, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 0, '<EMAIL>', '+2-456-7324', 'BGen', 'Henry is a Super User in EF 2.1', 'henry', 'United States of America', 'MALE', DATEADD(year, 1, CURRENT_TIMESTAMP), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, domainUsername, country, gender, endOfTourDate, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 0, '<EMAIL>', '+2-456-7324', 'CIV', 'Jacob is a Super User in EF 2.2', 'jacob', 'Italy', 'MALE', DATEADD(year, 1, CURRENT_TIMESTAMP), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, domainUsername, country, gender, endOfTourDate, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 0, '<EMAIL>', '+2-456-7324', 'CTR', 'Rebecca is a Super User in EF 2.2', 'rebecca', 'Germany', 'FEMALE', DATEADD(year, 1, CURRENT_TIMESTAMP), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, domainUsername, country, gender, endOfTourDate, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 0, '<EMAIL>', '+1-412-7324', 'CIV', 'Andrew is the EF 1 Manager', 'andrew', 'United States of America', 'MALE', DATEADD(year, 1, CURRENT_TIMESTAMP), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
-- Administrator
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, domainUsername, country, gender, endOfTourDate, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', '0', '0', '<EMAIL>', NULL, 'CIV', 'An administrator', 'arthur', 'Albania', 'MALE', DATEADD(year, 1, CURRENT_TIMESTAMP), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);

--People
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, country, gender, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 1, '<EMAIL>', '+1-412-9314', 'CIV', '', 'United States of America', 'MALE', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, domainUsername, country, gender, endOfTourDate, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 0, 0, '<EMAIL>', '+1-202-7324', 'CIV', '', 'nick', 'United States of America', 'MALE', DATEADD(year, 1, CURRENT_TIMESTAMP), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO people (uuid, name, status, role, emailAddress, phoneNumber, rank, biography, country, gender, createdAt, updatedAt)
	VALUES (lower(newid()), '<NAME>', 1, 1, '<EMAIL>', '+99-9999-9999', 'CIV', '', 'Italy', 'MALE', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);

INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'ANET Administrator', 3, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1 Manager', 2, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1.1 Advisor A', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1.1 Advisor B', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1.1 Advisor C', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1.1 Advisor D', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1.1 Advisor E', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1.1 Advisor F', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1.1 Advisor for Agriculture', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1.1 Old Inactive Advisor', 0, 1, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1.1 Advisor for Mining', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1.1 Advisor for Space Issues', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1.1 Advisor for Interagency Advising', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1.1 SuperUser', 2, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 2.1 Advisor B', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 2.1 Advisor for Accounting', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 2.1 Advisor for Kites', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 2.1 SuperUser', 2, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 2.2 Advisor C', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 2.2 Advisor D', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 2.2 Old and Inactive', 0, 1, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 2.2 Advisor Sewing Facilities', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 2.2 Advisor Local Kebabs', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 2.2 Super User', 2, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 2.2 Final Reviewer', 2, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 4.1 Advisor E', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 4.1 Advisor for Coffee', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 4.1 Advisor on Software Engineering', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 4.1 Advisor E', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 4.1 Advisor old - dont use', 0, 1, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO positions (uuid, name, type, status, currentPersonUuid, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 9 Advisor <empty>', 0, 0, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);


-- Put Andrew in the EF 1 Manager Billet
INSERT INTO peoplePositions (positionUuid, personUuid, createdAt)
	VALUES ((SELECT uuid from positions where name = 'EF 1 Manager'), (SELECT uuid from people where emailAddress = '<EMAIL>'), CURRENT_TIMESTAMP);
UPDATE positions SET currentPersonUuid = (SELECT uuid from people where emailAddress = '<EMAIL>') WHERE name = 'EF 1 Manager';

-- Put Bob into the Super User Billet in EF 1
INSERT INTO peoplePositions (positionUuid, personUuid, createdAt)
	VALUES ((SELECT uuid from positions where name = 'EF 1.1 SuperUser'), (SELECT uuid from people where emailAddress = '<EMAIL>'), CURRENT_TIMESTAMP);
UPDATE positions SET currentPersonUuid = (SELECT uuid from people where emailAddress = '<EMAIL>') WHERE name = 'EF 1.1 SuperUser';

-- Put Henry into the Super User Billet in EF 2
INSERT INTO peoplePositions (positionUuid, personUuid, createdAt)
	VALUES ((SELECT uuid from positions where name = 'EF 2.1 SuperUser'), (SELECT uuid from people where emailAddress = '<EMAIL>'), CURRENT_TIMESTAMP);
UPDATE positions SET currentPersonUuid = (SELECT uuid from people where emailAddress = '<EMAIL>') WHERE name = 'EF 2.1 SuperUser';

-- Rotate an advisor through a billet ending up with Jack in the EF 2 Advisor Billet
INSERT INTO peoplePositions (positionUuid, personUuid, createdAt)
	VALUES ((SELECT uuid from positions where name = 'EF 2.1 Advisor B'), (SELECT uuid from people where emailAddress = '<EMAIL>'), CURRENT_TIMESTAMP);
UPDATE positions SET currentPersonUuid = (SELECT uuid from people where emailAddress = '<EMAIL>') WHERE name = 'EF 2.1 Advisor B';
INSERT INTO peoplePositions (positionUuid, personUuid, createdAt)
	VALUES ((SELECT uuid from positions where name = 'EF 2.1 Advisor B'), (SELECT uuid from people where emailAddress = '<EMAIL>'), CURRENT_TIMESTAMP);
UPDATE positions SET currentPersonUuid = (SELECT uuid from people where emailAddress = '<EMAIL>') WHERE name = 'EF 2.1 Advisor B';

-- Put Elizabeth into the EF 1 Advisor Billet
INSERT INTO peoplePositions (positionUuid, personUuid, createdAt)
	VALUES ((SELECT uuid from positions where name = 'EF 1.1 Advisor A'), (SELECT uuid from people where emailAddress = '<EMAIL>'), CURRENT_TIMESTAMP);
UPDATE positions SET currentPersonUuid = (SELECT uuid from people where emailAddress = '<EMAIL>') WHERE name = 'EF 1.1 Advisor A';

-- Put Reina into the EF 2.2 Advisor Billet
INSERT INTO peoplePositions (positionUuid, personUuid, createdAt)
	VALUES ((SELECT uuid from positions where name = 'EF 2.2 Advisor C'), (SELECT uuid from people where emailAddress = '<EMAIL>'), CURRENT_TIMESTAMP);
UPDATE positions SET currentPersonUuid = (SELECT uuid from people where emailAddress = '<EMAIL>') WHERE name = 'EF 2.2 Advisor C';

-- Put Erin into the EF 2.2 Advisor Billet
INSERT INTO peoplePositions (positionUuid, personUuid, createdAt)
	VALUES ((SELECT uuid from positions where name = 'EF 2.2 Advisor D'), (SELECT uuid from people where emailAddress = '<EMAIL>'), CURRENT_TIMESTAMP);
UPDATE positions SET currentPersonUuid = (SELECT uuid from people where emailAddress = '<EMAIL>') WHERE name = 'EF 2.2 Advisor D';

-- Put Jacob in the EF 2.2 Super User Billet
INSERT INTO peoplePositions (positionUuid, personUuid, createdAt)
	VALUES ((SELECT uuid from positions where name = 'EF 2.2 Super User'), (SELECT uuid from people where emailAddress = '<EMAIL>'), CURRENT_TIMESTAMP);
UPDATE positions SET currentPersonUuid = (SELECT uuid from people where emailAddress = '<EMAIL>') WHERE name = 'EF 2.2 Super User';

-- Put Rebecca in the EF 2.2 Final Reviewer Position
INSERT INTO peoplePositions (positionUuid, personUuid, createdAt)
	VALUES ((SELECT uuid from positions where name = 'EF 2.2 Final Reviewer'), (SELECT uuid from people where emailAddress = '<EMAIL>'), CURRENT_TIMESTAMP);
UPDATE positions SET currentPersonUuid = (SELECT uuid from people where emailAddress = '<EMAIL>') WHERE name = 'EF 2.2 Final Reviewer';

-- Put Arthur into the Admin Billet
INSERT INTO peoplePositions (positionUuid, personUuid, createdAt)
	VALUES ((SELECT uuid from positions where name = 'ANET Administrator'), (SELECT uuid from people where emailAddress = '<EMAIL>'), CURRENT_TIMESTAMP);
UPDATE positions SET currentPersonUuid = (SELECT uuid from people where emailAddress = '<EMAIL>') WHERE name = 'ANET Administrator';


INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'ANET Administrators','', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 1', 'Planning Programming, Budgeting and Execution', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
	INSERT INTO organizations(uuid, shortName, longName, type, parentOrgUuid, createdAt, updatedAt)
		VALUES (lower(newid()), 'EF 1.1', '',0, (SELECT uuid from organizations WHERE shortName ='EF 1'), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 2', '',0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
	INSERT INTO organizations(uuid, shortName, longName, type, parentOrgUuid, createdAt, updatedAt)
		VALUES (lower(newid()), 'EF 2.1', '', 0, (SELECT uuid from organizations WHERE shortName ='EF 2'), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
	INSERT INTO organizations(uuid, shortName, longName, type, parentOrgUuid, createdAt, updatedAt)
		VALUES (lower(newid()), 'EF 2.2', '', 0, (SELECT uuid from organizations WHERE shortName ='EF 2'), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 3', '', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 4', '', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
	INSERT INTO organizations(uuid, shortName, longName, type, parentOrgUuid, createdAt, updatedAt)
		VALUES (lower(newid()), 'EF 4.1', '', 0 , (SELECT uuid FROM organizations WHERE shortName = 'EF 4'), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
	INSERT INTO organizations(uuid, shortName, longName, type, parentOrgUuid, createdAt, updatedAt)
		VALUES (lower(newid()), 'EF 4.2', '', 0 , (SELECT uuid FROM organizations WHERE shortName = 'EF 4'), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
	INSERT INTO organizations(uuid, shortName, longName, type, parentOrgUuid, createdAt, updatedAt)
		VALUES (lower(newid()), 'EF 4.3', '', 0 , (SELECT uuid FROM organizations WHERE shortName = 'EF 4'), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
	INSERT INTO organizations(uuid, shortName, longName, type, parentOrgUuid, createdAt, updatedAt)
		VALUES (lower(newid()), 'EF 4.4', '', 0 , (SELECT uuid FROM organizations WHERE shortName = 'EF 4'), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 5', '', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
	INSERT INTO organizations(uuid, shortName, longName, type, parentOrgUuid, createdAt, updatedAt)
		VALUES (lower(newid()), 'EF 5.1', '', 0 , (SELECT uuid FROM organizations WHERE shortName = 'EF 4'), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
	INSERT INTO organizations(uuid, shortName, longName, type, parentOrgUuid, createdAt, updatedAt)
		VALUES (lower(newid()), 'EF 5.2', '', 0 , (SELECT uuid FROM organizations WHERE shortName = 'EF 5'), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
	INSERT INTO organizations(uuid, shortName, longName, type, parentOrgUuid, createdAt, updatedAt)
		VALUES (lower(newid()), 'EF 5.3', '', 0 , (SELECT uuid FROM organizations WHERE shortName = 'EF 5'), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
	INSERT INTO organizations(uuid, shortName, longName, type, parentOrgUuid, createdAt, updatedAt)
		VALUES (lower(newid()), 'EF 5.4', '', 0 , (SELECT uuid FROM organizations WHERE shortName = 'EF 5'), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF 6', '', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
	INSERT INTO organizations(uuid, shortName, longName, type, parentOrgUuid, createdAt, updatedAt)
		VALUES (lower(newid()), 'EF 6.1', '', 0 , (SELECT uuid FROM organizations WHERE shortName = 'EF 6'), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
	INSERT INTO organizations(uuid, shortName, longName, type, parentOrgUuid, createdAt, updatedAt)
		VALUES (lower(newid()), 'EF 6.2', '', 0 , (SELECT uuid FROM organizations WHERE shortName = 'EF 6'), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF7', '', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF8', '', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'EF9', 'Gender', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'TAAC-N', '', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'TAAC-S', '', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'TAAC-W', '', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'TAAC-E', '', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'TAAC-C', '', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations(uuid, shortName, longName, type, createdAt, updatedAt)
	VALUES (lower(newid()), 'TAAC Air', '', 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);

UPDATE positions SET organizationUuid = (SELECT uuid FROM organizations WHERE shortName ='EF 1') WHERE name LIKE 'EF 1 %';
UPDATE positions SET organizationUuid = (SELECT uuid FROM organizations WHERE shortName ='EF 1.1') WHERE name LIKE 'EF 1.1%';
UPDATE positions SET organizationUuid = (SELECT uuid FROM organizations WHERE shortName ='EF 2.1') WHERE name LIKE 'EF 2.1%';
UPDATE positions SET organizationUuid = (SELECT uuid FROM organizations WHERE shortName ='EF 2.2') WHERE name LIKE 'EF 2.2%';
UPDATE positions SET organizationUuid = (SELECT uuid FROM organizations WHERE shortName ='EF 3') WHERE name LIKE 'EF 3%';
UPDATE positions SET organizationUuid = (SELECT uuid FROM organizations WHERE shortName ='EF 4') WHERE name LIKE 'EF 4%';
UPDATE positions SET organizationUuid = (SELECT uuid FROM organizations WHERE shortName='ANET Administrators') where name = 'ANET Administrator';

-- Create the EF 1.1 approval process
INSERT INTO approvalSteps (uuid, advisorOrganizationUuid, name)
	VALUES (lower(newid()), (SELECT uuid from organizations where shortName='EF 1.1'), 'EF 1.1 Approvers');
INSERT INTO approvers (approvalStepUuid, positionUuid)
	VALUES ((SELECT uuid from approvalSteps WHERE name='EF 1.1 Approvers'), (SELECT uuid from positions where name = 'EF 1.1 SuperUser'));

-- Create the EF 2.2 approval process
DECLARE @approvalStepUuid varchar(36);
SET @approvalStepUuid = lower(newid());
INSERT INTO approvalSteps (uuid, name, advisorOrganizationUuid)
	VALUES (@approvalStepUuid, 'EF 2.2 Secondary Reviewers', (SELECT uuid from organizations where shortName='EF 2.2'));
INSERT INTO approvalSteps (uuid, name, advisorOrganizationUuid, nextStepUuid)
	VALUES (lower(newid()), 'EF 2.2 Initial Approvers', (SELECT uuid from organizations where shortName='EF 2.2'), @approvalStepUuid);

INSERT INTO approvers (approvalStepUuid, positionUuid)
	VALUES ((SELECT uuid from approvalSteps WHERE name='EF 2.2 Initial Approvers'), (SELECT uuid from positions where name = 'EF 2.2 Super User'));
INSERT INTO approvers (approvalStepUuid, positionUuid)
	VALUES ((SELECT uuid from approvalSteps WHERE name='EF 2.2 Initial Approvers'), (SELECT uuid from positions where name = 'EF 2.2 Advisor D'));
INSERT INTO approvers (approvalStepUuid, positionUuid)
	VALUES ((SELECT uuid from approvalSteps WHERE name='EF 2.2 Secondary Reviewers'), (SELECT uuid from positions where name = 'EF 2.2 Final Reviewer'));

INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)	VALUES (N'1145e584-4485-4ce0-89c4-2fa2e1fe846a', 'EF 1', 'Budget and Planning', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid)
	VALUES (N'fdf107e7-a88a-4dc4-b744-748e9aaffabc', '1.1', 'Budgeting in the MoD', 'Sub-EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 1'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'7b2ad5c3-018b-48f5-b679-61fbbda21693', '1.1.A', 'Milestone the First in EF 1.1', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 1.1'), (SELECT uuid from organizations where shortName='EF 1.1'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'1b5eb36b-456c-46b7-ae9e-1c89e9075292', '1.1.B', 'Milestone the Second in EF 1.1', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 1.1'), (SELECT uuid from organizations where shortName='EF 1.1'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'7fdef880-1bf3-4e56-8476-79166324023f', '1.1.C', 'Milestone the Third in EF 1.1', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 1.1'), (SELECT uuid from organizations where shortName='EF 1.1'));

INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'fe6b6b2f-d2a1-4ce1-9aa7-05361812a4d0', 'EF 1.2', 'Budgeting in the MoI', 'Sub-EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 1'), (SELECT uuid from organizations WHERE shortName='EF 1.2'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'953e0b0b-25e6-44b6-bc77-ef98251d046a', '1.2.A', 'Milestone the First in EF 1.2', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 1.2'), (SELECT uuid from organizations where shortName='EF 1.2'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'9d3da7f4-8266-47af-b518-995f587250c9', '1.2.B', 'Milestone the Second in EF 1.2', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 1.2'), (SELECT uuid from organizations where shortName='EF 1.2'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'6bbb1be9-4655-48d7-83f2-bc474781544a', '1.2.C', 'Milestone the Third in EF 1.2', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 1.2'), (SELECT uuid from organizations where shortName='EF 1.2'));

INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'ac466253-1456-4fc8-9b14-a3643746e5a6', 'EF 1.3', 'Budgeting in the Police?', 'Sub-EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 1'), (SELECT uuid FROM organizations WHERE shortName='EF 1.3'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'076793eb-9950-4ea6-bbd5-2d8b8827828c', '1.3.A', 'Getting a budget in place', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 1.3'), (SELECT uuid from organizations where shortName='EF 1.3'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'30bc5708-c12d-4a21-916c-5acd7f6f11da', '1.3.B', 'Tracking your expenses', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 1.3'), (SELECT uuid from organizations where shortName='EF 1.3'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'df920c99-10ea-44e8-940f-cb1d1cbd22da', '1.3.C', 'Knowing when you run out of money', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 1.3'), (SELECT uuid from organizations where shortName='EF 1.3'));

INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, organizationUuid)
	VALUES (N'cd35abe7-a5c9-4b3e-885b-4c72bf564ed7', 'EF 2', 'Transparency, Accountability, O (TAO)', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from organizations where shortName='EF 2'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'75d4009d-7c79-42e0-aa2f-d79d158ec8d6', '2.A', 'This is the first Milestone in EF 2', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 2'), (SELECT uuid from organizations where shortName='EF 2'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'2200a820-c4c7-4c9c-946c-f0c9c9e045c5', '2.B', 'This is the second Milestone in EF 2', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 2'), (SELECT uuid from organizations where shortName='EF 2'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'0701a964-5d79-4090-8f35-a40856556675', '2.C', 'This is the third Milestone in EF 2', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 2'), (SELECT uuid from organizations where shortName='EF 2'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'42afd501-1a2c-4758-9da5-f996b2c97156', '2.D', 'Keep track of the petty cash drawer', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 2'), (SELECT uuid from organizations where shortName='EF 2'));

INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)
	VALUES (N'44089923-7367-4e97-82c3-dfe6b270d493', 'EF 3', 'Rule of Law', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'39d0c437-720c-4d78-8768-7f3dee5b3cd0', '3.a', 'Get some Lawyers to read a book', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 3'), (SELECT uuid from organizations where shortName='EF 3'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'a710a076-be5c-4982-b870-50dd5d340eb3', '3.b', 'Get some Lawyers to wear a suit to court', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 3'), (SELECT uuid from organizations where shortName='EF 3'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'c00633c5-5479-41b2-b188-89d2a9922924', '3.c', 'Get some Lawyers to cross-examine witnesses in a non-hostile fashion', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 3'), (SELECT uuid from organizations where shortName='EF 3'));

INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)
	VALUES (N'dbe26c4f-7f92-451a-a9b5-8e43fc9cd6c9', 'EF 4', 'Force Gen (Training)', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'c098a5b3-8d80-429d-ada2-fd57dc331e2a', '4.a', 'Get a website for people to apply on', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 4'), (SELECT uuid from organizations where shortName='EF 4'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'eddf19f6-f6e1-44f5-9093-f3e2ade59428', '4.b', 'Hire People', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 4'), (SELECT uuid from organizations where shortName='EF 4'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'0cb03167-2772-4d3e-8382-5870da58022a', '4.b.1', 'Get an HR team', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 4'), (SELECT uuid from organizations where shortName='EF 4'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'df8fd269-b382-486e-9bc6-f3f4b77a03b0', '4.b.2', 'Review resumes for hiring', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 4'), (SELECT uuid from organizations where shortName='EF 4'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'17f35bc6-a0f3-4f79-8813-2176a7d7ca2f', '4.b.3', 'Invite people to come interview', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 4'), (SELECT uuid from organizations where shortName='EF 4'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'32788f96-b72c-4314-8286-7f59b683cba2', '4.b.4', 'Interview candidates', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 4'), (SELECT uuid from organizations where shortName='EF 4'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'cca1678a-58d7-4213-9c67-f894879df776', '4.b.5', 'Extend Job Offers to successful candidates', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 4'), (SELECT uuid from organizations where shortName='EF 4'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt, customFieldRef1Uuid, organizationUuid)
	VALUES (N'98342fa0-9106-4ef1-bc47-e4af2f5da330', '4.c', 'Onboard new Employees', 'Milestone', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, (SELECT uuid from tasks where shortName = 'EF 4'), (SELECT uuid from organizations where shortName='EF 4'));
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)
	VALUES (N'242efaa3-d5de-4970-996d-50ca90ef6480', 'EF 5', 'Force Sustainment (Logistics)', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)
	VALUES (N'12b8dbcc-8f31-444a-9437-00fe00fc1f7b', 'EF6', 'C2 Operations', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)
	VALUES (N'19364d81-3203-483d-a6bf-461d58888c76', 'EF7', 'Intelligence', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)
	VALUES (N'9b9f4205-0721-4893-abf8-69e020d4db23', 'EF8', 'Stratcom', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)
	VALUES (N'5173f34b-16f5-4e18-aa3d-def55c40e36d', 'Gender', '', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)
	VALUES (lower(newid()), 'TAAC-N', '', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)
	VALUES (lower(newid()), 'TAAC-S', '', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)
	VALUES (lower(newid()), 'TAAC-E', '', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)
	VALUES (lower(newid()), 'TAAC-W', '', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)
	VALUES (lower(newid()), 'TAAC-C', '', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO tasks (uuid, shortName, longName, category, createdAt, updatedAt)
	VALUES (lower(newid()), 'TAAC Air', '', 'EF', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);

INSERT INTO locations (uuid, name, lat, lng, createdAt, updatedAt)
	VALUES (N'cc49bb27-4d8f-47a8-a9ee-af2b68b992ac', 'St Johns Airport', 47.613442, -52.740936, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, lat, lng, createdAt, updatedAt)
	VALUES (N'8c138750-91ce-41bf-9b4c-9f0ddc73608b', 'Murray''s Hotel', 47.561517, -52.708760, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, lat, lng, createdAt, updatedAt)
	VALUES (N'9c982685-5946-4dad-a7ee-0f5a12f5e170', 'Wishingwells Park', 47.560040, -52.736962, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, lat, lng, createdAt, updatedAt)
	VALUES (N'0855fb0a-995e-4a79-a132-4024ee2983ff', 'General Hospital', 47.571772, -52.741935, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, lat, lng, createdAt, updatedAt)
	VALUES (N'95446f93-249b-4aa9-b98a-7bd2c4680718', 'Portugal Cove Ferry Terminal', 47.626718, -52.857241, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, lat, lng, createdAt, updatedAt)
	VALUES (N'c8fdb53f-6f93-46fc-b0fa-f005c7b49667', 'Cabot Tower', 47.570010, -52.681770, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, lat, lng, createdAt, updatedAt)
	VALUES (N'c7a9f420-457a-490c-a810-b504c022cf1e', 'Fort Amherst', 47.563763, -52.680590, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, lat, lng, createdAt, updatedAt)
	VALUES (N'7339f9e3-99d1-497a-9e3b-1269c4c287fe', 'Harbour Grace Police Station', 47.705133, -53.214422, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, lat, lng, createdAt, updatedAt)
	VALUES (N'f2207d9b-204b-4cb5-874d-3fe6bc6f8acd', 'Conception Bay South Police Station', 47.526784, -52.954739, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'e0ff0d6c-e663-4639-a44d-b075bf1e690d', 'MoD Headquarters Kabul', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'5046a870-6c2a-40a7-9681-61a1d6eeaa07', 'MoI Headquarters Kabul', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'c15eb29e-2965-401e-9f36-6ac8b9cc3842', 'President''s Palace', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'0585f158-5121-46a2-b099-799fe980aa9c', 'Kabul Police Academy', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'053ab2ad-132a-4a62-8cbb-20827f50ec34', 'Police HQ Training Facility', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'e87f145b-32e9-47ec-a0f4-e0dcf18e8a8c', 'Kabul Hospital', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'6465dd40-9fec-41db-a3b9-652fa52c7d21', 'MoD Army Training Base 123', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'2a59dd78-0c29-4b3f-bc94-7c98ff80b197', 'MoD Location the Second', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'18c9be38-bf68-40e2-80d8-aac47f5ff7cf', 'MoI Office Building ABC', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'8a34768c-aa15-41e4-ab79-6cf2740d555e', 'MoI Training Center', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'9f364c59-953e-4c17-919c-648ea3a74e36', 'MoI Adminstrative Office', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'dfc3918d-c2e3-4308-b161-2445cde77b3f', 'MoI Senior Executive Suite', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'3652e114-ad16-43f0-b179-cc1bce6958d5', 'MoI Coffee Shop', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'5ac4078d-d445-416a-a93e-5941562359bb', 'MoI Herat Office', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'22b0137c-4d89-43eb-ac95-a9f68aba884f', 'MoI Jalalabad Office', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'60f4084f-3304-4cd5-89df-353edef07d18', 'MoI Kandahar Office', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'c136bf89-cc24-43a5-8f51-0f41dfc9ab77', 'MoI Mazar-i-Sharif', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO locations (uuid, name, createdAt, updatedAt)
	VALUES (N'b0979678-0ed0-4b42-9b26-9976fcfa1b81', 'MoI Office Building ABC', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);


INSERT INTO organizations (uuid, shortName, longName, type, identificationCode, createdAt, updatedAt)
	VALUES (lower(newid()), 'MoD', 'Ministry of Defense', 1, 'Z12345', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO organizations (uuid, shortName, longName, type, identificationCode, createdAt, updatedAt)
	VALUES (lower(newid()), 'MoI', 'Ministry of Interior', 1, 'P12345', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
{'fraction_non_alphanumeric': 0.12461971703554585, 'fraction_numerical': 0.04851788602255121, 'mean_word_length': 6.928091096565947, 'pattern_counts': {'":': 0, '<': 116, '<?xml version=': 0, '>': 116, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3481204', 'n_tokens_mistral': 32717, 'n_tokens_neox': 29464, 'n_words': 9221}