diff --git a/Websites/jefes-nextjs/.env b/Websites/jefes-nextjs/.env index 89570a8..2b9c476 100644 --- a/Websites/jefes-nextjs/.env +++ b/Websites/jefes-nextjs/.env @@ -5,4 +5,4 @@ # See the documentation for all the connection string options: https://pris.ly/d/connection-strings # DATABASE_URL="postgresql://johndoe:randompassword@localhost:5432/mydb?schema=public" -DATABASE_URL="mysql://'alpha':'!Plop2099'@192.168.50.190:3306/db" \ No newline at end of file +DATABASE_URL="mysql://root:%21Plop2099341723@192.168.50.190:3306/db" \ No newline at end of file diff --git a/Websites/jefes-nextjs/bun.lockb b/Websites/jefes-nextjs/bun.lockb index cf95c35..2facaef 100755 Binary files a/Websites/jefes-nextjs/bun.lockb and b/Websites/jefes-nextjs/bun.lockb differ diff --git a/Websites/jefes-nextjs/package.json b/Websites/jefes-nextjs/package.json index 4688507..cb8ff7f 100644 --- a/Websites/jefes-nextjs/package.json +++ b/Websites/jefes-nextjs/package.json @@ -9,6 +9,7 @@ "lint": "next lint" }, "dependencies": { + "@prisma/client": "5.4.2", "classnames": "^2.3.2", "next": "13.5.6", "prisma": "^5.4.2", diff --git a/Websites/jefes-nextjs/prisma/migrations/20231021063954_create_issue/migration.sql b/Websites/jefes-nextjs/prisma/migrations/20231021063954_create_issue/migration.sql new file mode 100644 index 0000000..87de1b4 --- /dev/null +++ b/Websites/jefes-nextjs/prisma/migrations/20231021063954_create_issue/migration.sql @@ -0,0 +1,11 @@ +-- CreateTable +CREATE TABLE `Issue` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `title` VARCHAR(255) NOT NULL, + `description` TEXT NOT NULL, + `status` ENUM('OPEN', 'IN_PROGRESS', 'CLOSED') NOT NULL DEFAULT 'OPEN', + `createdAT` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + `updatedAt` DATETIME(3) NOT NULL, + + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; diff --git a/Websites/jefes-nextjs/prisma/migrations/migration_lock.toml b/Websites/jefes-nextjs/prisma/migrations/migration_lock.toml new file mode 100644 index 0000000..e5a788a --- /dev/null +++ b/Websites/jefes-nextjs/prisma/migrations/migration_lock.toml @@ -0,0 +1,3 @@ +# Please do not edit this file manually +# It should be added in your version-control system (i.e. Git) +provider = "mysql" \ No newline at end of file diff --git a/Websites/jefes-nextjs/prisma/schema.prisma b/Websites/jefes-nextjs/prisma/schema.prisma index 39d307a..28ab717 100644 --- a/Websites/jefes-nextjs/prisma/schema.prisma +++ b/Websites/jefes-nextjs/prisma/schema.prisma @@ -10,3 +10,20 @@ datasource db { provider = "mysql" url = env("DATABASE_URL") } + +model Issue { + id Int @id @default(autoincrement()) // auto increasing id number for issues + title String @db.VarChar(255) // change varchar(variable character limit to 255) + description String @db.Text // issue description + status Status @default(OPEN) // stating issue is open + createdAT DateTime @default(now()) // creation time + updatedAt DateTime @updatedAt // updated time +} + +// issue status, or ticket status +// supported in mysql, but possibly not other db's +enum Status { + OPEN + IN_PROGRESS + CLOSED +}