sendou.ink/prisma/migrations/20201111140528-init/README.md
2020-11-11 16:40:21 +02:00

1.9 KiB

Migration 20201111140528-init

This migration has been generated by Kalle (Sendou) at 11/11/2020, 4:05:28 PM. You can check out the state of the schema after the migration.

Database Steps

ALTER TABLE "Build" DROP COLUMN "mainAbilities",
DROP COLUMN "subAbilities",
ADD COLUMN     "headAbilities" "Ability"[],
ADD COLUMN     "clothingAbilities" "Ability"[],
ADD COLUMN     "shoesAbilities" "Ability"[]

Changes

diff --git schema.prisma schema.prisma
migration 20201109140409-init..20201111140528-init
--- datamodel.dml
+++ datamodel.dml
@@ -1,8 +1,8 @@
 datasource db {
   provider = "postgresql"
   // FIXME: should use same .env system as Next.JS
-  url = "***"
+  url = "***"
 }
 generator client {
   provider = "prisma-client-js"
@@ -93,23 +93,24 @@
   BRU
 }
 model Build {
-  id            Int       @id @default(autoincrement())
-  userId        Int
-  weapon        String
-  title         String?
-  description   String?
-  mainAbilities Ability[]
-  subAbilities  Ability[]
-  abilityPoints Json
-  headGear      String?
-  clothingGear  String?
-  shoesGear     String?
-  top500        Boolean
-  jpn           Boolean
-  updatedAt     DateTime  @updatedAt
-  user          User      @relation(fields: [userId], references: [id])
+  id                Int       @id @default(autoincrement())
+  userId            Int
+  weapon            String
+  title             String?
+  description       String?
+  abilityPoints     Json
+  headGear          String?
+  headAbilities     Ability[]
+  clothingGear      String?
+  clothingAbilities Ability[]
+  shoesGear         String?
+  shoesAbilities    Ability[]
+  top500            Boolean
+  jpn               Boolean
+  updatedAt         DateTime  @updatedAt
+  user              User      @relation(fields: [userId], references: [id])
   @@index(weapon)
   @@index(userId)
   @@index(abilityPoints)