initial push

This commit is contained in:
Marcelo Dares
2026-03-15 15:03:56 +01:00
parent d48b9d5352
commit 65aaf9275e
146 changed files with 70245 additions and 100 deletions

View File

@@ -0,0 +1,23 @@
-- AlterEnum
ALTER TYPE "LicitationSource" ADD VALUE IF NOT EXISTS 'MUNICIPAL_OPEN_PORTAL';
-- CreateEnum
CREATE TYPE "MunicipalOpenPortalType" AS ENUM ('GENERIC', 'SAN_PEDRO_ASPX');
-- AlterTable
ALTER TABLE "Municipality"
ADD COLUMN "openPortalUrl" TEXT,
ADD COLUMN "openPortalType" "MunicipalOpenPortalType" NOT NULL DEFAULT 'GENERIC',
ADD COLUMN "openSyncIntervalDays" INTEGER NOT NULL DEFAULT 7,
ADD COLUMN "lastOpenSyncAt" TIMESTAMP(3);
-- AlterTable
ALTER TABLE "Licitation"
ADD COLUMN "tenderCode" TEXT,
ADD COLUMN "isOpen" BOOLEAN NOT NULL DEFAULT true,
ADD COLUMN "openingDate" TIMESTAMP(3),
ADD COLUMN "closingDate" TIMESTAMP(3),
ADD COLUMN "lastSeenAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP;
-- CreateIndex
CREATE INDEX "Licitation_municipalityId_isOpen_closingDate_idx" ON "Licitation"("municipalityId", "isOpen", "closingDate");