Skip to content

Commit

Permalink
ahhhhhhhhhhhh stupido
Browse files Browse the repository at this point in the history
  • Loading branch information
sberan1 committed Jan 3, 2024
1 parent 681b9cd commit 237a667
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Binary file added prisma/dev.db-journal
Binary file not shown.
24 changes: 24 additions & 0 deletions prisma/migrations/20240102223253_skill_category/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
-- CreateTable
CREATE TABLE "SkillCategory" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"name" TEXT NOT NULL
);

-- RedefineTables
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_Skill" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"name" TEXT NOT NULL,
"knowledge" INTEGER NOT NULL,
"logo" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
"skillCategoryId" INTEGER,
CONSTRAINT "Skill_skillCategoryId_fkey" FOREIGN KEY ("skillCategoryId") REFERENCES "SkillCategory" ("id") ON DELETE SET NULL ON UPDATE CASCADE
);
INSERT INTO "new_Skill" ("createdAt", "id", "knowledge", "logo", "name", "updatedAt") SELECT "createdAt", "id", "knowledge", "logo", "name", "updatedAt" FROM "Skill";
DROP TABLE "Skill";
ALTER TABLE "new_Skill" RENAME TO "Skill";
CREATE UNIQUE INDEX "Skill_name_key" ON "Skill"("name");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;

0 comments on commit 237a667

Please sign in to comment.