-
Notifications
You must be signed in to change notification settings - Fork 14
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 #82 from coronasafe/ocr
Get OCR working
- Loading branch information
Showing
16 changed files
with
659 additions
and
176 deletions.
There are no files selected for viewing
21 changes: 0 additions & 21 deletions
21
prisma/migrations/20230619073305_ocr_fields_added/migration.sql
This file was deleted.
Oops, something went wrong.
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,44 @@ | ||
-- CreateEnum | ||
CREATE TYPE "AssetType" AS ENUM ('CAMERA', 'MONITOR'); | ||
|
||
-- AlterTable | ||
ALTER TABLE "Asset" ADD COLUMN "bedId" INTEGER, | ||
ADD COLUMN "password" TEXT, | ||
ADD COLUMN "port" INTEGER DEFAULT 80, | ||
ADD COLUMN "type" "AssetType" NOT NULL DEFAULT 'MONITOR', | ||
ADD COLUMN "username" TEXT; | ||
|
||
-- CreateTable | ||
CREATE TABLE "Bed" ( | ||
"id" SERIAL NOT NULL, | ||
"name" TEXT NOT NULL, | ||
"externalId" TEXT NOT NULL, | ||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"deleted" BOOLEAN NOT NULL DEFAULT false, | ||
|
||
CONSTRAINT "Bed_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "Preset" ( | ||
"id" SERIAL NOT NULL, | ||
"x" INTEGER NOT NULL, | ||
"y" INTEGER NOT NULL, | ||
"zoom" INTEGER NOT NULL DEFAULT 0, | ||
"bedId" INTEGER NOT NULL, | ||
|
||
CONSTRAINT "Preset_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "Bed_externalId_key" ON "Bed"("externalId"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "Preset_bedId_key" ON "Preset"("bedId"); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Asset" ADD CONSTRAINT "Asset_bedId_fkey" FOREIGN KEY ("bedId") REFERENCES "Bed"("id") ON DELETE SET NULL ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Preset" ADD CONSTRAINT "Preset_bedId_fkey" FOREIGN KEY ("bedId") REFERENCES "Bed"("id") ON DELETE RESTRICT ON UPDATE CASCADE; |
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
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.