procbay-schema 1.0.55 → 1.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/prisma/migrations/20251028103158_added_user_relation_in_login_activity/migration.sql +5 -0
- package/prisma/schema.prisma +2 -0
- package/src/prisma/edge.js +3 -3
- package/src/prisma/index.d.ts +735 -4
- package/src/prisma/index.js +3 -3
- package/src/prisma/package.json +1 -1
- package/src/prisma/schema.prisma +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "procbay-schema",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.56",
|
|
4
4
|
"description": "A set of utilities for managing Prisma database schemas, seeding, and maintenance operations for the Procure-to-Pay system",
|
|
5
5
|
"main": "src/prisma/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
-- AlterTable
|
|
2
|
+
ALTER TABLE "export_logs" ALTER COLUMN "expires_at" SET DEFAULT NOW() + INTERVAL '7 days';
|
|
3
|
+
|
|
4
|
+
-- AddForeignKey
|
|
5
|
+
ALTER TABLE "user_login_activities" ADD CONSTRAINT "user_login_activities_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
package/prisma/schema.prisma
CHANGED
|
@@ -101,6 +101,7 @@ model User {
|
|
|
101
101
|
catalogue_cart CatalogueCart[]
|
|
102
102
|
send_back_approvers SendBack[] @relation("send_back_approver")
|
|
103
103
|
send_back_requestors SendBack[] @relation("send_back_requestor")
|
|
104
|
+
user_login_activities UserLoginActivity[]
|
|
104
105
|
|
|
105
106
|
@@map("users")
|
|
106
107
|
}
|
|
@@ -1802,6 +1803,7 @@ enum LoginActivityUserType {
|
|
|
1802
1803
|
model UserLoginActivity {
|
|
1803
1804
|
id Int @id @default(autoincrement())
|
|
1804
1805
|
user_id Int?
|
|
1806
|
+
user User? @relation(fields: [user_id], references: [id], onDelete: Cascade)
|
|
1805
1807
|
user_type LoginActivityUserType?
|
|
1806
1808
|
ip_address String?
|
|
1807
1809
|
user_agent String?
|