Skip to content

Commit

Permalink
Update transaction schema to make workflowInstanceId & workstepInstan…
Browse files Browse the repository at this point in the history
…ceId optional
  • Loading branch information
biscuitdey committed Jul 22, 2024
1 parent 0882f1e commit 43ddb3f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@
*/
-- AlterTable
ALTER TABLE "Transaction" ADD COLUMN "workflowId" TEXT NOT NULL,
ADD COLUMN "workstepId" TEXT NOT NULL;
ADD COLUMN "workstepId" TEXT NOT NULL,
ALTER COLUMN "workflowInstanceId" DROP NOT NULL,
ALTER COLUMN "workstepInstanceId" DROP NOT NULL;
4 changes: 2 additions & 2 deletions examples/bri-3/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ model Transaction {
id String @id
nonce Int
workflowId String
workflowInstanceId String
workflowInstanceId String?
workstepId String
workstepInstanceId String
workstepInstanceId String?
fromBpiSubjectAccountId String
fromBpiSubjectAccount BpiSubjectAccount @relation(fields: [fromBpiSubjectAccountId], references: [id], name: "fromBpiSubjectAccount_fk")
toBpiSubjectAccountId String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ export class TransactionStorageAgent {
data: {
id: transaction.id,
nonce: transaction.nonce,
workflowInstanceId: transaction.workflowInstanceId,
workstepInstanceId: transaction.workstepInstanceId,
workflowId: transaction.workflowId,
workstepId: transaction.workstepId,
fromBpiSubjectAccountId: transaction.fromBpiSubjectAccountId,
toBpiSubjectAccountId: transaction.toBpiSubjectAccountId,
payload: transaction.payload,
Expand Down

0 comments on commit 43ddb3f

Please sign in to comment.