territory/prisma/migrations/20230206113946_init/migration.sql

17 lines
426 B
MySQL
Raw Normal View History

2023-02-06 12:50:07 +00:00
-- CreateExtension
CREATE EXTENSION IF NOT EXISTS "postgis";
-- CreateTable
CREATE TABLE "territory" (
"uuid" UUID NOT NULL,
"name" TEXT NOT NULL,
"shape" geometry NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "territory_pkey" PRIMARY KEY ("uuid")
);
-- CreateIndex
CREATE INDEX "shape_idx" ON "territory" USING GIST ("shape");