Skip to content

Commit

Permalink
chore: upgrate prisma to version 6
Browse files Browse the repository at this point in the history
  • Loading branch information
rockingrohit9639 committed Jan 27, 2025
1 parent 1d8dc0b commit cd8e401
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 55 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
-- AlterTable
ALTER TABLE "_AssetReminderToTeamMember" ADD CONSTRAINT "_AssetReminderToTeamMember_AB_pkey" PRIMARY KEY ("A", "B");

-- DropIndex
DROP INDEX "_AssetReminderToTeamMember_AB_unique";

-- AlterTable
ALTER TABLE "_AssetToBooking" ADD CONSTRAINT "_AssetToBooking_AB_pkey" PRIMARY KEY ("A", "B");

-- DropIndex
DROP INDEX "_AssetToBooking_AB_unique";

-- AlterTable
ALTER TABLE "_AssetToTag" ADD CONSTRAINT "_AssetToTag_AB_pkey" PRIMARY KEY ("A", "B");

-- DropIndex
DROP INDEX "_AssetToTag_AB_unique";

-- AlterTable
ALTER TABLE "_CategoryToCustomField" ADD CONSTRAINT "_CategoryToCustomField_AB_pkey" PRIMARY KEY ("A", "B");

-- DropIndex
DROP INDEX "_CategoryToCustomField_AB_unique";

-- AlterTable
ALTER TABLE "_RoleToUser" ADD CONSTRAINT "_RoleToUser_AB_pkey" PRIMARY KEY ("A", "B");

-- DropIndex
DROP INDEX "_RoleToUser_AB_unique";
2 changes: 1 addition & 1 deletion app/database/migrations/migration_lock.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Please do not edit this file manually
# It should be added in your version-control system (i.e. Git)
# It should be added in your version-control system (e.g., Git)
provider = "postgresql"
30 changes: 14 additions & 16 deletions app/database/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ datasource db {

generator client {
provider = "prisma-client-js"
previewFeatures = ["fullTextSearch"]
previewFeatures = ["fullTextSearchPostgres"]
}

model Image {
Expand Down Expand Up @@ -766,27 +766,25 @@ model KitCustody {
}

model AssetReminder {
id String @id @default(cuid())
name String
message String
alertDateTime DateTime
id String @id @default(cuid())
name String
message String
alertDateTime DateTime
activeSchedulerReference String?
organization Organization @relation(fields: [organizationId], references: [id])
organizationId String
asset Asset @relation(fields: [assetId], references: [id], onDelete: Cascade)
assetId String
teamMembers TeamMember[]
createdBy User @relation(fields: [createdById], references: [id])
createdById String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
organization Organization @relation(fields: [organizationId], references: [id])
organizationId String
asset Asset @relation(fields: [assetId], references: [id], onDelete: Cascade)
assetId String
teamMembers TeamMember[]
createdBy User @relation(fields: [createdById], references: [id])
createdById String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
// Optimized indexes
@@index([assetId, alertDateTime])
@@index([name(ops: raw("gin_trgm_ops")), message(ops: raw("gin_trgm_ops"))], type: Gin)
@@index([organizationId, alertDateTime, assetId])
// For scheduler related queries
@@index([alertDateTime, activeSchedulerReference])
}
79 changes: 43 additions & 36 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@fullcalendar/timegrid": "^6.1.15",
"@markdoc/markdoc": "^0.4.0",
"@paralleldrive/cuid2": "^2.2.2",
"@prisma/client": "^5.9.1",
"@prisma/client": "^6.2.1",
"@radix-ui/react-alert-dialog": "^1.0.5",
"@radix-ui/react-collapsible": "^1.1.1",
"@radix-ui/react-dropdown-menu": "2.0.6",
Expand Down Expand Up @@ -161,7 +161,7 @@
"postcss": "^8.4.38",
"prettier": "3.0.3",
"prettier-plugin-tailwindcss": "^0.5.11",
"prisma": "^5.9.1",
"prisma": "^6.2.1",
"remix-flat-routes": "^0.6.4",
"start-server-and-test": "^2.0.3",
"tailwind-scrollbar": "^3.1.0",
Expand Down

0 comments on commit cd8e401

Please sign in to comment.