Loading packages/server/prisma/dbml/schema.dbml +0 −4 Original line number Diff line number Diff line Loading @@ -35,7 +35,6 @@ Table PaletteColor { id Int [pk, increment] name String [not null] hex String [unique, not null] pixels Pixel [not null] } Table Pixel { Loading @@ -49,7 +48,6 @@ Table Pixel { createdAt DateTime [default: `now()`, not null] deletedAt DateTime user User [not null] pallete PaletteColor [not null] } Table Faction { Loading Loading @@ -117,8 +115,6 @@ Table Ban { Ref: Pixel.userId > User.sub Ref: Pixel.color > PaletteColor.hex Ref: FactionMember.sub > User.sub Ref: FactionMember.factionId > Faction.id Loading packages/server/prisma/migrations/20240709000713_drop_pixel_constraint/migration.sql 0 → 100644 +2 −0 Original line number Diff line number Diff line -- DropForeignKey ALTER TABLE "Pixel" DROP CONSTRAINT "Pixel_color_fkey"; packages/server/prisma/schema.prisma +3 −4 Original line number Diff line number Diff line Loading @@ -50,8 +50,6 @@ model PaletteColor { id Int @id @default(autoincrement()) name String hex String @unique pixels Pixel[] } model Pixel { Loading @@ -67,7 +65,8 @@ model Pixel { deletedAt DateTime? user User @relation(fields: [userId], references: [sub]) pallete PaletteColor @relation(fields: [color], references: [hex]) // do not add a relation to PaletteColor, in the case the palette gets changed // https://github.com/prisma/prisma/issues/18058 } model Faction { Loading Loading
packages/server/prisma/dbml/schema.dbml +0 −4 Original line number Diff line number Diff line Loading @@ -35,7 +35,6 @@ Table PaletteColor { id Int [pk, increment] name String [not null] hex String [unique, not null] pixels Pixel [not null] } Table Pixel { Loading @@ -49,7 +48,6 @@ Table Pixel { createdAt DateTime [default: `now()`, not null] deletedAt DateTime user User [not null] pallete PaletteColor [not null] } Table Faction { Loading Loading @@ -117,8 +115,6 @@ Table Ban { Ref: Pixel.userId > User.sub Ref: Pixel.color > PaletteColor.hex Ref: FactionMember.sub > User.sub Ref: FactionMember.factionId > Faction.id Loading
packages/server/prisma/migrations/20240709000713_drop_pixel_constraint/migration.sql 0 → 100644 +2 −0 Original line number Diff line number Diff line -- DropForeignKey ALTER TABLE "Pixel" DROP CONSTRAINT "Pixel_color_fkey";
packages/server/prisma/schema.prisma +3 −4 Original line number Diff line number Diff line Loading @@ -50,8 +50,6 @@ model PaletteColor { id Int @id @default(autoincrement()) name String hex String @unique pixels Pixel[] } model Pixel { Loading @@ -67,7 +65,8 @@ model Pixel { deletedAt DateTime? user User @relation(fields: [userId], references: [sub]) pallete PaletteColor @relation(fields: [color], references: [hex]) // do not add a relation to PaletteColor, in the case the palette gets changed // https://github.com/prisma/prisma/issues/18058 } model Faction { Loading