-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changed server from branch to folder
- Loading branch information
Showing
43 changed files
with
193 additions
and
5 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
74 changes: 74 additions & 0 deletions
74
node-server-auth/prisma/migrations/20240728124735_batch_data/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
-- CreateTable | ||
CREATE TABLE `User` ( | ||
`UserId` INTEGER NOT NULL AUTO_INCREMENT, | ||
`Name` VARCHAR(191) NOT NULL, | ||
`Email` VARCHAR(255) NOT NULL, | ||
`Password` VARCHAR(255) NOT NULL, | ||
`PhoneNumber` VARCHAR(15) NOT NULL, | ||
`LoginAllowed` BOOLEAN NOT NULL DEFAULT true, | ||
`created_on` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), | ||
`updated_on` TIMESTAMP(6) NOT NULL, | ||
`last_login` TIMESTAMP(6) NULL, | ||
|
||
UNIQUE INDEX `User_Email_key`(`Email`), | ||
UNIQUE INDEX `User_PhoneNumber_key`(`PhoneNumber`), | ||
PRIMARY KEY (`UserId`) | ||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
|
||
-- CreateTable | ||
CREATE TABLE `UserRoles` ( | ||
`user_id` INTEGER NOT NULL, | ||
`Role` ENUM('ADMIN', 'TEACHER', 'STUDENT') NOT NULL, | ||
`created_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), | ||
`updated_at` TIMESTAMP(6) NOT NULL, | ||
|
||
PRIMARY KEY (`user_id`, `Role`) | ||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
|
||
-- CreateTable | ||
CREATE TABLE `UserDevice` ( | ||
`UserDeviceId` INTEGER NOT NULL AUTO_INCREMENT, | ||
`UserId` INTEGER NOT NULL, | ||
`DeviceId` INTEGER NOT NULL, | ||
`created_on` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), | ||
`updated_on` TIMESTAMP(6) NOT NULL, | ||
|
||
PRIMARY KEY (`UserDeviceId`) | ||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
|
||
-- CreateTable | ||
CREATE TABLE `SignInStates` ( | ||
`StateId` INTEGER NOT NULL AUTO_INCREMENT, | ||
`user_id` INTEGER NOT NULL, | ||
`device_id` INTEGER NOT NULL, | ||
`login_state` ENUM('LOGGED_IN', 'LOGGED_OUT', 'LOCKED', 'DISABLED') NOT NULL DEFAULT 'LOGGED_OUT', | ||
`created_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), | ||
`updated_at` TIMESTAMP(6) NOT NULL, | ||
`last_login` TIMESTAMP(6) NULL, | ||
|
||
PRIMARY KEY (`StateId`) | ||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
|
||
-- CreateTable | ||
CREATE TABLE `Batch` ( | ||
`batch_id` INTEGER NOT NULL AUTO_INCREMENT, | ||
`name` VARCHAR(191) NOT NULL, | ||
`description` VARCHAR(191) NOT NULL, | ||
`created_on` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), | ||
`updated_on` TIMESTAMP(6) NOT NULL, | ||
|
||
PRIMARY KEY (`batch_id`) | ||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
|
||
-- CreateTable | ||
CREATE TABLE `BatchStudents` ( | ||
`batch_id` INTEGER NOT NULL, | ||
`user_id` INTEGER NOT NULL, | ||
`created_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), | ||
`updated_at` TIMESTAMP(6) NOT NULL, | ||
|
||
PRIMARY KEY (`batch_id`, `user_id`) | ||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE `UserDevice` ADD CONSTRAINT `UserDevice_UserId_fkey` FOREIGN KEY (`UserId`) REFERENCES `User`(`UserId`) ON DELETE RESTRICT ON UPDATE CASCADE; |
10 changes: 10 additions & 0 deletions
10
node-server-auth/prisma/migrations/20240804084510_added_course_model/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
-- CreateTable | ||
CREATE TABLE `Course` ( | ||
`course_id` INTEGER NOT NULL AUTO_INCREMENT, | ||
`name` VARCHAR(191) NOT NULL, | ||
`description` VARCHAR(191) NOT NULL, | ||
`created_on` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), | ||
`updated_on` TIMESTAMP(6) NOT NULL, | ||
|
||
PRIMARY KEY (`course_id`) | ||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; |
9 changes: 9 additions & 0 deletions
9
node-server-auth/prisma/migrations/20240804173116_/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-- CreateTable | ||
CREATE TABLE `CourseStudents` ( | ||
`course_id` INTEGER NOT NULL, | ||
`user_id` INTEGER NOT NULL, | ||
`created_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), | ||
`updated_at` TIMESTAMP(6) NOT NULL, | ||
|
||
PRIMARY KEY (`course_id`, `user_id`) | ||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; |
18 changes: 18 additions & 0 deletions
18
node-server-auth/prisma/migrations/20240804173317_course_batches/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
Warnings: | ||
- You are about to drop the `CourseStudents` table. If the table is not empty, all the data it contains will be lost. | ||
*/ | ||
-- DropTable | ||
DROP TABLE `CourseStudents`; | ||
|
||
-- CreateTable | ||
CREATE TABLE `CourseBatches` ( | ||
`course_id` INTEGER NOT NULL, | ||
`batch_id` INTEGER NOT NULL, | ||
`created_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), | ||
`updated_at` TIMESTAMP(6) NOT NULL, | ||
|
||
PRIMARY KEY (`course_id`, `batch_id`) | ||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; |
20 changes: 20 additions & 0 deletions
20
node-server-auth/prisma/migrations/20240804210812_course_lectures/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
-- CreateTable | ||
CREATE TABLE `Lecture` ( | ||
`lecture_id` INTEGER NOT NULL AUTO_INCREMENT, | ||
`name` VARCHAR(191) NOT NULL, | ||
`description` VARCHAR(191) NOT NULL, | ||
`created_on` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), | ||
`updated_on` TIMESTAMP(6) NOT NULL, | ||
|
||
PRIMARY KEY (`lecture_id`) | ||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
|
||
-- CreateTable | ||
CREATE TABLE `LectureCourse` ( | ||
`lecture_id` INTEGER NOT NULL, | ||
`course_id` INTEGER NOT NULL, | ||
`created_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), | ||
`updated_at` TIMESTAMP(6) NOT NULL, | ||
|
||
PRIMARY KEY (`lecture_id`, `course_id`) | ||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; |
15 changes: 15 additions & 0 deletions
15
node-server-auth/prisma/migrations/20240804213521_updated_lectures/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
Warnings: | ||
- Added the required column `attendance_type` to the `Lecture` table without a default value. This is not possible if the table is not empty. | ||
- Added the required column `end_time` to the `Lecture` table without a default value. This is not possible if the table is not empty. | ||
- Added the required column `lecture_date` to the `Lecture` table without a default value. This is not possible if the table is not empty. | ||
- Added the required column `start_time` to the `Lecture` table without a default value. This is not possible if the table is not empty. | ||
*/ | ||
-- AlterTable | ||
ALTER TABLE `Lecture` ADD COLUMN `attendance_type` VARCHAR(191) NOT NULL, | ||
ADD COLUMN `end_time` TIMESTAMP(6) NOT NULL, | ||
ADD COLUMN `lecture_date` DATE NOT NULL, | ||
ADD COLUMN `mininum_attendance` INTEGER NOT NULL DEFAULT 75, | ||
ADD COLUMN `start_time` TIMESTAMP(6) NOT NULL; |
21 changes: 21 additions & 0 deletions
21
node-server-auth/prisma/migrations/20240805072336_forms_feedback/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
-- CreateTable | ||
CREATE TABLE `FormsAndFeedback` ( | ||
`form_id` INTEGER NOT NULL AUTO_INCREMENT, | ||
`name` VARCHAR(191) NOT NULL, | ||
`description` VARCHAR(191) NOT NULL, | ||
`created_on` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), | ||
`updated_on` TIMESTAMP(6) NOT NULL, | ||
|
||
PRIMARY KEY (`form_id`) | ||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
|
||
-- CreateTable | ||
CREATE TABLE `Questions` ( | ||
`question_id` INTEGER NOT NULL AUTO_INCREMENT, | ||
`question` VARCHAR(191) NOT NULL, | ||
`form_id` INTEGER NOT NULL, | ||
`created_on` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), | ||
`updated_on` TIMESTAMP(6) NOT NULL, | ||
|
||
PRIMARY KEY (`question_id`) | ||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; |
13 changes: 13 additions & 0 deletions
13
node-server-auth/prisma/migrations/20240817105016_sso_migration/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
-- CreateTable | ||
CREATE TABLE `SSOProvider` ( | ||
`sso_provider_id` INTEGER NOT NULL AUTO_INCREMENT, | ||
`name` VARCHAR(191) NOT NULL, | ||
`description` VARCHAR(191) NOT NULL, | ||
`home_url` VARCHAR(191) NOT NULL, | ||
`privacy_policy` VARCHAR(191) NOT NULL, | ||
`auth_redirect_url` VARCHAR(191) NOT NULL, | ||
`created_on` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), | ||
`updated_on` TIMESTAMP(6) NOT NULL, | ||
|
||
PRIMARY KEY (`sso_provider_id`) | ||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; |
8 changes: 8 additions & 0 deletions
8
node-server-auth/prisma/migrations/20240817105736_added_field_provider_key/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
Warnings: | ||
- Added the required column `provider_key` to the `SSOProvider` table without a default value. This is not possible if the table is not empty. | ||
*/ | ||
-- AlterTable | ||
ALTER TABLE `SSOProvider` ADD COLUMN `provider_key` VARCHAR(191) NOT NULL; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions
10
src/routes/routesRegister.ts → ...-server-auth/src/routes/routesRegister.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.