Commit a249bbb 1 parent 54ede41 commit a249bbb Copy full SHA for a249bbb
File tree 2 files changed +22
-4
lines changed
migrations/20250220090703_remove_item_reference_from_unallocated_item_request
2 files changed +22
-4
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `itemId` on the `UnallocatedItemRequest` table. All the data in the column will be lost.
5
+ - Added the required column `category` to the `UnallocatedItemRequest` table without a default value. This is not possible if the table is not empty.
6
+ - Added the required column `title` to the `UnallocatedItemRequest` table without a default value. This is not possible if the table is not empty.
7
+ - Added the required column `unitSize` to the `UnallocatedItemRequest` table without a default value. This is not possible if the table is not empty.
8
+
9
+ */
10
+ -- DropForeignKey
11
+ ALTER TABLE " UnallocatedItemRequest" DROP CONSTRAINT " UnallocatedItemRequest_itemId_fkey" ;
12
+
13
+ -- AlterTable
14
+ ALTER TABLE " UnallocatedItemRequest" DROP COLUMN " itemId" ,
15
+ ADD COLUMN " category" TEXT NOT NULL ,
16
+ ADD COLUMN " expirationDate" TIMESTAMP (3 ),
17
+ ADD COLUMN " title" TEXT NOT NULL ,
18
+ ADD COLUMN " unitSize" INTEGER NOT NULL ;
Original file line number Diff line number Diff line change @@ -58,8 +58,6 @@ model Item {
58
58
maxRequestLimit String
59
59
60
60
visible Boolean
61
-
62
- unallocatedItemRequests UnallocatedItemRequest []
63
61
}
64
62
65
63
model UnallocatedItemRequest {
@@ -69,8 +67,10 @@ model UnallocatedItemRequest {
69
67
partner User @relation (fields : [partnerId ] , references : [id ] , onDelete : Cascade )
70
68
partnerId Int
71
69
72
- item Item @relation (fields : [itemId ] , references : [id ] , onDelete : Cascade )
73
- itemId Int
70
+ title String
71
+ category String
72
+ expirationDate DateTime ?
73
+ unitSize Int
74
74
75
75
quantity Int
76
76
comments String
You can’t perform that action at this time.
0 commit comments