/*
  Warnings:

  - You are about to drop the column `officesRolesHasRulesUid` on the `rules` table. All the data in the column will be lost.
  - You are about to drop the column `rolesHasRulesUid` on the `rules` table. All the data in the column will be lost.

*/
-- DropForeignKey
ALTER TABLE "rules" DROP CONSTRAINT "rules_officesRolesHasRulesUid_fkey";

-- DropForeignKey
ALTER TABLE "rules" DROP CONSTRAINT "rules_rolesHasRulesUid_fkey";

-- AlterTable
ALTER TABLE "rules" DROP COLUMN "officesRolesHasRulesUid",
DROP COLUMN "rolesHasRulesUid",
ADD COLUMN     "office_role_has_rules_uid" TEXT,
ADD COLUMN     "role_has_rules_uid" TEXT;

-- AddForeignKey
ALTER TABLE "rules" ADD CONSTRAINT "rules_role_has_rules_uid_fkey" FOREIGN KEY ("role_has_rules_uid") REFERENCES "role_has_rules"("uid") ON DELETE SET NULL ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "rules" ADD CONSTRAINT "rules_office_role_has_rules_uid_fkey" FOREIGN KEY ("office_role_has_rules_uid") REFERENCES "office_role_has_rules"("uid") ON DELETE SET NULL ON UPDATE CASCADE;
