/*
  Warnings:

  - You are about to drop the column `consumer_id` on the `Users` table. All the data in the column will be lost.

*/
-- DropForeignKey
ALTER TABLE `Users` DROP FOREIGN KEY `Users_consumer_id_fkey`;

-- AlterTable
ALTER TABLE `Users` DROP COLUMN `consumer_id`;

-- CreateTable
CREATE TABLE `Consumer_Developers` (
    `consumer_developer_id` VARCHAR(191) NOT NULL,
    `assignment_type` VARCHAR(191) NOT NULL,
    `consumer_id` VARCHAR(191) NOT NULL,
    `developer_id` VARCHAR(191) NOT NULL,
    `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
    `updatedAt` DATETIME(3) NOT NULL,

    PRIMARY KEY (`consumer_developer_id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- AddForeignKey
ALTER TABLE `Consumer_Developers` ADD CONSTRAINT `Consumer_Developers_consumer_id_fkey` FOREIGN KEY (`consumer_id`) REFERENCES `Users`(`user_id`) ON DELETE RESTRICT ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE `Consumer_Developers` ADD CONSTRAINT `Consumer_Developers_developer_id_fkey` FOREIGN KEY (`developer_id`) REFERENCES `Users`(`user_id`) ON DELETE RESTRICT ON UPDATE CASCADE;
