       alter table "systemIntegrations" add constraint "systemIntegrations_masterIntegrationId_fkey" foreign key ("masterIntegrationId") references "masterIntegrations"(id) on update restrict on delete restrict;
     end if;
 
-  -- Adds foreign key relationships for projectPermissions
-    if not exists (select 1 from pg_constraint where conname = 'projectPermissions_accountId_fkey') then
-      alter table "projectPermissions" add constraint "projectPermissions_accountId_fkey" foreign key ("accountId") references "accounts"(id) on update restrict on delete restrict;
-    end if;
-    if not exists (select 1 from pg_constraint where conname = 'projectPermissions_providerId_fkey') then
-      alter table "projectPermissions" add constraint "projectPermissions_providerId_fkey" foreign key ("providerId") references "providers"(id) on update restrict on delete restrict;
-    end if;
-    if not exists (select 1 from pg_constraint where conname = 'projectPermissions_projectId_fkey') then
-      alter table "projectPermissions" add constraint "projectPermissions_projectId_fkey" foreign key ("projectId") references "projects"(id) on update restrict on delete restrict;
-    end if;
-    if not exists (select 1 from pg_constraint where conname = 'projectPermissions_subscriptionId_fkey') then
-      alter table "projectPermissions" add constraint "projectPermissions_subscriptionId_fkey" foreign key ("subscriptionId") references "subscriptions"(id) on update restrict on delete restrict;
-    end if;
-
   -- Adds foreign key relationships for subscriptionIntegrations
     if not exists (select 1 from pg_constraint where conname = 'subscriptionIntegrations_subscriptionId_fkey') then
       alter table "subscriptionIntegrations" add constraint "subscriptionIntegrations_subscriptionId_fkey" foreign key ("subscriptionId") references "subscriptions"(id) on update restrict on delete restrict;

      alter table "systemConfigs" add column "dynamicNodesSystemIntegrationId" varchar(24);
    end if;

    -- Adds systemNodePrivateKey column in systemConfigs table
    if not exists (select 1 from information_schema.columns where table_name = 'systemConfigs' and column_name = 'systemNodePrivateKey') then
      alter table "systemConfigs" add column "systemNodePrivateKey" TEXT ;

    --Add runShImage column to systemMachineImages
    if not exists (select 1 from information_schema.columns where table_name = 'systemMachineImages' and column_name = 'runShImage') then
      alter table "systemMachineImages" add column "runShImage" varchar(80);
      update "systemMachineImages" set "runShImage"='374168611083.dkr.ecr.us-east-1.amazonaws.com/runsh:v4.10.26' where "runShImage" is null;
      alter table "systemMachineImages" alter column "runShImage" set not null;
    end if;

