-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from usherlabs/feat/added_datasource
Feat/added Database
- Loading branch information
Showing
7 changed files
with
1,175 additions
and
1,497 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,4 +120,5 @@ cache | |
.cache | ||
|
||
# Move | ||
build | ||
build | ||
temp* |
19 changes: 19 additions & 0 deletions
19
orchestrator/prisma/migrations/20240822103300_init/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
-- CreateTable | ||
CREATE TABLE "Events" ( | ||
"id" TEXT NOT NULL PRIMARY KEY, | ||
"eventHandleId" TEXT NOT NULL, | ||
"eventSeq" INTEGER NOT NULL, | ||
"eventType" TEXT NOT NULL, | ||
"eventData" TEXT NOT NULL, | ||
"eventIndex" TEXT NOT NULL, | ||
"decoded_event_data" TEXT NOT NULL, | ||
"status" INTEGER NOT NULL, | ||
"retries" INTEGER NOT NULL, | ||
"response" TEXT NOT NULL, | ||
"executedAt" DATETIME NOT NULL, | ||
"indexedAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updateAt" DATETIME NOT NULL | ||
); | ||
|
||
-- CreateIndex | ||
CREATE INDEX "Events_eventHandleId_eventSeq_idx" ON "Events"("eventHandleId", "eventSeq"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Please do not edit this file manually | ||
# It should be added in your version-control system (i.e. Git) | ||
provider = "sqlite" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// This is your Prisma schema file, | ||
// learn more about it in the docs: https://pris.ly/d/prisma-schema | ||
|
||
generator client { | ||
provider = "prisma-client-js" | ||
} | ||
|
||
datasource db { | ||
provider = "sqlite" | ||
url = env("DATABASE_URL") | ||
} | ||
|
||
model Events{ | ||
id String @id @default(cuid()) | ||
eventHandleId String | ||
eventSeq Int | ||
eventType String | ||
eventData String | ||
eventIndex String | ||
decoded_event_data String //JSON String | ||
status Int | ||
retries Int | ||
response String //JSON String | ||
executedAt DateTime | ||
indexedAt DateTime @default(now()) | ||
updateAt DateTime @updatedAt | ||
@@index([eventHandleId, eventSeq]) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.