Skip to content

Commit

Permalink
Remove unique user id constraint on purchase
Browse files Browse the repository at this point in the history
  • Loading branch information
evmiguel committed Apr 8, 2024
1 parent 1d7f15e commit 557152e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- DropIndex
DROP INDEX "Purchase_userId_key";
3 changes: 3 additions & 0 deletions prisma/migrations/migration_lock.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Please do not edit this file manually
# It should be added in your version-control system (i.e. Git)
provider = "cockroachdb"
2 changes: 1 addition & 1 deletion prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ datasource db {
model Purchase {
id BigInt @id @default(autoincrement())
user User @relation(fields: [userId], references: [id])
userId String @unique
userId String
date DateTime
name String
cost Float
Expand Down

0 comments on commit 557152e

Please sign in to comment.