-- CreateTable
CREATE TABLE `User` (
    `id` VARCHAR(191) NOT NULL,
    `name` VARCHAR(191) NULL,
    `email` VARCHAR(191) NOT NULL,
    `emailVerified` DATETIME(3) NULL,
    `image` VARCHAR(191) NULL,
    `imagePublicId` VARCHAR(191) NULL,
    `password` VARCHAR(191) NOT NULL,
    `role` ENUM('admin', 'employee') NOT NULL DEFAULT 'employee',
    `status` ENUM('active', 'inactive') NOT NULL DEFAULT 'active',
    `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
    `updatedAt` DATETIME(3) NOT NULL,

    UNIQUE INDEX `User_email_key`(`email`),
    PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- CreateTable
CREATE TABLE `Account` (
    `userId` VARCHAR(191) NOT NULL,
    `type` VARCHAR(191) NOT NULL,
    `provider` VARCHAR(191) NOT NULL,
    `providerAccountId` VARCHAR(191) NOT NULL,
    `refresh_token` VARCHAR(191) NULL,
    `access_token` VARCHAR(191) NULL,
    `expires_at` INTEGER NULL,
    `token_type` VARCHAR(191) NULL,
    `scope` VARCHAR(191) NULL,
    `id_token` VARCHAR(191) NULL,
    `session_state` VARCHAR(191) NULL,

    INDEX `Account_userId_fkey`(`userId`),
    PRIMARY KEY (`provider`, `providerAccountId`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- CreateTable
CREATE TABLE `Session` (
    `sessionToken` VARCHAR(191) NOT NULL,
    `userId` VARCHAR(191) NOT NULL,
    `expires` DATETIME(3) NOT NULL,

    UNIQUE INDEX `Session_sessionToken_key`(`sessionToken`),
    UNIQUE INDEX `Session_userId_key`(`userId`),
    PRIMARY KEY (`sessionToken`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- CreateTable
CREATE TABLE `VerificationToken` (
    `identifier` VARCHAR(191) NOT NULL,
    `token` VARCHAR(191) NOT NULL,
    `expires` DATETIME(3) NOT NULL,

    PRIMARY KEY (`identifier`, `token`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- CreateTable
CREATE TABLE `Category` (
    `id` VARCHAR(191) NOT NULL,
    `name` VARCHAR(191) NOT NULL,
    `slug` VARCHAR(191) NOT NULL,
    `description` VARCHAR(191) NULL,
    `color` VARCHAR(191) NOT NULL,
    `isVisible` BOOLEAN NOT NULL DEFAULT true,
    `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
    `updatedAt` DATETIME(3) NOT NULL,

    UNIQUE INDEX `Category_slug_key`(`slug`),
    INDEX `Category_name_idx`(`name`),
    PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- CreateTable
CREATE TABLE `Translation` (
    `id` VARCHAR(191) NOT NULL,
    `entityType` VARCHAR(191) NOT NULL,
    `entityId` VARCHAR(191) NOT NULL,
    `locale` VARCHAR(191) NOT NULL,
    `name` VARCHAR(191) NULL,
    `description` VARCHAR(191) NULL,
    `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
    `updatedAt` DATETIME(3) NOT NULL,

    INDEX `Translation_entityType_entityId_idx`(`entityType`, `entityId`),
    UNIQUE INDEX `Translation_entityType_entityId_locale_key`(`entityType`, `entityId`, `locale`),
    PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- CreateTable
CREATE TABLE `Article` (
    `id` VARCHAR(191) NOT NULL,
    `title` VARCHAR(191) NOT NULL,
    `subTitle` VARCHAR(191) NULL,
    `slug` VARCHAR(191) NOT NULL,
    `faqHeading` VARCHAR(191) NULL,
    `categoryId` VARCHAR(191) NOT NULL,
    `image` VARCHAR(191) NOT NULL,
    `imagePublicId` VARCHAR(191) NOT NULL,
    `author` VARCHAR(191) NOT NULL,
    `readingTime` VARCHAR(191) NOT NULL,
    `publishDate` DATETIME(3) NOT NULL,
    `content` LONGTEXT NOT NULL,
    `contentImageFolder` VARCHAR(191) NULL,
    `overview` LONGTEXT NOT NULL,
    `images` LONGTEXT NULL,
    `faq` LONGTEXT NOT NULL,
    `conversionCard` LONGTEXT NULL,
    `trustCard` LONGTEXT NULL,
    `tags` LONGTEXT NOT NULL,
    `isFeatured` BOOLEAN NOT NULL DEFAULT false,
    `status` ENUM('draft', 'published') NOT NULL DEFAULT 'published',
    `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
    `updatedAt` DATETIME(3) NOT NULL,

    UNIQUE INDEX `Article_slug_key`(`slug`),
    INDEX `Article_categoryId_idx`(`categoryId`),
    INDEX `Article_slug_idx`(`slug`),
    INDEX `Article_status_idx`(`status`),
    INDEX `Article_isFeatured_idx`(`isFeatured`),
    PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- CreateTable
CREATE TABLE `ArticleTranslation` (
    `id` VARCHAR(191) NOT NULL,
    `articleId` VARCHAR(191) NOT NULL,
    `locale` VARCHAR(191) NOT NULL,
    `title` VARCHAR(191) NULL,
    `subTitle` VARCHAR(191) NULL,
    `author` VARCHAR(191) NULL,
    `content` LONGTEXT NULL,
    `faqHeading` VARCHAR(191) NULL,
    `overview` LONGTEXT NULL,
    `images` LONGTEXT NULL,
    `faq` LONGTEXT NULL,
    `conversionCard` LONGTEXT NULL,
    `trustCard` LONGTEXT NULL,
    `tags` LONGTEXT NOT NULL,
    `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
    `updatedAt` DATETIME(3) NOT NULL,

    INDEX `ArticleTranslation_articleId_idx`(`articleId`),
    UNIQUE INDEX `ArticleTranslation_articleId_locale_key`(`articleId`, `locale`),
    PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- CreateTable
CREATE TABLE `Doctor` (
    `id` VARCHAR(191) NOT NULL,
    `name` VARCHAR(191) NOT NULL,
    `slug` VARCHAR(191) NULL,
    `categoryId` VARCHAR(191) NOT NULL,
    `image` VARCHAR(191) NOT NULL,
    `imagePublicId` VARCHAR(191) NOT NULL,
    `rating` DOUBLE NOT NULL DEFAULT 0,
    `reviewCount` INTEGER NOT NULL DEFAULT 0,
    `description` VARCHAR(191) NOT NULL,
    `experienceYears` INTEGER NOT NULL DEFAULT 0,
    `casesCount` VARCHAR(191) NOT NULL DEFAULT '0',
    `successRate` VARCHAR(191) NOT NULL DEFAULT '0',
    `nationalities` VARCHAR(191) NOT NULL DEFAULT '',
    `languages` LONGTEXT NOT NULL,
    `credentialsJson` LONGTEXT NULL,
    `specialtiesJson` LONGTEXT NULL,
    `beforeAfterJson` LONGTEXT NULL,
    `reviewsJson` LONGTEXT NULL,
    `faqJson` LONGTEXT NULL,
    `credentialsHeadingJson` LONGTEXT NULL,
    `biographyHeadingJson` LONGTEXT NULL,
    `specialtiesHeadingJson` LONGTEXT NULL,
    `beforeAfterHeadingJson` LONGTEXT NULL,
    `reviewsHeadingJson` LONGTEXT NULL,
    `faqHeadingJson` LONGTEXT NULL,
    `tags` LONGTEXT NOT NULL,
    `isFeatured` BOOLEAN NOT NULL DEFAULT false,
    `status` ENUM('draft', 'published') NOT NULL DEFAULT 'published',
    `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
    `updatedAt` DATETIME(3) NOT NULL,

    UNIQUE INDEX `Doctor_slug_key`(`slug`),
    INDEX `Doctor_categoryId_idx`(`categoryId`),
    INDEX `Doctor_slug_idx`(`slug`),
    INDEX `Doctor_status_idx`(`status`),
    INDEX `Doctor_isFeatured_idx`(`isFeatured`),
    PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- CreateTable
CREATE TABLE `DoctorTranslation` (
    `id` VARCHAR(191) NOT NULL,
    `doctorId` VARCHAR(191) NOT NULL,
    `locale` VARCHAR(191) NOT NULL,
    `name` VARCHAR(191) NULL,
    `description` VARCHAR(191) NULL,
    `credentials` LONGTEXT NULL,
    `biography` LONGTEXT NULL,
    `doctorStatement` LONGTEXT NULL,
    `specialties` LONGTEXT NULL,
    `beforeAfter` LONGTEXT NULL,
    `reviews` LONGTEXT NULL,
    `faq` LONGTEXT NULL,
    `credentialsHeading` LONGTEXT NULL,
    `biographyHeading` LONGTEXT NULL,
    `specialtiesHeading` LONGTEXT NULL,
    `beforeAfterHeading` LONGTEXT NULL,
    `reviewsHeading` LONGTEXT NULL,
    `faqHeading` LONGTEXT NULL,
    `tags` LONGTEXT NOT NULL,
    `languages` LONGTEXT NOT NULL,
    `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
    `updatedAt` DATETIME(3) NOT NULL,

    INDEX `DoctorTranslation_doctorId_idx`(`doctorId`),
    UNIQUE INDEX `DoctorTranslation_doctorId_locale_key`(`doctorId`, `locale`),
    PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- CreateTable
CREATE TABLE `Hospital` (
    `id` VARCHAR(191) NOT NULL,
    `slug` VARCHAR(191) NOT NULL,
    `categoryId` VARCHAR(191) NOT NULL,
    `name` VARCHAR(191) NOT NULL,
    `type` VARCHAR(191) NOT NULL DEFAULT '',
    `image` VARCHAR(191) NOT NULL,
    `imagePublicId` VARCHAR(191) NOT NULL,
    `rating` DOUBLE NOT NULL DEFAULT 0,
    `reviewCount` INTEGER NOT NULL DEFAULT 0,
    `foundedYear` INTEGER NULL,
    `bedsCount` INTEGER NOT NULL DEFAULT 0,
    `departmentsCount` INTEGER NOT NULL DEFAULT 0,
    `doctorsCount` INTEGER NOT NULL DEFAULT 0,
    `patientsPerYear` INTEGER NOT NULL DEFAULT 0,
    `location` VARCHAR(191) NOT NULL DEFAULT '',
    `isFeatured` BOOLEAN NOT NULL DEFAULT false,
    `status` ENUM('draft', 'published') NOT NULL DEFAULT 'published',
    `heroJson` LONGTEXT NOT NULL,
    `aboutJson` LONGTEXT NOT NULL,
    `galleryJson` LONGTEXT NOT NULL,
    `departmentsJson` LONGTEXT NOT NULL,
    `doctorsJson` LONGTEXT NOT NULL,
    `accreditationJson` LONGTEXT NOT NULL,
    `technologyJson` LONGTEXT NOT NULL,
    `visitProcessJson` LONGTEXT NOT NULL,
    `reviewsJson` LONGTEXT NOT NULL,
    `locationJson` LONGTEXT NOT NULL,
    `packagesJson` LONGTEXT NOT NULL,
    `faqJson` LONGTEXT NOT NULL,
    `ctaJson` LONGTEXT NOT NULL,
    `similarJson` LONGTEXT NOT NULL,
    `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
    `updatedAt` DATETIME(3) NOT NULL,

    UNIQUE INDEX `Hospital_slug_key`(`slug`),
    INDEX `Hospital_categoryId_idx`(`categoryId`),
    INDEX `Hospital_slug_idx`(`slug`),
    INDEX `Hospital_status_idx`(`status`),
    INDEX `Hospital_isFeatured_idx`(`isFeatured`),
    PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- CreateTable
CREATE TABLE `HospitalTranslation` (
    `id` VARCHAR(191) NOT NULL,
    `hospitalId` VARCHAR(191) NOT NULL,
    `locale` VARCHAR(191) NOT NULL,
    `name` VARCHAR(191) NULL,
    `location` VARCHAR(191) NULL,
    `hospitalType` VARCHAR(191) NULL,
    `heroJson` LONGTEXT NULL,
    `aboutJson` LONGTEXT NULL,
    `galleryJson` LONGTEXT NULL,
    `departmentsJson` LONGTEXT NULL,
    `doctorsJson` LONGTEXT NULL,
    `accreditationJson` LONGTEXT NULL,
    `technologyJson` LONGTEXT NULL,
    `visitProcessJson` LONGTEXT NULL,
    `reviewsJson` LONGTEXT NULL,
    `locationJson` LONGTEXT NULL,
    `packagesJson` LONGTEXT NULL,
    `faqJson` LONGTEXT NULL,
    `ctaJson` LONGTEXT NULL,
    `similarJson` LONGTEXT NULL,
    `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
    `updatedAt` DATETIME(3) NOT NULL,

    INDEX `HospitalTranslation_hospitalId_idx`(`hospitalId`),
    UNIQUE INDEX `HospitalTranslation_hospitalId_locale_key`(`hospitalId`, `locale`),
    PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- CreateTable
CREATE TABLE `Procedure` (
    `id` VARCHAR(191) NOT NULL,
    `slug` VARCHAR(191) NOT NULL,
    `categoryId` VARCHAR(191) NOT NULL,
    `name` VARCHAR(191) NOT NULL,
    `description` LONGTEXT NOT NULL,
    `image` VARCHAR(191) NOT NULL,
    `imagePublicId` VARCHAR(191) NOT NULL,
    `rating` DOUBLE NOT NULL DEFAULT 0,
    `reviewCount` INTEGER NOT NULL DEFAULT 0,
    `isFeatured` BOOLEAN NOT NULL DEFAULT false,
    `status` ENUM('draft', 'published') NOT NULL DEFAULT 'published',
    `basicInfoJson` LONGTEXT NOT NULL,
    `quickStatsJson` LONGTEXT NOT NULL,
    `overviewJson` LONGTEXT NOT NULL,
    `countriesComparisonJson` LONGTEXT NOT NULL,
    `processJson` LONGTEXT NOT NULL,
    `benefitsJson` LONGTEXT NOT NULL,
    `beforeAfterSectionJson` LONGTEXT NOT NULL,
    `doctorsSectionJson` LONGTEXT NOT NULL,
    `recoveryJson` LONGTEXT NOT NULL,
    `packageSectionJson` LONGTEXT NOT NULL,
    `reviewsSectionJson` LONGTEXT NOT NULL,
    `faqSectionJson` LONGTEXT NOT NULL,
    `relatedJson` LONGTEXT NOT NULL,
    `ctaJson` LONGTEXT NOT NULL,
    `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
    `updatedAt` DATETIME(3) NOT NULL,

    UNIQUE INDEX `Procedure_slug_key`(`slug`),
    INDEX `Procedure_categoryId_idx`(`categoryId`),
    INDEX `Procedure_slug_idx`(`slug`),
    INDEX `Procedure_status_idx`(`status`),
    INDEX `Procedure_isFeatured_idx`(`isFeatured`),
    PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- CreateTable
CREATE TABLE `ProcedureTranslation` (
    `id` VARCHAR(191) NOT NULL,
    `procedureId` VARCHAR(191) NOT NULL,
    `locale` VARCHAR(191) NOT NULL,
    `name` VARCHAR(191) NULL,
    `description` LONGTEXT NULL,
    `stayCity` VARCHAR(191) NULL,
    `overviewJson` LONGTEXT NULL,
    `countriesComparisonJson` LONGTEXT NULL,
    `processJson` LONGTEXT NULL,
    `benefitsJson` LONGTEXT NULL,
    `beforeAfterSectionJson` LONGTEXT NULL,
    `doctorsSectionJson` LONGTEXT NULL,
    `recoveryJson` LONGTEXT NULL,
    `packageSectionJson` LONGTEXT NULL,
    `reviewsSectionJson` LONGTEXT NULL,
    `faqSectionJson` LONGTEXT NULL,
    `relatedJson` LONGTEXT NULL,
    `ctaJson` LONGTEXT NULL,
    `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
    `updatedAt` DATETIME(3) NOT NULL,
    `basicInfoJson` LONGTEXT NULL,

    INDEX `ProcedureTranslation_procedureId_idx`(`procedureId`),
    UNIQUE INDEX `ProcedureTranslation_procedureId_locale_key`(`procedureId`, `locale`),
    PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- CreateTable
CREATE TABLE `BlogPageLocale` (
    `id` VARCHAR(191) NOT NULL,
    `entityKey` VARCHAR(191) NOT NULL,
    `locale` VARCHAR(191) NOT NULL,
    `heroJson` LONGTEXT NOT NULL,
    `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
    `updatedAt` DATETIME(3) NOT NULL,

    INDEX `BlogPageLocale_entityKey_idx`(`entityKey`),
    UNIQUE INDEX `BlogPageLocale_entityKey_locale_key`(`entityKey`, `locale`),
    PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- CreateTable
CREATE TABLE `ContactUsPageLocale` (
    `id` VARCHAR(191) NOT NULL,
    `entityKey` VARCHAR(191) NOT NULL,
    `locale` VARCHAR(191) NOT NULL,
    `contentJson` LONGTEXT NOT NULL,
    `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
    `updatedAt` DATETIME(3) NOT NULL,

    INDEX `ContactUsPageLocale_entityKey_idx`(`entityKey`),
    UNIQUE INDEX `ContactUsPageLocale_entityKey_locale_key`(`entityKey`, `locale`),
    PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- CreateTable
CREATE TABLE `AboutUsPageLocale` (
    `id` VARCHAR(191) NOT NULL,
    `entityKey` VARCHAR(191) NOT NULL,
    `locale` VARCHAR(191) NOT NULL,
    `contentJson` LONGTEXT NOT NULL,
    `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
    `updatedAt` DATETIME(3) NOT NULL,

    INDEX `AboutUsPageLocale_entityKey_idx`(`entityKey`),
    UNIQUE INDEX `AboutUsPageLocale_entityKey_locale_key`(`entityKey`, `locale`),
    PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- CreateTable
CREATE TABLE `DoctorsPageLocale` (
    `id` VARCHAR(191) NOT NULL,
    `entityKey` VARCHAR(191) NOT NULL,
    `locale` VARCHAR(191) NOT NULL,
    `contentJson` LONGTEXT NOT NULL,
    `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
    `updatedAt` DATETIME(3) NOT NULL,

    INDEX `DoctorsPageLocale_entityKey_idx`(`entityKey`),
    UNIQUE INDEX `DoctorsPageLocale_entityKey_locale_key`(`entityKey`, `locale`),
    PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- CreateTable
CREATE TABLE `HomePageLocale` (
    `id` VARCHAR(191) NOT NULL,
    `entityKey` VARCHAR(191) NOT NULL,
    `locale` VARCHAR(191) NOT NULL,
    `contentJson` LONGTEXT NOT NULL,
    `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
    `updatedAt` DATETIME(3) NOT NULL,

    INDEX `HomePageLocale_entityKey_idx`(`entityKey`),
    UNIQUE INDEX `HomePageLocale_entityKey_locale_key`(`entityKey`, `locale`),
    PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- CreateTable
CREATE TABLE `ProceduresPageLocale` (
    `id` VARCHAR(191) NOT NULL,
    `entityKey` VARCHAR(191) NOT NULL,
    `locale` VARCHAR(191) NOT NULL,
    `contentJson` LONGTEXT NOT NULL,
    `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
    `updatedAt` DATETIME(3) NOT NULL,

    INDEX `ProceduresPageLocale_entityKey_idx`(`entityKey`),
    UNIQUE INDEX `ProceduresPageLocale_entityKey_locale_key`(`entityKey`, `locale`),
    PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- CreateTable
CREATE TABLE `HospitalsPageLocale` (
    `id` VARCHAR(191) NOT NULL,
    `entityKey` VARCHAR(191) NOT NULL,
    `locale` VARCHAR(191) NOT NULL,
    `contentJson` LONGTEXT NOT NULL,
    `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
    `updatedAt` DATETIME(3) NOT NULL,

    INDEX `HospitalsPageLocale_entityKey_idx`(`entityKey`),
    UNIQUE INDEX `HospitalsPageLocale_entityKey_locale_key`(`entityKey`, `locale`),
    PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- AddForeignKey
ALTER TABLE `Account` ADD CONSTRAINT `Account_userId_fkey` FOREIGN KEY (`userId`) REFERENCES `User`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE `Session` ADD CONSTRAINT `Session_userId_fkey` FOREIGN KEY (`userId`) REFERENCES `User`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE `Article` ADD CONSTRAINT `Article_categoryId_fkey` FOREIGN KEY (`categoryId`) REFERENCES `Category`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE `ArticleTranslation` ADD CONSTRAINT `ArticleTranslation_articleId_fkey` FOREIGN KEY (`articleId`) REFERENCES `Article`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE `Doctor` ADD CONSTRAINT `Doctor_categoryId_fkey` FOREIGN KEY (`categoryId`) REFERENCES `Category`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE `DoctorTranslation` ADD CONSTRAINT `DoctorTranslation_doctorId_fkey` FOREIGN KEY (`doctorId`) REFERENCES `Doctor`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE `Hospital` ADD CONSTRAINT `Hospital_categoryId_fkey` FOREIGN KEY (`categoryId`) REFERENCES `Category`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE `HospitalTranslation` ADD CONSTRAINT `HospitalTranslation_hospitalId_fkey` FOREIGN KEY (`hospitalId`) REFERENCES `Hospital`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE `Procedure` ADD CONSTRAINT `Procedure_categoryId_fkey` FOREIGN KEY (`categoryId`) REFERENCES `Category`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE `ProcedureTranslation` ADD CONSTRAINT `ProcedureTranslation_procedureId_fkey` FOREIGN KEY (`procedureId`) REFERENCES `Procedure`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;

