feat(db): serverData added in

This commit is contained in:
2025-03-13 15:38:22 -05:00
parent 5c2d79c125
commit 3c2b10b28c
8 changed files with 1895 additions and 1 deletions

View File

@@ -0,0 +1,34 @@
CREATE TABLE "apiHits" (
"ip" text,
"endpoint" text,
"action" text,
"lastBody" text,
"stats" text,
"add_date" timestamp DEFAULT now(),
"upd_date" timestamp DEFAULT now()
);
--> statement-breakpoint
CREATE TABLE "serverData" (
"server_id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"sName" text NOT NULL,
"serverDNS" text NOT NULL,
"plantToken" text NOT NULL,
"idAddress" text NOT NULL,
"greatPlainsPlantCode" numeric NOT NULL,
"streetAddress" text NOT NULL,
"cityState" text NOT NULL,
"zipcode" numeric,
"contactEmail" text,
"contactPhone" text,
"customerTiAcc" text,
"lstServerPort" numeric DEFAULT '4000',
"active" boolean DEFAULT true,
"serverLoc" text NOT NULL,
"oldVersion" text NOT NULL,
"lastUpdated" timestamp DEFAULT now(),
"shippingHours" text DEFAULT '[{"early": "06:30", "late": "23:00"}]',
"tiPostTime" text DEFAULT '[{"from": "24", "to": "24"}]',
"otherSettings" jsonb DEFAULT '[{"specialInstructions":"something for ti","active":false}]'::jsonb NOT NULL
);
--> statement-breakpoint
CREATE UNIQUE INDEX "plantToken" ON "serverData" USING btree ("plantToken");