     if not exists (select 1 from "systemCodes" where code = 6100) then
       insert into "systemCodes" ("code", "name", "group", "createdBy", "updatedBy", "createdAt", "updatedAt")
       values (6100, 'serviceUser', 'roles', '54188262bc4d591ba438d62a', '54188262bc4d591ba438d62a', '2016-06-01', '2016-06-01');
+    end if;
+
+    if not exists (select 1 from "systemCodes" where code = 6110) then
+      insert into "systemCodes" ("code", "name", "group", "createdBy", "updatedBy", "createdAt", "updatedAt")
+      values (6110, 'publicPipelineUser', 'roles', '54188262bc4d591ba438d62a', '54188262bc4d591ba438d62a', '2016-06-01', '2016-06-01');
     end if;
 
     -- Codes for nodeType

    );

    perform set_route_role(
      routePattern := '/buildJobs/:buildJobId',
      httpVerb := 'GET',
      roleCode := 6060

  -- Add projectId in builds
    if not exists (select 1 from information_schema.columns where table_name = 'builds' and column_name = 'projectId') then
      alter table "builds" add column "projectId" varchar(24);
    end if;

    if not exists (select 1 from information_schema.columns where table_name = 'builds' and column_name = 'propertyBag') then
      alter table "builds" add column "propertyBag" TEXT;
    end if;

  -- Set projectIds for builds where projectId is null
