basic crud

This commit is contained in:
sbriat
2023-02-07 14:06:24 +01:00
parent 1da111bba9
commit 5b63d8ba1a
34 changed files with 1014 additions and 96 deletions

View File

@@ -13,4 +13,5 @@ CREATE TABLE "territory" (
);
-- CreateIndex
CREATE UNIQUE INDEX "territory_name_key" ON "territory"("name");
CREATE INDEX "shape_idx" ON "territory" USING GIST ("shape");

View File

@@ -14,7 +14,7 @@ datasource db {
model Territory {
uuid String @id @default(uuid()) @db.Uuid
name String
name String @unique
shape Unsupported("geometry")
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt