Hi, im using mongodb and i have the following mode...
# orm-help
k
Hi, im using mongodb and i have the following model
Copy code
model Contract {
    id         String   @id @default(auto()) @map("_id") @db.ObjectId
    address    String   @unique
    active     Boolean
    last_fetch DateTime
}
I expect that if i insert a colletion with the same address it should fail? becuase of "@unique" But i am able to insert 2 contracts with the same address
1
Ah i realised you have to run
db push
, not entirely sure why, i thought migrations were nto handled in mongodb
🙌 1