careerty-prism 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/.env +27 -0
  2. package/index.d.ts +1 -0
  3. package/index.ts +1 -0
  4. package/package.json +14 -0
  5. package/prisma/migrations/20240131014313_1_31/migration.sql +826 -0
  6. package/prisma/migrations/20240131014532_1_31/migration.sql +2 -0
  7. package/prisma/migrations/20240131015628_1_31/migration.sql +31 -0
  8. package/prisma/migrations/20240131024601_1_31/migration.sql +14 -0
  9. package/prisma/migrations/20240131033222_1_31/migration.sql +12 -0
  10. package/prisma/migrations/20240131170511_1_31/migration.sql +8 -0
  11. package/prisma/migrations/20240131171610_1_31/migration.sql +2 -0
  12. package/prisma/migrations/20240201001741_2_1/migration.sql +12 -0
  13. package/prisma/migrations/20240201170231_2_1/migration.sql +33 -0
  14. package/prisma/migrations/20240201171252_2_1/migration.sql +14 -0
  15. package/prisma/migrations/20240201192306_2_1/migration.sql +8 -0
  16. package/prisma/migrations/20240202002716_2_2/migration.sql +41 -0
  17. package/prisma/migrations/20240202003711_2_2/migration.sql +27 -0
  18. package/prisma/migrations/20240202004845_2_2/migration.sql +17 -0
  19. package/prisma/migrations/20240202012224_2_2/migration.sql +3 -0
  20. package/prisma/migrations/20240202014349_2_2/migration.sql +12 -0
  21. package/prisma/migrations/20240202022643_2_2/migration.sql +8 -0
  22. package/prisma/migrations/20240202023205_2_2/migration.sql +2 -0
  23. package/prisma/migrations/20240202172053_2_2/migration.sql +8 -0
  24. package/prisma/migrations/20240202182337_2_2/migration.sql +11 -0
  25. package/prisma/migrations/20240202182555_2_2/migration.sql +2 -0
  26. package/prisma/migrations/20240202182943_2_2/migration.sql +10 -0
  27. package/prisma/migrations/20240205035515_2_5/migration.sql +8 -0
  28. package/prisma/migrations/20240208153622_2_8/migration.sql +2 -0
  29. package/prisma/migrations/20240209192820_2_9/migration.sql +56 -0
  30. package/prisma/migrations/20240209201256_2_9/migration.sql +2 -0
  31. package/prisma/migrations/20240209201932_2_9/migration.sql +3 -0
  32. package/prisma/migrations/20240209205002_2_9/migration.sql +24 -0
  33. package/prisma/migrations/20240210022055_2_10/migration.sql +53 -0
  34. package/prisma/migrations/20240212020505_2_12/migration.sql +12 -0
  35. package/prisma/migrations/20240213001607_2_13/migration.sql +12 -0
  36. package/prisma/migrations/20240213001720_2_13/migration.sql +2 -0
  37. package/prisma/migrations/20240213193248_2_13/migration.sql +17 -0
  38. package/prisma/migrations/20240213195316_2_13/migration.sql +8 -0
  39. package/prisma/migrations/20240213200814_2_13/migration.sql +12 -0
  40. package/prisma/migrations/20240213203646_2_13/migration.sql +18 -0
  41. package/prisma/migrations/20240217003442_2_17/migration.sql +17 -0
  42. package/prisma/migrations/20240221011736_2_21/migration.sql +2 -0
  43. package/prisma/migrations/20240221214416_2_22/migration.sql +8 -0
  44. package/prisma/migrations/20240221221830_2_22/migration.sql +8 -0
  45. package/prisma/migrations/20240225134814_2_25/migration.sql +53 -0
  46. package/prisma/migrations/20240225142256_2_25/migration.sql +8 -0
  47. package/prisma/migrations/20240225142848_2_25/migration.sql +3 -0
  48. package/prisma/migrations/20240225154637_2_25/migration.sql +8 -0
  49. package/prisma/migrations/20240225180355_2_25/migration.sql +2 -0
  50. package/prisma/migrations/20240225181039_2_25/migration.sql +2 -0
  51. package/prisma/migrations/20240301180300_3_1/migration.sql +90 -0
  52. package/prisma/migrations/20240303155506_3_3/migration.sql +3 -0
  53. package/prisma/migrations/20240304105912_3_4/migration.sql +29 -0
  54. package/prisma/migrations/20240304161556_3_4/migration.sql +8 -0
  55. package/prisma/migrations/20240304171222_3_4/migration.sql +32 -0
  56. package/prisma/migrations/20240307155903_3_7/migration.sql +12 -0
  57. package/prisma/migrations/20240307160710_3_7/migration.sql +8 -0
  58. package/prisma/migrations/20240307161842_3_7/migration.sql +8 -0
  59. package/prisma/migrations/20240309134547_3_9/migration.sql +2 -0
  60. package/prisma/migrations/20240324192008_3_24/migration.sql +12 -0
  61. package/prisma/migrations/migration_lock.toml +3 -0
  62. package/prisma/schema.prisma +899 -0
@@ -0,0 +1,2 @@
1
+ -- AlterTable
2
+ ALTER TABLE `coupn` MODIFY `status` BOOLEAN NOT NULL DEFAULT false;
@@ -0,0 +1,31 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the `coupn` table. If the table is not empty, all the data it contains will be lost.
5
+
6
+ */
7
+ -- DropForeignKey
8
+ ALTER TABLE `coupn` DROP FOREIGN KEY `Coupn_collectionId_fkey`;
9
+
10
+ -- DropTable
11
+ DROP TABLE `coupn`;
12
+
13
+ -- CreateTable
14
+ CREATE TABLE `Coupon` (
15
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
16
+ `type` VARCHAR(191) NOT NULL,
17
+ `value` VARCHAR(191) NOT NULL,
18
+ `target` VARCHAR(191) NOT NULL,
19
+ `expireDate` DATETIME(3) NOT NULL,
20
+ `status` BOOLEAN NOT NULL DEFAULT false,
21
+ `isRedeemed` BOOLEAN NOT NULL DEFAULT false,
22
+ `collectionId` INTEGER NOT NULL,
23
+ `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
24
+ `updatedAt` DATETIME(3) NOT NULL,
25
+ `redeemedAt` DATETIME(3) NULL,
26
+
27
+ PRIMARY KEY (`id`)
28
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
29
+
30
+ -- AddForeignKey
31
+ ALTER TABLE `Coupon` ADD CONSTRAINT `Coupon_collectionId_fkey` FOREIGN KEY (`collectionId`) REFERENCES `CouponCollection`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,14 @@
1
+ -- CreateTable
2
+ CREATE TABLE `UserCoupon` (
3
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
4
+ `userId` INTEGER NOT NULL,
5
+ `couponId` INTEGER NOT NULL,
6
+
7
+ PRIMARY KEY (`id`)
8
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
9
+
10
+ -- AddForeignKey
11
+ ALTER TABLE `UserCoupon` ADD CONSTRAINT `UserCoupon_userId_fkey` FOREIGN KEY (`userId`) REFERENCES `User`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
12
+
13
+ -- AddForeignKey
14
+ ALTER TABLE `UserCoupon` ADD CONSTRAINT `UserCoupon_couponId_fkey` FOREIGN KEY (`couponId`) REFERENCES `Coupon`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,12 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `target` on the `coupon` table. All the data in the column will be lost.
5
+ - Added the required column `model` to the `Coupon` table without a default value. This is not possible if the table is not empty.
6
+ - Added the required column `modelId` to the `Coupon` table without a default value. This is not possible if the table is not empty.
7
+
8
+ */
9
+ -- AlterTable
10
+ ALTER TABLE `coupon` DROP COLUMN `target`,
11
+ ADD COLUMN `model` VARCHAR(191) NOT NULL,
12
+ ADD COLUMN `modelId` INTEGER NOT NULL;
@@ -0,0 +1,8 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to alter the column `type` on the `coupon` table. The data in that column could be lost. The data in that column will be cast from `VarChar(191)` to `Enum(EnumId(2))`.
5
+
6
+ */
7
+ -- AlterTable
8
+ ALTER TABLE `coupon` MODIFY `type` ENUM('Free_PLAN', 'Free_TRANSACTION', 'Free_GPT') NOT NULL;
@@ -0,0 +1,2 @@
1
+ -- AlterTable
2
+ ALTER TABLE `coupon` MODIFY `modelId` VARCHAR(191) NOT NULL;
@@ -0,0 +1,12 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - A unique constraint covering the columns `[code]` on the table `Coupon` will be added. If there are existing duplicate values, this will fail.
5
+ - Added the required column `code` to the `Coupon` table without a default value. This is not possible if the table is not empty.
6
+
7
+ */
8
+ -- AlterTable
9
+ ALTER TABLE `coupon` ADD COLUMN `code` VARCHAR(191) NOT NULL;
10
+
11
+ -- CreateIndex
12
+ CREATE UNIQUE INDEX `Coupon_code_key` ON `Coupon`(`code`);
@@ -0,0 +1,33 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - Added the required column `referralId` to the `User` table without a default value. This is not possible if the table is not empty.
5
+
6
+ */
7
+ -- AlterTable
8
+ ALTER TABLE `user` ADD COLUMN `referralId` INTEGER NOT NULL;
9
+
10
+ -- CreateTable
11
+ CREATE TABLE `Referral` (
12
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
13
+ `userId` INTEGER NOT NULL,
14
+ `code` VARCHAR(191) NOT NULL,
15
+
16
+ UNIQUE INDEX `Referral_userId_key`(`userId`),
17
+ UNIQUE INDEX `Referral_code_key`(`code`),
18
+ PRIMARY KEY (`id`)
19
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
20
+
21
+ -- CreateTable
22
+ CREATE TABLE `ReferralEvent` (
23
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
24
+ `referralId` INTEGER NOT NULL,
25
+
26
+ PRIMARY KEY (`id`)
27
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
28
+
29
+ -- AddForeignKey
30
+ ALTER TABLE `Referral` ADD CONSTRAINT `Referral_userId_fkey` FOREIGN KEY (`userId`) REFERENCES `User`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
31
+
32
+ -- AddForeignKey
33
+ ALTER TABLE `ReferralEvent` ADD CONSTRAINT `ReferralEvent_referralId_fkey` FOREIGN KEY (`referralId`) REFERENCES `Referral`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,14 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - A unique constraint covering the columns `[referralId]` on the table `User` will be added. If there are existing duplicate values, this will fail.
5
+
6
+ */
7
+ -- DropForeignKey
8
+ ALTER TABLE `referral` DROP FOREIGN KEY `Referral_userId_fkey`;
9
+
10
+ -- CreateIndex
11
+ CREATE UNIQUE INDEX `User_referralId_key` ON `User`(`referralId`);
12
+
13
+ -- AddForeignKey
14
+ ALTER TABLE `User` ADD CONSTRAINT `User_referralId_fkey` FOREIGN KEY (`referralId`) REFERENCES `Referral`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,8 @@
1
+ -- DropForeignKey
2
+ ALTER TABLE `user` DROP FOREIGN KEY `User_referralId_fkey`;
3
+
4
+ -- AlterTable
5
+ ALTER TABLE `user` MODIFY `referralId` INTEGER NULL;
6
+
7
+ -- AddForeignKey
8
+ ALTER TABLE `User` ADD CONSTRAINT `User_referralId_fkey` FOREIGN KEY (`referralId`) REFERENCES `Referral`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
@@ -0,0 +1,41 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - Added the required column `referralActionId` to the `ReferralEvent` table without a default value. This is not possible if the table is not empty.
5
+
6
+ */
7
+ -- AlterTable
8
+ ALTER TABLE `referralevent` ADD COLUMN `referralActionId` INTEGER NOT NULL,
9
+ ADD COLUMN `timestamp` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3);
10
+
11
+ -- CreateTable
12
+ CREATE TABLE `ReferralAction` (
13
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
14
+ `name` VARCHAR(191) NOT NULL,
15
+ `value` INTEGER NOT NULL,
16
+ `referralId` INTEGER NOT NULL,
17
+
18
+ PRIMARY KEY (`id`)
19
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
20
+
21
+ -- CreateTable
22
+ CREATE TABLE `ReferralReward` (
23
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
24
+ `actionId` INTEGER NOT NULL,
25
+ `referralId` INTEGER NOT NULL,
26
+ `model` VARCHAR(191) NOT NULL,
27
+ `modelId` INTEGER NOT NULL,
28
+ `isRedeemed` BOOLEAN NOT NULL DEFAULT false,
29
+ `expirationDate` DATETIME(3) NULL,
30
+
31
+ PRIMARY KEY (`id`)
32
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
33
+
34
+ -- AddForeignKey
35
+ ALTER TABLE `ReferralAction` ADD CONSTRAINT `ReferralAction_referralId_fkey` FOREIGN KEY (`referralId`) REFERENCES `Referral`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
36
+
37
+ -- AddForeignKey
38
+ ALTER TABLE `ReferralEvent` ADD CONSTRAINT `ReferralEvent_referralActionId_fkey` FOREIGN KEY (`referralActionId`) REFERENCES `ReferralAction`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
39
+
40
+ -- AddForeignKey
41
+ ALTER TABLE `ReferralReward` ADD CONSTRAINT `ReferralReward_referralId_fkey` FOREIGN KEY (`referralId`) REFERENCES `Referral`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,27 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `referralId` on the `referralreward` table. All the data in the column will be lost.
5
+
6
+ */
7
+ -- DropForeignKey
8
+ ALTER TABLE `referralaction` DROP FOREIGN KEY `ReferralAction_referralId_fkey`;
9
+
10
+ -- DropForeignKey
11
+ ALTER TABLE `referralreward` DROP FOREIGN KEY `ReferralReward_referralId_fkey`;
12
+
13
+ -- AlterTable
14
+ ALTER TABLE `referralreward` DROP COLUMN `referralId`;
15
+
16
+ -- CreateTable
17
+ CREATE TABLE `ReferralRewardRedemption` (
18
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
19
+ `referralId` INTEGER NOT NULL,
20
+ `model` VARCHAR(191) NOT NULL,
21
+ `modelId` INTEGER NOT NULL,
22
+
23
+ PRIMARY KEY (`id`)
24
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
25
+
26
+ -- AddForeignKey
27
+ ALTER TABLE `ReferralRewardRedemption` ADD CONSTRAINT `ReferralRewardRedemption_referralId_fkey` FOREIGN KEY (`referralId`) REFERENCES `Referral`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,17 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `referralId` on the `referralaction` table. All the data in the column will be lost.
5
+ - You are about to drop the column `value` on the `referralaction` table. All the data in the column will be lost.
6
+
7
+ */
8
+ -- DropIndex
9
+ DROP INDEX `ReferralAction_referralId_fkey` ON `referralaction`;
10
+
11
+ -- AlterTable
12
+ ALTER TABLE `referralaction` DROP COLUMN `referralId`,
13
+ DROP COLUMN `value`,
14
+ ADD COLUMN `rewardId` INTEGER NULL;
15
+
16
+ -- AddForeignKey
17
+ ALTER TABLE `ReferralAction` ADD CONSTRAINT `ReferralAction_rewardId_fkey` FOREIGN KEY (`rewardId`) REFERENCES `ReferralReward`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
@@ -0,0 +1,3 @@
1
+ -- AlterTable
2
+ ALTER TABLE `referralaction` ADD COLUMN `isDeleted` BOOLEAN NOT NULL DEFAULT false,
3
+ ADD COLUMN `status` BOOLEAN NOT NULL DEFAULT false;
@@ -0,0 +1,12 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - A unique constraint covering the columns `[key]` on the table `ReferralAction` will be added. If there are existing duplicate values, this will fail.
5
+ - Added the required column `key` to the `ReferralAction` table without a default value. This is not possible if the table is not empty.
6
+
7
+ */
8
+ -- AlterTable
9
+ ALTER TABLE `referralaction` ADD COLUMN `key` VARCHAR(191) NOT NULL;
10
+
11
+ -- CreateIndex
12
+ CREATE UNIQUE INDEX `ReferralAction_key_key` ON `ReferralAction`(`key`);
@@ -0,0 +1,8 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - Added the required column `value` to the `ReferralAction` table without a default value. This is not possible if the table is not empty.
5
+
6
+ */
7
+ -- AlterTable
8
+ ALTER TABLE `referralaction` ADD COLUMN `value` VARCHAR(191) NOT NULL;
@@ -0,0 +1,2 @@
1
+ -- AlterTable
2
+ ALTER TABLE `referralreward` MODIFY `modelId` VARCHAR(191) NOT NULL;
@@ -0,0 +1,8 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - Added the required column `trigger` to the `ReferralAction` table without a default value. This is not possible if the table is not empty.
5
+
6
+ */
7
+ -- AlterTable
8
+ ALTER TABLE `referralaction` ADD COLUMN `trigger` ENUM('USER_REGISTRATION') NOT NULL;
@@ -0,0 +1,11 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - Added the required column `rewardId` to the `ReferralRewardRedemption` table without a default value. This is not possible if the table is not empty.
5
+
6
+ */
7
+ -- AlterTable
8
+ ALTER TABLE `referralrewardredemption` ADD COLUMN `rewardId` INTEGER NOT NULL;
9
+
10
+ -- AddForeignKey
11
+ ALTER TABLE `ReferralRewardRedemption` ADD CONSTRAINT `ReferralRewardRedemption_rewardId_fkey` FOREIGN KEY (`rewardId`) REFERENCES `ReferralReward`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,2 @@
1
+ -- AlterTable
2
+ ALTER TABLE `referralrewardredemption` MODIFY `modelId` VARCHAR(191) NOT NULL;
@@ -0,0 +1,10 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `model` on the `referralrewardredemption` table. All the data in the column will be lost.
5
+ - You are about to drop the column `modelId` on the `referralrewardredemption` table. All the data in the column will be lost.
6
+
7
+ */
8
+ -- AlterTable
9
+ ALTER TABLE `referralrewardredemption` DROP COLUMN `model`,
10
+ DROP COLUMN `modelId`;
@@ -0,0 +1,8 @@
1
+ -- DropForeignKey
2
+ ALTER TABLE `mnprogramrequest` DROP FOREIGN KEY `MnProgramRequest_mentorId_fkey`;
3
+
4
+ -- AlterTable
5
+ ALTER TABLE `mnprogramrequest` MODIFY `mentorId` INTEGER NULL;
6
+
7
+ -- AddForeignKey
8
+ ALTER TABLE `MnProgramRequest` ADD CONSTRAINT `MnProgramRequest_mentorId_fkey` FOREIGN KEY (`mentorId`) REFERENCES `Mentor`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
@@ -0,0 +1,2 @@
1
+ -- AlterTable
2
+ ALTER TABLE `mentor` ADD COLUMN `isBanned` BOOLEAN NOT NULL DEFAULT false;
@@ -0,0 +1,56 @@
1
+ -- AlterTable
2
+ ALTER TABLE `mnprogramrequest` MODIFY `isPending` BOOLEAN NOT NULL DEFAULT false;
3
+
4
+ -- CreateTable
5
+ CREATE TABLE `MentorAvailablity` (
6
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
7
+ `day` VARCHAR(191) NOT NULL,
8
+ `mentorId` INTEGER NOT NULL,
9
+
10
+ PRIMARY KEY (`id`)
11
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
12
+
13
+ -- CreateTable
14
+ CREATE TABLE `MentorAvailablitySlots` (
15
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
16
+ `start` VARCHAR(191) NOT NULL,
17
+ `end` VARCHAR(191) NOT NULL,
18
+ `mentorAvailablityId` INTEGER NOT NULL,
19
+
20
+ PRIMARY KEY (`id`)
21
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
22
+
23
+ -- CreateTable
24
+ CREATE TABLE `MnProgramRequestAvailablity` (
25
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
26
+ `day` VARCHAR(191) NOT NULL,
27
+ `mnProgramRequestId` INTEGER NOT NULL,
28
+
29
+ PRIMARY KEY (`id`)
30
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
31
+
32
+ -- CreateTable
33
+ CREATE TABLE `MnProgramRequestAvailablitySlots` (
34
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
35
+ `start` VARCHAR(191) NOT NULL,
36
+ `end` VARCHAR(191) NOT NULL,
37
+ `mnProgramRequestAvailablityId` INTEGER NOT NULL,
38
+ `mentorAvailablityId` INTEGER NULL,
39
+
40
+ PRIMARY KEY (`id`)
41
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
42
+
43
+ -- AddForeignKey
44
+ ALTER TABLE `MentorAvailablity` ADD CONSTRAINT `MentorAvailablity_mentorId_fkey` FOREIGN KEY (`mentorId`) REFERENCES `Mentor`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
45
+
46
+ -- AddForeignKey
47
+ ALTER TABLE `MentorAvailablitySlots` ADD CONSTRAINT `MentorAvailablitySlots_mentorAvailablityId_fkey` FOREIGN KEY (`mentorAvailablityId`) REFERENCES `MentorAvailablity`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
48
+
49
+ -- AddForeignKey
50
+ ALTER TABLE `MnProgramRequestAvailablity` ADD CONSTRAINT `MnProgramRequestAvailablity_mnProgramRequestId_fkey` FOREIGN KEY (`mnProgramRequestId`) REFERENCES `MnProgramRequest`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
51
+
52
+ -- AddForeignKey
53
+ ALTER TABLE `MnProgramRequestAvailablitySlots` ADD CONSTRAINT `MnProgramRequestAvailablitySlots_mnProgramRequestAvailablit_fkey` FOREIGN KEY (`mnProgramRequestAvailablityId`) REFERENCES `MnProgramRequestAvailablity`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
54
+
55
+ -- AddForeignKey
56
+ ALTER TABLE `MnProgramRequestAvailablitySlots` ADD CONSTRAINT `MnProgramRequestAvailablitySlots_mentorAvailablityId_fkey` FOREIGN KEY (`mentorAvailablityId`) REFERENCES `MentorAvailablity`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
@@ -0,0 +1,2 @@
1
+ -- AlterTable
2
+ ALTER TABLE `mentoravailablity` ADD COLUMN `status` BOOLEAN NOT NULL DEFAULT false;
@@ -0,0 +1,3 @@
1
+ -- AlterTable
2
+ ALTER TABLE `mentoravailablityslots` MODIFY `start` VARCHAR(191) NULL,
3
+ MODIFY `end` VARCHAR(191) NULL;
@@ -0,0 +1,24 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the `mentoravailablityslots` table. If the table is not empty, all the data it contains will be lost.
5
+
6
+ */
7
+ -- DropForeignKey
8
+ ALTER TABLE `mentoravailablityslots` DROP FOREIGN KEY `MentorAvailablitySlots_mentorAvailablityId_fkey`;
9
+
10
+ -- DropTable
11
+ DROP TABLE `mentoravailablityslots`;
12
+
13
+ -- CreateTable
14
+ CREATE TABLE `MentorAvailablitySlot` (
15
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
16
+ `start` VARCHAR(191) NULL,
17
+ `end` VARCHAR(191) NULL,
18
+ `mentorAvailablityId` INTEGER NOT NULL,
19
+
20
+ PRIMARY KEY (`id`)
21
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
22
+
23
+ -- AddForeignKey
24
+ ALTER TABLE `MentorAvailablitySlot` ADD CONSTRAINT `MentorAvailablitySlot_mentorAvailablityId_fkey` FOREIGN KEY (`mentorAvailablityId`) REFERENCES `MentorAvailablity`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,53 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the `mnprogramrequestavailablityslots` table. If the table is not empty, all the data it contains will be lost.
5
+
6
+ */
7
+ -- DropForeignKey
8
+ ALTER TABLE `mnprogramrequestavailablityslots` DROP FOREIGN KEY `MnProgramRequestAvailablitySlots_mentorAvailablityId_fkey`;
9
+
10
+ -- DropForeignKey
11
+ ALTER TABLE `mnprogramrequestavailablityslots` DROP FOREIGN KEY `MnProgramRequestAvailablitySlots_mnProgramRequestAvailablit_fkey`;
12
+
13
+ -- DropTable
14
+ DROP TABLE `mnprogramrequestavailablityslots`;
15
+
16
+ -- CreateTable
17
+ CREATE TABLE `UserAvailablity` (
18
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
19
+ `day` VARCHAR(191) NOT NULL,
20
+ `status` BOOLEAN NOT NULL DEFAULT false,
21
+ `userId` INTEGER NOT NULL,
22
+
23
+ PRIMARY KEY (`id`)
24
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
25
+
26
+ -- CreateTable
27
+ CREATE TABLE `UserAvailablitySlot` (
28
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
29
+ `start` VARCHAR(191) NULL,
30
+ `end` VARCHAR(191) NULL,
31
+ `userAvailablityId` INTEGER NOT NULL,
32
+
33
+ PRIMARY KEY (`id`)
34
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
35
+
36
+ -- CreateTable
37
+ CREATE TABLE `MnProgramRequestAvailablitySlot` (
38
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
39
+ `start` VARCHAR(191) NOT NULL,
40
+ `end` VARCHAR(191) NOT NULL,
41
+ `mnProgramRequestAvailablityId` INTEGER NOT NULL,
42
+
43
+ PRIMARY KEY (`id`)
44
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
45
+
46
+ -- AddForeignKey
47
+ ALTER TABLE `UserAvailablity` ADD CONSTRAINT `UserAvailablity_userId_fkey` FOREIGN KEY (`userId`) REFERENCES `User`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
48
+
49
+ -- AddForeignKey
50
+ ALTER TABLE `UserAvailablitySlot` ADD CONSTRAINT `UserAvailablitySlot_userAvailablityId_fkey` FOREIGN KEY (`userAvailablityId`) REFERENCES `UserAvailablity`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
51
+
52
+ -- AddForeignKey
53
+ ALTER TABLE `MnProgramRequestAvailablitySlot` ADD CONSTRAINT `MnProgramRequestAvailablitySlot_mnProgramRequestAvailablity_fkey` FOREIGN KEY (`mnProgramRequestAvailablityId`) REFERENCES `MnProgramRequestAvailablity`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,12 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - A unique constraint covering the columns `[permalink]` on the table `MnProgramRequest` will be added. If there are existing duplicate values, this will fail.
5
+ - Added the required column `permalink` to the `MnProgramRequest` table without a default value. This is not possible if the table is not empty.
6
+
7
+ */
8
+ -- AlterTable
9
+ ALTER TABLE `mnprogramrequest` ADD COLUMN `permalink` VARCHAR(191) NOT NULL;
10
+
11
+ -- CreateIndex
12
+ CREATE UNIQUE INDEX `MnProgramRequest_permalink_key` ON `MnProgramRequest`(`permalink`);
@@ -0,0 +1,12 @@
1
+ -- CreateTable
2
+ CREATE TABLE `MnProgramRequestLecture` (
3
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
4
+ `status` ENUM('PENDING', 'PLANNED', 'CANCELED', 'DONE') NOT NULL DEFAULT 'PENDING',
5
+ `at` DATETIME(3) NOT NULL,
6
+ `mnProgramRequestId` INTEGER NOT NULL,
7
+
8
+ PRIMARY KEY (`id`)
9
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
10
+
11
+ -- AddForeignKey
12
+ ALTER TABLE `MnProgramRequestLecture` ADD CONSTRAINT `MnProgramRequestLecture_mnProgramRequestId_fkey` FOREIGN KEY (`mnProgramRequestId`) REFERENCES `MnProgramRequest`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,2 @@
1
+ -- AlterTable
2
+ ALTER TABLE `mnprogramrequestlecture` MODIFY `at` DATETIME(3) NULL;
@@ -0,0 +1,17 @@
1
+ -- CreateTable
2
+ CREATE TABLE `MnProgramRequestLectureSession` (
3
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
4
+ `mnProgramRequestAvailablitySlotId` INTEGER NOT NULL,
5
+ `mnProgramRequestLecture` INTEGER NOT NULL,
6
+ `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
7
+ `updatedAt` DATETIME(3) NOT NULL,
8
+ `mnProgramRequestLectureId` INTEGER NOT NULL,
9
+
10
+ PRIMARY KEY (`id`)
11
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
12
+
13
+ -- AddForeignKey
14
+ ALTER TABLE `MnProgramRequestLectureSession` ADD CONSTRAINT `MnProgramRequestLectureSession_mnProgramRequestAvailablityS_fkey` FOREIGN KEY (`mnProgramRequestAvailablitySlotId`) REFERENCES `MnProgramRequestAvailablitySlot`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
15
+
16
+ -- AddForeignKey
17
+ ALTER TABLE `MnProgramRequestLectureSession` ADD CONSTRAINT `MnProgramRequestLectureSession_mnProgramRequestLectureId_fkey` FOREIGN KEY (`mnProgramRequestLectureId`) REFERENCES `MnProgramRequestLecture`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,8 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `mnProgramRequestLecture` on the `mnprogramrequestlecturesession` table. All the data in the column will be lost.
5
+
6
+ */
7
+ -- AlterTable
8
+ ALTER TABLE `mnprogramrequestlecturesession` DROP COLUMN `mnProgramRequestLecture`;
@@ -0,0 +1,12 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - A unique constraint covering the columns `[permalink]` on the table `MnProgramRequestLectureSession` will be added. If there are existing duplicate values, this will fail.
5
+ - Added the required column `permalink` to the `MnProgramRequestLectureSession` table without a default value. This is not possible if the table is not empty.
6
+
7
+ */
8
+ -- AlterTable
9
+ ALTER TABLE `mnprogramrequestlecturesession` ADD COLUMN `permalink` VARCHAR(191) NOT NULL;
10
+
11
+ -- CreateIndex
12
+ CREATE UNIQUE INDEX `MnProgramRequestLectureSession_permalink_key` ON `MnProgramRequestLectureSession`(`permalink`);
@@ -0,0 +1,18 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the `mnprogrammeet` table. If the table is not empty, all the data it contains will be lost.
5
+ - You are about to drop the `mnprogrammeetsession` table. If the table is not empty, all the data it contains will be lost.
6
+
7
+ */
8
+ -- DropForeignKey
9
+ ALTER TABLE `mnprogrammeet` DROP FOREIGN KEY `MnProgramMeet_mentorId_fkey`;
10
+
11
+ -- DropForeignKey
12
+ ALTER TABLE `mnprogrammeetsession` DROP FOREIGN KEY `MnProgramMeetSession_mnProgramMeetId_fkey`;
13
+
14
+ -- DropTable
15
+ DROP TABLE `mnprogrammeet`;
16
+
17
+ -- DropTable
18
+ DROP TABLE `mnprogrammeetsession`;
@@ -0,0 +1,17 @@
1
+ -- CreateTable
2
+ CREATE TABLE `MnProgramRequestLectureSessionAttachment` (
3
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
4
+ `uploadId` INTEGER NOT NULL,
5
+ `mnProgramRequestLectureSessionId` INTEGER NOT NULL,
6
+ `by` VARCHAR(191) NOT NULL,
7
+
8
+ UNIQUE INDEX `MnProgramRequestLectureSessionAttachment_uploadId_key`(`uploadId`),
9
+ UNIQUE INDEX `MnProgramRequestLectureSessionAttachment_mnProgramRequestLec_key`(`mnProgramRequestLectureSessionId`),
10
+ PRIMARY KEY (`id`)
11
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
12
+
13
+ -- AddForeignKey
14
+ ALTER TABLE `MnProgramRequestLectureSessionAttachment` ADD CONSTRAINT `MnProgramRequestLectureSessionAttachment_mnProgramRequestLe_fkey` FOREIGN KEY (`mnProgramRequestLectureSessionId`) REFERENCES `MnProgramRequestLectureSession`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
15
+
16
+ -- AddForeignKey
17
+ ALTER TABLE `MnProgramRequestLectureSessionAttachment` ADD CONSTRAINT `MnProgramRequestLectureSessionAttachment_uploadId_fkey` FOREIGN KEY (`uploadId`) REFERENCES `Upload`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,2 @@
1
+ -- AlterTable
2
+ ALTER TABLE `template` ADD COLUMN `isMultiSide` BOOLEAN NOT NULL DEFAULT false;
@@ -0,0 +1,8 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `file` on the `skillrepo` table. All the data in the column will be lost.
5
+
6
+ */
7
+ -- AlterTable
8
+ ALTER TABLE `skillrepo` DROP COLUMN `file`;
@@ -0,0 +1,8 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `file` on the `positionrepo` table. All the data in the column will be lost.
5
+
6
+ */
7
+ -- AlterTable
8
+ ALTER TABLE `positionrepo` DROP COLUMN `file`;