From 0dc80a30b2fc2ea21d1cc2989243ea31bfa49235 Mon Sep 17 00:00:00 2001 From: James Holcombe Date: Fri, 6 Jun 2025 15:10:13 +0100 Subject: [PATCH 01/18] plot legend as SVG, export working --- .../data/plots/[plotId]/definition/page.tsx | 145 --------- .../data/plots/[plotId]/layout.tsx | 34 -- .../[projectId]/data/plots/[plotId]/page.tsx | 51 ++- .../data/plots/[plotId]/view/page.tsx | 35 -- .../data/plot/definition/layout.tsx | 174 +++++----- .../data/plot/definition/plot-sidebar.tsx | 160 +++++++++ .../definition/sections/section-wrapper.tsx | 17 +- .../components/data/plot/form/axis-form.tsx | 6 +- .../data/plot/form/grouping-form.tsx | 1 + .../components/data/plot/plot-data-view.tsx | 103 ------ .../src/components/data/plot/plot-export.ts | 89 ++++- .../src/components/data/plot/plot-nav-bar.tsx | 73 ----- .../plot/{plot-preview.tsx => plot-view.tsx} | 2 +- .../components/data/plot/plots/bar-plot.tsx | 3 + .../src/components/data/plot/plots/common.tsx | 25 +- .../data/plot/plots/histogram-plot.tsx | 3 + .../src/components/data/plot/plots/legend.tsx | 307 ++++++++++++------ .../components/data/plot/plots/line-plot.tsx | 3 + .../data/plot/plots/scatter-plot.tsx | 3 + .../app/src/components/ui/auto-complete.tsx | 4 +- packages/app/src/components/ui/tabs.tsx | 4 +- 21 files changed, 634 insertions(+), 608 deletions(-) delete mode 100644 packages/app/src/app/(app)/projects/[projectId]/data/plots/[plotId]/definition/page.tsx delete mode 100644 packages/app/src/app/(app)/projects/[projectId]/data/plots/[plotId]/layout.tsx delete mode 100644 packages/app/src/app/(app)/projects/[projectId]/data/plots/[plotId]/view/page.tsx create mode 100644 packages/app/src/components/data/plot/definition/plot-sidebar.tsx delete mode 100644 packages/app/src/components/data/plot/plot-data-view.tsx delete mode 100644 packages/app/src/components/data/plot/plot-nav-bar.tsx rename packages/app/src/components/data/plot/{plot-preview.tsx => plot-view.tsx} (98%) diff --git a/packages/app/src/app/(app)/projects/[projectId]/data/plots/[plotId]/definition/page.tsx b/packages/app/src/app/(app)/projects/[projectId]/data/plots/[plotId]/definition/page.tsx deleted file mode 100644 index fd13d762..00000000 --- a/packages/app/src/app/(app)/projects/[projectId]/data/plots/[plotId]/definition/page.tsx +++ /dev/null @@ -1,145 +0,0 @@ -import { PlotDefinitionLayout } from "@/components/data/plot/definition/layout"; -import { GeneralSection } from "@/components/data/plot/definition/sections/general-section"; -import { AxesSection } from "@/components/data/plot/definition/sections/axes-section"; - -import { LineStyleSection } from "@/components/data/plot/definition/sections/line-style-section"; -import { notFound } from "next/navigation"; - -import { parseIntParam } from "@/lib/routing"; -import { type Plot, type PlotDefinition } from "@common/db/schema/plot"; -import { GroupingSection } from "@/components/data/plot/definition/sections/grouping-section"; -import { schemaConfig } from "@/lib/ags/summary/data"; -import { - getPlotData, - getColumnsForPlot, - getPlotForProject, -} from "@/lib/dal/plots"; -import { DistributionSection } from "@/components/data/plot/definition/sections/distribution-section"; -import { ReferenceLinesSection } from "@/components/data/plot/definition/sections/reference-lines-section"; -import { TextLabelsSection } from "@/components/data/plot/definition/sections/text-labels-section"; -import { getCustomTablesForProject } from "@/lib/dal/custom-tables"; -import { getProjectForUser } from "@/lib/dal/projects"; -import { getServerUser } from "@/lib/auth"; - -const tables = schemaConfig.map((table) => ({ - tableName: table.dbName, - label: table.label, -})); - -interface Props { - params: { - projectId: string; - plotId: string; - }; - searchParams: { - section?: string; - }; -} - -export default async function PlotDefinitionPage({ - params, - searchParams: { section = "general" }, -}: Props) { - const plotId = parseIntParam(params.plotId); - const projectId = parseIntParam(params.projectId); - const user = await getServerUser(); - const { project } = await getProjectForUser(user, projectId); - - if (!project) { - return notFound(); - } - - const [customTables, plot] = await Promise.all([ - getCustomTablesForProject(projectId), - getPlotForProject(projectId, plotId), - ]); - - if (!plot) { - return notFound(); - } - - const data = (await getPlotData(plot, projectId)) ?? []; - const columns = getColumnsForPlot(plot, customTables); - - const renderSection = () => { - switch (section) { - case "general": - return ( - - ); - case "axes": - return ; - case "grouping": - return ( - - ); - case "line-style": - if (plot.definition?.type !== "line") return null; - return ( - ; - } - } - /> - ); - case "distribution": - if (plot.definition?.type !== "histogram") return null; - return ( - ; - } - } - /> - ); - case "reference-lines": - if (plot.definition?.type !== "scatter") return null; - return ( - ; - } - } - /> - ); - case "text-labels": - if (plot.definition?.type !== "scatter") return null; - return ( - ; - } - } - /> - ); - default: - return null; - } - }; - - return ( - - {renderSection()} - - ); -} diff --git a/packages/app/src/app/(app)/projects/[projectId]/data/plots/[plotId]/layout.tsx b/packages/app/src/app/(app)/projects/[projectId]/data/plots/[plotId]/layout.tsx deleted file mode 100644 index 260a7ab5..00000000 --- a/packages/app/src/app/(app)/projects/[projectId]/data/plots/[plotId]/layout.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { getServerUser } from "@/lib/auth"; -import { getProjectForUser } from "@/lib/dal/projects"; -import { parseIntParam } from "@/lib/routing"; -import { notFound } from "next/navigation"; -import { PlotNavBar } from "@/components/data/plot/plot-nav-bar"; -import { getPlotForProject } from "@/lib/dal/plots"; -type Props = { - params: { projectId: string; plotId: string }; - children: React.ReactNode; -}; - -export default async function Layout({ params, children }: Props) { - const projectId = parseIntParam(params.projectId); - const user = await getServerUser(); - const { project } = await getProjectForUser(user, projectId); - - if (!project) { - notFound(); - } - - const plotId = parseIntParam(params.plotId); - const plot = await getPlotForProject(projectId, plotId); - - if (!plot) { - notFound(); - } - - return ( -
- -
{children}
-
- ); -} diff --git a/packages/app/src/app/(app)/projects/[projectId]/data/plots/[plotId]/page.tsx b/packages/app/src/app/(app)/projects/[projectId]/data/plots/[plotId]/page.tsx index 4f0d6a35..7af0543e 100644 --- a/packages/app/src/app/(app)/projects/[projectId]/data/plots/[plotId]/page.tsx +++ b/packages/app/src/app/(app)/projects/[projectId]/data/plots/[plotId]/page.tsx @@ -1,32 +1,57 @@ import { getServerUser } from "@/lib/auth"; -import { getPlotForProject } from "@/lib/dal/plots"; +import { + getPlotForProject, + getPlotData, + getColumnsForPlot, +} from "@/lib/dal/plots"; import { getProjectForUser } from "@/lib/dal/projects"; import { parseIntParam } from "@/lib/routing"; -import { notFound, redirect } from "next/navigation"; +import { notFound } from "next/navigation"; +import { getCustomTablesForProject } from "@/lib/dal/custom-tables"; +import { schemaConfig } from "@/lib/ags/summary/data"; +import { PlotLayout } from "@/components/data/plot/definition/layout"; -type Props = { +const tables = schemaConfig.map((table) => ({ + tableName: table.dbName, + label: table.label, +})); + +interface Props { params: { projectId: string; plotId: string }; -}; + searchParams: { tab?: string }; +} -export default async function Page({ params }: Props) { +export default async function PlotPage({ params, searchParams }: Props) { const projectId = parseIntParam(params.projectId); + const plotId = parseIntParam(params.plotId); const user = await getServerUser(); const { project } = await getProjectForUser(user, projectId); if (!project) { - notFound(); + return notFound(); } - const plotId = parseIntParam(params.plotId); - const plot = await getPlotForProject(projectId, plotId); + const [customTables, plot] = await Promise.all([ + getCustomTablesForProject(projectId), + getPlotForProject(projectId, plotId), + ]); if (!plot) { - notFound(); + return notFound(); } - if (!plot.definition) { - redirect(`/projects/${projectId}/data/plots/${plotId}/definition`); - } + const data = (await getPlotData(plot, projectId)) ?? []; + const columns = getColumnsForPlot(plot, customTables); - redirect(`/projects/${projectId}/data/plots/${plotId}/view`); + return ( + + ); } diff --git a/packages/app/src/app/(app)/projects/[projectId]/data/plots/[plotId]/view/page.tsx b/packages/app/src/app/(app)/projects/[projectId]/data/plots/[plotId]/view/page.tsx deleted file mode 100644 index 25423230..00000000 --- a/packages/app/src/app/(app)/projects/[projectId]/data/plots/[plotId]/view/page.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import { getServerUser } from "@/lib/auth"; -import { getProjectForUser } from "@/lib/dal/projects"; -import { parseIntParam } from "@/lib/routing"; -import { notFound, redirect } from "next/navigation"; -import { PlotDataView } from "@/components/data/plot/plot-data-view"; -import { getPlotData, getPlotForProject } from "@/lib/dal/plots"; - -type Props = { - params: { projectId: string; plotId: string }; -}; - -export default async function Page({ params }: Props) { - const projectId = parseIntParam(params.projectId); - const user = await getServerUser(); - const { project } = await getProjectForUser(user, projectId); - - if (!project) { - notFound(); - } - - const plotId = parseIntParam(params.plotId); - const plot = await getPlotForProject(projectId, plotId); - - if (!plot) { - notFound(); - } - - if (!plot.definition) { - redirect(`/projects/${projectId}/data/plots/${plotId}/definition`); - } - - const data = (await getPlotData(plot, projectId)) ?? []; - - return ; -} diff --git a/packages/app/src/components/data/plot/definition/layout.tsx b/packages/app/src/components/data/plot/definition/layout.tsx index 1f480835..f3b60b2d 100644 --- a/packages/app/src/components/data/plot/definition/layout.tsx +++ b/packages/app/src/components/data/plot/definition/layout.tsx @@ -1,100 +1,128 @@ "use client"; -import { type ReactNode, useMemo } from "react"; -import { PlotDefinitionNav } from "./nav"; -import { cn } from "@/utils/styles"; +import { useRef, useState } from "react"; import { CustomTable } from "@common/db/schema/custom_table"; -import { - getTotalValidationErrors, - Plot, - PlotDefinition, -} from "@common/db/schema/plot"; -import { ScrollArea } from "@/components/ui/scroll-area"; +import { Plot, PlotDefinition } from "@common/db/schema/plot"; + +import { PlotView } from "../plot-view"; -import { Badge } from "@/components/ui/badge"; -import { pluralize } from "@/utils/helpers"; -import { AlertCircle } from "lucide-react"; -import { Separator } from "@/components/ui/separator"; import { Button } from "@/components/ui/button"; -import { PlotPreview } from "../plot-preview"; -import { - HoverCard, - HoverCardContent, - HoverCardTrigger, -} from "@/components/ui/hover-card"; -import Link from "next/link"; +import { DownloadIcon, PanelRight } from "lucide-react"; +import { toast } from "sonner"; +import { exportPlotAsImage } from "../plot-export"; +import { ResizableBox } from "react-resizable"; +import "react-resizable/css/styles.css"; +import { useLocalStorage } from "@uidotdev/usehooks"; +import { cn } from "@/utils/styles"; + +import { PlotSidebar } from "./plot-sidebar"; + +interface PlotDimensions { + width: number; + height: number; +} + +const DEFAULT_DIMENSIONS: PlotDimensions = { + width: 700, + height: 450, +}; + interface PlotDefinitionLayoutProps { - children: ReactNode; plotType: "scatter" | "line" | "histogram" | "bar"; - section: string; plot: Plot; customTables: CustomTable[]; data: Record[]; + columns: { id: string; name: string; table: string }[]; + tables: { tableName: string; label: string }[]; + initialTab?: string; } -export function PlotDefinitionLayout({ - children, +export function PlotLayout({ plotType, - section, plot, customTables, data, + columns, + tables, }: PlotDefinitionLayoutProps) { - const errorCount = useMemo( - () => getTotalValidationErrors(plot.definition), - [plot.definition], + const plotRef = useRef(null); + const [dimensions, setDimensions] = useLocalStorage( + "plot-dimensions", + DEFAULT_DIMENSIONS, ); + const [sidebarOpen, setSidebarOpen] = useState(false); return ( -
-
-
-

Sections

- {errorCount > 0 && ( - - - {errorCount} {pluralize("issue", errorCount)} - - )} -
+
+ {/* Main plot preview area */} +
+
+ -
- - - - - - - setSidebarOpen(!sidebarOpen)} > - - - - + Edit Plot + + )} +
+
+ { + setDimensions({ width: size.width, height: size.height }); + }} + minConstraints={[300, 200]} + maxConstraints={[1200, 800]} + handleSize={[20, 20]} + className="flex items-center justify-center bg-background p-4" + > + +
- {children} + + {/* Right sidebar */} +
+ +
); } diff --git a/packages/app/src/components/data/plot/definition/plot-sidebar.tsx b/packages/app/src/components/data/plot/definition/plot-sidebar.tsx new file mode 100644 index 00000000..d078d31e --- /dev/null +++ b/packages/app/src/components/data/plot/definition/plot-sidebar.tsx @@ -0,0 +1,160 @@ +"use client"; + +import { AxesSection } from "@/components/data/plot/definition/sections/axes-section"; +import { DistributionSection } from "@/components/data/plot/definition/sections/distribution-section"; +import { GeneralSection } from "@/components/data/plot/definition/sections/general-section"; +import { GroupingSection } from "@/components/data/plot/definition/sections/grouping-section"; +import { LineStyleSection } from "@/components/data/plot/definition/sections/line-style-section"; +import { ReferenceLinesSection } from "@/components/data/plot/definition/sections/reference-lines-section"; +import { TextLabelsSection } from "@/components/data/plot/definition/sections/text-labels-section"; +import { Button } from "@/components/ui/button"; +import { TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; +import { Tabs } from "@/components/ui/tabs"; +import { CustomTable } from "@common/db/schema/custom_table"; + +import { Plot, PlotDefinition } from "@common/db/schema/plot"; + +import { useState } from "react"; +import { X } from "lucide-react"; +type Props = { + plot: Plot; + customTables: CustomTable[]; + plotType: "scatter" | "line" | "histogram" | "bar"; + columns: { id: string; name: string; table: string }[]; + tables: { tableName: string; label: string }[]; + setSidebarOpen: (_open: boolean) => void; +}; + +export function PlotSidebar({ + plot, + customTables, + plotType, + columns, + tables, + setSidebarOpen, +}: Props) { + // State to control the active tab, synced with URL + const [activeTab, setActiveTab] = useState("general"); + + const updateTab = (tab: string) => { + setActiveTab(tab); + }; + + return ( + + ); +} diff --git a/packages/app/src/components/data/plot/definition/sections/section-wrapper.tsx b/packages/app/src/components/data/plot/definition/sections/section-wrapper.tsx index 689dad2a..b1798614 100644 --- a/packages/app/src/components/data/plot/definition/sections/section-wrapper.tsx +++ b/packages/app/src/components/data/plot/definition/sections/section-wrapper.tsx @@ -7,6 +7,7 @@ import { CardHeader, CardTitle, } from "@/components/ui/card"; +import { ScrollArea } from "@/components/ui/scroll-area"; import { type ReactNode } from "react"; interface SectionWrapperProps { @@ -21,12 +22,14 @@ export function SectionWrapper({ children, }: SectionWrapperProps) { return ( - - - {title} - {description && {description}} - - {children} - + + + + {title} + {description && {description}} + + {children} + + ); } diff --git a/packages/app/src/components/data/plot/form/axis-form.tsx b/packages/app/src/components/data/plot/form/axis-form.tsx index d41ef738..bad195fa 100644 --- a/packages/app/src/components/data/plot/form/axis-form.tsx +++ b/packages/app/src/components/data/plot/form/axis-form.tsx @@ -33,7 +33,7 @@ export function AxisForm({ return (
{label} -
+
-
+
{hasCustomDomain && ( -
+
diff --git a/packages/app/src/components/data/plot/plot-data-view.tsx b/packages/app/src/components/data/plot/plot-data-view.tsx deleted file mode 100644 index be10b0d2..00000000 --- a/packages/app/src/components/data/plot/plot-data-view.tsx +++ /dev/null @@ -1,103 +0,0 @@ -"use client"; -import { DownloadIcon } from "lucide-react"; -import { useRef } from "react"; -import { Button } from "@/components/ui/button"; -import { toast } from "sonner"; -import { exportPlotAsImage } from "./plot-export"; -import { PlotPreview } from "./plot-preview"; -import { ResizableBox } from "react-resizable"; -import "react-resizable/css/styles.css"; -import { useLocalStorage } from "@uidotdev/usehooks"; - -import { Plot, PlotDefinition } from "@common/db/schema/plot"; -import { isDefined } from "@/utils/helpers"; - -// Add custom styles for resize handles -const styles = ` - .react-resizable-handle { - opacity: 0; - transition: opacity 0.2s ease-in-out; - height: 20px; - width: 20px; - } - .react-resizable:hover .react-resizable-handle { - opacity: 1; - } -`; - -interface PlotDimensions { - width: number; - height: number; -} - -const DEFAULT_DIMENSIONS: PlotDimensions = { - width: 700, - height: 450, -}; - -export function PlotDataView({ - plot, - data, -}: { - projectId: number; - plot: Plot; - data: Record[]; -}) { - const plotRef = useRef(null); - const [dimensions, setDimensions] = useLocalStorage( - "plot-dimensions", - DEFAULT_DIMENSIONS, - ); - - return ( -
- -
-
- -
-
- -
-

{plot.name}

-
-
- {isDefined(plot.definition) && ( - { - setDimensions({ width: size.width, height: size.height }); - }} - minConstraints={[300, 200]} - maxConstraints={[1200, 800]} - handleSize={[20, 20]} - className="flex items-center justify-center bg-background p-4" - > - - - )} -
-
- ); -} diff --git a/packages/app/src/components/data/plot/plot-export.ts b/packages/app/src/components/data/plot/plot-export.ts index 07fb6239..042bc235 100644 --- a/packages/app/src/components/data/plot/plot-export.ts +++ b/packages/app/src/components/data/plot/plot-export.ts @@ -1,28 +1,81 @@ import { Plot } from "@common/db/schema/plot"; -import html2canvas from "html2canvas"; export async function exportPlotAsImage(plotElement: HTMLElement, plot: Plot) { try { - // Use html2canvas to capture the plot element - const canvas = await html2canvas(plotElement, { - backgroundColor: "#ffffff", - scale: 2, // Higher quality - logging: false, - useCORS: true, - }); - - // Convert to blob - const blob = await new Promise((resolve) => { - canvas.toBlob((blob: Blob | null) => { - if (blob) resolve(blob); - }, "image/png"); - }); - - // Create download link + // Find the plot SVG and legend SVG + const plotSvg = plotElement.querySelector( + // eslint-disable-next-line quotes + '[data-plot="true"]', + ) as SVGElement; + const legendSvg = plotElement.querySelector( + // eslint-disable-next-line quotes + '[data-legend="true"]', + ) as SVGElement; + + if (!plotSvg) { + throw new Error("Plot SVG not found"); + } + + // Create a new SVG that will contain both plot and legend + const combinedSvg = document.createElementNS( + "http://www.w3.org/2000/svg", + "svg", + ); + + // Get dimensions + const plotBox = plotSvg.getBoundingClientRect(); + const legendBox = legendSvg?.getBoundingClientRect(); + + // Set the combined SVG dimensions + const totalWidth = Math.max(plotBox.width, legendBox?.width || 0); + const totalHeight = plotBox.height + (legendBox?.height || 0); + + combinedSvg.setAttribute("width", String(totalWidth)); + combinedSvg.setAttribute("height", String(totalHeight)); + combinedSvg.setAttribute("viewBox", `0 0 ${totalWidth} ${totalHeight}`); + + // Clone the plot SVG + const plotClone = plotSvg.cloneNode(true) as SVGElement; + plotClone.setAttribute("width", String(plotBox.width)); + plotClone.setAttribute("height", String(plotBox.height)); + + // Create a group for the plot + const plotGroup = document.createElementNS( + "http://www.w3.org/2000/svg", + "g", + ); + plotGroup.appendChild(plotClone); + combinedSvg.appendChild(plotGroup); + + // If legend exists, add it below the plot + if (legendSvg) { + const legendClone = legendSvg.cloneNode(true) as SVGElement; + const legendGroup = document.createElementNS( + "http://www.w3.org/2000/svg", + "g", + ); + + // Center the legend + const legendX = (totalWidth - legendBox.width) / 2; + legendGroup.setAttribute( + "transform", + `translate(${legendX}, ${plotBox.height})`, + ); + + legendGroup.appendChild(legendClone); + combinedSvg.appendChild(legendGroup); + } + + // Convert to SVG string + const serializer = new XMLSerializer(); + const svgString = serializer.serializeToString(combinedSvg); + + // Create blob and download + const blob = new Blob([svgString], { type: "image/svg+xml" }); const url = URL.createObjectURL(blob); const link = document.createElement("a"); link.href = url; - link.download = `${plot.name.toLowerCase().replace(/\s+/g, "-")}.png`; + link.download = `${plot.name.toLowerCase().replace(/\s+/g, "-")}.svg`; document.body.appendChild(link); link.click(); document.body.removeChild(link); diff --git a/packages/app/src/components/data/plot/plot-nav-bar.tsx b/packages/app/src/components/data/plot/plot-nav-bar.tsx deleted file mode 100644 index e4003883..00000000 --- a/packages/app/src/components/data/plot/plot-nav-bar.tsx +++ /dev/null @@ -1,73 +0,0 @@ -"use client"; - -import { NavTabs } from "@/components/common/nav-tabs"; -import { usePathname } from "next/navigation"; -import { BreadcrumbSetter } from "../breadcrumb-setter"; -import { Plot } from "@common/db/schema/plot"; -import { InlineInput } from "@/components/ui/inline-input"; -import { updatePlotAction } from "@/actions/data/plots/updatePlot"; -import { toast } from "sonner"; - -export function PlotNavBar({ - projectId, - plotId, - plot, -}: { - projectId: number; - plotId: number; - plot: Plot; -}) { - const pathname = usePathname(); - - const tabs = [ - { - name: "View", - href: `/projects/${projectId}/data/plots/${plotId}/view`, - active: pathname === `/projects/${projectId}/data/plots/${plotId}/view`, - disabled: !plot.definition, - disabledMessage: "Definition must be configured to view data", - }, - { - name: "Definition", - href: `/projects/${projectId}/data/plots/${plotId}/definition`, - active: - pathname === `/projects/${projectId}/data/plots/${plotId}/definition`, - }, - ]; - - async function handleNameChange(name: string) { - if (name === plot.name) return; - await updatePlotAction(projectId, plot.id, { name }); - toast.success("Plot name updated"); - } - - return ( -
- - { - handleNameChange(e.target.value); - }} - /> - tab.active)?.name || "", - href: tabs.find((tab) => tab.active)?.href || "", - }, - ]} - /> -
- ); -} diff --git a/packages/app/src/components/data/plot/plot-preview.tsx b/packages/app/src/components/data/plot/plot-view.tsx similarity index 98% rename from packages/app/src/components/data/plot/plot-preview.tsx rename to packages/app/src/components/data/plot/plot-view.tsx index 88b1c57d..0a134fc2 100644 --- a/packages/app/src/components/data/plot/plot-preview.tsx +++ b/packages/app/src/components/data/plot/plot-view.tsx @@ -12,7 +12,7 @@ import { BarPlot } from "./plots/bar-plot"; import { cn } from "@/lib/utils"; import { CommonPlotProps } from "./plots/common"; -export function PlotPreview({ +export function PlotView({ plot, data, className, diff --git a/packages/app/src/components/data/plot/plots/bar-plot.tsx b/packages/app/src/components/data/plot/plots/bar-plot.tsx index 1b6d8ff7..934e9014 100644 --- a/packages/app/src/components/data/plot/plots/bar-plot.tsx +++ b/packages/app/src/components/data/plot/plots/bar-plot.tsx @@ -140,6 +140,9 @@ export function BarPlot({ typeof height === "number" ? height : containerRef.current.clientHeight, }); + // Add data-plot attribute to the SVG + chart.setAttribute("data-plot", "true"); + containerRef.current.append(chart); return () => { diff --git a/packages/app/src/components/data/plot/plots/common.tsx b/packages/app/src/components/data/plot/plots/common.tsx index 8cbeb83d..64367d3f 100644 --- a/packages/app/src/components/data/plot/plots/common.tsx +++ b/packages/app/src/components/data/plot/plots/common.tsx @@ -83,15 +83,21 @@ export function getPlotOptions( const yAxis = definition.type === "histogram" ? undefined : definition.yAxis; const colorGrouping = definition.grouping?.color; + const MARGIN = 50; + const options: PlotOptions = { className: "text-sm", - marginRight: 60, - marginBottom: 40, - marginLeft: 60, + + marginRight: MARGIN, + marginBottom: MARGIN, + marginLeft: MARGIN, + marginTop: MARGIN, + clip: true, x: { label: xAxis.label ?? xAxis.column, + labelArrow: false, type: xAxis.scale ?? "linear", labelAnchor: "center", domain: isDefined(xAxis.domainTickOptions) @@ -122,6 +128,7 @@ export function getPlotOptions( if (yAxis) { options.y = { label: yAxis.label ?? yAxis.column, + labelArrow: false, type: "linear", labelAnchor: "center", domain: yAxis.domainTickOptions @@ -177,6 +184,15 @@ export function getCommonMarks( Plot.frame(), Plot.gridX(), Plot.gridY(), + Plot.text([{ text: plot.name }], { + x: 0.5, + y: 1, + frameAnchor: "top", + fontSize: 16, + fontWeight: "bold", + dy: -20, + text: (d) => d.text, + }), ...additionalMarks, ]; @@ -244,7 +260,8 @@ export interface CommonLegendProps { colorSchemeType?: "categorical" | "continuous"; } -export const PLOT_CONTAINER_CLASSES = "flex w-full flex-col items-center gap-1"; +export const PLOT_CONTAINER_CLASSES = + "flex w-full flex-col items-center gap-16"; export const PLOT_CLASSES = "mx-auto flex-grow text-lg text-sm"; export interface DataPoint { diff --git a/packages/app/src/components/data/plot/plots/histogram-plot.tsx b/packages/app/src/components/data/plot/plots/histogram-plot.tsx index 0c41db4e..cba9f2c1 100644 --- a/packages/app/src/components/data/plot/plots/histogram-plot.tsx +++ b/packages/app/src/components/data/plot/plots/histogram-plot.tsx @@ -102,6 +102,9 @@ export function HistogramPlot({ typeof height === "number" ? height : containerRef.current.clientHeight, }); + // Add data-plot attribute to the SVG + chart.setAttribute("data-plot", "true"); + containerRef.current.append(chart); return () => { diff --git a/packages/app/src/components/data/plot/plots/legend.tsx b/packages/app/src/components/data/plot/plots/legend.tsx index 66c92651..8f032d4a 100644 --- a/packages/app/src/components/data/plot/plots/legend.tsx +++ b/packages/app/src/components/data/plot/plots/legend.tsx @@ -1,4 +1,3 @@ -import { cn } from "@/lib/utils"; import { AVAILABLE_SYMBOLS, OBSERVABLE_COLORS } from "./common"; import type { SymbolType } from "@observablehq/plot"; @@ -8,67 +7,119 @@ interface LegendItemProps { symbol?: SymbolType; isFiltered: boolean; onClick?: () => void; + x: number; + y: number; } +const ITEM_HEIGHT = 24; +const ITEM_WIDTH = 120; +const SYMBOL_SIZE = 16; +const TEXT_OFFSET = 26; +const SECTION_HEADER_PADDING = 16; + function LegendItem({ label, color, symbol, isFiltered, onClick, + x, + y, }: LegendItemProps) { return ( - + + {/* Label */} + + {label} + + ); } @@ -78,18 +129,20 @@ interface ColorLegendProps { schemeType?: "categorical" | "continuous"; onColorClick?: (_color: string) => void; filteredColors?: Set; + x?: number; + y?: number; } -export function ColorLegend({ +function ColorLegend({ colors, label, - onColorClick, filteredColors = new Set(), + x = 0, + y = 0, }: ColorLegendProps) { if (!colors.length) return null; - // Map colors to Observable's default scheme const colorMap = new Map( colors.map((color, index) => [ color, @@ -97,21 +150,38 @@ export function ColorLegend({ ]), ); + const ITEMS_PER_ROW = 3; + return ( -
-
{label}
-
- {colors.map((color) => ( - onColorClick?.(color)} - /> - ))} -
-
+ + + {label} + + {colors.map((color, i) => ( + onColorClick?.(color)} + x={(i % ITEMS_PER_ROW) * (ITEM_WIDTH + 8)} + y={ + Math.floor(i / ITEMS_PER_ROW) * ITEM_HEIGHT + + SECTION_HEADER_PADDING + + 16 + } + /> + ))} + ); } @@ -120,31 +190,52 @@ interface SymbolLegendProps { label: string; onSymbolClick?: (_symbol: string) => void; filteredSymbols?: Set; + x?: number; + y?: number; } -export function SymbolLegend({ +function SymbolLegend({ symbols, label, onSymbolClick, filteredSymbols = new Set(), + x = 0, + y = 0, }: SymbolLegendProps) { if (!symbols.length) return null; + const ITEMS_PER_ROW = 2; + return ( -
-
{label}
-
- {symbols.map((symbol, index) => ( - onSymbolClick?.(symbol)} - /> - ))} -
-
+ + + {label} + + {symbols.map((symbol, i) => ( + onSymbolClick?.(symbol)} + x={(i % ITEMS_PER_ROW) * (ITEM_WIDTH + 8)} + y={ + Math.floor(i / ITEMS_PER_ROW) * ITEM_HEIGHT + + SECTION_HEADER_PADDING + + 16 + } + /> + ))} + ); } @@ -165,7 +256,6 @@ interface PlotLegendProps { export function PlotLegend({ showColorLegend = true, showSymbolLegend = true, - colorDomain, colorLabel, symbolDomain, @@ -181,25 +271,50 @@ export function PlotLegend({ if (!colors.length && !symbols.length) return null; + const colorLegendHeight = colors.length + ? Math.ceil(colors.length / 3) * ITEM_HEIGHT + 24 + : 0; + const symbolLegendHeight = symbols.length + ? Math.ceil(symbols.length / 2) * ITEM_HEIGHT + 24 + : 0; + const totalHeight = + colorLegendHeight + + symbolLegendHeight + + (colors.length && symbols.length ? 16 : 0) + + 16; + + const totalWidth = + Math.max(colors.length ? 3 : 0, symbols.length ? 2 : 0) * (ITEM_WIDTH + 8); + return ( -
- {showColorLegend && colors.length > 0 && colorLabel && ( - - )} - {showSymbolLegend && symbols.length > 0 && symbolLabel && ( - - )} +
+ + + {showColorLegend && colors.length > 0 && colorLabel && ( + + )} + {showSymbolLegend && symbols.length > 0 && symbolLabel && ( + + )} + +
); } diff --git a/packages/app/src/components/data/plot/plots/line-plot.tsx b/packages/app/src/components/data/plot/plots/line-plot.tsx index 0e3680f2..199ff9bb 100644 --- a/packages/app/src/components/data/plot/plots/line-plot.tsx +++ b/packages/app/src/components/data/plot/plots/line-plot.tsx @@ -111,6 +111,9 @@ export function LinePlot({ typeof height === "number" ? height : containerRef.current.clientHeight, }); + // Add data-plot attribute to the SVG + chart.setAttribute("data-plot", "true"); + containerRef.current.append(chart); return () => { diff --git a/packages/app/src/components/data/plot/plots/scatter-plot.tsx b/packages/app/src/components/data/plot/plots/scatter-plot.tsx index cb24e451..a0a03c1f 100644 --- a/packages/app/src/components/data/plot/plots/scatter-plot.tsx +++ b/packages/app/src/components/data/plot/plots/scatter-plot.tsx @@ -130,6 +130,9 @@ export function ScatterPlot({ typeof height === "number" ? height : containerRef.current.clientHeight, }); + // Add data-plot attribute to the SVG + chart.setAttribute("data-plot", "true"); + containerRef.current.append(chart); return () => { diff --git a/packages/app/src/components/ui/auto-complete.tsx b/packages/app/src/components/ui/auto-complete.tsx index 0d4f557a..4d932b34 100644 --- a/packages/app/src/components/ui/auto-complete.tsx +++ b/packages/app/src/components/ui/auto-complete.tsx @@ -34,6 +34,7 @@ type Props = { disabled?: boolean; className?: string; popoverClassName?: string; + triggerClassName?: string; showClearButton?: boolean; }; @@ -47,6 +48,7 @@ export default function AutoComplete({ className, popoverClassName, showClearButton = false, + triggerClassName, }: Props) { const [open, setOpen] = React.useState(false); @@ -61,7 +63,7 @@ export default function AutoComplete({ role="combobox" disabled={disabled} aria-expanded={open} - className="overflow-hidden text-ellipsis" + className={cn("overflow-hidden text-ellipsis", triggerClassName)} > {selectedOption ? options.find((option) => option.value === selectedOption) diff --git a/packages/app/src/components/ui/tabs.tsx b/packages/app/src/components/ui/tabs.tsx index 40068236..885f4047 100644 --- a/packages/app/src/components/ui/tabs.tsx +++ b/packages/app/src/components/ui/tabs.tsx @@ -14,7 +14,7 @@ const TabsList = React.forwardRef< Date: Fri, 6 Jun 2025 15:42:17 +0100 Subject: [PATCH 02/18] plot updates --- .../src/components/data/plot/plot-export.ts | 43 ++++++++++++++----- .../components/data/plot/plots/bar-plot.tsx | 2 + .../src/components/data/plot/plots/common.tsx | 31 +++++++------ .../data/plot/plots/histogram-plot.tsx | 4 +- .../components/data/plot/plots/line-plot.tsx | 2 + .../data/plot/plots/scatter-plot.tsx | 2 + 6 files changed, 60 insertions(+), 24 deletions(-) diff --git a/packages/app/src/components/data/plot/plot-export.ts b/packages/app/src/components/data/plot/plot-export.ts index 042bc235..0e4310b9 100644 --- a/packages/app/src/components/data/plot/plot-export.ts +++ b/packages/app/src/components/data/plot/plot-export.ts @@ -2,7 +2,11 @@ import { Plot } from "@common/db/schema/plot"; export async function exportPlotAsImage(plotElement: HTMLElement, plot: Plot) { try { - // Find the plot SVG and legend SVG + // Find all SVG elements + const titleSvg = plotElement.querySelector( + // eslint-disable-next-line quotes + '[data-plot-title="true"]', + ) as SVGElement; const plotSvg = plotElement.querySelector( // eslint-disable-next-line quotes '[data-plot="true"]', @@ -16,38 +20,55 @@ export async function exportPlotAsImage(plotElement: HTMLElement, plot: Plot) { throw new Error("Plot SVG not found"); } - // Create a new SVG that will contain both plot and legend + // Create a new SVG that will contain all elements const combinedSvg = document.createElementNS( "http://www.w3.org/2000/svg", "svg", ); // Get dimensions + const titleBox = titleSvg?.getBoundingClientRect(); const plotBox = plotSvg.getBoundingClientRect(); const legendBox = legendSvg?.getBoundingClientRect(); // Set the combined SVG dimensions - const totalWidth = Math.max(plotBox.width, legendBox?.width || 0); - const totalHeight = plotBox.height + (legendBox?.height || 0); + const totalWidth = Math.max( + plotBox.width, + legendBox?.width || 0, + titleBox?.width || 0, + ); + const totalHeight = + (titleBox?.height || 0) + plotBox.height + (legendBox?.height || 0); combinedSvg.setAttribute("width", String(totalWidth)); combinedSvg.setAttribute("height", String(totalHeight)); combinedSvg.setAttribute("viewBox", `0 0 ${totalWidth} ${totalHeight}`); - // Clone the plot SVG - const plotClone = plotSvg.cloneNode(true) as SVGElement; - plotClone.setAttribute("width", String(plotBox.width)); - plotClone.setAttribute("height", String(plotBox.height)); + // Add title if it exists + if (titleSvg) { + const titleClone = titleSvg.cloneNode(true) as SVGElement; + const titleGroup = document.createElementNS( + "http://www.w3.org/2000/svg", + "g", + ); + titleGroup.appendChild(titleClone); + combinedSvg.appendChild(titleGroup); + } - // Create a group for the plot + // Add plot + const plotClone = plotSvg.cloneNode(true) as SVGElement; const plotGroup = document.createElementNS( "http://www.w3.org/2000/svg", "g", ); + plotGroup.setAttribute( + "transform", + `translate(0, ${titleBox?.height || 0})`, + ); plotGroup.appendChild(plotClone); combinedSvg.appendChild(plotGroup); - // If legend exists, add it below the plot + // Add legend if it exists if (legendSvg) { const legendClone = legendSvg.cloneNode(true) as SVGElement; const legendGroup = document.createElementNS( @@ -59,7 +80,7 @@ export async function exportPlotAsImage(plotElement: HTMLElement, plot: Plot) { const legendX = (totalWidth - legendBox.width) / 2; legendGroup.setAttribute( "transform", - `translate(${legendX}, ${plotBox.height})`, + `translate(${legendX}, ${(titleBox?.height || 0) + plotBox.height})`, ); legendGroup.appendChild(legendClone); diff --git a/packages/app/src/components/data/plot/plots/bar-plot.tsx b/packages/app/src/components/data/plot/plots/bar-plot.tsx index 934e9014..dddb9b30 100644 --- a/packages/app/src/components/data/plot/plots/bar-plot.tsx +++ b/packages/app/src/components/data/plot/plots/bar-plot.tsx @@ -11,6 +11,7 @@ import { PLOT_CONTAINER_CLASSES, PLOT_CLASSES, getCommonMarks, + PlotTitle, } from "./common"; import { useRef, useEffect, useState } from "react"; import { PlotLegend } from "./legend"; @@ -160,6 +161,7 @@ export function BarPlot({ return (
+
d.text, - }), ...additionalMarks, ]; @@ -260,9 +251,8 @@ export interface CommonLegendProps { colorSchemeType?: "categorical" | "continuous"; } -export const PLOT_CONTAINER_CLASSES = - "flex w-full flex-col items-center gap-16"; -export const PLOT_CLASSES = "mx-auto flex-grow text-lg text-sm"; +export const PLOT_CONTAINER_CLASSES = "flex w-full flex-col items-center gap-4"; +export const PLOT_CLASSES = "mx-auto flex-grow text-sm"; export interface DataPoint { x: number | string; @@ -443,3 +433,20 @@ export function assignColorsAndSymbols( }), })); } + +export function PlotTitle({ title }: { title: string }) { + return ( +
+ + + {title} + + +
+ ); +} diff --git a/packages/app/src/components/data/plot/plots/histogram-plot.tsx b/packages/app/src/components/data/plot/plots/histogram-plot.tsx index cba9f2c1..a04427d0 100644 --- a/packages/app/src/components/data/plot/plots/histogram-plot.tsx +++ b/packages/app/src/components/data/plot/plots/histogram-plot.tsx @@ -15,9 +15,10 @@ import { useFilteredData, getUniqueValues, getCommonMarks, + PlotTitle, } from "./common"; -import { useRef, useEffect } from "react"; import { PlotLegend } from "./legend"; +import { useRef, useEffect } from "react"; interface Props extends CommonPlotProps { plot: PlotType & { @@ -114,6 +115,7 @@ export function HistogramPlot({ return (
+
+
+
Date: Fri, 6 Jun 2025 16:00:49 +0100 Subject: [PATCH 03/18] update plot export with dialog --- package-lock.json | 339 ++++++++++++++++++ package.json | 5 +- .../data/plot/definition/layout.tsx | 25 +- .../data/plot/plot-export-dialog.tsx | 313 ++++++++++++++++ .../app/src/components/ui/radio-group.tsx | 44 +++ 5 files changed, 709 insertions(+), 17 deletions(-) create mode 100644 packages/app/src/components/data/plot/plot-export-dialog.tsx create mode 100644 packages/app/src/components/ui/radio-group.tsx diff --git a/package-lock.json b/package-lock.json index 90c3f648..a2b55f92 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "packages/*" ], "dependencies": { + "@radix-ui/react-radio-group": "^1.3.7", "drizzle-kit": "^0.30.0", "drizzle-orm": "^0.40.0" } @@ -3030,6 +3031,311 @@ } } }, + "node_modules/@radix-ui/react-radio-group": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/@radix-ui/react-radio-group/-/react-radio-group-1.3.7.tgz", + "integrity": "sha512-9w5XhD0KPOrm92OTTE0SysH3sYzHsSTHNvZgUBo/VZ80VdYyB5RneDbc0dKpURS24IxkoFRu/hI0i4XyfFwY6g==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.2", + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-direction": "1.1.1", + "@radix-ui/react-presence": "1.1.4", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-roving-focus": "1.1.10", + "@radix-ui/react-use-controllable-state": "1.2.2", + "@radix-ui/react-use-previous": "1.1.1", + "@radix-ui/react-use-size": "1.1.1" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/primitive": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.2.tgz", + "integrity": "sha512-XnbHrrprsNqZKQhStrSwgRUQzoCI1glLzdw79xiZPoofhGICeZRSQ3dIxAKH1gb3OHfNf4d6f+vAv3kil2eggA==", + "license": "MIT" + }, + "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-collection": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.7.tgz", + "integrity": "sha512-Fh9rGN0MoI4ZFUNyfFVNU4y9LUz93u9/0K+yLgA2bwRojxM8JU1DyvvMBabnZPBgMWREAJvU2jjVzq+LrFUglw==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-slot": "1.2.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-compose-refs": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.2.tgz", + "integrity": "sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-context": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.2.tgz", + "integrity": "sha512-jCi/QKUM2r1Ju5a3J64TH2A5SpKAgh0LpknyqdQ4m6DCV0xJ2HG1xARRwNGPQfi1SLdLWZ1OJz6F4OMBBNiGJA==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-direction": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.1.1.tgz", + "integrity": "sha512-1UEWRX6jnOA2y4H5WczZ44gOOjTEmlqv1uNW4GAJEO5+bauCBhv8snY65Iw5/VOS/ghKN9gr2KjnLKxrsvoMVw==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-id": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.1.tgz", + "integrity": "sha512-kGkGegYIdQsOb4XjsfM97rXsiHaBwco+hFI66oO4s9LU+PLAC5oJ7khdOVFxkhsmlbpUqDAvXw11CluXP+jkHg==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.1" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-presence": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.4.tgz", + "integrity": "sha512-ueDqRbdc4/bkaQT3GIpLQssRlFgWaL/U2z/S31qRwwLWoxHLgry3SIfCwhxeQNbirEUXFa+lq3RL3oBYXtcmIA==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-use-layout-effect": "1.1.1" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-primitive": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.1.3.tgz", + "integrity": "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-slot": "1.2.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-roving-focus": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.10.tgz", + "integrity": "sha512-dT9aOXUen9JSsxnMPv/0VqySQf5eDQ6LCk5Sw28kamz8wSOW2bJdlX2Bg5VUIIcV+6XlHpWTIuTPCf/UNIyq8Q==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.2", + "@radix-ui/react-collection": "1.1.7", + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-direction": "1.1.1", + "@radix-ui/react-id": "1.1.1", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-use-callback-ref": "1.1.1", + "@radix-ui/react-use-controllable-state": "1.2.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-slot": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz", + "integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.2" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-use-callback-ref": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.1.tgz", + "integrity": "sha512-FkBMwD+qbGQeMu1cOHnuGB6x4yzPjho8ap5WtbEJ26umhgqVXbhekKUQO+hZEL1vU92a3wHwdp0HAcqAUF5iDg==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-use-controllable-state": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.2.2.tgz", + "integrity": "sha512-BjasUjixPFdS+NKkypcyyN5Pmg83Olst0+c6vGov0diwTEo6mgdqVR6hxcEgFuh4QrAs7Rc+9KuGJ9TVCj0Zzg==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-use-effect-event": "0.0.2", + "@radix-ui/react-use-layout-effect": "1.1.1" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-use-layout-effect": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.1.tgz", + "integrity": "sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-use-previous": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-1.1.1.tgz", + "integrity": "sha512-2dHfToCj/pzca2Ck724OZ5L0EVrr3eHRNsG/b3xQJLA2hZpVCS99bLAX+hm1IHXDEnzU6by5z/5MIY794/a8NQ==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-use-size": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.1.tgz", + "integrity": "sha512-ewrXRDTAqAXlkl6t/fkXWNAhFX9I+CkKlw6zjEwk86RSPKwZr3xpBRso655aqYafwtnbpHLj6toFzmd6xdVptQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.1" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-roving-focus": { "version": "1.1.2", "license": "MIT", @@ -3282,6 +3588,39 @@ } } }, + "node_modules/@radix-ui/react-use-effect-event": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-effect-event/-/react-use-effect-event-0.0.2.tgz", + "integrity": "sha512-Qp8WbZOBe+blgpuUT+lw2xheLP8q0oatc9UpmiemEICxGvFLYmHm9QowVZGHtJlGbS6A6yJ3iViad/2cVjnOiA==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.1" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-effect-event/node_modules/@radix-ui/react-use-layout-effect": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.1.tgz", + "integrity": "sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-use-escape-keydown": { "version": "1.1.0", "license": "MIT", diff --git a/package.json b/package.json index f9850f4f..a7f7f49f 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,8 @@ "lint": "cd packages/app && npm run lint" }, "dependencies": { - "drizzle-orm": "^0.40.0", - "drizzle-kit": "^0.30.0" + "@radix-ui/react-radio-group": "^1.3.7", + "drizzle-kit": "^0.30.0", + "drizzle-orm": "^0.40.0" } } diff --git a/packages/app/src/components/data/plot/definition/layout.tsx b/packages/app/src/components/data/plot/definition/layout.tsx index f3b60b2d..8d2ab8f6 100644 --- a/packages/app/src/components/data/plot/definition/layout.tsx +++ b/packages/app/src/components/data/plot/definition/layout.tsx @@ -8,14 +8,13 @@ import { PlotView } from "../plot-view"; import { Button } from "@/components/ui/button"; import { DownloadIcon, PanelRight } from "lucide-react"; -import { toast } from "sonner"; -import { exportPlotAsImage } from "../plot-export"; import { ResizableBox } from "react-resizable"; import "react-resizable/css/styles.css"; import { useLocalStorage } from "@uidotdev/usehooks"; import { cn } from "@/utils/styles"; import { PlotSidebar } from "./plot-sidebar"; +import { PlotExportDialog } from "../plot-export-dialog"; interface PlotDimensions { width: number; @@ -51,25 +50,14 @@ export function PlotLayout({ DEFAULT_DIMENSIONS, ); const [sidebarOpen, setSidebarOpen] = useState(false); + const [exportDialogOpen, setExportDialogOpen] = useState(false); return (
{/* Main plot preview area */}
- @@ -123,6 +111,13 @@ export function PlotLayout({ setSidebarOpen={setSidebarOpen} />
+ +
); } diff --git a/packages/app/src/components/data/plot/plot-export-dialog.tsx b/packages/app/src/components/data/plot/plot-export-dialog.tsx new file mode 100644 index 00000000..61305736 --- /dev/null +++ b/packages/app/src/components/data/plot/plot-export-dialog.tsx @@ -0,0 +1,313 @@ +"use client"; + +import { Dialog, DialogContent } from "@/components/ui/dialog"; +import { Plot, PlotDefinition } from "@common/db/schema/plot"; +import { PlotView } from "./plot-view"; +import { Button } from "@/components/ui/button"; +import { DownloadIcon } from "lucide-react"; +import { exportPlotAsImage } from "./plot-export"; +import { toast } from "sonner"; +import { Label } from "@/components/ui/label"; +import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group"; +import { Separator } from "@/components/ui/separator"; +import { Input } from "@/components/ui/input"; +import { + Form, + FormControl, + FormField, + FormItem, + FormMessage, +} from "@/components/ui/form"; +import { useForm } from "react-hook-form"; +import { zodResolver } from "@hookform/resolvers/zod"; +import * as z from "zod"; + +const exportFormSchema = z.object({ + format: z.enum(["svg", "png"]), + sizeType: z.enum(["original", "custom"]), + width: z.string().refine( + (val) => { + const num = Number(val); + return !isNaN(num) && num >= 100 && num <= 4000; + }, + { message: "Width must be between 100 and 4000 pixels" }, + ), + aspectRatioWidth: z.string().refine( + (val) => { + const num = Number(val); + return !isNaN(num) && num > 0 && num <= 100; + }, + { message: "Must be between 1 and 100" }, + ), + aspectRatioHeight: z.string().refine( + (val) => { + const num = Number(val); + return !isNaN(num) && num > 0 && num <= 100; + }, + { message: "Must be between 1 and 100" }, + ), + theme: z.enum(["current", "light", "dark"]), +}); + +type ExportFormValues = z.infer; + +interface PlotExportDialogProps { + plot: Plot; + data: Record[]; + open: boolean; + onOpenChange: (open: boolean) => void; +} + +export function PlotExportDialog({ + plot, + data, + open, + onOpenChange, +}: PlotExportDialogProps) { + const form = useForm({ + resolver: zodResolver(exportFormSchema), + defaultValues: { + format: "svg", + sizeType: "original", + width: "700", + aspectRatioWidth: "1", + aspectRatioHeight: "1", + theme: "current", + }, + }); + + const onSubmit = async (_values: ExportFormValues) => { + const plotElement = document.querySelector('[data-export-preview="true"]'); + if (!plotElement) return; + + try { + await exportPlotAsImage(plotElement as HTMLElement, plot); + toast.success("Plot exported successfully"); + onOpenChange(false); + } catch (error) { + console.error("Export failed:", error); + toast.error("Failed to export plot"); + } + }; + + // Calculate height based on width and aspect ratio + const width = Number(form.watch("width")); + const ratioWidth = Number(form.watch("aspectRatioWidth")); + const ratioHeight = Number(form.watch("aspectRatioHeight")); + const height = Math.round(width * (ratioHeight / ratioWidth)); + + return ( + + + {/* Left panel - Export options */} +
+ +
+

Export options

+ +
+ {/* File Format */} + ( + + + + +
+ + +
+
+ + +
+
+
+ +
+ )} + /> + + + + {/* Dimensions */} + ( + + + + +
+ + +
+
+ + +
+
+
+ + + {field.value === "custom" && ( +
+
+ ( + + + + + + + + )} + /> +
+ +
+ ( + + + + + + + )} + /> + : + ( + + + + + + + )} + /> +
+
+
+

+ Width: {width}px, Height:{" "} + {isNaN(height) ? "-" : height}px +

+

+ Common ratios: 16:9, 4:3, 1:1 +

+
+ )} +
+ )} + /> + + + + {/* Theme */} + ( + + + + +
+ + +
+
+ + +
+
+ + +
+
+
+ +
+ )} + /> +
+
+ + +
+ + + {/* Right panel - Preview */} +
+

Preview

+
+ }} + data={data} + height={form.watch("sizeType") === "custom" ? height : 450} + width={form.watch("sizeType") === "custom" ? width : 700} + /> +
+
+
+
+ ); +} diff --git a/packages/app/src/components/ui/radio-group.tsx b/packages/app/src/components/ui/radio-group.tsx new file mode 100644 index 00000000..a4988eed --- /dev/null +++ b/packages/app/src/components/ui/radio-group.tsx @@ -0,0 +1,44 @@ +"use client"; + +import * as React from "react"; +import * as RadioGroupPrimitive from "@radix-ui/react-radio-group"; +import { Circle } from "lucide-react"; + +import { cn } from "@/lib/utils"; + +const RadioGroup = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => { + return ( + + ); +}); +RadioGroup.displayName = RadioGroupPrimitive.Root.displayName; + +const RadioGroupItem = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => { + return ( + + + + + + ); +}); +RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName; + +export { RadioGroup, RadioGroupItem }; From fdb449231aff7625c7c6c3dada5f209277baa2fc Mon Sep 17 00:00:00 2001 From: James Holcombe Date: Wed, 11 Jun 2025 13:38:41 +0100 Subject: [PATCH 04/18] update plot label size --- packages/app/src/app/globals.css | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/app/src/app/globals.css b/packages/app/src/app/globals.css index 51d2f53f..1fceb737 100644 --- a/packages/app/src/app/globals.css +++ b/packages/app/src/app/globals.css @@ -98,3 +98,10 @@ html { @apply bg-background text-foreground; } } + +/* Plot styles */ +[aria-label="x-axis label"] text, +[aria-label="y-axis label"] text { + font-size: 16px !important; + font-weight: 500 !important; +} From 5d106c172ba62395a1db2ba176676fe3ed96cfc3 Mon Sep 17 00:00:00 2001 From: James Holcombe Date: Wed, 18 Jun 2025 15:37:55 +0100 Subject: [PATCH 05/18] allow skip rows --- .../imports/csv/completeColumnMapping.ts | 39 ++++- .../src/actions/imports/csv/createImport.ts | 35 ++-- .../src/actions/imports/csv/reparseSheet.ts | 150 +++++++++++++++++ .../actions/imports/csv/updateImportFile.ts | 36 ++--- .../imports/column-mapping/index.tsx | 9 ++ .../column-mapping/row-skip-selector.tsx | 84 ++++++++++ .../imports/column-mapping/use-sheets.ts | 153 +++--------------- packages/common/src/db/schema/import.ts | 1 + 8 files changed, 338 insertions(+), 169 deletions(-) create mode 100644 packages/app/src/actions/imports/csv/reparseSheet.ts create mode 100644 packages/app/src/components/imports/column-mapping/row-skip-selector.tsx diff --git a/packages/app/src/actions/imports/csv/completeColumnMapping.ts b/packages/app/src/actions/imports/csv/completeColumnMapping.ts index 1a85d3c1..74813916 100644 --- a/packages/app/src/actions/imports/csv/completeColumnMapping.ts +++ b/packages/app/src/actions/imports/csv/completeColumnMapping.ts @@ -75,8 +75,14 @@ export async function completeColumnMappingAction( extractedData[destinationTable] = { rowData: [] }; } - // Process each row (skip header) - for (let rowIndex = 1; rowIndex < rows.length; rowIndex++) { + // Apply row skipping for CSV + const startRowIndex = sheetMapping.rowsToSkip + 1; // +1 because we want to skip the header row too + if (rows.length <= startRowIndex) continue; // Skip if not enough rows after skipping + + const headerRow = rows[sheetMapping.rowsToSkip]; + + // Process each row (skip header and skipped rows) + for (let rowIndex = startRowIndex; rowIndex < rows.length; rowIndex++) { const rowData = rows[rowIndex]; if (!rowData || rowData.length === 0) continue; @@ -91,7 +97,12 @@ export async function completeColumnMappingAction( // Find index of the source column in header row const columnIndex = headerRow.indexOf(mapping.sourceColumn); - if (columnIndex !== -1 && columnIndex < rowData.length) { + if ( + columnIndex !== -1 && + columnIndex < rowData.length && + rowData[columnIndex] !== null && + rowData[columnIndex] !== undefined + ) { // Add the mapped data to the result mappedRowData[mapping.destinationColumn] = rowData[columnIndex]; } @@ -153,7 +164,11 @@ async function extractDataFromExcel( const sheetData = xlsxUtils.sheet_to_json(sheet, { header: 1 }); if (sheetData.length <= 1) continue; // Skip if only header or empty - const headerRow = sheetData[0] as string[]; + // Apply row skipping + const startRowIndex = sheetMapping.rowsToSkip + 1; // +1 because we want to skip the header row too + if (sheetData.length <= startRowIndex) continue; // Skip if not enough rows after skipping + + const headerRow = sheetData[sheetMapping.rowsToSkip] as string[]; const tableConfig = schemaConfig.find( (config) => config.dbName === destinationTable, @@ -177,22 +192,30 @@ async function extractDataFromExcel( return [destinationColumn, columnConfig.nameCamelCase]; }), ); - // Process each row in the sheet (skip header) - for (let rowIndex = 1; rowIndex < sheetData.length; rowIndex++) { + // Process each row in the sheet (skip header and skipped rows) + for ( + let rowIndex = startRowIndex; + rowIndex < sheetData.length; + rowIndex++ + ) { const rowData = sheetData[rowIndex] as any[]; const mappedRowData: Record = {}; // Process each column in the row based on column mappings for (const mapping of sheetMapping.columnMappings) { // Skip columns that are not included or don't have a destination mapping - if (!mapping.includeInImport || !mapping.destinationColumn) { continue; } // Find index of the source column in header row const columnIndex = headerRow.indexOf(mapping.sourceColumn); - if (columnIndex !== -1 && columnIndex < rowData.length) { + if ( + columnIndex !== -1 && + columnIndex < rowData.length && + rowData[columnIndex] !== null && + rowData[columnIndex] !== undefined + ) { // Add the mapped data to the result mappedRowData[destinationColumnMapping[mapping.destinationColumn]] = rowData[columnIndex]; diff --git a/packages/app/src/actions/imports/csv/createImport.ts b/packages/app/src/actions/imports/csv/createImport.ts index dc613f8d..f57a5cee 100644 --- a/packages/app/src/actions/imports/csv/createImport.ts +++ b/packages/app/src/actions/imports/csv/createImport.ts @@ -62,18 +62,35 @@ export async function createImportCsv( const headerRow = sheetData[0] as string[]; const sampleDataRow = sheetData[1] as string[]; + // Filter out null/undefined/empty column names + const columnMappings = headerRow + .map((col: any, index: number) => { + // Convert to string and skip null/undefined/empty column names + const colString = col ? String(col) : ""; + if (!colString || colString.trim() === "") { + return null; + } + + return { + sourceColumn: colString, + destinationColumn: null, + includeInImport: true, + sampleData: + sampleDataRow && sampleDataRow[index] !== undefined + ? String(sampleDataRow[index]) + : null, + }; + }) + .filter( + (mapping): mapping is NonNullable => + mapping !== null, + ); + return { id: sheetName, sheetName: sheetName, - columnMappings: headerRow.map((col: string, index: number) => ({ - sourceColumn: col, - destinationColumn: null, - includeInImport: true, - sampleData: - sampleDataRow[index] !== undefined - ? String(sampleDataRow[index]) - : null, - })), + rowsToSkip: 0, + columnMappings, includeInImport: true, destinationTable: null, }; diff --git a/packages/app/src/actions/imports/csv/reparseSheet.ts b/packages/app/src/actions/imports/csv/reparseSheet.ts new file mode 100644 index 00000000..f6455f09 --- /dev/null +++ b/packages/app/src/actions/imports/csv/reparseSheet.ts @@ -0,0 +1,150 @@ +"use server"; + +import { createExcelImportWithUploads } from "@/db/crud/import"; +import { getServerUser } from "@/lib/auth"; +import { generatePresignedUrl } from "@/lib/aws"; +import { getProjectForUser } from "@/lib/dal/projects"; +import { updateImportFileAction } from "./updateImportFile"; +import { + readExcelImportForProject, + readExcelImportFilesForImport, +} from "@/db/crud/import"; +import { read, utils as xlsxUtils } from "xlsx"; +import { ExcelImportFileMapping } from "@common/db/schema/import"; +import { revalidatePath } from "next/cache"; + +const sheetToJson = xlsxUtils.sheet_to_json; + +export async function reparseSheetAction( + importId: number, + projectId: number, + sheetName: string, + rowsToSkip: number, +) { + const user = await getServerUser(); + + if (!user) { + throw new Error("User not found"); + } + + const userProject = await getProjectForUser(user, projectId); + + if (!userProject) { + throw new Error("Project not found"); + } + + const importData = await readExcelImportForProject(projectId, importId); + + if (!importData) { + throw new Error("Import not found"); + } + + const files = await readExcelImportFilesForImport(importId); + + if (files.length === 0) { + throw new Error("No files found for import"); + } + + const file = files[0]; + + // Generate presigned URL to get the file from S3 + const { url: blobUrl } = await generatePresignedUrl( + { + key: file.blobKey, + action: "GET", + }, + process.env.AWS_S3_BUCKET_NAME, + ); + + // Fetch and parse the Excel file + const data = await (await fetch(blobUrl)).arrayBuffer(); + const workbook = read(data); + + const sheet = workbook.Sheets[sheetName]; + if (!sheet) { + throw new Error(`Sheet ${sheetName} not found`); + } + + // Get sheet data with all rows + const sheetData = sheetToJson(sheet, { header: 1 }); + + if (sheetData.length <= rowsToSkip) { + throw new Error( + `Cannot skip ${rowsToSkip} rows from a sheet with only ${sheetData.length} rows`, + ); + } + + // Get the new header row (after skipping rows) + const headerRow = sheetData[rowsToSkip] as string[]; + const sampleDataRow = sheetData[rowsToSkip + 1] as string[]; + + // Validate that we have a valid header row + if (!headerRow || !Array.isArray(headerRow) || headerRow.length === 0) { + throw new Error(`Invalid header row found at row ${rowsToSkip + 1}`); + } + + // Create new column mappings based on the new header row + // Filter out null/undefined values and provide fallback column names + const newColumnMappings = headerRow + .map((col: any, index: number) => { + // Convert to string and skip null/undefined/empty column names + const colString = col ? String(col) : ""; + if (!colString || colString.trim() === "") { + return null; + } + + return { + sourceColumn: colString, + destinationColumn: null, + includeInImport: true, + sampleData: + sampleDataRow && sampleDataRow[index] !== undefined + ? String(sampleDataRow[index]) + : null, + }; + }) + .filter( + (mapping): mapping is NonNullable => mapping !== null, + ); // Remove null mappings with proper typing + + // Ensure we have at least some valid columns + if (newColumnMappings.length === 0) { + throw new Error( + `No valid columns found in header row at row ${rowsToSkip + 1}`, + ); + } + + // Update the mapping for the specific sheet + const updatedMapping: ExcelImportFileMapping = file.mapping.map( + (sheetMapping) => { + if (sheetMapping.sheetName === sheetName) { + return { + ...sheetMapping, + rowsToSkip, + columnMappings: newColumnMappings, + }; + } + return sheetMapping; + }, + ); + + // Update the file with the new mapping + await updateImportFileAction( + file.id, + { + mapping: updatedMapping, + excelImportId: importId, + }, + projectId, + ); + + // Return the updated mapping for the specific sheet + const updatedSheetMapping = updatedMapping.find( + (mapping) => mapping.sheetName === sheetName, + ); + + return { + success: true, + updatedMapping: updatedSheetMapping, + }; +} diff --git a/packages/app/src/actions/imports/csv/updateImportFile.ts b/packages/app/src/actions/imports/csv/updateImportFile.ts index fc111167..490f98c8 100644 --- a/packages/app/src/actions/imports/csv/updateImportFile.ts +++ b/packages/app/src/actions/imports/csv/updateImportFile.ts @@ -1,36 +1,34 @@ "use server"; -import { ExcelImportFileInsert } from "@common/db/schema/import"; -import { - readExcelImportFileForProject, - updateExcelImportFile, -} from "@/db/crud/import"; +import { getServerUser } from "@/lib/auth"; +import { getProjectForUser } from "@/lib/dal/projects"; +import { updateExcelImportFile } from "@/db/crud/import"; import { revalidatePath } from "next/cache"; + export async function updateImportFileAction( - id: number, - data: Partial & { + fileId: number, + data: { + mapping?: any; excelImportId: number; }, projectId: number, ) { - const existingFile = await readExcelImportFileForProject( - projectId, - data.excelImportId, - id, - ); + const user = await getServerUser(); - if (!existingFile) { - throw new Error("File not found"); + if (!user) { + throw new Error("User not found"); } - if (existingFile.excelImportId !== data.excelImportId) { - throw new Error("File not found"); + const userProject = await getProjectForUser(user, projectId); + + if (!userProject) { + throw new Error("Project not found"); } - const updatedImportFile = await updateExcelImportFile(id, data); + await updateExcelImportFile(fileId, data); + + // Trigger Next.js ISR to refresh the page data revalidatePath( `/projects/${projectId}/imports/csv/${data.excelImportId}/columns`, ); - - return updatedImportFile; } diff --git a/packages/app/src/components/imports/column-mapping/index.tsx b/packages/app/src/components/imports/column-mapping/index.tsx index 603e11c0..e5b21f54 100644 --- a/packages/app/src/components/imports/column-mapping/index.tsx +++ b/packages/app/src/components/imports/column-mapping/index.tsx @@ -33,6 +33,7 @@ import { } from "@/components/imports/column-mapping/use-sheets"; import { TableSelector } from "@/components/imports/column-mapping/table-selector"; import { ColumnSelector } from "@/components/imports/column-mapping/column-selector"; +import { RowSkipSelector } from "@/components/imports/column-mapping/row-skip-selector"; import { TableName } from "@common/db/schema/data"; import Link from "next/link"; import { Button } from "@/components/ui/button"; @@ -166,6 +167,14 @@ export function ColumnMapping({ buttonClassName="bg-card" disabled={!selectedSheet.includeInImport || isPending} /> + Promise; + disabled?: boolean; + maxRows?: number; + importId: number; + projectId: number; + sheetName: string; +} + +export function RowSkipSelector({ + value, + onValueChange, + disabled = false, + maxRows = 100, + importId, + projectId, + sheetName, +}: RowSkipSelectorProps) { + const [isPending, setIsPending] = useState(false); + + const handleValueChange = async (newValue: number) => { + if (newValue < 0 || newValue > maxRows) return; + + setIsPending(true); + try { + // Trigger the re-parse action + const result = await reparseSheetAction( + importId, + projectId, + sheetName, + newValue, + ); + + if (result.success) { + toast.success(`Sheet re-parsed with ${newValue} rows skipped`); + // Next.js ISR will automatically refresh the page data + // and the UI will update with the new column mappings + } else { + throw new Error("Failed to re-parse sheet"); + } + } catch (error) { + console.error("Failed to update rows to skip:", error); + toast.error("Failed to update rows to skip. Please try again."); + } finally { + setIsPending(false); + } + }; + + const handleInputChange = async (e: React.ChangeEvent) => { + const newValue = parseInt(e.target.value) || 0; + await handleValueChange(newValue); + }; + + return ( +
+ +
+ +
+
+ ); +} diff --git a/packages/app/src/components/imports/column-mapping/use-sheets.ts b/packages/app/src/components/imports/column-mapping/use-sheets.ts index d72c6248..0d1c53b8 100644 --- a/packages/app/src/components/imports/column-mapping/use-sheets.ts +++ b/packages/app/src/components/imports/column-mapping/use-sheets.ts @@ -3,12 +3,12 @@ import { useMemo } from "react"; import { ExcelImport, ExcelImportFile } from "@common/db/schema/import"; import { updateImportFileAction } from "@/actions/imports/csv/updateImportFile"; -import { useOptimisticUpdate } from "@/hooks/use-optimistic-update"; type Props = { importData: ExcelImport; files: ExcelImportFile[]; }; + export type Sheet = { id: number | string; name: string; @@ -16,6 +16,8 @@ export type Sheet = { setIncludeInImport: (_includeInImport: boolean) => Promise; destinationTable: string | null; setDestinationTable: (_destinationTable: string | null) => Promise; + rowsToSkip: number; + setRowsToSkip: (_rowsToSkip: number) => Promise; isValid: boolean; columns: { name: string; @@ -28,8 +30,8 @@ export type Sheet = { }; export function useSheets({ importData, files }: Props) { - // Create the actual sheets from the input data - const actualSheets = useMemo(() => { + // Create the sheets from the input data + const sheets = useMemo(() => { if (importData.kind === "excel") { const sheet = files[0]; @@ -42,6 +44,7 @@ export function useSheets({ importData, files }: Props) { : true, id: mapping.sheetName, name: mapping.sheetName, + rowsToSkip: mapping.rowsToSkip, columns: mapping.columnMappings.map((column, columnIndex) => { return { name: column.sourceColumn, @@ -108,6 +111,18 @@ export function useSheets({ importData, files }: Props) { importData.projectId, ); }, + setRowsToSkip: async (rowsToSkip: number) => { + const currentMapping = [...sheet.mapping]; + currentMapping[sheetIndex].rowsToSkip = rowsToSkip; + await updateImportFileAction( + sheet.id, + { + mapping: currentMapping, + excelImportId: importData.id, + }, + importData.projectId, + ); + }, }; }); } @@ -115,136 +130,8 @@ export function useSheets({ importData, files }: Props) { return []; }, [files, importData]); - // Use the generic optimistic update hook - const { - data: optimisticSheets, - isPending, - updateArray, - } = useOptimisticUpdate(actualSheets); - - // Create enhanced sheets with optimistic updates - const enhancedSheets = useMemo(() => { - return optimisticSheets.map((sheet) => { - // Enhanced sheet methods with optimistic updates - const optimisticSetIncludeInImport = async (includeInImport: boolean) => { - updateArray( - [], // Root array path - (s) => s.id === sheet.id, // Predicate to find the sheet - (s) => { - // Recalculate isValid based on the new includeInImport status - const isValid = includeInImport - ? s.columns.every((col) => - col.includeInImport ? col.destinationColumn : true, - ) - : true; - - return { - ...s, - includeInImport, - isValid, - }; - }, - () => sheet.setIncludeInImport(includeInImport), // Server update - "Failed to update sheet inclusion", // Error message - ); - }; - - const optimisticSetDestinationTable = async ( - destinationTable: string | null, - ) => { - updateArray( - [], // Root array path - (s) => s.id === sheet.id, // Predicate to find the sheet - (s) => ({ - ...s, - destinationTable, - // Destination table changes don't affect isValid directly - }), - () => sheet.setDestinationTable(destinationTable), // Server update - "Failed to update destination table", // Error message - ); - }; - - // Enhanced columns with optimistic updates - const optimisticColumns = sheet.columns.map((column) => { - const optimisticSetIncludeInImport = async ( - includeInImport: boolean, - ) => { - updateArray( - [], // Root array path - (s) => s.id === sheet.id, // Predicate to find the sheet - (s) => { - // Update columns first - const updatedColumns = s.columns.map((c) => - c.name === column.name ? { ...c, includeInImport } : c, - ); - - // Recalculate isValid based on updated columns - const isValid = s.includeInImport - ? updatedColumns.every((col) => - col.includeInImport ? col.destinationColumn : true, - ) - : true; - - return { - ...s, - columns: updatedColumns, - isValid, - }; - }, - () => column.setIncludeInImport(includeInImport), // Server update - "Failed to update column inclusion", // Error message - ); - }; - - const optimisticSetDestinationColumn = async ( - destinationColumn: string | null, - ) => { - updateArray( - [], // Root array path - (s) => s.id === sheet.id, // Predicate to find the sheet - (s) => { - // Update columns first - const updatedColumns = s.columns.map((c) => - c.name === column.name ? { ...c, destinationColumn } : c, - ); - - // Recalculate isValid based on updated columns - const isValid = s.includeInImport - ? updatedColumns.every((col) => - col.includeInImport ? col.destinationColumn : true, - ) - : true; - - return { - ...s, - columns: updatedColumns, - isValid, - }; - }, - () => column.setDestinationColumn(destinationColumn), // Server update - "Failed to update column mapping", // Error message - ); - }; - - return { - ...column, - setIncludeInImport: optimisticSetIncludeInImport, - setDestinationColumn: optimisticSetDestinationColumn, - }; - }); - - return { - ...sheet, - setIncludeInImport: optimisticSetIncludeInImport, - setDestinationTable: optimisticSetDestinationTable, - columns: optimisticColumns, - }; - }); - }, [optimisticSheets, updateArray]); - return { - sheets: enhancedSheets, - isPending, + sheets, + isPending: false, // No optimistic updates, so no pending state }; } diff --git a/packages/common/src/db/schema/import.ts b/packages/common/src/db/schema/import.ts index ce2566a9..90adc20c 100644 --- a/packages/common/src/db/schema/import.ts +++ b/packages/common/src/db/schema/import.ts @@ -110,6 +110,7 @@ export type ExcelImportFileMapping = { sheetName: string; includeInImport: boolean; destinationTable: string | null; + rowsToSkip: number; columnMappings: { sourceColumn: string; destinationColumn: string | null; From 04f9afd9c30565ad031fd0e796e49208e7bd4f6c Mon Sep 17 00:00:00 2001 From: James Holcombe Date: Wed, 18 Jun 2025 18:16:30 +0100 Subject: [PATCH 06/18] fix csv file upload --- .../imports/csv/completeColumnMapping.ts | 49 +++++-- .../src/actions/imports/csv/createImport.ts | 80 ++++++++-- .../src/actions/imports/csv/reparseSheet.ts | 138 +++++++++++++++++- .../imports/column-mapping/index.tsx | 4 +- .../imports/column-mapping/use-sheets.ts | 98 +++++++++++++ 5 files changed, 342 insertions(+), 27 deletions(-) diff --git a/packages/app/src/actions/imports/csv/completeColumnMapping.ts b/packages/app/src/actions/imports/csv/completeColumnMapping.ts index 74813916..24247e27 100644 --- a/packages/app/src/actions/imports/csv/completeColumnMapping.ts +++ b/packages/app/src/actions/imports/csv/completeColumnMapping.ts @@ -43,6 +43,8 @@ export async function completeColumnMappingAction( if (importData.kind === "csv") { // Process each CSV file + const allExtractedData: ExtractedData = {}; + for (const file of files) { // Generate presigned URL to get the file from S3 const { url: blobUrl } = await generatePresignedUrl( @@ -59,10 +61,6 @@ export async function completeColumnMappingAction( if (rows.length <= 1) continue; // Skip if only header or empty - const headerRow = rows[0]; - const extractedData: Record[] }> = - {}; - // Process each sheet according to mapping for (const sheetMapping of file.mapping) { // Skip sheets that are not included in import @@ -71,8 +69,8 @@ export async function completeColumnMappingAction( } const destinationTable = sheetMapping.destinationTable as TableName; - if (!extractedData[destinationTable]) { - extractedData[destinationTable] = { rowData: [] }; + if (!allExtractedData[destinationTable]) { + allExtractedData[destinationTable] = []; } // Apply row skipping for CSV @@ -81,6 +79,29 @@ export async function completeColumnMappingAction( const headerRow = rows[sheetMapping.rowsToSkip]; + const tableConfig = schemaConfig.find( + (config) => config.dbName === destinationTable, + ); + + if (!tableConfig) { + continue; + } + + const destinationColumnMapping = Object.fromEntries( + sheetMapping.columnMappings + .filter( + (mapping) => mapping.includeInImport && mapping.destinationColumn, + ) + .map((mapping) => { + const destinationColumn = mapping.destinationColumn; + const columnConfig = tableConfig.columns.find( + (column) => column.dbName === destinationColumn, + ) as ColumnConfig; + + return [destinationColumn, columnConfig.nameCamelCase]; + }), + ); + // Process each row (skip header and skipped rows) for (let rowIndex = startRowIndex; rowIndex < rows.length; rowIndex++) { const rowData = rows[rowIndex]; @@ -104,22 +125,24 @@ export async function completeColumnMappingAction( rowData[columnIndex] !== undefined ) { // Add the mapped data to the result - mappedRowData[mapping.destinationColumn] = rowData[columnIndex]; + mappedRowData[ + destinationColumnMapping[mapping.destinationColumn] + ] = rowData[columnIndex]; } } // Only add non-empty rows if (Object.keys(mappedRowData).length > 0) { - extractedData[destinationTable].rowData.push(mappedRowData); + allExtractedData[destinationTable].push(mappedRowData); } } } - - // Update the file with extracted data - await updateExcelImport(importId, { - extractedData: extractedData, - }); } + + // Update the import with all extracted data + await updateExcelImport(importId, { + extractedData: allExtractedData, + }); } redirect(`/projects/${projectId}/imports/csv/${importId}/validate`); diff --git a/packages/app/src/actions/imports/csv/createImport.ts b/packages/app/src/actions/imports/csv/createImport.ts index f57a5cee..7e5052ae 100644 --- a/packages/app/src/actions/imports/csv/createImport.ts +++ b/packages/app/src/actions/imports/csv/createImport.ts @@ -109,16 +109,76 @@ export async function createImportCsv( revalidatePath(`/projects/${projectId}/imports`); redirect(`/projects/${projectId}/imports/csv/${createdImport.id}/columns`); } else if (kind === "csv") { - throw new Error("CSV imports are not supported yet"); - // const filesWithData = await Promise.all( - // blobsData.map(async (blob) => { - // const { url: blobUrl } = await generatePresignedUrl( - // { key: blob.blobKey, action: "GET" }, - // process.env.AWS_S3_BUCKET_NAME, - // ); - // const data = await (await fetch(blobUrl)).text(); - // }), - // ); + // Process CSV files - each file becomes a "sheet" + const filesWithData = await Promise.all( + blobsData.map(async (blob) => { + const { url: blobUrl } = await generatePresignedUrl( + { key: blob.blobKey, action: "GET" }, + process.env.AWS_S3_BUCKET_NAME, + ); + + const csvText = await (await fetch(blobUrl)).text(); + const rows = csvText.split("\n").map((row) => row.split(",")); + + if (rows.length === 0) { + throw new Error(`CSV file ${blob.fileName} is empty`); + } + + const headerRow = rows[0]; + const sampleDataRow = rows[1] || []; + + // Filter out null/undefined/empty column names + const columnMappings = headerRow + .map((col: string, index: number) => { + // Convert to string and skip null/undefined/empty column names + const colString = col ? String(col).trim() : ""; + if (!colString || colString === "") { + return null; + } + + return { + sourceColumn: colString, + destinationColumn: null, + includeInImport: true, + sampleData: + sampleDataRow && sampleDataRow[index] !== undefined + ? String(sampleDataRow[index]).trim() + : null, + }; + }) + .filter( + (mapping): mapping is NonNullable => + mapping !== null, + ); + + // Create a single "sheet" mapping for the CSV file + const mapping: ExcelImportFileMapping = [ + { + id: blob.fileName, // Use filename as sheet ID for CSV + sheetName: blob.fileName, // Use filename as sheet name for CSV + rowsToSkip: 0, + columnMappings, + includeInImport: true, + destinationTable: null, + }, + ]; + + return { + ...importData, + fileName: blob.fileName, + blobKey: blob.blobKey, + fileSize: blob.fileSize, + mapping, + }; + }), + ); + + const createdImport = await createExcelImportWithUploads( + importData, + filesWithData, + ); + revalidatePath(`/projects/${projectId}/imports`); + redirect(`/projects/${projectId}/imports/csv/${createdImport.id}/columns`); } else { throw new Error("Invalid import kind"); } diff --git a/packages/app/src/actions/imports/csv/reparseSheet.ts b/packages/app/src/actions/imports/csv/reparseSheet.ts index f6455f09..ad4102fb 100644 --- a/packages/app/src/actions/imports/csv/reparseSheet.ts +++ b/packages/app/src/actions/imports/csv/reparseSheet.ts @@ -45,8 +45,34 @@ export async function reparseSheetAction( throw new Error("No files found for import"); } - const file = files[0]; + if (importData.kind === "excel") { + return await reparseExcelSheet( + files[0], + sheetName, + rowsToSkip, + importId, + projectId, + ); + } else if (importData.kind === "csv") { + return await reparseCsvSheet( + files, + sheetName, + rowsToSkip, + importId, + projectId, + ); + } else { + throw new Error("Unsupported import kind"); + } +} +async function reparseExcelSheet( + file: any, + sheetName: string, + rowsToSkip: number, + importId: number, + projectId: number, +) { // Generate presigned URL to get the file from S3 const { url: blobUrl } = await generatePresignedUrl( { @@ -84,7 +110,7 @@ export async function reparseSheetAction( } // Create new column mappings based on the new header row - // Filter out null/undefined values and provide fallback column names + // Filter out null/undefined/values and provide fallback column names const newColumnMappings = headerRow .map((col: any, index: number) => { // Convert to string and skip null/undefined/empty column names @@ -116,7 +142,113 @@ export async function reparseSheetAction( // Update the mapping for the specific sheet const updatedMapping: ExcelImportFileMapping = file.mapping.map( - (sheetMapping) => { + (sheetMapping: any) => { + if (sheetMapping.sheetName === sheetName) { + return { + ...sheetMapping, + rowsToSkip, + columnMappings: newColumnMappings, + }; + } + return sheetMapping; + }, + ); + + // Update the file with the new mapping + await updateImportFileAction( + file.id, + { + mapping: updatedMapping, + excelImportId: importId, + }, + projectId, + ); + + // Return the updated mapping for the specific sheet + const updatedSheetMapping = updatedMapping.find( + (mapping) => mapping.sheetName === sheetName, + ); + + return { + success: true, + updatedMapping: updatedSheetMapping, + }; +} + +async function reparseCsvSheet( + files: any[], + sheetName: string, + rowsToSkip: number, + importId: number, + projectId: number, +) { + // Find the file that contains the sheet (for CSV, sheet name is the file name) + const file = files.find((f) => f.fileName === sheetName); + if (!file) { + throw new Error(`File ${sheetName} not found`); + } + + // Generate presigned URL to get the file from S3 + const { url: blobUrl } = await generatePresignedUrl( + { + key: file.blobKey, + action: "GET", + }, + process.env.AWS_S3_BUCKET_NAME, + ); + + // Fetch and parse the CSV file as text + const csvText = await (await fetch(blobUrl)).text(); + const rows = csvText.split("\n").map((row) => row.split(",")); + + if (rows.length <= rowsToSkip) { + throw new Error( + `Cannot skip ${rowsToSkip} rows from a CSV with only ${rows.length} rows`, + ); + } + + // Get the new header row (after skipping rows) + const headerRow = rows[rowsToSkip]; + const sampleDataRow = rows[rowsToSkip + 1] || []; + + // Validate that we have a valid header row + if (!headerRow || !Array.isArray(headerRow) || headerRow.length === 0) { + throw new Error(`Invalid header row found at row ${rowsToSkip + 1}`); + } + + // Create new column mappings based on the new header row + const newColumnMappings = headerRow + .map((col: string, index: number) => { + // Convert to string and skip null/undefined/empty column names + const colString = col ? String(col).trim() : ""; + if (!colString || colString === "") { + return null; + } + + return { + sourceColumn: colString, + destinationColumn: null, + includeInImport: true, + sampleData: + sampleDataRow && sampleDataRow[index] !== undefined + ? String(sampleDataRow[index]).trim() + : null, + }; + }) + .filter( + (mapping): mapping is NonNullable => mapping !== null, + ); + + // Ensure we have at least some valid columns + if (newColumnMappings.length === 0) { + throw new Error( + `No valid columns found in header row at row ${rowsToSkip + 1}`, + ); + } + + // Update the mapping for the specific sheet + const updatedMapping: ExcelImportFileMapping = file.mapping.map( + (sheetMapping: any) => { if (sheetMapping.sheetName === sheetName) { return { ...sheetMapping, diff --git a/packages/app/src/components/imports/column-mapping/index.tsx b/packages/app/src/components/imports/column-mapping/index.tsx index e5b21f54..2653599f 100644 --- a/packages/app/src/components/imports/column-mapping/index.tsx +++ b/packages/app/src/components/imports/column-mapping/index.tsx @@ -113,7 +113,9 @@ export function ColumnMapping({ return (
- + {sheets.map((sheet) => (
{ + return file.mapping.map((mapping, sheetIndex) => { + return { + isValid: mapping.includeInImport + ? mapping.columnMappings.every((column) => + column.includeInImport ? column.destinationColumn : true, + ) + : true, + id: mapping.sheetName, + name: mapping.sheetName, + rowsToSkip: mapping.rowsToSkip, + columns: mapping.columnMappings.map((column, columnIndex) => { + return { + name: column.sourceColumn, + sampleData: column.sampleData, + destinationColumn: column.destinationColumn, + includeInImport: column.includeInImport, + setIncludeInImport: async (includeInImport: boolean) => { + const currentColumnMappings = [...mapping.columnMappings]; + currentColumnMappings[columnIndex].includeInImport = + includeInImport; + const currentSheet = [...file.mapping]; + currentSheet[sheetIndex].columnMappings = + currentColumnMappings; + await updateImportFileAction( + file.id, + { + mapping: currentSheet, + excelImportId: importData.id, + }, + importData.projectId, + ); + }, + setDestinationColumn: async ( + destinationColumn: string | null, + ) => { + const currentColumnMappings = [...mapping.columnMappings]; + currentColumnMappings[columnIndex].destinationColumn = + destinationColumn; + const currentSheet = [...file.mapping]; + currentSheet[sheetIndex].columnMappings = + currentColumnMappings; + await updateImportFileAction( + file.id, + { + mapping: currentSheet, + excelImportId: importData.id, + }, + importData.projectId, + ); + }, + }; + }), + includeInImport: mapping.includeInImport, + destinationTable: mapping.destinationTable, + setIncludeInImport: async (includeInImport: boolean) => { + const currentMapping = [...file.mapping]; + currentMapping[sheetIndex].includeInImport = includeInImport; + await updateImportFileAction( + file.id, + { + mapping: currentMapping, + excelImportId: importData.id, + }, + importData.projectId, + ); + }, + setDestinationTable: async (destinationTable: string | null) => { + const currentMapping = [...file.mapping]; + currentMapping[sheetIndex].destinationTable = destinationTable; + await updateImportFileAction( + file.id, + { + mapping: currentMapping, + excelImportId: importData.id, + }, + importData.projectId, + ); + }, + setRowsToSkip: async (rowsToSkip: number) => { + const currentMapping = [...file.mapping]; + currentMapping[sheetIndex].rowsToSkip = rowsToSkip; + await updateImportFileAction( + file.id, + { + mapping: currentMapping, + excelImportId: importData.id, + }, + importData.projectId, + ); + }, + }; + }); + }); + } + return []; }, [files, importData]); From edb7a16437f2b901662aaabff0555b6cc8264070 Mon Sep 17 00:00:00 2001 From: James Holcombe Date: Thu, 19 Jun 2025 15:42:58 +0100 Subject: [PATCH 07/18] folder structure for views and plots --- .../data/custom-tables/createCustomTable.ts | 6 +- .../data/custom-tables/moveCustomTable.ts | 28 + .../src/actions/data/folders/createFolder.ts | 38 + .../src/actions/data/folders/deleteFolder.ts | 25 + .../src/actions/data/folders/moveFolder.ts | 33 + .../src/actions/data/folders/updateFolder.ts | 31 + .../app/src/actions/data/plots/createPlot.ts | 6 +- .../app/src/actions/data/plots/movePlot.ts | 28 + .../projects/[projectId]/data/layout.tsx | 8 + .../data/data-sidebar/custom-table-tab.tsx | 63 +- .../data/data-sidebar/folder-tree.tsx | 641 + .../components/data/data-sidebar/index.tsx | 15 +- .../components/data/data-sidebar/plot-tab.tsx | 69 +- .../app/src/components/data/data-wrapper.tsx | 7 + packages/app/src/db/crud/custom_table.ts | 24 +- packages/app/src/db/crud/folder.ts | 123 + packages/app/src/db/crud/plot.ts | 20 +- packages/app/src/lib/dal/folders.ts | 21 + .../common/drizzle/0014_quiet_romulus.sql | 15 + .../common/drizzle/0015_flowery_cyclops.sql | 1 + .../common/drizzle/meta/0014_snapshot.json | 25773 +++++++++++++++ .../common/drizzle/meta/0015_snapshot.json | 25780 ++++++++++++++++ packages/common/drizzle/meta/_journal.json | 16 +- .../drizzle/migrations/0014_add_folders.sql | 19 + packages/common/src/db/schema/custom_table.ts | 4 + packages/common/src/db/schema/folder.ts | 27 + packages/common/src/db/schema/plot.ts | 4 + 27 files changed, 52779 insertions(+), 46 deletions(-) create mode 100644 packages/app/src/actions/data/custom-tables/moveCustomTable.ts create mode 100644 packages/app/src/actions/data/folders/createFolder.ts create mode 100644 packages/app/src/actions/data/folders/deleteFolder.ts create mode 100644 packages/app/src/actions/data/folders/moveFolder.ts create mode 100644 packages/app/src/actions/data/folders/updateFolder.ts create mode 100644 packages/app/src/actions/data/plots/movePlot.ts create mode 100644 packages/app/src/components/data/data-sidebar/folder-tree.tsx create mode 100644 packages/app/src/db/crud/folder.ts create mode 100644 packages/app/src/lib/dal/folders.ts create mode 100644 packages/common/drizzle/0014_quiet_romulus.sql create mode 100644 packages/common/drizzle/0015_flowery_cyclops.sql create mode 100644 packages/common/drizzle/meta/0014_snapshot.json create mode 100644 packages/common/drizzle/meta/0015_snapshot.json create mode 100644 packages/common/drizzle/migrations/0014_add_folders.sql create mode 100644 packages/common/src/db/schema/folder.ts diff --git a/packages/app/src/actions/data/custom-tables/createCustomTable.ts b/packages/app/src/actions/data/custom-tables/createCustomTable.ts index d2230ec0..2e47f2b0 100644 --- a/packages/app/src/actions/data/custom-tables/createCustomTable.ts +++ b/packages/app/src/actions/data/custom-tables/createCustomTable.ts @@ -9,7 +9,10 @@ import { redirect } from "next/navigation"; import { getProjectForUser } from "@/lib/dal/projects"; import { revalidateCustomTableCache } from "@/lib/dal/custom-tables"; -export async function createCustomTableAction(projectId: number) { +export async function createCustomTableAction( + projectId: number, + folderId?: number | null, +) { const user = await getServerUser(); const userProject = await getProjectForUser(user, projectId); @@ -21,6 +24,7 @@ export async function createCustomTableAction(projectId: number) { const newCustomTable = await createCustomTable({ name, projectId, + folderId: folderId || null, }); revalidateCustomTableCache(newCustomTable.id, projectId); diff --git a/packages/app/src/actions/data/custom-tables/moveCustomTable.ts b/packages/app/src/actions/data/custom-tables/moveCustomTable.ts new file mode 100644 index 00000000..6680cd57 --- /dev/null +++ b/packages/app/src/actions/data/custom-tables/moveCustomTable.ts @@ -0,0 +1,28 @@ +"use server"; + +import { getServerUser } from "@/lib/auth"; +import { updateCustomTable } from "@/db/crud/custom_table"; +import { getProjectForUser } from "@/lib/dal/projects"; +import { revalidateTag } from "next/cache"; + +export async function moveCustomTableAction( + projectId: number, + customTableId: number, + newFolderId: number | null, +) { + const user = await getServerUser(); + const userProject = await getProjectForUser(user, projectId); + + if (!userProject) { + throw new Error("Project not found"); + } + + const updatedCustomTable = await updateCustomTable(customTableId, { + folderId: newFolderId, + }); + + revalidateTag(`project-${projectId}-custom-tables`); + revalidateTag(`project-${projectId}-data`); + + return updatedCustomTable; +} diff --git a/packages/app/src/actions/data/folders/createFolder.ts b/packages/app/src/actions/data/folders/createFolder.ts new file mode 100644 index 00000000..d9cabfdb --- /dev/null +++ b/packages/app/src/actions/data/folders/createFolder.ts @@ -0,0 +1,38 @@ +"use server"; + +import { getServerUser } from "@/lib/auth"; +import { createFolder, generateUniqueFolderName } from "@/db/crud/folder"; +import { getProjectForUser } from "@/lib/dal/projects"; +import { revalidateTag } from "next/cache"; + +export async function createFolderAction( + projectId: number, + parentFolderId: number | null = null, + type: "customTable" | "plot" = "customTable", + name?: string, +) { + const user = await getServerUser(); + const userProject = await getProjectForUser(user, projectId); + + if (!userProject) { + throw new Error("Project not found"); + } + + const folderName = + name || (await generateUniqueFolderName(projectId, parentFolderId, type)); + + const insertData = { + name: folderName, + projectId, + parentFolderId, + type, + }; + + const newFolder = await createFolder(insertData); + + // More aggressive cache revalidation + revalidateTag(`project-${projectId}-folders-${type}`); + revalidateTag(`project-${projectId}-data`); + + return newFolder; +} diff --git a/packages/app/src/actions/data/folders/deleteFolder.ts b/packages/app/src/actions/data/folders/deleteFolder.ts new file mode 100644 index 00000000..96003beb --- /dev/null +++ b/packages/app/src/actions/data/folders/deleteFolder.ts @@ -0,0 +1,25 @@ +"use server"; + +import { getServerUser } from "@/lib/auth"; +import { deleteFolder, readFolder } from "@/db/crud/folder"; +import { getProjectForUser } from "@/lib/dal/projects"; +import { revalidateTag } from "next/cache"; + +export async function deleteFolderAction(projectId: number, folderId: number) { + const user = await getServerUser(); + const userProject = await getProjectForUser(user, projectId); + + if (!userProject) { + throw new Error("Project not found"); + } + + const folder = await readFolder(folderId); + if (!folder) { + throw new Error("Folder not found"); + } + + await deleteFolder(folderId); + + revalidateTag(`project-${projectId}-folders-${folder.type}`); + revalidateTag(`project-${projectId}-data`); +} diff --git a/packages/app/src/actions/data/folders/moveFolder.ts b/packages/app/src/actions/data/folders/moveFolder.ts new file mode 100644 index 00000000..14f95a52 --- /dev/null +++ b/packages/app/src/actions/data/folders/moveFolder.ts @@ -0,0 +1,33 @@ +"use server"; + +import { getServerUser } from "@/lib/auth"; +import { updateFolder, readFolder } from "@/db/crud/folder"; +import { getProjectForUser } from "@/lib/dal/projects"; +import { revalidateTag } from "next/cache"; + +export async function moveFolderAction( + projectId: number, + folderId: number, + newParentFolderId: number | null, +) { + const user = await getServerUser(); + const userProject = await getProjectForUser(user, projectId); + + if (!userProject) { + throw new Error("Project not found"); + } + + const folder = await readFolder(folderId); + if (!folder) { + throw new Error("Folder not found"); + } + + const updatedFolder = await updateFolder(folderId, { + parentFolderId: newParentFolderId, + }); + + revalidateTag(`project-${projectId}-folders-${folder.type}`); + revalidateTag(`project-${projectId}-data`); + + return updatedFolder; +} diff --git a/packages/app/src/actions/data/folders/updateFolder.ts b/packages/app/src/actions/data/folders/updateFolder.ts new file mode 100644 index 00000000..a94a1d73 --- /dev/null +++ b/packages/app/src/actions/data/folders/updateFolder.ts @@ -0,0 +1,31 @@ +"use server"; + +import { getServerUser } from "@/lib/auth"; +import { updateFolder, readFolder } from "@/db/crud/folder"; +import { getProjectForUser } from "@/lib/dal/projects"; +import { revalidateTag } from "next/cache"; + +export async function updateFolderAction( + projectId: number, + folderId: number, + data: { name?: string; parentFolderId?: number | null }, +) { + const user = await getServerUser(); + const userProject = await getProjectForUser(user, projectId); + + if (!userProject) { + throw new Error("Project not found"); + } + + const folder = await readFolder(folderId); + if (!folder) { + throw new Error("Folder not found"); + } + + const updatedFolder = await updateFolder(folderId, data); + + revalidateTag(`project-${projectId}-folders-${folder.type}`); + revalidateTag(`project-${projectId}-data`); + + return updatedFolder; +} diff --git a/packages/app/src/actions/data/plots/createPlot.ts b/packages/app/src/actions/data/plots/createPlot.ts index 627001cc..3ee709ee 100644 --- a/packages/app/src/actions/data/plots/createPlot.ts +++ b/packages/app/src/actions/data/plots/createPlot.ts @@ -7,7 +7,10 @@ import { getProjectForUser } from "@/lib/dal/projects"; import { createPlot, generateUniquePlotName } from "@/db/crud/plot"; -export async function createPlotAction(projectId: number) { +export async function createPlotAction( + projectId: number, + folderId?: number | null, +) { const user = await getServerUser(); const userProject = await getProjectForUser(user, projectId); @@ -19,6 +22,7 @@ export async function createPlotAction(projectId: number) { const newPlot = await createPlot({ name, projectId, + folderId: folderId || null, }); revalidateTag(`project-${projectId}-plots`); diff --git a/packages/app/src/actions/data/plots/movePlot.ts b/packages/app/src/actions/data/plots/movePlot.ts new file mode 100644 index 00000000..f7f270dd --- /dev/null +++ b/packages/app/src/actions/data/plots/movePlot.ts @@ -0,0 +1,28 @@ +"use server"; + +import { getServerUser } from "@/lib/auth"; +import { updatePlot } from "@/db/crud/plot"; +import { getProjectForUser } from "@/lib/dal/projects"; +import { revalidateTag } from "next/cache"; + +export async function movePlotAction( + projectId: number, + plotId: number, + newFolderId: number | null, +) { + const user = await getServerUser(); + const userProject = await getProjectForUser(user, projectId); + + if (!userProject) { + throw new Error("Project not found"); + } + + const updatedPlot = await updatePlot(plotId, { + folderId: newFolderId, + }); + + revalidateTag(`project-${projectId}-plots`); + revalidateTag(`project-${projectId}-data`); + + return updatedPlot; +} diff --git a/packages/app/src/app/(app)/projects/[projectId]/data/layout.tsx b/packages/app/src/app/(app)/projects/[projectId]/data/layout.tsx index 5486b14c..0bd599d2 100644 --- a/packages/app/src/app/(app)/projects/[projectId]/data/layout.tsx +++ b/packages/app/src/app/(app)/projects/[projectId]/data/layout.tsx @@ -6,6 +6,7 @@ import { schemaConfig } from "@common/db/schema/common"; import { tableConfigToNodes } from "@/components/data/data-sidebar/table-config"; import { DataWrapper } from "@/components/data/data-wrapper"; import { notFound } from "next/navigation"; +import { getFoldersForProject } from "@/lib/dal/folders"; type Props = { params: { projectId: string }; @@ -23,6 +24,11 @@ export default async function Layout({ params, children }: Props) { const nodes = tableConfigToNodes(schemaConfig); const { tableCounts, plots, customTables } = await getProjectData(projectId); + const customTableFolders = await getFoldersForProject( + projectId, + "customTable", + ); + const plotFolders = await getFoldersForProject(projectId, "plot"); return ( {children} diff --git a/packages/app/src/components/data/data-sidebar/custom-table-tab.tsx b/packages/app/src/components/data/data-sidebar/custom-table-tab.tsx index 19b31d73..36735e54 100644 --- a/packages/app/src/components/data/data-sidebar/custom-table-tab.tsx +++ b/packages/app/src/components/data/data-sidebar/custom-table-tab.tsx @@ -1,49 +1,76 @@ "use client"; +import { useState } from "react"; import { CustomTable } from "@common/db/schema/custom_table"; -import { Button } from "@/components/ui/button"; -import { Plus } from "lucide-react"; +import { Folder } from "@common/db/schema/folder"; import { createCustomTableAction } from "@/actions/data/custom-tables/createCustomTable"; -import { CustomTableList } from "./custom-table-list"; +import { updateCustomTableAction } from "@/actions/data/custom-tables/updateCustomTable"; +import { deleteCustomTableAction } from "@/actions/data/custom-tables/deleteCustomTable"; +import { duplicateCustomTableAction } from "@/actions/data/custom-tables/duplicateCustomTable"; +import { FolderTree } from "./folder-tree"; type Props = { projectId: number; customTables: CustomTable[]; + folders: Folder[]; }; type CustomTableItem = { id: number; label: string; href: string; + folderId?: number | null; }; -export function CustomTableTab({ projectId, customTables }: Props) { +export function CustomTableTab({ projectId, customTables, folders }: Props) { + const [currentFolderId, setCurrentFolderId] = useState(null); + + // Filter tables based on current folder + const filteredTables = customTables.filter( + (table) => table.folderId === currentFolderId, + ); + const tableItems: CustomTableItem[] = customTables.map( (table: CustomTable) => { return { id: table.id, label: table.name, href: `/projects/${projectId}/data/views/${table.id}`, + folderId: table.folderId, }; }, ); + const handleNewItem = async (folderId: number | null) => { + await createCustomTableAction(projectId, folderId); + }; + + const handleRename = async (itemId: number, newName: string) => { + await updateCustomTableAction(projectId, itemId, { name: newName }); + }; + + const handleDelete = async (itemId: number, itemName: string) => { + await deleteCustomTableAction(projectId, itemId); + }; + + const handleDuplicate = async (itemId: number) => { + await duplicateCustomTableAction(projectId, itemId); + }; + return (
-
-
- -
-
- +
); } diff --git a/packages/app/src/components/data/data-sidebar/folder-tree.tsx b/packages/app/src/components/data/data-sidebar/folder-tree.tsx new file mode 100644 index 00000000..d29e4f79 --- /dev/null +++ b/packages/app/src/components/data/data-sidebar/folder-tree.tsx @@ -0,0 +1,641 @@ +"use client"; + +import { useState } from "react"; +import { + ChevronRight, + ChevronDown, + Folder, + FolderOpen, + MoreHorizontal, + TableColumnsSplit, + ChartLine, + Plus, + FolderPlus, +} from "lucide-react"; +import { Button } from "@/components/ui/button"; +import { cn } from "@/utils/styles"; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from "@/components/ui/dropdown-menu"; +import { + ContextMenu, + ContextMenuContent, + ContextMenuItem, + ContextMenuTrigger, +} from "@/components/ui/context-menu"; +import { + DndContext, + PointerSensor, + useSensor, + useSensors, + DragEndEvent, + DragStartEvent, + DragOverlay, + useDraggable, + useDroppable, +} from "@dnd-kit/core"; +import { Folder as FolderType } from "@common/db/schema/folder"; +import { createFolderAction } from "@/actions/data/folders/createFolder"; +import { updateFolderAction } from "@/actions/data/folders/updateFolder"; +import { deleteFolderAction } from "@/actions/data/folders/deleteFolder"; +import { moveFolderAction } from "@/actions/data/folders/moveFolder"; +import { moveCustomTableAction } from "@/actions/data/custom-tables/moveCustomTable"; +import { movePlotAction } from "@/actions/data/plots/movePlot"; +import { RenameDialog } from "./rename-dialog"; +import Link from "next/link"; +import { useRouter } from "next/navigation"; + +interface FolderTreeProps { + projectId: number; + folders: FolderType[]; + currentFolderId: number | null; + onFolderSelect: (folderId: number | null) => void; + onNewItem: (folderId: number | null) => void; + items: Array<{ + id: number; + label: string; + href: string; + folderId?: number | null; + }>; + itemType: "customTable" | "plot"; + onItemRename?: (itemId: number, newName: string) => Promise; + onItemDelete?: (itemId: number, itemName: string) => Promise; + onItemDuplicate?: (itemId: number) => Promise; +} + +interface FolderNodeProps { + folder: FolderType; + level: number; + isExpanded: boolean; + onToggle: (folderId: number) => void; + onSelect: (folderId: number) => void; + onNewSubfolder: (parentFolderId: number | null) => void; + onRename: (folderId: number, currentName: string) => void; + onDelete: (folderId: number, folderName: string) => void; + isSelected: boolean; + items: Array<{ + id: number; + label: string; + href: string; + folderId?: number | null; + }>; + itemType: "customTable" | "plot"; + onItemRename?: (itemId: number, newName: string) => Promise; + onItemDelete?: (itemId: number, itemName: string) => Promise; + onItemDuplicate?: (itemId: number) => Promise; +} + +interface ItemNodeProps { + item: { + id: number; + label: string; + href: string; + folderId?: number | null; + }; + level: number; + itemType: "customTable" | "plot"; + onRename?: (itemId: number, newName: string) => Promise; + onDelete?: (itemId: number, itemName: string) => Promise; + onDuplicate?: (itemId: number) => Promise; +} + +function RootDroppableArea() { + const droppable = useDroppable({ + id: "folder:root", + }); + + return ( +
+ ); +} + +function ItemNode({ + item, + level, + itemType, + onRename, + onDelete, + onDuplicate, +}: ItemNodeProps) { + const [isRenaming, setIsRenaming] = useState(false); + + const draggable = useDraggable({ + id: `item:${item.id}:${encodeURIComponent(item.label)}`, + }); + + const handleRename = async (newName: string) => { + if (onRename) { + await onRename(item.id, newName); + } + setIsRenaming(false); + }; + + const handleDelete = async () => { + if (onDelete) { + await onDelete(item.id, item.label); + } + }; + + const handleDuplicate = async () => { + if (onDuplicate) { + await onDuplicate(item.id); + } + }; + + const ItemIcon = itemType === "customTable" ? TableColumnsSplit : ChartLine; + + return ( + + +
+ + + {item.label} + + + + + + + + {onRename && ( + setIsRenaming(true)}> + Rename + + )} + {onDuplicate && ( + + Duplicate + + )} + {onDelete && ( + + Delete + + )} + + +
+
+ + {onRename && ( + setIsRenaming(true)}> + Rename + + )} + {onDuplicate && ( + Duplicate + )} + {onDelete && ( + + Delete + + )} + + + {onRename && ( + !open && setIsRenaming(false)} + title={`Rename ${itemType === "customTable" ? "Table" : "Plot"}`} + initialName={item.label} + onRename={handleRename} + placeholderText={`${itemType === "customTable" ? "Table" : "Plot"} name`} + /> + )} +
+ ); +} + +function FolderNode({ + folder, + level, + isExpanded, + onToggle, + onSelect, + onNewSubfolder, + onRename, + onDelete, + isSelected, + items, + itemType, + onItemRename, + onItemDelete, + onItemDuplicate, +}: FolderNodeProps) { + const [isRenaming, setIsRenaming] = useState(false); + + const draggable = useDraggable({ + id: `folder:${folder.id}:${encodeURIComponent(folder.name)}`, + }); + + const droppable = useDroppable({ + id: `folder:${folder.id}`, + }); + + const handleRename = async (newName: string) => { + await updateFolderAction(folder.projectId, folder.id, { name: newName }); + setIsRenaming(false); + }; + + const handleDelete = async () => { + await deleteFolderAction(folder.projectId, folder.id); + }; + + const folderItems = items.filter((item) => item.folderId === folder.id); + + return ( + + +
+
+ + + +
+ + + + + + + onNewSubfolder(folder.id)}> + New Subfolder + + setIsRenaming(true)}> + Rename + + onDelete(folder.id, folder.name)} + className="text-destructive" + > + Delete + + + +
+
+ + onNewSubfolder(folder.id)}> + New Subfolder + + setIsRenaming(true)}> + Rename + + onDelete(folder.id, folder.name)} + className="text-destructive" + > + Delete + + + + {/* Show items in this folder */} + {isExpanded && folderItems.length > 0 && ( +
+ {folderItems.map((item) => ( + + ))} +
+ )} + + !open && setIsRenaming(false)} + title="Rename Folder" + initialName={folder.name} + onRename={handleRename} + placeholderText="Folder name" + /> +
+ ); +} + +export function FolderTree({ + projectId, + folders, + currentFolderId, + onFolderSelect, + onNewItem, + items, + itemType, + onItemRename, + onItemDelete, + onItemDuplicate, +}: FolderTreeProps) { + const [expandedFolders, setExpandedFolders] = useState>( + new Set(), + ); + const [draggingItem, setDraggingItem] = useState<{ + type: "folder" | "item"; + id: number; + name: string; + } | null>(null); + const router = useRouter(); + + const sensors = useSensors( + useSensor(PointerSensor, { + activationConstraint: { + distance: 6, + }, + }), + ); + + const toggleExpanded = (folderId: number) => { + const newExpanded = new Set(expandedFolders); + if (newExpanded.has(folderId)) { + newExpanded.delete(folderId); + } else { + newExpanded.add(folderId); + } + setExpandedFolders(newExpanded); + }; + + const handleNewSubfolder = async (parentFolderId: number | null) => { + try { + await createFolderAction(projectId, parentFolderId, itemType); + + // Expand the parent folder to show the new subfolder + if (parentFolderId !== null) { + setExpandedFolders((prev) => new Set([...prev, parentFolderId])); + } + router.refresh(); + } catch (error) {} + }; + + const handleRename = async (folderId: number, currentName: string) => { + // This will be handled by the RenameDialog in the FolderNode + }; + + const handleDelete = async (folderId: number, folderName: string) => { + if ( + confirm( + `Are you sure you want to delete the folder "${folderName}"? This will also delete all subfolders and move items to the root.`, + ) + ) { + await deleteFolderAction(projectId, folderId); + router.refresh(); + } + }; + + const handleDragStart = (event: DragStartEvent) => { + const { id } = event.active; + const [type, itemId, name] = (id as string).split(":"); + + setDraggingItem({ + type: type as "folder" | "item", + id: parseInt(itemId), + name: decodeURIComponent(name), + }); + }; + + const handleDragEnd = async (event: DragEndEvent) => { + setDraggingItem(null); + const { active, over } = event; + + if (!active || !over) return; + + const [draggedType, draggedId] = (active.id as string).split(":"); + const [droppedType, droppedId] = (over.id as string).split(":"); + + // Only allow dropping on folders + if (droppedType !== "folder") return; + + const targetFolderId = droppedId === "root" ? null : parseInt(droppedId); + const draggedItemId = parseInt(draggedId); + + try { + if (draggedType === "folder") { + // Prevent dropping a folder into itself or its descendants + if (targetFolderId === draggedItemId) return; + + await moveFolderAction(projectId, draggedItemId, targetFolderId); + } else if (draggedType === "item") { + if (itemType === "customTable") { + await moveCustomTableAction(projectId, draggedItemId, targetFolderId); + } else if (itemType === "plot") { + await movePlotAction(projectId, draggedItemId, targetFolderId); + } + } + + router.refresh(); + } catch (error) { + console.error("Error moving item:", error); + } + }; + + const buildFolderTree = ( + folders: FolderType[], + parentId: number | null = null, + ): FolderType[] => { + const filteredFolders = folders + .filter((folder) => { + const matches = folder.parentFolderId === parentId; + return matches; + }) + .sort((a, b) => a.name.localeCompare(b.name)); + + return filteredFolders; + }; + + const renderFolderLevel = ( + folders: FolderType[], + allFolders: FolderType[], + level: number = 0, + ): React.ReactNode => { + return folders.map((folder) => { + const isExpanded = expandedFolders.has(folder.id); + const children = buildFolderTree(allFolders, folder.id); + + return ( +
+ + {isExpanded && children.length > 0 && ( +
{renderFolderLevel(children, allFolders, level + 1)}
+ )} +
+ ); + }); + }; + + const rootFolders = buildFolderTree(folders); + const rootItems = items.filter((item) => item.folderId === null); + + const ItemIcon = itemType === "customTable" ? TableColumnsSplit : ChartLine; + + return ( + +
+ {/* Header with action buttons */} + +
+ + +
+ + {/* Show root items */} + {rootItems.length > 0 && ( +
+ {rootItems.map((item) => ( + + ))} +
+ )} + + {/* Folder tree */} + {renderFolderLevel(rootFolders, folders)} + + {/* Root droppable area */} + +
+ + {/* Drag overlay */} + {draggingItem && ( + +
+ {draggingItem.type === "folder" ? ( + + ) : ( + + )} + {draggingItem.name} +
+
+ )} +
+ ); +} diff --git a/packages/app/src/components/data/data-sidebar/index.tsx b/packages/app/src/components/data/data-sidebar/index.tsx index 5729e3b4..3467435e 100644 --- a/packages/app/src/components/data/data-sidebar/index.tsx +++ b/packages/app/src/components/data/data-sidebar/index.tsx @@ -23,6 +23,7 @@ import { GroupConfig } from "@common/db/schema/common"; import tableConfig from "@assets/tableConfig.json"; import { Plot } from "@common/db/schema/plot"; import { CustomTable } from "@common/db/schema/custom_table"; +import { Folder } from "@common/db/schema/folder"; import { useState, useRef, useCallback } from "react"; import { ImperativePanelHandle } from "react-resizable-panels"; import { TableNode } from "@/components/data/data-sidebar/table-config"; @@ -38,6 +39,8 @@ type Props = { tableCounts: TableCounts; plots: Plot[]; customTables: CustomTable[]; + customTableFolders: Folder[]; + plotFolders: Folder[]; defaultSize?: number; minSize?: number; maxSize?: number; @@ -60,6 +63,8 @@ export function DataSidebar({ tableCounts, plots, customTables, + customTableFolders, + plotFolders, }: Props) { const flattenedNodes = flattenNodes(nodes); @@ -120,13 +125,19 @@ export function DataSidebar({ name: "Views and reports", icon: TableColumnsSplit, content: ( - + ), }, { name: "Plots", icon: ChartLine, - content: , + content: ( + + ), }, { name: "Logs", diff --git a/packages/app/src/components/data/data-sidebar/plot-tab.tsx b/packages/app/src/components/data/data-sidebar/plot-tab.tsx index eff4205f..9aa16f24 100644 --- a/packages/app/src/components/data/data-sidebar/plot-tab.tsx +++ b/packages/app/src/components/data/data-sidebar/plot-tab.tsx @@ -1,41 +1,72 @@ "use client"; +import { useState } from "react"; import { Plot } from "@common/db/schema/plot"; - -import { Button } from "@/components/ui/button"; -import { Plus } from "lucide-react"; +import { Folder } from "@common/db/schema/folder"; import { createPlotAction } from "@/actions/data/plots/createPlot"; -import { PlotList } from "./plot-list"; +import { updatePlotAction } from "@/actions/data/plots/updatePlot"; +import { deletePlotAction } from "@/actions/data/plots/deletePlot"; +// import { duplicatePlotAction } from "@/actions/data/plots/duplicatePlot"; +import { FolderTree } from "./folder-tree"; type Props = { projectId: number; plots: Plot[]; + folders: Folder[]; +}; + +type PlotItem = { + id: number; + label: string; + href: string; + folderId?: number | null; }; -export function PlotTab({ projectId, plots }: Props) { - const plotItems = plots.map((plot: Plot) => { +export function PlotTab({ projectId, plots, folders }: Props) { + const [currentFolderId, setCurrentFolderId] = useState(null); + + // Filter plots based on current folder + const filteredPlots = plots.filter( + (plot) => plot.folderId === currentFolderId, + ); + + const plotItems: PlotItem[] = plots.map((plot: Plot) => { return { id: plot.id, - type: "link", label: plot.name, href: `/projects/${projectId}/data/plots/${plot.id}`, + folderId: plot.folderId, }; }); + const handleNewItem = async (folderId: number | null) => { + await createPlotAction(projectId, folderId); + }; + + const handleRename = async (itemId: number, newName: string) => { + await updatePlotAction(projectId, itemId, { name: newName }); + }; + + const handleDelete = async (itemId: number, itemName: string) => { + await deletePlotAction(projectId, itemId); + }; + + const handleDuplicate = async (itemId: number) => {}; + return (
-
- -
- +
); } diff --git a/packages/app/src/components/data/data-wrapper.tsx b/packages/app/src/components/data/data-wrapper.tsx index 813cbcdc..24042157 100644 --- a/packages/app/src/components/data/data-wrapper.tsx +++ b/packages/app/src/components/data/data-wrapper.tsx @@ -12,6 +12,7 @@ import { import { TableNode } from "@/components/data/data-sidebar/table-config"; import { Plot } from "@common/db/schema/plot"; import { CustomTable } from "@common/db/schema/custom_table"; +import { Folder } from "@common/db/schema/folder"; import { TableCounts } from "./helpers"; import { usePathname } from "next/navigation"; import { useEffect, createContext } from "react"; @@ -24,6 +25,8 @@ interface DataWrapperProps { tableCounts: TableCounts; plots: Plot[]; customTables: CustomTable[]; + customTableFolders: Folder[]; + plotFolders: Folder[]; children: React.ReactNode; } @@ -36,6 +39,8 @@ export function DataWrapper({ tableCounts, plots, customTables, + customTableFolders, + plotFolders, children, }: DataWrapperProps) { const pathname = usePathname(); @@ -84,6 +89,8 @@ export function DataWrapper({ tableCounts={tableCounts} plots={plots} customTables={customTables} + customTableFolders={customTableFolders} + plotFolders={plotFolders} /> diff --git a/packages/app/src/db/crud/custom_table.ts b/packages/app/src/db/crud/custom_table.ts index 1f79af4c..e6e88c1f 100644 --- a/packages/app/src/db/crud/custom_table.ts +++ b/packages/app/src/db/crud/custom_table.ts @@ -1,4 +1,4 @@ -import { eq, and } from "drizzle-orm"; +import { eq, and, isNull } from "drizzle-orm"; import { db } from ".."; import { @@ -11,7 +11,27 @@ export async function readCustomTables(projectId: number) { return await db .select() .from(customTable) - .where(eq(customTable.projectId, projectId)); + .where(eq(customTable.projectId, projectId)) + .orderBy(customTable.name); +} + +export async function readCustomTablesInFolder( + projectId: number, + folderId: number | null, +) { + const whereCondition = + folderId === null + ? and(eq(customTable.projectId, projectId), isNull(customTable.folderId)) + : and( + eq(customTable.projectId, projectId), + eq(customTable.folderId, folderId), + ); + + return await db + .select() + .from(customTable) + .where(whereCondition) + .orderBy(customTable.name); } export async function readCustomTable(id: number) { diff --git a/packages/app/src/db/crud/folder.ts b/packages/app/src/db/crud/folder.ts new file mode 100644 index 00000000..0d7a75a8 --- /dev/null +++ b/packages/app/src/db/crud/folder.ts @@ -0,0 +1,123 @@ +import { eq, and, isNull } from "drizzle-orm"; +import { db } from ".."; +import { folder, Folder, FolderInsert } from "@common/db/schema/folder"; + +export async function readFolders( + projectId: number, + type: "customTable" | "plot", +): Promise { + return await db + .select() + .from(folder) + .where(and(eq(folder.projectId, projectId), eq(folder.type, type))) + .orderBy(folder.name); +} + +export async function readFolder(id: number): Promise { + const [selectedFolder] = await db + .select() + .from(folder) + .where(eq(folder.id, id)); + + return selectedFolder; +} + +export async function readRootFolders( + projectId: number, + type: "customTable" | "plot", +): Promise { + return await db + .select() + .from(folder) + .where( + and( + eq(folder.projectId, projectId), + eq(folder.type, type), + isNull(folder.parentFolderId), + ), + ) + .orderBy(folder.name); +} + +export async function readChildFolders( + parentFolderId: number, +): Promise { + return await db + .select() + .from(folder) + .where(eq(folder.parentFolderId, parentFolderId)) + .orderBy(folder.name); +} + +export async function generateUniqueFolderName( + projectId: number, + parentFolderId: number | null = null, + type: "customTable" | "plot" = "customTable", + baseName: string = "New Folder", +): Promise { + const existingFolders = parentFolderId + ? await readChildFolders(parentFolderId) + : await readRootFolders(projectId, type); + + const existingNames = new Set(existingFolders.map((folder) => folder.name)); + + let name = baseName; + let counter = 1; + + while (existingNames.has(name)) { + name = `${baseName} (${counter})`; + counter++; + } + + return name; +} + +export async function createFolder(insertData: FolderInsert): Promise { + const [newFolder] = await db.insert(folder).values(insertData).returning(); + + return newFolder; +} + +export async function deleteFolder(id: number): Promise { + await db.delete(folder).where(eq(folder.id, id)); +} + +export async function updateFolder( + id: number, + data: Partial>, +): Promise { + const [updatedFolder] = await db + .update(folder) + .set(data) + .where(eq(folder.id, id)) + .returning(); + + return updatedFolder; +} + +export async function readFolderForProject( + projectId: number, + folderId: number, +): Promise { + const [selectedFolder] = await db + .select() + .from(folder) + .where(and(eq(folder.projectId, projectId), eq(folder.id, folderId))); + + return selectedFolder; +} + +export async function getFolderPath(folderId: number): Promise { + const path: Folder[] = []; + let currentFolderId = folderId; + + while (currentFolderId) { + const currentFolder = await readFolder(currentFolderId); + if (!currentFolder) break; + + path.unshift(currentFolder); + currentFolderId = currentFolder.parentFolderId || 0; + } + + return path; +} diff --git a/packages/app/src/db/crud/plot.ts b/packages/app/src/db/crud/plot.ts index d0e1091f..3cb682f4 100644 --- a/packages/app/src/db/crud/plot.ts +++ b/packages/app/src/db/crud/plot.ts @@ -1,9 +1,25 @@ import { db } from "@/db"; import { plot, type Plot, type PlotInsert } from "@common/db/schema/plot"; -import { eq, and } from "drizzle-orm"; +import { eq, and, isNull } from "drizzle-orm"; export async function readPlots(projectId: number): Promise { - return db.select().from(plot).where(eq(plot.projectId, projectId)); + return db + .select() + .from(plot) + .where(eq(plot.projectId, projectId)) + .orderBy(plot.name); +} + +export async function readPlotsInFolder( + projectId: number, + folderId: number | null, +): Promise { + const whereCondition = + folderId === null + ? and(eq(plot.projectId, projectId), isNull(plot.folderId)) + : and(eq(plot.projectId, projectId), eq(plot.folderId, folderId)); + + return db.select().from(plot).where(whereCondition).orderBy(plot.name); } export async function readPlot(id: number): Promise { diff --git a/packages/app/src/lib/dal/folders.ts b/packages/app/src/lib/dal/folders.ts new file mode 100644 index 00000000..c8cbab31 --- /dev/null +++ b/packages/app/src/lib/dal/folders.ts @@ -0,0 +1,21 @@ +import { readFolders } from "@/db/crud/folder"; +import { unstable_cache } from "next/cache"; + +export async function getFoldersForProject( + projectId: number, + type: "customTable" | "plot", +) { + const getCachedFolders = unstable_cache( + async () => { + const folders = await readFolders(projectId, type); + return folders; + }, + [`project-${projectId}-folders-${type}`], + { + tags: [`project-${projectId}-folders-${type}`], + revalidate: 300, // Disable cache to force fresh data + }, + ); + + return await getCachedFolders(); +} diff --git a/packages/common/drizzle/0014_quiet_romulus.sql b/packages/common/drizzle/0014_quiet_romulus.sql new file mode 100644 index 00000000..2afb7f6d --- /dev/null +++ b/packages/common/drizzle/0014_quiet_romulus.sql @@ -0,0 +1,15 @@ +CREATE TABLE "folder" ( + "id" serial PRIMARY KEY NOT NULL, + "name" varchar NOT NULL, + "project_id" integer NOT NULL, + "parent_folder_id" integer, + "createdAt" timestamp (3) DEFAULT now() NOT NULL, + "updatedAt" timestamp (3) DEFAULT now() NOT NULL +); +--> statement-breakpoint +ALTER TABLE "custom_table" ADD COLUMN "folder_id" integer;--> statement-breakpoint +ALTER TABLE "plot" ADD COLUMN "folder_id" integer;--> statement-breakpoint +ALTER TABLE "folder" ADD CONSTRAINT "folder_project_id_project_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."project"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "folder" ADD CONSTRAINT "folder_parent_folder_id_folder_id_fk" FOREIGN KEY ("parent_folder_id") REFERENCES "public"."folder"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "custom_table" ADD CONSTRAINT "custom_table_folder_id_folder_id_fk" FOREIGN KEY ("folder_id") REFERENCES "public"."folder"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "plot" ADD CONSTRAINT "plot_folder_id_folder_id_fk" FOREIGN KEY ("folder_id") REFERENCES "public"."folder"("id") ON DELETE set null ON UPDATE no action; \ No newline at end of file diff --git a/packages/common/drizzle/0015_flowery_cyclops.sql b/packages/common/drizzle/0015_flowery_cyclops.sql new file mode 100644 index 00000000..c4b8167a --- /dev/null +++ b/packages/common/drizzle/0015_flowery_cyclops.sql @@ -0,0 +1 @@ +ALTER TABLE "folder" ADD COLUMN "type" varchar DEFAULT 'customTable' NOT NULL; \ No newline at end of file diff --git a/packages/common/drizzle/meta/0014_snapshot.json b/packages/common/drizzle/meta/0014_snapshot.json new file mode 100644 index 00000000..c8959ab7 --- /dev/null +++ b/packages/common/drizzle/meta/0014_snapshot.json @@ -0,0 +1,25773 @@ +{ + "id": "22eff15d-f822-43a8-85bc-55a50e87a071", + "prevId": "fb24f786-5c76-4822-93e0-941b452856cd", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.abbreviation": { + "name": "abbreviation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "code": { + "name": "code", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "abbreviation_collection_id": { + "name": "abbreviation_collection_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "abbreviation_abbreviation_collection_id_abbreviation_collection_id_fk": { + "name": "abbreviation_abbreviation_collection_id_abbreviation_collection_id_fk", + "tableFrom": "abbreviation", + "tableTo": "abbreviation_collection", + "columnsFrom": [ + "abbreviation_collection_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_abbr": { + "name": "unique_abbr", + "nullsNotDistinct": false, + "columns": [ + "code", + "abbreviation_collection_id" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.abbreviation_collection": { + "name": "abbreviation_collection", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "column": { + "name": "column", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "table": { + "name": "table", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "abbreviation_collection_project_id_project_id_fk": { + "name": "abbreviation_collection_project_id_project_id_fk", + "tableFrom": "abbreviation_collection", + "tableTo": "project", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_abbr_collection": { + "name": "unique_abbr_collection", + "nullsNotDistinct": false, + "columns": [ + "project_id", + "column", + "table" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_table": { + "name": "custom_table", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "folder_id": { + "name": "folder_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "definition": { + "name": "definition", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "custom_table_project_id_project_id_fk": { + "name": "custom_table_project_id_project_id_fk", + "tableFrom": "custom_table", + "tableTo": "project", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "custom_table_folder_id_folder_id_fk": { + "name": "custom_table_folder_id_folder_id_fk", + "tableFrom": "custom_table", + "tableTo": "folder", + "columnsFrom": [ + "folder_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_table_zone": { + "name": "custom_table_zone", + "schema": "", + "columns": { + "custom_table_id": { + "name": "custom_table_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "zone_id": { + "name": "zone_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "custom_table_zone_custom_table_id_custom_table_id_fk": { + "name": "custom_table_zone_custom_table_id_custom_table_id_fk", + "tableFrom": "custom_table_zone", + "tableTo": "custom_table", + "columnsFrom": [ + "custom_table_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "custom_table_zone_zone_id_zone_id_fk": { + "name": "custom_table_zone_zone_id_zone_id_fk", + "tableFrom": "custom_table_zone", + "tableTo": "zone", + "columnsFrom": [ + "zone_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.folder": { + "name": "folder", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_folder_id": { + "name": "parent_folder_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "folder_project_id_project_id_fk": { + "name": "folder_project_id_project_id_fk", + "tableFrom": "folder", + "tableTo": "project", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "folder_parent_folder_id_folder_id_fk": { + "name": "folder_parent_folder_id_folder_id_fk", + "tableFrom": "folder", + "tableTo": "folder", + "columnsFrom": [ + "parent_folder_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ags_file_upload": { + "name": "ags_file_upload", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "type": "always", + "name": "ags_file_upload_id_seq", + "schema": "public", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "2147483647", + "cache": "1", + "cycle": false + } + }, + "ags_import_id": { + "name": "ags_import_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "validated_data_blob_key": { + "name": "validated_data_blob_key", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "file_name": { + "name": "file_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "file_url": { + "name": "file_url", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "file_url_in_progress": { + "name": "file_url_in_progress", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "file_size": { + "name": "file_size", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "ags_file_upload_ags_import_id_ags_import_id_fk": { + "name": "ags_file_upload_ags_import_id_ags_import_id_fk", + "tableFrom": "ags_file_upload", + "tableTo": "ags_import", + "columnsFrom": [ + "ags_import_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ags_import": { + "name": "ags_import", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "ags_dictionary_version": { + "name": "ags_dictionary_version", + "type": "ags_dictionary_version", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "ags_validation_status": { + "name": "ags_validation_status", + "type": "ags_validation_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "changes_calculation_status": { + "name": "changes_calculation_status", + "type": "changes_calculation_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "import_summary": { + "name": "import_summary", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "ags_import_project_id_project_id_fk": { + "name": "ags_import_project_id_project_id_fk", + "tableFrom": "ags_import", + "tableTo": "project", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.excel_import": { + "name": "excel_import", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "excel_import_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "extracted_data": { + "name": "extracted_data", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "summary": { + "name": "summary", + "type": "jsonb", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "excel_import_project_id_project_id_fk": { + "name": "excel_import_project_id_project_id_fk", + "tableFrom": "excel_import", + "tableTo": "project", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.excel_import_file": { + "name": "excel_import_file", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "excel_import_id": { + "name": "excel_import_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "file_name": { + "name": "file_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "file_size": { + "name": "file_size", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "mapping": { + "name": "mapping", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "blob_key": { + "name": "blob_key", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "excel_import_file_excel_import_id_excel_import_id_fk": { + "name": "excel_import_file_excel_import_id_excel_import_id_fk", + "tableFrom": "excel_import_file", + "tableTo": "excel_import", + "columnsFrom": [ + "excel_import_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.plot": { + "name": "plot", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "folder_id": { + "name": "folder_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "source_custom_table_id": { + "name": "source_custom_table_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "definition": { + "name": "definition", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "plot_project_id_project_id_fk": { + "name": "plot_project_id_project_id_fk", + "tableFrom": "plot", + "tableTo": "project", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "plot_folder_id_folder_id_fk": { + "name": "plot_folder_id_folder_id_fk", + "tableFrom": "plot", + "tableTo": "folder", + "columnsFrom": [ + "folder_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "plot_source_custom_table_id_custom_table_id_fk": { + "name": "plot_source_custom_table_id_custom_table_id_fk", + "tableFrom": "plot", + "tableTo": "custom_table", + "columnsFrom": [ + "source_custom_table_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.project": { + "name": "project", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "srid": { + "name": "srid", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 4326 + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user_project": { + "name": "user_project", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "project_role", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'VIEWER'" + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "user_project_user_id_user_id_fk": { + "name": "user_project_user_id_user_id_fk", + "tableFrom": "user_project", + "tableTo": "user", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "user_project_project_id_project_id_fk": { + "name": "user_project_project_id_project_id_fk", + "tableFrom": "user_project", + "tableTo": "project", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user": { + "name": "user", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "email": { + "name": "email", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "auth_id": { + "name": "auth_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "first_name": { + "name": "first_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "last_name": { + "name": "last_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "picture": { + "name": "picture", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "user_email_unique": { + "name": "user_email_unique", + "nullsNotDistinct": false, + "columns": [ + "email" + ] + }, + "user_auth_id_unique": { + "name": "user_auth_id_unique", + "nullsNotDistinct": false, + "columns": [ + "auth_id" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.zone": { + "name": "zone", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "type": "always", + "name": "zone_id_seq", + "schema": "public", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "2147483647", + "cache": "1", + "cycle": false + } + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "geometry": { + "name": "geometry", + "type": "geometry(Polygon, 4326)", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "zone_project_id_project_id_fk": { + "name": "zone_project_id_project_id_fk", + "tableFrom": "zone", + "tableTo": "project", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aggregate_abrasion_tests": { + "name": "aggregate_abrasion_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "aggregate_abrasion_value": { + "name": "aggregate_abrasion_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "aggregate_abrasion_tests_sample_information_id_sample_information_id_fk": { + "name": "aggregate_abrasion_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "aggregate_abrasion_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_aggregate_abrasion_tests": { + "name": "unique_aggregate_abrasion_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aggregate_crushing_value_tests": { + "name": "aggregate_crushing_value_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "aggregate_crushing_value": { + "name": "aggregate_crushing_value", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "size_fraction_from_which_test_portion_was_obtained": { + "name": "size_fraction_from_which_test_portion_was_obtained", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "aggregate_crushing_value_tests_sample_information_id_sample_information_id_fk": { + "name": "aggregate_crushing_value_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "aggregate_crushing_value_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_aggregate_crushing_value_tests": { + "name": "unique_aggregate_crushing_value_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aggregate_determination_of_the_resistance_to_wear_micro_deval": { + "name": "aggregate_determination_of_the_resistance_to_wear_micro_deval", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "size_fraction_on_which_sample_obtained": { + "name": "size_fraction_on_which_sample_obtained", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_test": { + "name": "type_of_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "micro_deval_coefficient_for_test_specimen_one": { + "name": "micro_deval_coefficient_for_test_specimen_one", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "micro_deval_coefficient_for_test_specimen_two": { + "name": "micro_deval_coefficient_for_test_specimen_two", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mean_micro_deval_value_dry": { + "name": "mean_micro_deval_value_dry", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mean_micro_deval_value_wet": { + "name": "mean_micro_deval_value_wet", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "date_control_2_polished_stone_value_first_run": { + "name": "date_control_2_polished_stone_value_first_run", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_aggregate_determination_of_the_resistance_to_wear_micro_deval_abbr": { + "name": "idx_aggregate_determination_of_the_resistance_to_wear_micro_deval_abbr", + "columns": [ + { + "expression": "type_of_test", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "aggregate_determination_of_the_resistance_to_wear_micro_deval_type_of_test_abbreviation_id_fk": { + "name": "aggregate_determination_of_the_resistance_to_wear_micro_deval_type_of_test_abbreviation_id_fk", + "tableFrom": "aggregate_determination_of_the_resistance_to_wear_micro_deval", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_test" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "aggregate_determination_of_the_resistance_to_wear_micro_deval_sample_information_id_sample_information_id_fk": { + "name": "aggregate_determination_of_the_resistance_to_wear_micro_deval_sample_information_id_sample_information_id_fk", + "tableFrom": "aggregate_determination_of_the_resistance_to_wear_micro_deval", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_aggregate_determination_of_the_resistance_to_wear_micro_deval": { + "name": "unique_aggregate_determination_of_the_resistance_to_wear_micro_deval", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aggregate_elongation_index_tests": { + "name": "aggregate_elongation_index_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "aggregate_elongation_index": { + "name": "aggregate_elongation_index", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "aggregate_elongation_index_tests_sample_information_id_sample_information_id_fk": { + "name": "aggregate_elongation_index_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "aggregate_elongation_index_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_aggregate_elongation_index_tests": { + "name": "unique_aggregate_elongation_index_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aggregate_flakiness_tests": { + "name": "aggregate_flakiness_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "aggregate_flakiness_index": { + "name": "aggregate_flakiness_index", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mass_of_test_portion": { + "name": "mass_of_test_portion", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "aggregate_flakiness_tests_sample_information_id_sample_information_id_fk": { + "name": "aggregate_flakiness_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "aggregate_flakiness_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_aggregate_flakiness_tests": { + "name": "unique_aggregate_flakiness_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aggregate_impact_value_tests": { + "name": "aggregate_impact_value_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "aggregate_impact_value_test_1": { + "name": "aggregate_impact_value_test_1", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "aggregate_impact_value_test_2": { + "name": "aggregate_impact_value_test_2", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mean_aggregate_impact_value": { + "name": "mean_aggregate_impact_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "size_fraction_from_which_test_portion_was_obtained": { + "name": "size_fraction_from_which_test_portion_was_obtained", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "particle_density_of_size_fraction_between_8_mm_and_12_5mm": { + "name": "particle_density_of_size_fraction_between_8_mm_and_12_5mm", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "aggregate_impact_value_tests_sample_information_id_sample_information_id_fk": { + "name": "aggregate_impact_value_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "aggregate_impact_value_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_aggregate_impact_value_tests": { + "name": "unique_aggregate_impact_value_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aggregate_polished_stone_tests": { + "name": "aggregate_polished_stone_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "aggregate_polished_stone_value": { + "name": "aggregate_polished_stone_value", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "aggregate_polished_stone_tests_sample_information_id_sample_information_id_fk": { + "name": "aggregate_polished_stone_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "aggregate_polished_stone_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_aggregate_polished_stone_tests": { + "name": "unique_aggregate_polished_stone_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aggregate_soundness_tests": { + "name": "aggregate_soundness_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "aggregate_soundness_test": { + "name": "aggregate_soundness_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "size_fraction_from_which_test_portion_was_obtained": { + "name": "size_fraction_from_which_test_portion_was_obtained", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "aggregate_soundness_tests_sample_information_id_sample_information_id_fk": { + "name": "aggregate_soundness_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "aggregate_soundness_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_aggregate_soundness_tests": { + "name": "unique_aggregate_soundness_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aggregate_water_absorption_tests": { + "name": "aggregate_water_absorption_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "aggregate_water_absorption": { + "name": "aggregate_water_absorption", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "aggregate_water_absorption_tests_sample_information_id_sample_information_id_fk": { + "name": "aggregate_water_absorption_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "aggregate_water_absorption_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_aggregate_water_absorption_tests": { + "name": "unique_aggregate_water_absorption_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.boring_drilling_progress_by_time": { + "name": "boring_drilling_progress_by_time", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "date_and_time_of_progress_reading": { + "name": "date_and_time_of_progress_reading", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "hole_depth": { + "name": "hole_depth", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_of_casing": { + "name": "depth_of_casing", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_water": { + "name": "depth_to_water", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_drilling_journals": { + "name": "associated_file_reference_e_g_drilling_journals", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "boring_drilling_progress_by_time_location_details_id_location_details_id_fk": { + "name": "boring_drilling_progress_by_time_location_details_id_location_details_id_fk", + "tableFrom": "boring_drilling_progress_by_time", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_boring_drilling_progress_by_time": { + "name": "unique_boring_drilling_progress_by_time", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "date_and_time_of_progress_reading" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.california_bearing_ratio_tests_data": { + "name": "california_bearing_ratio_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cbr_at_top": { + "name": "cbr_at_top", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "cbr_at_bottom": { + "name": "cbr_at_bottom", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content_at_top_after_test": { + "name": "water_moisture_content_at_top_after_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content_at_bottom_after_test": { + "name": "water_moisture_content_at_bottom_after_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_water_moisture_content": { + "name": "initial_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_bulk_density": { + "name": "initial_bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "surcharge_pressure_applied": { + "name": "surcharge_pressure_applied", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "details_of_soaking": { + "name": "details_of_soaking", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "amount_of_swell_recorded_during_soaking_if_applicable": { + "name": "amount_of_swell_recorded_during_soaking_if_applicable", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_specific_remarks": { + "name": "test_specific_remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "california_bearing_ratio_tests_general_id": { + "name": "california_bearing_ratio_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "california_bearing_ratio_tests_data_california_bearing_ratio_tests_general_id_california_bearing_ratio_tests_general_id_fk": { + "name": "california_bearing_ratio_tests_data_california_bearing_ratio_tests_general_id_california_bearing_ratio_tests_general_id_fk", + "tableFrom": "california_bearing_ratio_tests_data", + "tableTo": "california_bearing_ratio_tests_general", + "columnsFrom": [ + "california_bearing_ratio_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_california_bearing_ratio_tests_data": { + "name": "unique_california_bearing_ratio_tests_data", + "nullsNotDistinct": false, + "columns": [ + "california_bearing_ratio_tests_general_id", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.california_bearing_ratio_tests_general": { + "name": "california_bearing_ratio_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "natural_water_moisture_content_of_specimen_prior_to_test": { + "name": "natural_water_moisture_content_of_specimen_prior_to_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "weight_percent_retained_on_20mm_sieve": { + "name": "weight_percent_retained_on_20mm_sieve", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "amount_of_stabiliser_added": { + "name": "amount_of_stabiliser_added", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_stabiliser_added": { + "name": "type_of_stabiliser_added", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result": { + "name": "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method_including_remoulding": { + "name": "test_method_including_remoulding", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_california_bearing_ratio_tests_general_abbr": { + "name": "idx_california_bearing_ratio_tests_general_abbr", + "columns": [ + { + "expression": "sample_condition", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "california_bearing_ratio_tests_general_sample_condition_abbreviation_id_fk": { + "name": "california_bearing_ratio_tests_general_sample_condition_abbreviation_id_fk", + "tableFrom": "california_bearing_ratio_tests_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "sample_condition" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "california_bearing_ratio_tests_general_sample_information_id_sample_information_id_fk": { + "name": "california_bearing_ratio_tests_general_sample_information_id_sample_information_id_fk", + "tableFrom": "california_bearing_ratio_tests_general", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_california_bearing_ratio_tests_general": { + "name": "unique_california_bearing_ratio_tests_general", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.casing_diameter_by_depth": { + "name": "casing_diameter_by_depth", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_of_base_of_casing_recorded_in_cdia_diam": { + "name": "depth_of_base_of_casing_recorded_in_cdia_diam", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "casing_diameter": { + "name": "casing_diameter", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_casing_cement_records": { + "name": "associated_file_reference_e_g_casing_cement_records", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "casing_diameter_by_depth_location_details_id_location_details_id_fk": { + "name": "casing_diameter_by_depth_location_details_id_location_details_id_fk", + "tableFrom": "casing_diameter_by_depth", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_casing_diameter_by_depth": { + "name": "unique_casing_diameter_by_depth", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_of_base_of_casing_recorded_in_cdia_diam", + "casing_diameter" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.chain_of_custody_information": { + "name": "chain_of_custody_information", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "chain_of_custody_reference": { + "name": "chain_of_custody_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "samples_despatched_from": { + "name": "samples_despatched_from", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "samples_despatched_to": { + "name": "samples_despatched_to", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "date_dispatched": { + "name": "date_dispatched", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "batch_reference": { + "name": "batch_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "number_of_sample_containers": { + "name": "number_of_sample_containers", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_chain_of_custody_sheets": { + "name": "associated_file_reference_chain_of_custody_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "chain_of_custody_information_sample_information_id_sample_information_id_fk": { + "name": "chain_of_custody_information_sample_information_id_sample_information_id_fk", + "tableFrom": "chain_of_custody_information", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_chain_of_custody_information": { + "name": "unique_chain_of_custody_information", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "chain_of_custody_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.chalk_crushing_value_tests": { + "name": "chalk_crushing_value_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "water_content_of_specimen_tested": { + "name": "water_content_of_specimen_tested", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "chalk_crushing_value": { + "name": "chalk_crushing_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "percentage_larger_than_10mm_in_original_sample": { + "name": "percentage_larger_than_10mm_in_original_sample", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "chalk_crushing_value_tests_sample_information_id_sample_information_id_fk": { + "name": "chalk_crushing_value_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "chalk_crushing_value_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_chalk_crushing_value_tests": { + "name": "unique_chalk_crushing_value_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.chiselling_details": { + "name": "chiselling_details", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_at_start_of_chiselling": { + "name": "depth_at_start_of_chiselling", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_at_end_of_chiselling": { + "name": "depth_at_end_of_chiselling", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "time_taken": { + "name": "time_taken", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "start_time": { + "name": "start_time", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "chiselling_tool_used": { + "name": "chiselling_tool_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "notes_on_chiselling": { + "name": "notes_on_chiselling", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_drilling_journals": { + "name": "associated_file_reference_e_g_drilling_journals", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "chiselling_details_location_details_id_location_details_id_fk": { + "name": "chiselling_details_location_details_id_location_details_id_fk", + "tableFrom": "chiselling_details", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_chiselling_details": { + "name": "unique_chiselling_details", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_at_start_of_chiselling" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.compaction_tests_data": { + "name": "compaction_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "compaction_point_number": { + "name": "compaction_point_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content": { + "name": "water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "dry_density_at_cmpt_mc_water_moisture_content": { + "name": "dry_density_at_cmpt_mc_water_moisture_content", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "compaction_tests_general_id": { + "name": "compaction_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "compaction_tests_data_compaction_tests_general_id_compaction_tests_general_id_fk": { + "name": "compaction_tests_data_compaction_tests_general_id_compaction_tests_general_id_fk", + "tableFrom": "compaction_tests_data", + "tableTo": "compaction_tests_general", + "columnsFrom": [ + "compaction_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_compaction_tests_data": { + "name": "unique_compaction_tests_data", + "nullsNotDistinct": false, + "columns": [ + "compaction_tests_general_id", + "compaction_point_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.compaction_tests_general": { + "name": "compaction_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_number": { + "name": "test_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "compaction_test_type": { + "name": "compaction_test_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "compaction_mould_type": { + "name": "compaction_mould_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "weight_percent_of_material_retained_on_37_5mm_sieve": { + "name": "weight_percent_of_material_retained_on_37_5mm_sieve", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "weight_percent_of_material_retained_on_20mm_sieve": { + "name": "weight_percent_of_material_retained_on_20mm_sieve", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "particle_density_with_prefix_if_value_assumed": { + "name": "particle_density_with_prefix_if_value_assumed", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "maximum_dry_density": { + "name": "maximum_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content_at_maximum_dry_density_optimum": { + "name": "water_moisture_content_at_maximum_dry_density_optimum", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "amount_of_stabiliser_added": { + "name": "amount_of_stabiliser_added", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_stabiliser_added": { + "name": "type_of_stabiliser_added", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result": { + "name": "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_compaction_tests_general_abbr": { + "name": "idx_compaction_tests_general_abbr", + "columns": [ + { + "expression": "compaction_test_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "compaction_mould_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "compaction_tests_general_compaction_test_type_abbreviation_id_fk": { + "name": "compaction_tests_general_compaction_test_type_abbreviation_id_fk", + "tableFrom": "compaction_tests_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "compaction_test_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "compaction_tests_general_compaction_mould_type_abbreviation_id_fk": { + "name": "compaction_tests_general_compaction_mould_type_abbreviation_id_fk", + "tableFrom": "compaction_tests_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "compaction_mould_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "compaction_tests_general_sample_information_id_sample_information_id_fk": { + "name": "compaction_tests_general_sample_information_id_sample_information_id_fk", + "tableFrom": "compaction_tests_general", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_compaction_tests_general": { + "name": "unique_compaction_tests_general", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen", + "test_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.consolidation_tests_data": { + "name": "consolidation_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "oedometer_stress_increment": { + "name": "oedometer_stress_increment", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "voids_ratio_at_start_of_increment": { + "name": "voids_ratio_at_start_of_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "stress_at_end_of_stress_increment_decrement": { + "name": "stress_at_end_of_stress_increment_decrement", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "voids_ratio_at_end_of_stress_increment": { + "name": "voids_ratio_at_end_of_stress_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "reported_coefficient_of_volume_compressibility_over_stress_increment": { + "name": "reported_coefficient_of_volume_compressibility_over_stress_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "coefficient_of_secondary_compression_over_stress_increment": { + "name": "coefficient_of_secondary_compression_over_stress_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "coefficient_of_consolidation_determined_by_the_root_time_method": { + "name": "coefficient_of_consolidation_determined_by_the_root_time_method", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "coefficient_of_consolidation_determined_by_the_log_time_method": { + "name": "coefficient_of_consolidation_determined_by_the_log_time_method", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "average_temperature_over_stress_increment": { + "name": "average_temperature_over_stress_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "consolidation_tests_general_id": { + "name": "consolidation_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "consolidation_tests_data_consolidation_tests_general_id_consolidation_tests_general_id_fk": { + "name": "consolidation_tests_data_consolidation_tests_general_id_consolidation_tests_general_id_fk", + "tableFrom": "consolidation_tests_data", + "tableTo": "consolidation_tests_general", + "columnsFrom": [ + "consolidation_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_consolidation_tests_data": { + "name": "unique_consolidation_tests_data", + "nullsNotDistinct": false, + "columns": [ + "consolidation_tests_general_id", + "oedometer_stress_increment" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.consolidation_tests_general": { + "name": "consolidation_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_consolidation_test": { + "name": "type_of_consolidation_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "test_specimen_diameter": { + "name": "test_specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_specimen_height": { + "name": "test_specimen_height", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_water_moisture_content": { + "name": "initial_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "final_water_moisture_content": { + "name": "final_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_bulk_density": { + "name": "initial_bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "particle_density_with_prefix_if_value_assumed": { + "name": "particle_density_with_prefix_if_value_assumed", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_degree_of_saturation": { + "name": "initial_degree_of_saturation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "swelling_pressure": { + "name": "swelling_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "height_change_of_specimen_on_saturation": { + "name": "height_change_of_specimen_on_saturation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_voids_ratio": { + "name": "initial_voids_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result": { + "name": "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviations_from_the_test_method": { + "name": "deviations_from_the_test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_water_moisture_content_source": { + "name": "initial_water_moisture_content_source", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "results_corrected_for_equipment_deformation": { + "name": "results_corrected_for_equipment_deformation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_consolidation_tests_general_abbr": { + "name": "idx_consolidation_tests_general_abbr", + "columns": [ + { + "expression": "type_of_consolidation_test", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sample_condition", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "consolidation_tests_general_type_of_consolidation_test_abbreviation_id_fk": { + "name": "consolidation_tests_general_type_of_consolidation_test_abbreviation_id_fk", + "tableFrom": "consolidation_tests_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_consolidation_test" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "consolidation_tests_general_sample_condition_abbreviation_id_fk": { + "name": "consolidation_tests_general_sample_condition_abbreviation_id_fk", + "tableFrom": "consolidation_tests_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "sample_condition" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "consolidation_tests_general_sample_information_id_sample_information_id_fk": { + "name": "consolidation_tests_general_sample_information_id_sample_information_id_fk", + "tableFrom": "consolidation_tests_general", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_consolidation_tests_general": { + "name": "unique_consolidation_tests_general", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.coring_information": { + "name": "coring_information", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_core_run": { + "name": "depth_to_top_of_core_run", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_core_run": { + "name": "depth_to_base_of_core_run", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "percentage_of_core_recovered_in_core_run_tcr": { + "name": "percentage_of_core_recovered_in_core_run_tcr", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "percentage_of_solid_core_recovered_in_core_run_scr": { + "name": "percentage_of_solid_core_recovered_in_core_run_scr", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "rock_quality_designation_for_core_run_rqd": { + "name": "rock_quality_designation_for_core_run_rqd", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "core_diameter": { + "name": "core_diameter", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "time_taken_to_drill_core_run": { + "name": "time_taken_to_drill_core_run", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_photographs_of_rock_cores": { + "name": "associated_file_reference_e_g_photographs_of_rock_cores", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "coring_information_location_details_id_location_details_id_fk": { + "name": "coring_information_location_details_id_location_details_id_fk", + "tableFrom": "coring_information", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_coring_information": { + "name": "unique_coring_information", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_core_run", + "depth_to_base_of_core_run" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.cyclic_triaxial_test_derived_parameters": { + "name": "cyclic_triaxial_test_derived_parameters", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "cycle_number": { + "name": "cycle_number", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cycle_number_of_failure": { + "name": "cycle_number_of_failure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "maximum_excess_porewater_pressure": { + "name": "maximum_excess_porewater_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "minimum_excess_porewater_pressure": { + "name": "minimum_excess_porewater_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "maximum_shear_stress": { + "name": "maximum_shear_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "minimum_shear_stress": { + "name": "minimum_shear_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mean_shear_stress": { + "name": "mean_shear_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "cyclic_shear_stress_max_min_2": { + "name": "cyclic_shear_stress_max_min_2", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "average_cyclic_axial_stress": { + "name": "average_cyclic_axial_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "axial_strain_at_failure": { + "name": "axial_strain_at_failure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "porewater_pressure_at_failure": { + "name": "porewater_pressure_at_failure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "maximum_deviatoric_stress": { + "name": "maximum_deviatoric_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "minimum_deviatoric_stress": { + "name": "minimum_deviatoric_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mean_effective_stress_at_end_of_ctrd_cyc": { + "name": "mean_effective_stress_at_end_of_ctrd_cyc", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "maximum_axial_strain": { + "name": "maximum_axial_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "minimum_axial_strain": { + "name": "minimum_axial_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "final_voids_ratio": { + "name": "final_voids_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviatoric_stress_at_maximum_axial_strain": { + "name": "deviatoric_stress_at_maximum_axial_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviatoric_stress_at_minimum_axial_strain": { + "name": "deviatoric_stress_at_minimum_axial_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "secant_modulus": { + "name": "secant_modulus", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "damping_ratio": { + "name": "damping_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mode_of_failure": { + "name": "mode_of_failure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "percent_difference_from_programmed_load": { + "name": "percent_difference_from_programmed_load", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "observed_performance_visual": { + "name": "observed_performance_visual", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "cyclic_triaxial_tests_consolidation_id": { + "name": "cyclic_triaxial_tests_consolidation_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "cyclic_triaxial_test_derived_parameters_cyclic_triaxial_tests_consolidation_id_cyclic_triaxial_tests_consolidation_id_fk": { + "name": "cyclic_triaxial_test_derived_parameters_cyclic_triaxial_tests_consolidation_id_cyclic_triaxial_tests_consolidation_id_fk", + "tableFrom": "cyclic_triaxial_test_derived_parameters", + "tableTo": "cyclic_triaxial_tests_consolidation", + "columnsFrom": [ + "cyclic_triaxial_tests_consolidation_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_cyclic_triaxial_test_derived_parameters": { + "name": "unique_cyclic_triaxial_test_derived_parameters", + "nullsNotDistinct": false, + "columns": [ + "cyclic_triaxial_tests_consolidation_id", + "cycle_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.cyclic_triaxial_test_general": { + "name": "cyclic_triaxial_test_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_preparation_technique_used": { + "name": "specimen_preparation_technique_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_test": { + "name": "type_of_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "initial_water_moisture_content": { + "name": "initial_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "final_water_moisture_content": { + "name": "final_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description_of_type_of_water_used_for_filter_flushing": { + "name": "description_of_type_of_water_used_for_filter_flushing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "saturation_back_pressure": { + "name": "saturation_back_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_degree_of_saturation_after_back_pressure": { + "name": "initial_degree_of_saturation_after_back_pressure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "initial_sample_relative_density": { + "name": "initial_sample_relative_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_specimen_diameter": { + "name": "initial_specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_height_of_specimen": { + "name": "initial_height_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "total_mass_of_installed_specimen": { + "name": "total_mass_of_installed_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "particle_density_with_prefix_if_value_assumed": { + "name": "particle_density_with_prefix_if_value_assumed", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "maximum_density_of_sand": { + "name": "maximum_density_of_sand", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "minimum_density_of_sand": { + "name": "minimum_density_of_sand", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_bulk_density": { + "name": "initial_bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_voids_ratio": { + "name": "initial_voids_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "method_of_saturation": { + "name": "method_of_saturation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_duration": { + "name": "test_duration", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "deviations_from_the_test_method": { + "name": "deviations_from_the_test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_cyclic_triaxial_test_general_abbr": { + "name": "idx_cyclic_triaxial_test_general_abbr", + "columns": [ + { + "expression": "type_of_test", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "cyclic_triaxial_test_general_type_of_test_abbreviation_id_fk": { + "name": "cyclic_triaxial_test_general_type_of_test_abbreviation_id_fk", + "tableFrom": "cyclic_triaxial_test_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_test" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "cyclic_triaxial_test_general_sample_information_id_sample_information_id_fk": { + "name": "cyclic_triaxial_test_general_sample_information_id_sample_information_id_fk", + "tableFrom": "cyclic_triaxial_test_general", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_cyclic_triaxial_test_general": { + "name": "unique_cyclic_triaxial_test_general", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.cyclic_triaxial_tests_consolidation": { + "name": "cyclic_triaxial_tests_consolidation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_stage_number": { + "name": "test_stage_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "final_cell_pressure": { + "name": "final_cell_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "base_porewater_pressure": { + "name": "base_porewater_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mid_height_porewater_pressure": { + "name": "mid_height_porewater_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mid_height_b_value": { + "name": "mid_height_b_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "base_b_value": { + "name": "base_b_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_consolidation": { + "name": "type_of_consolidation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "final_back_pressure": { + "name": "final_back_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "duration_of_test_stage_number": { + "name": "duration_of_test_stage_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_height_at_end_of_stage": { + "name": "specimen_height_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter_at_end_of_stage": { + "name": "specimen_diameter_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "water_content_at_end_of_stage": { + "name": "water_content_at_end_of_stage", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "bulk_density_at_end_of_stage": { + "name": "bulk_density_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "dry_density_at_end_of_stage": { + "name": "dry_density_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "relative_density_index_of_sand_at_end_of_stage": { + "name": "relative_density_index_of_sand_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "voids_ratio_at_end_of_stage": { + "name": "voids_ratio_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "effective_axial_stress_at_end_of_stage": { + "name": "effective_axial_stress_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "effective_radial_stress_at_end_of_stage": { + "name": "effective_radial_stress_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "shear_stress_at_end_of_stage": { + "name": "shear_stress_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviatoric_stress_at_end_of_stage": { + "name": "deviatoric_stress_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mean_effective_stress_at_end_of_stage": { + "name": "mean_effective_stress_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "ratio_of_radial_to_axial_effective_stress_at_end_of_stage": { + "name": "ratio_of_radial_to_axial_effective_stress_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "external_axial_strain_at_end_of_stage": { + "name": "external_axial_strain_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "volumetric_strain_from_measured_volume_change_at_end_of_stage": { + "name": "volumetric_strain_from_measured_volume_change_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "radial_strain_from_measured_volume_change_at_end_of_stage": { + "name": "radial_strain_from_measured_volume_change_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "b_value": { + "name": "b_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "bender_element_test_sequence": { + "name": "bender_element_test_sequence", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "bender_element_axis_of_measurement": { + "name": "bender_element_axis_of_measurement", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "distance_between_bender_elements": { + "name": "distance_between_bender_elements", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "measured_arrival_time_of_propagated_wave": { + "name": "measured_arrival_time_of_propagated_wave", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "method_of_measuring_arrival_time_of_propagated_wave": { + "name": "method_of_measuring_arrival_time_of_propagated_wave", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "calculated_shear_wave_velocity": { + "name": "calculated_shear_wave_velocity", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "shear_modulus_gmax": { + "name": "shear_modulus_gmax", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference": { + "name": "associated_file_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "cyclic_triaxial_test_general_id": { + "name": "cyclic_triaxial_test_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_cyclic_triaxial_tests_consolidation_abbr": { + "name": "idx_cyclic_triaxial_tests_consolidation_abbr", + "columns": [ + { + "expression": "type_of_consolidation", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "bender_element_axis_of_measurement", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "cyclic_triaxial_tests_consolidation_type_of_consolidation_abbreviation_id_fk": { + "name": "cyclic_triaxial_tests_consolidation_type_of_consolidation_abbreviation_id_fk", + "tableFrom": "cyclic_triaxial_tests_consolidation", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_consolidation" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "cyclic_triaxial_tests_consolidation_bender_element_axis_of_measurement_abbreviation_id_fk": { + "name": "cyclic_triaxial_tests_consolidation_bender_element_axis_of_measurement_abbreviation_id_fk", + "tableFrom": "cyclic_triaxial_tests_consolidation", + "tableTo": "abbreviation", + "columnsFrom": [ + "bender_element_axis_of_measurement" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "cyclic_triaxial_tests_consolidation_cyclic_triaxial_test_general_id_cyclic_triaxial_test_general_id_fk": { + "name": "cyclic_triaxial_tests_consolidation_cyclic_triaxial_test_general_id_cyclic_triaxial_test_general_id_fk", + "tableFrom": "cyclic_triaxial_tests_consolidation", + "tableTo": "cyclic_triaxial_test_general", + "columnsFrom": [ + "cyclic_triaxial_test_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_cyclic_triaxial_tests_consolidation": { + "name": "unique_cyclic_triaxial_tests_consolidation", + "nullsNotDistinct": false, + "columns": [ + "cyclic_triaxial_test_general_id", + "test_stage_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.cyclic_triaxial_tests_data": { + "name": "cyclic_triaxial_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "date_time_of_reading": { + "name": "date_time_of_reading", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "test_conditions": { + "name": "test_conditions", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_height": { + "name": "specimen_height", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "cell_pressure": { + "name": "cell_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "base_porewater_pressure": { + "name": "base_porewater_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mid_plane_porewater_pressure": { + "name": "mid_plane_porewater_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "external_axial_strain": { + "name": "external_axial_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "local_axial_strain_1": { + "name": "local_axial_strain_1", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "local_axial_strain_2": { + "name": "local_axial_strain_2", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "volumetric_strain": { + "name": "volumetric_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "radial_strain": { + "name": "radial_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "shear_strain": { + "name": "shear_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "shear_stress": { + "name": "shear_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviatoric_stress": { + "name": "deviatoric_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "principal_stress_difference": { + "name": "principal_stress_difference", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mean_effective_stress": { + "name": "mean_effective_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "secant_young_s_modulus_local": { + "name": "secant_young_s_modulus_local", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "tangent_young_s_modulus": { + "name": "tangent_young_s_modulus", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "loading_frequency": { + "name": "loading_frequency", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "cyclic_amplitude": { + "name": "cyclic_amplitude", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "double_amplitude_axial_strain": { + "name": "double_amplitude_axial_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "compression_extension_stress_ratio": { + "name": "compression_extension_stress_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "excess_mid_plane_pore_pressure_ratio": { + "name": "excess_mid_plane_pore_pressure_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "excess_base_pore_pressure_ratio": { + "name": "excess_base_pore_pressure_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "cyclic_triaxial_test_derived_parameters_id": { + "name": "cyclic_triaxial_test_derived_parameters_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_cyclic_triaxial_tests_data_abbr": { + "name": "idx_cyclic_triaxial_tests_data_abbr", + "columns": [ + { + "expression": "test_conditions", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "cyclic_triaxial_tests_data_test_conditions_abbreviation_id_fk": { + "name": "cyclic_triaxial_tests_data_test_conditions_abbreviation_id_fk", + "tableFrom": "cyclic_triaxial_tests_data", + "tableTo": "abbreviation", + "columnsFrom": [ + "test_conditions" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "cyclic_triaxial_tests_data_cyclic_triaxial_test_derived_parameters_id_cyclic_triaxial_test_derived_parameters_id_fk": { + "name": "cyclic_triaxial_tests_data_cyclic_triaxial_test_derived_parameters_id_cyclic_triaxial_test_derived_parameters_id_fk", + "tableFrom": "cyclic_triaxial_tests_data", + "tableTo": "cyclic_triaxial_test_derived_parameters", + "columnsFrom": [ + "cyclic_triaxial_test_derived_parameters_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_cyclic_triaxial_tests_data": { + "name": "unique_cyclic_triaxial_tests_data", + "nullsNotDistinct": false, + "columns": [ + "cyclic_triaxial_test_derived_parameters_id" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.cyclic_triaxial_tests_saturation": { + "name": "cyclic_triaxial_tests_saturation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_stage_number": { + "name": "test_stage_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "saturation_cell_pressure": { + "name": "saturation_cell_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "saturation_base_porewater_pressure": { + "name": "saturation_base_porewater_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "saturation_mid_height_porewater_pressure": { + "name": "saturation_mid_height_porewater_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "saturation_mid_height_b_value": { + "name": "saturation_mid_height_b_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "saturation_base_b_value": { + "name": "saturation_base_b_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "saturation_method": { + "name": "saturation_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "final_saturation": { + "name": "final_saturation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "cyclic_triaxial_test_general_id": { + "name": "cyclic_triaxial_test_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "cyclic_triaxial_tests_saturation_cyclic_triaxial_test_general_id_cyclic_triaxial_test_general_id_fk": { + "name": "cyclic_triaxial_tests_saturation_cyclic_triaxial_test_general_id_cyclic_triaxial_test_general_id_fk", + "tableFrom": "cyclic_triaxial_tests_saturation", + "tableTo": "cyclic_triaxial_test_general", + "columnsFrom": [ + "cyclic_triaxial_test_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_cyclic_triaxial_tests_saturation": { + "name": "unique_cyclic_triaxial_tests_saturation", + "nullsNotDistinct": false, + "columns": [ + "cyclic_triaxial_test_general_id", + "test_stage_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.density_tests": { + "name": "density_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_test_performed": { + "name": "type_of_test_performed", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type_of_sample": { + "name": "type_of_sample", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content": { + "name": "water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "bulk_density": { + "name": "bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "dry_density": { + "name": "dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_size_if_less_than_50cm3_and_any_deviation_from_the_specified_procedure": { + "name": "specimen_size_if_less_than_50cm3_and_any_deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_density_tests_abbr": { + "name": "idx_density_tests_abbr", + "columns": [ + { + "expression": "type_of_test_performed", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sample_condition", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type_of_sample", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "density_tests_type_of_test_performed_abbreviation_id_fk": { + "name": "density_tests_type_of_test_performed_abbreviation_id_fk", + "tableFrom": "density_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_test_performed" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "density_tests_sample_condition_abbreviation_id_fk": { + "name": "density_tests_sample_condition_abbreviation_id_fk", + "tableFrom": "density_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "sample_condition" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "density_tests_type_of_sample_abbreviation_id_fk": { + "name": "density_tests_type_of_sample_abbreviation_id_fk", + "tableFrom": "density_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_sample" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "density_tests_sample_information_id_sample_information_id_fk": { + "name": "density_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "density_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_density_tests": { + "name": "unique_density_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.depth_related_exploratory_hole_information": { + "name": "depth_related_exploratory_hole_information", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_section": { + "name": "depth_to_top_of_section", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_section": { + "name": "depth_to_base_of_section", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_depth_related_information": { + "name": "type_of_depth_related_information", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "date_and_time_of_start_of_section": { + "name": "date_and_time_of_start_of_section", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "date_and_time_of_end_of_section": { + "name": "date_and_time_of_end_of_section", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "name_of_rig_drill_crew_operator": { + "name": "name_of_rig_drill_crew_operator", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "plant_used": { + "name": "plant_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "shoring_support_used": { + "name": "shoring_support_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stability_of_trial_pit_trial_trench_or_logged_traverse_length": { + "name": "stability_of_trial_pit_trial_trench_or_logged_traverse_length", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "trial_pit_trial_trench_or_logged_traverse_length": { + "name": "trial_pit_trial_trench_or_logged_traverse_length", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "trial_pit_trial_trench_or_logged_traverse_width": { + "name": "trial_pit_trial_trench_or_logged_traverse_width", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "drill_bit_used": { + "name": "drill_bit_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "bit_condition": { + "name": "bit_condition", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "barrel_type": { + "name": "barrel_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "barrel_length": { + "name": "barrel_length", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "definitive_person_responsible_for_logging_the_section": { + "name": "definitive_person_responsible_for_logging_the_section", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "start_date_of_hole_section_logging": { + "name": "start_date_of_hole_section_logging", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_hole_section_construction": { + "name": "details_of_weather_and_environmental_conditions_during_hole_section_construction", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_method_of_hole_section_construction": { + "name": "details_of_method_of_hole_section_construction", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "drilling_contractor": { + "name": "drilling_contractor", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_drilling_journals": { + "name": "associated_file_reference_e_g_drilling_journals", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_depth_related_exploratory_hole_information_abbr": { + "name": "idx_depth_related_exploratory_hole_information_abbr", + "columns": [ + { + "expression": "type_of_depth_related_information", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "depth_related_exploratory_hole_information_type_of_depth_related_information_abbreviation_id_fk": { + "name": "depth_related_exploratory_hole_information_type_of_depth_related_information_abbreviation_id_fk", + "tableFrom": "depth_related_exploratory_hole_information", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_depth_related_information" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "depth_related_exploratory_hole_information_location_details_id_location_details_id_fk": { + "name": "depth_related_exploratory_hole_information_location_details_id_location_details_id_fk", + "tableFrom": "depth_related_exploratory_hole_information", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_depth_related_exploratory_hole_information": { + "name": "unique_depth_related_exploratory_hole_information", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_section", + "depth_to_base_of_section", + "type_of_depth_related_information" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.depth_related_remarks": { + "name": "depth_related_remarks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_of_remark_drem_rem": { + "name": "depth_of_remark_drem_rem", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "base_depth": { + "name": "base_depth", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_related_remark": { + "name": "depth_related_remark", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_drilling_journals": { + "name": "associated_file_reference_e_g_drilling_journals", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "depth_related_remarks_location_details_id_location_details_id_fk": { + "name": "depth_related_remarks_location_details_id_location_details_id_fk", + "tableFrom": "depth_related_remarks", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_depth_related_remarks": { + "name": "unique_depth_related_remarks", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_of_remark_drem_rem", + "base_depth" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.discontinuity_data": { + "name": "discontinuity_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_in_hole": { + "name": "depth_to_top_in_hole", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_in_hole": { + "name": "depth_to_base_in_hole", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "discontinuity_set_reference": { + "name": "discontinuity_set_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discontinuity_reference": { + "name": "discontinuity_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_discontinuity": { + "name": "type_of_discontinuity", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "dip_of_discontinuity": { + "name": "dip_of_discontinuity", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "dip_direction_of_discontinuity": { + "name": "dip_direction_of_discontinuity", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "small_scale_roughness": { + "name": "small_scale_roughness", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "medium_scale_roughness": { + "name": "medium_scale_roughness", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "large_scale_roughness": { + "name": "large_scale_roughness", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "joint_roughness_coefficient": { + "name": "joint_roughness_coefficient", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "surface_appearance": { + "name": "surface_appearance", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discontinuity_aperture_measurement": { + "name": "discontinuity_aperture_measurement", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discontinuity_aperture_observation": { + "name": "discontinuity_aperture_observation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "infilling_material": { + "name": "infilling_material", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discontinuity_termination_lower": { + "name": "discontinuity_termination_lower", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "persistence_measurement": { + "name": "persistence_measurement", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "discontinuity_wall_strength": { + "name": "discontinuity_wall_strength", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "discontinuity_wall_weathering": { + "name": "discontinuity_wall_weathering", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "seepage_rating": { + "name": "seepage_rating", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "water_flow_estimate": { + "name": "water_flow_estimate", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_logging_field_sheets": { + "name": "associated_file_reference_e_g_logging_field_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_discontinuity_data_abbr": { + "name": "idx_discontinuity_data_abbr", + "columns": [ + { + "expression": "type_of_discontinuity", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "discontinuity_termination_lower", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "discontinuity_data_type_of_discontinuity_abbreviation_id_fk": { + "name": "discontinuity_data_type_of_discontinuity_abbreviation_id_fk", + "tableFrom": "discontinuity_data", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_discontinuity" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "discontinuity_data_discontinuity_termination_lower_abbreviation_id_fk": { + "name": "discontinuity_data_discontinuity_termination_lower_abbreviation_id_fk", + "tableFrom": "discontinuity_data", + "tableTo": "abbreviation", + "columnsFrom": [ + "discontinuity_termination_lower" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "discontinuity_data_location_details_id_location_details_id_fk": { + "name": "discontinuity_data_location_details_id_location_details_id_fk", + "tableFrom": "discontinuity_data", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_discontinuity_data": { + "name": "unique_discontinuity_data", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_in_hole", + "depth_to_base_in_hole", + "discontinuity_set_reference", + "discontinuity_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.driller_geological_description": { + "name": "driller_geological_description", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_drillers_stratum_description": { + "name": "depth_to_top_of_drillers_stratum_description", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_drillers_stratum_description": { + "name": "depth_to_base_of_drillers_stratum_description", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "drillers_description_of_stratum": { + "name": "drillers_description_of_stratum", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_sampling_field_sheets": { + "name": "associated_file_reference_e_g_sampling_field_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "driller_geological_description_location_details_id_location_details_id_fk": { + "name": "driller_geological_description_location_details_id_location_details_id_fk", + "tableFrom": "driller_geological_description", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_driller_geological_description": { + "name": "unique_driller_geological_description", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_drillers_stratum_description", + "depth_to_base_of_drillers_stratum_description" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.drilling_advancement_observations_parameters": { + "name": "drilling_advancement_observations_parameters", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_reported_section": { + "name": "depth_to_top_of_reported_section", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_reported_section": { + "name": "depth_to_base_of_reported_section", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "readings_set_reference": { + "name": "readings_set_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "duration_to_advance_reported_section": { + "name": "duration_to_advance_reported_section", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "date_and_time_of_start_of_reported_section": { + "name": "date_and_time_of_start_of_reported_section", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "date_and_time_at_end_of_reported_section": { + "name": "date_and_time_at_end_of_reported_section", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "drill_head_rotational_torque": { + "name": "drill_head_rotational_torque", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "drill_head_rotational_speed": { + "name": "drill_head_rotational_speed", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "penetration_rate": { + "name": "penetration_rate", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "hammering_used_during_section": { + "name": "hammering_used_during_section", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "pressure_of_downthrust_system": { + "name": "pressure_of_downthrust_system", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "pressure_of_restraining_holdback_system": { + "name": "pressure_of_restraining_holdback_system", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "torque_pressure": { + "name": "torque_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "torque_applied_to_top_of_drill_rods": { + "name": "torque_applied_to_top_of_drill_rods", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "downward_thrust_on_bit": { + "name": "downward_thrust_on_bit", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "restraining_holdback_force": { + "name": "restraining_holdback_force", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "supply_pressure_to_downhole_hammer": { + "name": "supply_pressure_to_downhole_hammer", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specific_energy": { + "name": "specific_energy", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "flushing_medium_pressure_at_the_output_of_the_pump_over_flush_zone": { + "name": "flushing_medium_pressure_at_the_output_of_the_pump_over_flush_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "flushing_medium_circulation_rate_input_over_flush_zone": { + "name": "flushing_medium_circulation_rate_input_over_flush_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "flushing_medium_recovery_rate_over_flush_zone": { + "name": "flushing_medium_recovery_rate_over_flush_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_drilling_journals_or_log_files": { + "name": "associated_file_reference_e_g_drilling_journals_or_log_files", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "drilling_advancement_observations_parameters_location_details_id_location_details_id_fk": { + "name": "drilling_advancement_observations_parameters_location_details_id_location_details_id_fk", + "tableFrom": "drilling_advancement_observations_parameters", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_drilling_advancement_observations_parameters": { + "name": "unique_drilling_advancement_observations_parameters", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_reported_section", + "depth_to_base_of_reported_section", + "readings_set_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.drilling_flush_details": { + "name": "drilling_flush_details", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_flush_zone": { + "name": "depth_to_top_of_flush_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_bottom_of_flush_zone": { + "name": "depth_to_bottom_of_flush_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_flush": { + "name": "type_of_flush", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "flush_return_minimum_as_percentage": { + "name": "flush_return_minimum_as_percentage", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "flush_return_maximum_as_percentage": { + "name": "flush_return_maximum_as_percentage", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "colour_of_flush_return": { + "name": "colour_of_flush_return", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_drilling_journal": { + "name": "associated_file_reference_e_g_drilling_journal", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_drilling_flush_details_abbr": { + "name": "idx_drilling_flush_details_abbr", + "columns": [ + { + "expression": "type_of_flush", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "drilling_flush_details_type_of_flush_abbreviation_id_fk": { + "name": "drilling_flush_details_type_of_flush_abbreviation_id_fk", + "tableFrom": "drilling_flush_details", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_flush" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "drilling_flush_details_location_details_id_location_details_id_fk": { + "name": "drilling_flush_details_location_details_id_location_details_id_fk", + "tableFrom": "drilling_flush_details", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_drilling_flush_details": { + "name": "unique_drilling_flush_details", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_flush_zone", + "depth_to_bottom_of_flush_zone" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.dynamic_cone_penetrometer_tests_data": { + "name": "dynamic_cone_penetrometer_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "cumulative_blows": { + "name": "cumulative_blows", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "penetration_at_dcpt_cblo": { + "name": "penetration_at_dcpt_cblo", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "delay_before_increment_started": { + "name": "delay_before_increment_started", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_reading_remarks": { + "name": "test_reading_remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "dynamic_cone_penetrometer_tests_general_id": { + "name": "dynamic_cone_penetrometer_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "dynamic_cone_penetrometer_tests_data_dynamic_cone_penetrometer_tests_general_id_dynamic_cone_penetrometer_tests_general_id_fk": { + "name": "dynamic_cone_penetrometer_tests_data_dynamic_cone_penetrometer_tests_general_id_dynamic_cone_penetrometer_tests_general_id_fk", + "tableFrom": "dynamic_cone_penetrometer_tests_data", + "tableTo": "dynamic_cone_penetrometer_tests_general", + "columnsFrom": [ + "dynamic_cone_penetrometer_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_dynamic_cone_penetrometer_tests_data": { + "name": "unique_dynamic_cone_penetrometer_tests_data", + "nullsNotDistinct": false, + "columns": [ + "dynamic_cone_penetrometer_tests_general_id", + "cumulative_blows" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.dynamic_cone_penetrometer_tests_general": { + "name": "dynamic_cone_penetrometer_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_from_surface_to_start_of_test": { + "name": "depth_from_surface_to_start_of_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "zero_reading": { + "name": "zero_reading", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "details_of_surface_and_base_layers_removed_prior_to_during_the_test_if_applicable": { + "name": "details_of_surface_and_base_layers_removed_prior_to_during_the_test_if_applicable", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_remarks": { + "name": "test_remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_field_record_sheets": { + "name": "associated_file_reference_e_g_field_record_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "dynamic_cone_penetrometer_tests_general_location_details_id_location_details_id_fk": { + "name": "dynamic_cone_penetrometer_tests_general_location_details_id_location_details_id_fk", + "tableFrom": "dynamic_cone_penetrometer_tests_general", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_dynamic_cone_penetrometer_tests_general": { + "name": "unique_dynamic_cone_penetrometer_tests_general", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "test_date", + "test_reference", + "depth_from_surface_to_start_of_test" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.dynamic_probe_tests_data": { + "name": "dynamic_probe_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_start_of_dynamic_probe_increment": { + "name": "depth_to_start_of_dynamic_probe_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "dynamic_probe_blows_for_increment_dprb_inc": { + "name": "dynamic_probe_blows_for_increment_dprb_inc", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cumulative_blows_for_test": { + "name": "cumulative_blows_for_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "maximum_torque_required_to_rotate_rods": { + "name": "maximum_torque_required_to_rotate_rods", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "delay_before_increment_started": { + "name": "delay_before_increment_started", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "dynamic_probe_increment": { + "name": "dynamic_probe_increment", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "notes_on_events_during_increment": { + "name": "notes_on_events_during_increment", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference": { + "name": "associated_file_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "dynamic_probe_tests_general_id": { + "name": "dynamic_probe_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "dynamic_probe_tests_data_dynamic_probe_tests_general_id_dynamic_probe_tests_general_id_fk": { + "name": "dynamic_probe_tests_data_dynamic_probe_tests_general_id_dynamic_probe_tests_general_id_fk", + "tableFrom": "dynamic_probe_tests_data", + "tableTo": "dynamic_probe_tests_general", + "columnsFrom": [ + "dynamic_probe_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_dynamic_probe_tests_data": { + "name": "unique_dynamic_probe_tests_data", + "nullsNotDistinct": false, + "columns": [ + "dynamic_probe_tests_general_id", + "depth_to_start_of_dynamic_probe_increment" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.dynamic_probe_tests_general": { + "name": "dynamic_probe_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "dynamic_probe_type": { + "name": "dynamic_probe_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hammer_mass": { + "name": "hammer_mass", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "standard_drop": { + "name": "standard_drop", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cone_base_diameter": { + "name": "cone_base_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "rod_diameter": { + "name": "rod_diameter", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type_of_anvil": { + "name": "type_of_anvil", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_anvil_damper": { + "name": "type_of_anvil_damper", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_of_cone_if_left_in_ground": { + "name": "depth_of_cone_if_left_in_ground", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "cone_angle": { + "name": "cone_angle", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "rod_mass": { + "name": "rod_mass", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "precautions_against_rod_friction": { + "name": "precautions_against_rod_friction", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "pre_drilling_if_used": { + "name": "pre_drilling_if_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "blow_count_frequency": { + "name": "blow_count_frequency", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "groundwater_level": { + "name": "groundwater_level", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "reasons_for_early_end_of_test": { + "name": "reasons_for_early_end_of_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_dynamic_probe_tests_general_abbr": { + "name": "idx_dynamic_probe_tests_general_abbr", + "columns": [ + { + "expression": "dynamic_probe_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "dynamic_probe_tests_general_dynamic_probe_type_abbreviation_id_fk": { + "name": "dynamic_probe_tests_general_dynamic_probe_type_abbreviation_id_fk", + "tableFrom": "dynamic_probe_tests_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "dynamic_probe_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "dynamic_probe_tests_general_location_details_id_location_details_id_fk": { + "name": "dynamic_probe_tests_general_location_details_id_location_details_id_fk", + "tableFrom": "dynamic_probe_tests_general", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_dynamic_probe_tests_general": { + "name": "unique_dynamic_probe_tests_general", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.dynamic_testing": { + "name": "dynamic_testing", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "p_wave_velocity": { + "name": "p_wave_velocity", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "s_wave_velocity": { + "name": "s_wave_velocity", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "dynamic_elastic_modulus": { + "name": "dynamic_elastic_modulus", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "shear_modulus_derived_from_ldyn_swav": { + "name": "shear_modulus_derived_from_ldyn_swav", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "dynamic_testing_sample_information_id_sample_information_id_fk": { + "name": "dynamic_testing_sample_information_id_sample_information_id_fk", + "tableFrom": "dynamic_testing", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_dynamic_testing": { + "name": "unique_dynamic_testing", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.effective_stress_consolidation_tests_data": { + "name": "effective_stress_consolidation_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "consolidation_stage_number": { + "name": "consolidation_stage_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "additional_stage_specific_details": { + "name": "additional_stage_specific_details", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cell_or_diaphragm_pressure_applied_during_stage": { + "name": "cell_or_diaphragm_pressure_applied_during_stage", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "back_pressure_applied_during_stage": { + "name": "back_pressure_applied_during_stage", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "pore_pressure_at_end_of_undrained_loading": { + "name": "pore_pressure_at_end_of_undrained_loading", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "pore_pressure_at_end_of_consolidation_stage": { + "name": "pore_pressure_at_end_of_consolidation_stage", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "effective_stress_at_end_of_consolidation_stage": { + "name": "effective_stress_at_end_of_consolidation_stage", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "voids_ratio_at_start_of_increment": { + "name": "voids_ratio_at_start_of_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "voids_ratio_at_end_of_stress_increment": { + "name": "voids_ratio_at_end_of_stress_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "percentage_pore_pressure_dissipation_at_end_of_stage": { + "name": "percentage_pore_pressure_dissipation_at_end_of_stage", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "settlement_measured_during_consolidation_stage": { + "name": "settlement_measured_during_consolidation_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "volume_change_measured_during_consolidation_stage": { + "name": "volume_change_measured_during_consolidation_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "reported_coefficient_of_volume_compressibility_over_stress_increment": { + "name": "reported_coefficient_of_volume_compressibility_over_stress_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "reported_coefficient_of_consolidation_over_stress_increment": { + "name": "reported_coefficient_of_consolidation_over_stress_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "coefficient_of_secondary_compression_over_stress_increment": { + "name": "coefficient_of_secondary_compression_over_stress_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "method_used_for_deriving_cv": { + "name": "method_used_for_deriving_cv", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "average_temperature_over_stress_increment": { + "name": "average_temperature_over_stress_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "permeability_over_stress_increment_t90": { + "name": "permeability_over_stress_increment_t90", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "effective_stress_consolidation_tests_general_id": { + "name": "effective_stress_consolidation_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "effective_stress_consolidation_tests_data_effective_stress_consolidation_tests_general_id_effective_stress_consolidation_tests_general_id_fk": { + "name": "effective_stress_consolidation_tests_data_effective_stress_consolidation_tests_general_id_effective_stress_consolidation_tests_general_id_fk", + "tableFrom": "effective_stress_consolidation_tests_data", + "tableTo": "effective_stress_consolidation_tests_general", + "columnsFrom": [ + "effective_stress_consolidation_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_effective_stress_consolidation_tests_data": { + "name": "unique_effective_stress_consolidation_tests_data", + "nullsNotDistinct": false, + "columns": [ + "effective_stress_consolidation_tests_general_id", + "consolidation_stage_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.effective_stress_consolidation_tests_general": { + "name": "effective_stress_consolidation_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_type": { + "name": "test_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type_of_equipment_used": { + "name": "type_of_equipment_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "test_specimen_diameter": { + "name": "test_specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_specimen_height": { + "name": "test_specimen_height", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_water_moisture_content": { + "name": "initial_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "final_water_moisture_content": { + "name": "final_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_bulk_density": { + "name": "initial_bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "final_bulk_density": { + "name": "final_bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "particle_density_with_prefix_if_value_assumed": { + "name": "particle_density_with_prefix_if_value_assumed", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_voids_ratio": { + "name": "initial_voids_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_degree_of_saturation": { + "name": "initial_degree_of_saturation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type_of_loading_strain": { + "name": "type_of_loading_strain", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_drainage": { + "name": "type_of_drainage", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "pore_pressure_measurement_location": { + "name": "pore_pressure_measurement_location", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "swelling_pressure": { + "name": "swelling_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "method_of_saturation": { + "name": "method_of_saturation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "saturation_increments": { + "name": "saturation_increments", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "differential_pressure_during_saturation": { + "name": "differential_pressure_during_saturation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cell_or_diaphragm_pressure_at_end_of_saturation": { + "name": "cell_or_diaphragm_pressure_at_end_of_saturation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "back_pressure_at_end_of_saturation": { + "name": "back_pressure_at_end_of_saturation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "b_value_at_end_of_saturation": { + "name": "b_value_at_end_of_saturation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "volume_of_water_taken_in_during_saturation": { + "name": "volume_of_water_taken_in_during_saturation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result": { + "name": "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviations_from_the_test_method": { + "name": "deviations_from_the_test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "voids_ratio_at_in_situ_vertical_stress": { + "name": "voids_ratio_at_in_situ_vertical_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "in_situ_vertical_effective_stress": { + "name": "in_situ_vertical_effective_stress", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "axial_strain_at_in_situ_vertical_effective_stress": { + "name": "axial_strain_at_in_situ_vertical_effective_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "preconsolidation_stress_yield_stress": { + "name": "preconsolidation_stress_yield_stress", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "yield_stress_ratio_based_on_casagrande_method": { + "name": "yield_stress_ratio_based_on_casagrande_method", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "compression_index_over_stress_increment": { + "name": "compression_index_over_stress_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "swelling_index_over_stress_increment": { + "name": "swelling_index_over_stress_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_effective_stress_consolidation_tests_general_abbr": { + "name": "idx_effective_stress_consolidation_tests_general_abbr", + "columns": [ + { + "expression": "test_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sample_condition", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "effective_stress_consolidation_tests_general_test_type_abbreviation_id_fk": { + "name": "effective_stress_consolidation_tests_general_test_type_abbreviation_id_fk", + "tableFrom": "effective_stress_consolidation_tests_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "test_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "effective_stress_consolidation_tests_general_sample_condition_abbreviation_id_fk": { + "name": "effective_stress_consolidation_tests_general_sample_condition_abbreviation_id_fk", + "tableFrom": "effective_stress_consolidation_tests_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "sample_condition" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "effective_stress_consolidation_tests_general_sample_information_id_sample_information_id_fk": { + "name": "effective_stress_consolidation_tests_general_sample_information_id_sample_information_id_fk", + "tableFrom": "effective_stress_consolidation_tests_general", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_effective_stress_consolidation_tests_general": { + "name": "unique_effective_stress_consolidation_tests_general", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.environmental_contaminant_testing": { + "name": "environmental_contaminant_testing", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "laboratory_specimen_reference_or_laboratory_id": { + "name": "laboratory_specimen_reference_or_laboratory_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "chemical_code": { + "name": "chemical_code", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "laboratory_test_matrix": { + "name": "laboratory_test_matrix", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "run_type_initial_or_reanalysis": { + "name": "run_type_initial_or_reanalysis", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "chemical_name": { + "name": "chemical_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "laboratory_analytical_test_name": { + "name": "laboratory_analytical_test_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "result_value": { + "name": "result_value", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "result_unit": { + "name": "result_unit", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "reported_result": { + "name": "reported_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "result_type": { + "name": "result_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "reportable_result": { + "name": "reportable_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "detect_flag": { + "name": "detect_flag", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "organic": { + "name": "organic", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "interpreted_qualifiers": { + "name": "interpreted_qualifiers", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "laboratory_qualifiers": { + "name": "laboratory_qualifiers", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reporting_detection_limit": { + "name": "reporting_detection_limit", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "method_detection_limit": { + "name": "method_detection_limit", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "quantification_limit": { + "name": "quantification_limit", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "unit_of_detection_quantification_limits": { + "name": "unit_of_detection_quantification_limits", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "tentatively_identified_compound_tic_probability": { + "name": "tentatively_identified_compound_tic_probability", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "tentatively_identified_compound_tic_retention_time": { + "name": "tentatively_identified_compound_tic_retention_time", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sample_receipt_date_at_laboratory": { + "name": "sample_receipt_date_at_laboratory", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "sample_delivery_or_batch_code": { + "name": "sample_delivery_or_batch_code", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "analysis_date_and_time_date": { + "name": "analysis_date_and_time_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "test_name_as_defined_in_lbst_test_during_electronic_scheduling": { + "name": "test_name_as_defined_in_lbst_test_during_electronic_scheduling", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "total_or_dissolved": { + "name": "total_or_dissolved", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "analysis_location": { + "name": "analysis_location", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "basis": { + "name": "basis", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "dilution_factor": { + "name": "dilution_factor", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "leachate_preparation_method": { + "name": "leachate_preparation_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "leachate_preparation_date_and_time": { + "name": "leachate_preparation_date_and_time", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "instrument_reference_no_or_identifier": { + "name": "instrument_reference_no_or_identifier", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "size_of_material_removed_prior_to_test_value_given_indicates_lowest_sized_material_removed": { + "name": "size_of_material_removed_prior_to_test_value_given_indicates_lowest_sized_material_removed", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "percentage_of_material_removed": { + "name": "percentage_of_material_removed", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_environmental_contaminant_testing_abbr": { + "name": "idx_environmental_contaminant_testing_abbr", + "columns": [ + { + "expression": "chemical_code", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "laboratory_test_matrix", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "run_type_initial_or_reanalysis", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "result_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "analysis_location", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "basis", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "environmental_contaminant_testing_chemical_code_abbreviation_id_fk": { + "name": "environmental_contaminant_testing_chemical_code_abbreviation_id_fk", + "tableFrom": "environmental_contaminant_testing", + "tableTo": "abbreviation", + "columnsFrom": [ + "chemical_code" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "environmental_contaminant_testing_laboratory_test_matrix_abbreviation_id_fk": { + "name": "environmental_contaminant_testing_laboratory_test_matrix_abbreviation_id_fk", + "tableFrom": "environmental_contaminant_testing", + "tableTo": "abbreviation", + "columnsFrom": [ + "laboratory_test_matrix" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "environmental_contaminant_testing_run_type_initial_or_reanalysis_abbreviation_id_fk": { + "name": "environmental_contaminant_testing_run_type_initial_or_reanalysis_abbreviation_id_fk", + "tableFrom": "environmental_contaminant_testing", + "tableTo": "abbreviation", + "columnsFrom": [ + "run_type_initial_or_reanalysis" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "environmental_contaminant_testing_result_type_abbreviation_id_fk": { + "name": "environmental_contaminant_testing_result_type_abbreviation_id_fk", + "tableFrom": "environmental_contaminant_testing", + "tableTo": "abbreviation", + "columnsFrom": [ + "result_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "environmental_contaminant_testing_analysis_location_abbreviation_id_fk": { + "name": "environmental_contaminant_testing_analysis_location_abbreviation_id_fk", + "tableFrom": "environmental_contaminant_testing", + "tableTo": "abbreviation", + "columnsFrom": [ + "analysis_location" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "environmental_contaminant_testing_basis_abbreviation_id_fk": { + "name": "environmental_contaminant_testing_basis_abbreviation_id_fk", + "tableFrom": "environmental_contaminant_testing", + "tableTo": "abbreviation", + "columnsFrom": [ + "basis" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "environmental_contaminant_testing_sample_information_id_sample_information_id_fk": { + "name": "environmental_contaminant_testing_sample_information_id_sample_information_id_fk", + "tableFrom": "environmental_contaminant_testing", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_environmental_contaminant_testing": { + "name": "unique_environmental_contaminant_testing", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "laboratory_specimen_reference_or_laboratory_id", + "depth_to_top_of_test_specimen", + "chemical_code", + "test_method", + "laboratory_test_matrix", + "run_type_initial_or_reanalysis" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.environmental_laboratory_reporting": { + "name": "environmental_laboratory_reporting", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "determinand_code": { + "name": "determinand_code", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "laboratory_test_matrix": { + "name": "laboratory_test_matrix", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "run_type_initial_or_reanalysis": { + "name": "run_type_initial_or_reanalysis", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "test_additional_descriptor": { + "name": "test_additional_descriptor", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "tentatively_identified_compound_tic": { + "name": "tentatively_identified_compound_tic", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "result_unit": { + "name": "result_unit", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "laboratory_sample_id": { + "name": "laboratory_sample_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "result_type": { + "name": "result_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "interpreted_qualifiers": { + "name": "interpreted_qualifiers", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "laboratory_qualifiers": { + "name": "laboratory_qualifiers", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "result_value": { + "name": "result_value", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reported_result": { + "name": "reported_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "determinand_name": { + "name": "determinand_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "laboratory_analytical_name": { + "name": "laboratory_analytical_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "determinand_category": { + "name": "determinand_category", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "flagged_deviation": { + "name": "flagged_deviation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "result_deviation_description_s": { + "name": "result_deviation_description_s", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reportable_result": { + "name": "reportable_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "detect_flag": { + "name": "detect_flag", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "organic": { + "name": "organic", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reporting_detection_limit": { + "name": "reporting_detection_limit", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "method_detection_limit": { + "name": "method_detection_limit", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "quantification_limit": { + "name": "quantification_limit", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "unit_of_detection_quantification_limits": { + "name": "unit_of_detection_quantification_limits", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cas_code": { + "name": "cas_code", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "tentatively_identified_compound_tic_probability": { + "name": "tentatively_identified_compound_tic_probability", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "tentatively_identified_compound_tic_retention_time": { + "name": "tentatively_identified_compound_tic_retention_time", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sample_receipt_date_time_at_laboratory": { + "name": "sample_receipt_date_time_at_laboratory", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "sample_delivery_or_batch_code": { + "name": "sample_delivery_or_batch_code", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "analysis_date_and_time": { + "name": "analysis_date_and_time", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "test_or_suite_name": { + "name": "test_or_suite_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "total_or_dissolved": { + "name": "total_or_dissolved", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "analysis_location": { + "name": "analysis_location", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "basis": { + "name": "basis", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "dilution_factor": { + "name": "dilution_factor", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "leachate_preparation_method": { + "name": "leachate_preparation_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "leachate_preparation_date_and_time": { + "name": "leachate_preparation_date_and_time", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "instrument_reference_number_or_identifier": { + "name": "instrument_reference_number_or_identifier", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "instrument_type": { + "name": "instrument_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "size_of_material_removed_prior_to_test_value_given_indicates_lowest_sized_material_removed": { + "name": "size_of_material_removed_prior_to_test_value_given_indicates_lowest_sized_material_removed", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "percentage_of_material_removed": { + "name": "percentage_of_material_removed", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_environmental_laboratory_reporting_abbr": { + "name": "idx_environmental_laboratory_reporting_abbr", + "columns": [ + { + "expression": "determinand_code", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "laboratory_test_matrix", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "run_type_initial_or_reanalysis", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "test_additional_descriptor", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "result_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "analysis_location", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "basis", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "environmental_laboratory_reporting_determinand_code_abbreviation_id_fk": { + "name": "environmental_laboratory_reporting_determinand_code_abbreviation_id_fk", + "tableFrom": "environmental_laboratory_reporting", + "tableTo": "abbreviation", + "columnsFrom": [ + "determinand_code" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "environmental_laboratory_reporting_laboratory_test_matrix_abbreviation_id_fk": { + "name": "environmental_laboratory_reporting_laboratory_test_matrix_abbreviation_id_fk", + "tableFrom": "environmental_laboratory_reporting", + "tableTo": "abbreviation", + "columnsFrom": [ + "laboratory_test_matrix" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "environmental_laboratory_reporting_run_type_initial_or_reanalysis_abbreviation_id_fk": { + "name": "environmental_laboratory_reporting_run_type_initial_or_reanalysis_abbreviation_id_fk", + "tableFrom": "environmental_laboratory_reporting", + "tableTo": "abbreviation", + "columnsFrom": [ + "run_type_initial_or_reanalysis" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "environmental_laboratory_reporting_test_additional_descriptor_abbreviation_id_fk": { + "name": "environmental_laboratory_reporting_test_additional_descriptor_abbreviation_id_fk", + "tableFrom": "environmental_laboratory_reporting", + "tableTo": "abbreviation", + "columnsFrom": [ + "test_additional_descriptor" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "environmental_laboratory_reporting_result_type_abbreviation_id_fk": { + "name": "environmental_laboratory_reporting_result_type_abbreviation_id_fk", + "tableFrom": "environmental_laboratory_reporting", + "tableTo": "abbreviation", + "columnsFrom": [ + "result_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "environmental_laboratory_reporting_analysis_location_abbreviation_id_fk": { + "name": "environmental_laboratory_reporting_analysis_location_abbreviation_id_fk", + "tableFrom": "environmental_laboratory_reporting", + "tableTo": "abbreviation", + "columnsFrom": [ + "analysis_location" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "environmental_laboratory_reporting_basis_abbreviation_id_fk": { + "name": "environmental_laboratory_reporting_basis_abbreviation_id_fk", + "tableFrom": "environmental_laboratory_reporting", + "tableTo": "abbreviation", + "columnsFrom": [ + "basis" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "environmental_laboratory_reporting_sample_information_id_sample_information_id_fk": { + "name": "environmental_laboratory_reporting_sample_information_id_sample_information_id_fk", + "tableFrom": "environmental_laboratory_reporting", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_environmental_laboratory_reporting": { + "name": "unique_environmental_laboratory_reporting", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen", + "determinand_code", + "test_method", + "laboratory_test_matrix", + "run_type_initial_or_reanalysis", + "test_additional_descriptor", + "tentatively_identified_compound_tic", + "result_unit" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.exploratory_hole_backfill_details": { + "name": "exploratory_hole_backfill_details", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_section": { + "name": "depth_to_top_of_section", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_section": { + "name": "depth_to_base_of_section", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "backfill_description": { + "name": "backfill_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "backfill_legend_abbreviation": { + "name": "backfill_legend_abbreviation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "date_of_completion_of_backfill": { + "name": "date_of_completion_of_backfill", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "backfill_remarks_including_how_it_was_placed": { + "name": "backfill_remarks_including_how_it_was_placed", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_drilling_journals": { + "name": "associated_file_reference_e_g_drilling_journals", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_exploratory_hole_backfill_details_abbr": { + "name": "idx_exploratory_hole_backfill_details_abbr", + "columns": [ + { + "expression": "backfill_legend_abbreviation", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "exploratory_hole_backfill_details_backfill_legend_abbreviation_abbreviation_id_fk": { + "name": "exploratory_hole_backfill_details_backfill_legend_abbreviation_abbreviation_id_fk", + "tableFrom": "exploratory_hole_backfill_details", + "tableTo": "abbreviation", + "columnsFrom": [ + "backfill_legend_abbreviation" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "exploratory_hole_backfill_details_location_details_id_location_details_id_fk": { + "name": "exploratory_hole_backfill_details_location_details_id_location_details_id_fk", + "tableFrom": "exploratory_hole_backfill_details", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_exploratory_hole_backfill_details": { + "name": "unique_exploratory_hole_backfill_details", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_section" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.exploratory_hole_orientation_and_inclination": { + "name": "exploratory_hole_orientation_and_inclination", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_exploratory_hole_section": { + "name": "depth_to_top_of_exploratory_hole_section", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_exploratory_hole_section": { + "name": "depth_to_base_of_exploratory_hole_section", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "orientation_of_exploratory_hole_section_or_traverse_degrees_from_north": { + "name": "orientation_of_exploratory_hole_section_or_traverse_degrees_from_north", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "inclination_of_exploratory_hole_section_or_traverse_measured_positively_down_from_horizontal": { + "name": "inclination_of_exploratory_hole_section_or_traverse_measured_positively_down_from_horizontal", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks_relating_to_orientation_and_inclination_of_hole_section": { + "name": "remarks_relating_to_orientation_and_inclination_of_hole_section", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_contract_data_specification": { + "name": "associated_file_reference_e_g_contract_data_specification", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "exploratory_hole_orientation_and_inclination_location_details_id_location_details_id_fk": { + "name": "exploratory_hole_orientation_and_inclination_location_details_id_location_details_id_fk", + "tableFrom": "exploratory_hole_orientation_and_inclination", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_exploratory_hole_orientation_and_inclination": { + "name": "unique_exploratory_hole_orientation_and_inclination", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_exploratory_hole_section", + "depth_to_base_of_exploratory_hole_section" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.field_geohydraulic_testing_data": { + "name": "field_geohydraulic_testing_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_date_clock_time_of_reading": { + "name": "test_date_clock_time_of_reading", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "test_record_type": { + "name": "test_record_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "stage_number_of_multistage_test": { + "name": "stage_number_of_multistage_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "elapsed_time_of_reading_during_test_or_test_stage": { + "name": "elapsed_time_of_reading_during_test_or_test_stage", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_record_reading": { + "name": "test_record_reading", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reading_units": { + "name": "reading_units", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_record_remark": { + "name": "test_record_remark", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "field_geohydraulic_testing_instrumentation_details_id": { + "name": "field_geohydraulic_testing_instrumentation_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_field_geohydraulic_testing_data_abbr": { + "name": "idx_field_geohydraulic_testing_data_abbr", + "columns": [ + { + "expression": "test_record_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "field_geohydraulic_testing_data_test_record_type_abbreviation_id_fk": { + "name": "field_geohydraulic_testing_data_test_record_type_abbreviation_id_fk", + "tableFrom": "field_geohydraulic_testing_data", + "tableTo": "abbreviation", + "columnsFrom": [ + "test_record_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "field_geohydraulic_testing_data_field_geohydraulic_testing_instrumentation_details_id_field_geohydraulic_testing_instrumentation_details_id_fk": { + "name": "field_geohydraulic_testing_data_field_geohydraulic_testing_instrumentation_details_id_field_geohydraulic_testing_instrumentation_details_id_fk", + "tableFrom": "field_geohydraulic_testing_data", + "tableTo": "field_geohydraulic_testing_instrumentation_details", + "columnsFrom": [ + "field_geohydraulic_testing_instrumentation_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_field_geohydraulic_testing_data": { + "name": "unique_field_geohydraulic_testing_data", + "nullsNotDistinct": false, + "columns": [ + "field_geohydraulic_testing_instrumentation_details_id", + "test_date_clock_time_of_reading", + "test_record_type" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.field_geohydraulic_testing_general": { + "name": "field_geohydraulic_testing_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_test_zone": { + "name": "depth_to_top_of_test_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_test_zone": { + "name": "depth_to_base_of_test_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "diameter_of_test_zone": { + "name": "diameter_of_test_zone", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "inside_diameter_of_installation_standpipe_or_borehole_casing": { + "name": "inside_diameter_of_installation_standpipe_or_borehole_casing", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "outside_diameter_of_installation_standpipe_or_borehole_casing": { + "name": "outside_diameter_of_installation_standpipe_or_borehole_casing", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "depth_of_borehole_during_test_excluding_tests_in_installations": { + "name": "depth_of_borehole_during_test_excluding_tests_in_installations", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_of_casing_during_test_excluding_tests_in_installations": { + "name": "depth_of_casing_during_test_excluding_tests_in_installations", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "shape_factor_for_test_zone": { + "name": "shape_factor_for_test_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "shape_factor_reference": { + "name": "shape_factor_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "type_of_test": { + "name": "type_of_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "test_configuration": { + "name": "test_configuration", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_water_in_borehole_or_installation_prior_to_test": { + "name": "depth_to_water_in_borehole_or_installation_prior_to_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_assumed_standing_water_level_used_for_calculations_of_head_during_test": { + "name": "depth_to_assumed_standing_water_level_used_for_calculations_of_head_during_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "applied_total_head_of_water_at_centre_of_test_zone": { + "name": "applied_total_head_of_water_at_centre_of_test_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "average_flow_rate_during_test": { + "name": "average_flow_rate_during_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "representative_permeability_for_test": { + "name": "representative_permeability_for_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "representative_lugeon_value_for_water_pressure_test": { + "name": "representative_lugeon_value_for_water_pressure_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "flow_type_for_water_pressure_test": { + "name": "flow_type_for_water_pressure_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "test_remarks": { + "name": "test_remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_test_operator": { + "name": "name_of_test_operator", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_field_geohydraulic_testing_general_abbr": { + "name": "idx_field_geohydraulic_testing_general_abbr", + "columns": [ + { + "expression": "type_of_test", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "test_configuration", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "flow_type_for_water_pressure_test", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "field_geohydraulic_testing_general_type_of_test_abbreviation_id_fk": { + "name": "field_geohydraulic_testing_general_type_of_test_abbreviation_id_fk", + "tableFrom": "field_geohydraulic_testing_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_test" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "field_geohydraulic_testing_general_test_configuration_abbreviation_id_fk": { + "name": "field_geohydraulic_testing_general_test_configuration_abbreviation_id_fk", + "tableFrom": "field_geohydraulic_testing_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "test_configuration" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "field_geohydraulic_testing_general_flow_type_for_water_pressure_test_abbreviation_id_fk": { + "name": "field_geohydraulic_testing_general_flow_type_for_water_pressure_test_abbreviation_id_fk", + "tableFrom": "field_geohydraulic_testing_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "flow_type_for_water_pressure_test" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "field_geohydraulic_testing_general_location_details_id_location_details_id_fk": { + "name": "field_geohydraulic_testing_general_location_details_id_location_details_id_fk", + "tableFrom": "field_geohydraulic_testing_general", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_field_geohydraulic_testing_general": { + "name": "unique_field_geohydraulic_testing_general", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_test_zone", + "depth_to_base_of_test_zone", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.field_geohydraulic_testing_instrumentation_details": { + "name": "field_geohydraulic_testing_instrumentation_details", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "instrument_reference_serial_number": { + "name": "instrument_reference_serial_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "instrument_measured_parameters": { + "name": "instrument_measured_parameters", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_instrument": { + "name": "details_of_instrument", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "instrument_position": { + "name": "instrument_position", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "field_geohydraulic_testing_general_id": { + "name": "field_geohydraulic_testing_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "field_geohydraulic_testing_instrumentation_details_field_geohydraulic_testing_general_id_field_geohydraulic_testing_general_id_fk": { + "name": "field_geohydraulic_testing_instrumentation_details_field_geohydraulic_testing_general_id_field_geohydraulic_testing_general_id_fk", + "tableFrom": "field_geohydraulic_testing_instrumentation_details", + "tableTo": "field_geohydraulic_testing_general", + "columnsFrom": [ + "field_geohydraulic_testing_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_field_geohydraulic_testing_instrumentation_details": { + "name": "unique_field_geohydraulic_testing_instrumentation_details", + "nullsNotDistinct": false, + "columns": [ + "field_geohydraulic_testing_general_id", + "instrument_reference_serial_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.field_geohydraulic_testing_test_results_per_stage": { + "name": "field_geohydraulic_testing_test_results_per_stage", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "stage_number_of_multistage_test": { + "name": "stage_number_of_multistage_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "start_of_stage_date_time": { + "name": "start_of_stage_date_time", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "end_of_stage_date_time": { + "name": "end_of_stage_date_time", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "applied_head_of_water_during_test_stage_at_centre_of_test_zone": { + "name": "applied_head_of_water_during_test_stage_at_centre_of_test_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "average_flow_rate_during_test_stage": { + "name": "average_flow_rate_during_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "permeability_for_test_stage": { + "name": "permeability_for_test_stage", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "lugeon_value_for_test_stage": { + "name": "lugeon_value_for_test_stage", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "field_geohydraulic_testing_general_id": { + "name": "field_geohydraulic_testing_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "field_geohydraulic_testing_test_results_per_stage_field_geohydraulic_testing_general_id_field_geohydraulic_testing_general_id_fk": { + "name": "field_geohydraulic_testing_test_results_per_stage_field_geohydraulic_testing_general_id_field_geohydraulic_testing_general_id_fk", + "tableFrom": "field_geohydraulic_testing_test_results_per_stage", + "tableTo": "field_geohydraulic_testing_general", + "columnsFrom": [ + "field_geohydraulic_testing_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_field_geohydraulic_testing_test_results_per_stage": { + "name": "unique_field_geohydraulic_testing_test_results_per_stage", + "nullsNotDistinct": false, + "columns": [ + "field_geohydraulic_testing_general_id", + "stage_number_of_multistage_test" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.field_geological_descriptions": { + "name": "field_geological_descriptions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_the_top_of_stratum": { + "name": "depth_to_the_top_of_stratum", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_the_base_of_description": { + "name": "depth_to_the_base_of_description", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "general_description_of_stratum": { + "name": "general_description_of_stratum", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "legend_code": { + "name": "legend_code", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "geology_code": { + "name": "geology_code", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "second_geology_code": { + "name": "second_geology_code", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "stratum_reference_shown_on_trial_pit_or_traverse_sketch": { + "name": "stratum_reference_shown_on_trial_pit_or_traverse_sketch", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "bgs_lexicon_code": { + "name": "bgs_lexicon_code", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "geological_formation_or_stratum_name": { + "name": "geological_formation_or_stratum_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_logging_field_sheets": { + "name": "associated_file_reference_e_g_logging_field_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_field_geological_descriptions_abbr": { + "name": "idx_field_geological_descriptions_abbr", + "columns": [ + { + "expression": "legend_code", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "geology_code", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "second_geology_code", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "bgs_lexicon_code", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "field_geological_descriptions_legend_code_abbreviation_id_fk": { + "name": "field_geological_descriptions_legend_code_abbreviation_id_fk", + "tableFrom": "field_geological_descriptions", + "tableTo": "abbreviation", + "columnsFrom": [ + "legend_code" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "field_geological_descriptions_geology_code_abbreviation_id_fk": { + "name": "field_geological_descriptions_geology_code_abbreviation_id_fk", + "tableFrom": "field_geological_descriptions", + "tableTo": "abbreviation", + "columnsFrom": [ + "geology_code" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "field_geological_descriptions_second_geology_code_abbreviation_id_fk": { + "name": "field_geological_descriptions_second_geology_code_abbreviation_id_fk", + "tableFrom": "field_geological_descriptions", + "tableTo": "abbreviation", + "columnsFrom": [ + "second_geology_code" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "field_geological_descriptions_bgs_lexicon_code_abbreviation_id_fk": { + "name": "field_geological_descriptions_bgs_lexicon_code_abbreviation_id_fk", + "tableFrom": "field_geological_descriptions", + "tableTo": "abbreviation", + "columnsFrom": [ + "bgs_lexicon_code" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "field_geological_descriptions_location_details_id_location_details_id_fk": { + "name": "field_geological_descriptions_location_details_id_location_details_id_fk", + "tableFrom": "field_geological_descriptions", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_field_geological_descriptions": { + "name": "unique_field_geological_descriptions", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_the_top_of_stratum", + "depth_to_the_base_of_description" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.fracture_spacing": { + "name": "fracture_spacing", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_in_hole": { + "name": "depth_to_top_in_hole", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_in_hole": { + "name": "depth_to_base_in_hole", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "discontinuity_set_reference": { + "name": "discontinuity_set_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "maximum_fracture_spacing_over_zone": { + "name": "maximum_fracture_spacing_over_zone", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "average_fracture_modal_spacing_over_zone": { + "name": "average_fracture_modal_spacing_over_zone", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "minimum_fracture_spacing_over_zone": { + "name": "minimum_fracture_spacing_over_zone", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "fracture_index_frequency_over_zone_fractures_per_metre": { + "name": "fracture_index_frequency_over_zone_fractures_per_metre", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "comments_on_fracture_set": { + "name": "comments_on_fracture_set", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_logging_field_sheets": { + "name": "associated_file_reference_e_g_logging_field_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "fracture_spacing_location_details_id_location_details_id_fk": { + "name": "fracture_spacing_location_details_id_location_details_id_fk", + "tableFrom": "fracture_spacing", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_fracture_spacing": { + "name": "unique_fracture_spacing", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_in_hole", + "depth_to_base_in_hole", + "discontinuity_set_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.frost_susceptibility_tests": { + "name": "frost_susceptibility_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "dry_density_of_specimens_after_preparation": { + "name": "dry_density_of_specimens_after_preparation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content_of_specimens_at_preparation": { + "name": "water_moisture_content_of_specimens_at_preparation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "frost_heave": { + "name": "frost_heave", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mean_heave_of_3_specimens": { + "name": "mean_heave_of_3_specimens", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "amount_of_stabiliser_added": { + "name": "amount_of_stabiliser_added", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_stabiliser_added": { + "name": "type_of_stabiliser_added", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "notes_on_frost_susceptibility_testing_as_per_trrl_sr_829": { + "name": "notes_on_frost_susceptibility_testing_as_per_trrl_sr_829", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviations_from_the_test_method": { + "name": "deviations_from_the_test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_frost_susceptibility_tests_abbr": { + "name": "idx_frost_susceptibility_tests_abbr", + "columns": [ + { + "expression": "sample_condition", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "frost_susceptibility_tests_sample_condition_abbreviation_id_fk": { + "name": "frost_susceptibility_tests_sample_condition_abbreviation_id_fk", + "tableFrom": "frost_susceptibility_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "sample_condition" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "frost_susceptibility_tests_sample_information_id_sample_information_id_fk": { + "name": "frost_susceptibility_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "frost_susceptibility_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_frost_susceptibility_tests": { + "name": "unique_frost_susceptibility_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.geotechnical_chemistry_testing": { + "name": "geotechnical_chemistry_testing", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "determinand": { + "name": "determinand", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_type": { + "name": "test_type", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "test_result": { + "name": "test_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_result_units": { + "name": "test_result_units", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "client_laboratory_preferred_name_of_determinand": { + "name": "client_laboratory_preferred_name_of_determinand", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks_on_test": { + "name": "remarks_on_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reported_result": { + "name": "reported_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "lower_detection_limit": { + "name": "lower_detection_limit", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviations_from_the_test_method": { + "name": "deviations_from_the_test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_delivery_or_batch_code": { + "name": "sample_delivery_or_batch_code", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "laboratory_sample_id": { + "name": "laboratory_sample_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_receipt_date_time_at_laboratory": { + "name": "sample_receipt_date_time_at_laboratory", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "analysis_date_and_time": { + "name": "analysis_date_and_time", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "test_of_suite_name": { + "name": "test_of_suite_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "instrument_reference_no_or_identifier": { + "name": "instrument_reference_no_or_identifier", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "instrument_type": { + "name": "instrument_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "size_of_material_removed_prior_to_test_value_given_indicates_lowest_sized_material_removed": { + "name": "size_of_material_removed_prior_to_test_value_given_indicates_lowest_sized_material_removed", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "percentage_of_material_removed": { + "name": "percentage_of_material_removed", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "result_deviation_description_s": { + "name": "result_deviation_description_s", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_geotechnical_chemistry_testing_abbr": { + "name": "idx_geotechnical_chemistry_testing_abbr", + "columns": [ + { + "expression": "determinand", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "test_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "geotechnical_chemistry_testing_determinand_abbreviation_id_fk": { + "name": "geotechnical_chemistry_testing_determinand_abbreviation_id_fk", + "tableFrom": "geotechnical_chemistry_testing", + "tableTo": "abbreviation", + "columnsFrom": [ + "determinand" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "geotechnical_chemistry_testing_test_type_abbreviation_id_fk": { + "name": "geotechnical_chemistry_testing_test_type_abbreviation_id_fk", + "tableFrom": "geotechnical_chemistry_testing", + "tableTo": "abbreviation", + "columnsFrom": [ + "test_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "geotechnical_chemistry_testing_sample_information_id_sample_information_id_fk": { + "name": "geotechnical_chemistry_testing_sample_information_id_sample_information_id_fk", + "tableFrom": "geotechnical_chemistry_testing", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_geotechnical_chemistry_testing": { + "name": "unique_geotechnical_chemistry_testing", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen", + "determinand", + "test_method", + "test_type" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.hole_diameter_by_depth": { + "name": "hole_diameter_by_depth", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_of_base_of_hole_at_the_diameter_recorded_in_hdia_diam": { + "name": "depth_of_base_of_hole_at_the_diameter_recorded_in_hdia_diam", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "hole_diameter": { + "name": "hole_diameter", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_drilling_journals": { + "name": "associated_file_reference_e_g_drilling_journals", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "hole_diameter_by_depth_location_details_id_location_details_id_fk": { + "name": "hole_diameter_by_depth_location_details_id_location_details_id_fk", + "tableFrom": "hole_diameter_by_depth", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_hole_diameter_by_depth": { + "name": "unique_hole_diameter_by_depth", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_of_base_of_hole_at_the_diameter_recorded_in_hdia_diam", + "hole_diameter" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.in_situ_california_bearing_ratio_tests": { + "name": "in_situ_california_bearing_ratio_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_cbr_test": { + "name": "depth_to_top_of_cbr_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cbr_value": { + "name": "cbr_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content_relating_to_test": { + "name": "water_moisture_content_relating_to_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "details_of_kentledge_reaction_load": { + "name": "details_of_kentledge_reaction_load", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "seating_force": { + "name": "seating_force", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "surcharge_pressure": { + "name": "surcharge_pressure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type_of_cbr": { + "name": "type_of_cbr", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stratum_reference_shown_on_trial_pit_or_traverse_sketch": { + "name": "stratum_reference_shown_on_trial_pit_or_traverse_sketch", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_in_situ_california_bearing_ratio_tests_abbr": { + "name": "idx_in_situ_california_bearing_ratio_tests_abbr", + "columns": [ + { + "expression": "type_of_cbr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "in_situ_california_bearing_ratio_tests_type_of_cbr_abbreviation_id_fk": { + "name": "in_situ_california_bearing_ratio_tests_type_of_cbr_abbreviation_id_fk", + "tableFrom": "in_situ_california_bearing_ratio_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_cbr" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "in_situ_california_bearing_ratio_tests_location_details_id_location_details_id_fk": { + "name": "in_situ_california_bearing_ratio_tests_location_details_id_location_details_id_fk", + "tableFrom": "in_situ_california_bearing_ratio_tests", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_in_situ_california_bearing_ratio_tests": { + "name": "unique_in_situ_california_bearing_ratio_tests", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_cbr_test", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.in_situ_density_tests": { + "name": "in_situ_density_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_of_in_situ_density_test": { + "name": "depth_of_in_situ_density_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "type_of_density_test_performed": { + "name": "type_of_density_test_performed", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "in_situ_bulk_density_after_any_calibration_corrections_applied": { + "name": "in_situ_bulk_density_after_any_calibration_corrections_applied", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content_relating_to_in_situ_test_after_any_calibration_corrections_applied": { + "name": "water_moisture_content_relating_to_in_situ_test_after_any_calibration_corrections_applied", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "amount_of_stabiliser_added": { + "name": "amount_of_stabiliser_added", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_stabiliser_added": { + "name": "type_of_stabiliser_added", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stratum_reference_shown_on_trial_pit_or_traverse_sketch": { + "name": "stratum_reference_shown_on_trial_pit_or_traverse_sketch", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_in_situ_density_tests_abbr": { + "name": "idx_in_situ_density_tests_abbr", + "columns": [ + { + "expression": "type_of_density_test_performed", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "in_situ_density_tests_type_of_density_test_performed_abbreviation_id_fk": { + "name": "in_situ_density_tests_type_of_density_test_performed_abbreviation_id_fk", + "tableFrom": "in_situ_density_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_density_test_performed" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "in_situ_density_tests_location_details_id_location_details_id_fk": { + "name": "in_situ_density_tests_location_details_id_location_details_id_fk", + "tableFrom": "in_situ_density_tests", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_in_situ_density_tests": { + "name": "unique_in_situ_density_tests", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_of_in_situ_density_test", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.in_situ_hand_penetrometer_tests": { + "name": "in_situ_hand_penetrometer_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_of_test": { + "name": "depth_of_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hand_penetrometer_result": { + "name": "hand_penetrometer_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "remarks_on_test": { + "name": "remarks_on_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stratum_reference_shown_on_trial_pit_or_traverse_sketch": { + "name": "stratum_reference_shown_on_trial_pit_or_traverse_sketch", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "in_situ_hand_penetrometer_tests_location_details_id_location_details_id_fk": { + "name": "in_situ_hand_penetrometer_tests_location_details_id_location_details_id_fk", + "tableFrom": "in_situ_hand_penetrometer_tests", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_in_situ_hand_penetrometer_tests": { + "name": "unique_in_situ_hand_penetrometer_tests", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_of_test", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.in_situ_permeability_tests_data": { + "name": "in_situ_permeability_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "stage_number_of_multistage_packer_test": { + "name": "stage_number_of_multistage_packer_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "elapsed_time": { + "name": "elapsed_time", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_water_at_time_iprt_time": { + "name": "depth_to_water_at_time_iprt_time", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reading_remark": { + "name": "test_reading_remark", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "in_situ_permeability_tests_general_id": { + "name": "in_situ_permeability_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "in_situ_permeability_tests_data_in_situ_permeability_tests_general_id_in_situ_permeability_tests_general_id_fk": { + "name": "in_situ_permeability_tests_data_in_situ_permeability_tests_general_id_in_situ_permeability_tests_general_id_fk", + "tableFrom": "in_situ_permeability_tests_data", + "tableTo": "in_situ_permeability_tests_general", + "columnsFrom": [ + "in_situ_permeability_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_in_situ_permeability_tests_data": { + "name": "unique_in_situ_permeability_tests_data", + "nullsNotDistinct": false, + "columns": [ + "in_situ_permeability_tests_general_id", + "stage_number_of_multistage_packer_test", + "elapsed_time" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.in_situ_permeability_tests_general": { + "name": "in_situ_permeability_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_test_zone": { + "name": "depth_to_top_of_test_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_test_zone": { + "name": "depth_to_base_of_test_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "stage_number_of_multistage_test": { + "name": "stage_number_of_multistage_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type_of_test": { + "name": "type_of_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "depth_to_water_in_test_zone_immediately_prior_to_test": { + "name": "depth_to_water_in_test_zone_immediately_prior_to_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_water_at_start_of_test": { + "name": "depth_to_water_at_start_of_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "diameter_of_test_zone": { + "name": "diameter_of_test_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "diameter_of_test_installation_e_g_standpipe_or_casing": { + "name": "diameter_of_test_installation_e_g_standpipe_or_casing", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "permeability": { + "name": "permeability", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "average_flow_during_test_stage": { + "name": "average_flow_during_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_assumed_standing_water_level": { + "name": "depth_to_assumed_standing_water_level", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "applied_total_head_of_water_during_test_stage_at_centre_of_test_zone": { + "name": "applied_total_head_of_water_during_test_stage_at_centre_of_test_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "test_remarks": { + "name": "test_remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_in_situ_permeability_tests_general_abbr": { + "name": "idx_in_situ_permeability_tests_general_abbr", + "columns": [ + { + "expression": "type_of_test", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "in_situ_permeability_tests_general_type_of_test_abbreviation_id_fk": { + "name": "in_situ_permeability_tests_general_type_of_test_abbreviation_id_fk", + "tableFrom": "in_situ_permeability_tests_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_test" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "in_situ_permeability_tests_general_location_details_id_location_details_id_fk": { + "name": "in_situ_permeability_tests_general_location_details_id_location_details_id_fk", + "tableFrom": "in_situ_permeability_tests_general", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_in_situ_permeability_tests_general": { + "name": "unique_in_situ_permeability_tests_general", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_test_zone", + "test_reference", + "depth_to_base_of_test_zone", + "stage_number_of_multistage_test" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.in_situ_redox_tests": { + "name": "in_situ_redox_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_of_redox_test": { + "name": "depth_of_redox_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "ph": { + "name": "ph", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mean_value_of_the_potential_of_the_two_platinum_probes": { + "name": "mean_value_of_the_potential_of_the_two_platinum_probes", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "redox_potential": { + "name": "redox_potential", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "details_of_redox_test_and_probe_type": { + "name": "details_of_redox_test_and_probe_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stratum_reference_shown_on_trial_pit_or_traverse_sketch": { + "name": "stratum_reference_shown_on_trial_pit_or_traverse_sketch", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "in_situ_redox_tests_location_details_id_location_details_id_fk": { + "name": "in_situ_redox_tests_location_details_id_location_details_id_fk", + "tableFrom": "in_situ_redox_tests", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_in_situ_redox_tests": { + "name": "unique_in_situ_redox_tests", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_of_redox_test", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.in_situ_resistivity_tests": { + "name": "in_situ_resistivity_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_which_in_situ_resistivity_test_relates": { + "name": "depth_to_which_in_situ_resistivity_test_relates", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "base_depth_to_which_in_situ_resistivity_test_relates": { + "name": "base_depth_to_which_in_situ_resistivity_test_relates", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_resistivity_test": { + "name": "type_of_resistivity_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "mean_value_of_the_apparent_resistivity": { + "name": "mean_value_of_the_apparent_resistivity", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "first_value_of_apparent_resistivity_when_more_than_15_different_to_mean": { + "name": "first_value_of_apparent_resistivity_when_more_than_15_different_to_mean", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "second_value_of_apparent_resistivity_when_more_than_15_different_to_mean": { + "name": "second_value_of_apparent_resistivity_when_more_than_15_different_to_mean", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "details_of_test_e_g_electrode_spacing_and_configuration": { + "name": "details_of_test_e_g_electrode_spacing_and_configuration", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stratum_reference_shown_on_trial_pit_or_traverse_sketch": { + "name": "stratum_reference_shown_on_trial_pit_or_traverse_sketch", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_in_situ_resistivity_tests_abbr": { + "name": "idx_in_situ_resistivity_tests_abbr", + "columns": [ + { + "expression": "type_of_resistivity_test", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "in_situ_resistivity_tests_type_of_resistivity_test_abbreviation_id_fk": { + "name": "in_situ_resistivity_tests_type_of_resistivity_test_abbreviation_id_fk", + "tableFrom": "in_situ_resistivity_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_resistivity_test" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "in_situ_resistivity_tests_location_details_id_location_details_id_fk": { + "name": "in_situ_resistivity_tests_location_details_id_location_details_id_fk", + "tableFrom": "in_situ_resistivity_tests", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_in_situ_resistivity_tests": { + "name": "unique_in_situ_resistivity_tests", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_which_in_situ_resistivity_test_relates", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.in_situ_vane_tests": { + "name": "in_situ_vane_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_of_vane_test": { + "name": "depth_of_vane_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "vane_type": { + "name": "vane_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vane_test_result": { + "name": "vane_test_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "vane_test_residual_result": { + "name": "vane_test_residual_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "details_of_vane_test": { + "name": "details_of_vane_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stratum_reference_shown_on_trial_pit_or_traverse_sketch": { + "name": "stratum_reference_shown_on_trial_pit_or_traverse_sketch", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_in_situ_vane_tests_abbr": { + "name": "idx_in_situ_vane_tests_abbr", + "columns": [ + { + "expression": "vane_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "in_situ_vane_tests_vane_type_abbreviation_id_fk": { + "name": "in_situ_vane_tests_vane_type_abbreviation_id_fk", + "tableFrom": "in_situ_vane_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "vane_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "in_situ_vane_tests_location_details_id_location_details_id_fk": { + "name": "in_situ_vane_tests_location_details_id_location_details_id_fk", + "tableFrom": "in_situ_vane_tests", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_in_situ_vane_tests": { + "name": "unique_in_situ_vane_tests", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_of_vane_test", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.initial_consumption_of_lime_tests_data": { + "name": "initial_consumption_of_lime_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "percentage_of_lime_added": { + "name": "percentage_of_lime_added", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "ph_of_lime_soil_suspension": { + "name": "ph_of_lime_soil_suspension", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "initial_consumption_of_lime_tests_general_id": { + "name": "initial_consumption_of_lime_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "initial_consumption_of_lime_tests_data_initial_consumption_of_lime_tests_general_id_initial_consumption_of_lime_tests_general_id_fk": { + "name": "initial_consumption_of_lime_tests_data_initial_consumption_of_lime_tests_general_id_initial_consumption_of_lime_tests_general_id_fk", + "tableFrom": "initial_consumption_of_lime_tests_data", + "tableTo": "initial_consumption_of_lime_tests_general", + "columnsFrom": [ + "initial_consumption_of_lime_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_initial_consumption_of_lime_tests_data": { + "name": "unique_initial_consumption_of_lime_tests_data", + "nullsNotDistinct": false, + "columns": [ + "initial_consumption_of_lime_tests_general_id", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.initial_consumption_of_lime_tests_general": { + "name": "initial_consumption_of_lime_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_consumption_of_lime": { + "name": "initial_consumption_of_lime", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "ph_value_used_for_interpretation_of_lstg_icl": { + "name": "ph_value_used_for_interpretation_of_lstg_icl", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "details_of_lime_used_for_test": { + "name": "details_of_lime_used_for_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "ph_of_saturated_lime_solution_suitability": { + "name": "ph_of_saturated_lime_solution_suitability", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "percentage_passing_0_425mm_sieve": { + "name": "percentage_passing_0_425mm_sieve", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result": { + "name": "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "initial_consumption_of_lime_tests_general_sample_information_id_sample_information_id_fk": { + "name": "initial_consumption_of_lime_tests_general_sample_information_id_sample_information_id_fk", + "tableFrom": "initial_consumption_of_lime_tests_general", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_initial_consumption_of_lime_tests_general": { + "name": "unique_initial_consumption_of_lime_tests_general", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.laboratory_fall_cone_test": { + "name": "laboratory_fall_cone_test", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviations_from_the_procedure": { + "name": "deviations_from_the_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mass_of_cone_used": { + "name": "mass_of_cone_used", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "angle_of_cone_tip": { + "name": "angle_of_cone_tip", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "average_cone_penetration": { + "name": "average_cone_penetration", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "individual_penetration_point_1_if_values_differ_by_more_than_0_5mm_from_the_average": { + "name": "individual_penetration_point_1_if_values_differ_by_more_than_0_5mm_from_the_average", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "individual_penetration_point_2_if_values_differ_by_more_than_0_5mm_from_the_average": { + "name": "individual_penetration_point_2_if_values_differ_by_more_than_0_5mm_from_the_average", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "individual_penetration_point_3_if_values_differ_by_more_than_0_5mm_from_the_average": { + "name": "individual_penetration_point_3_if_values_differ_by_more_than_0_5mm_from_the_average", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "individual_penetration_point_4_if_values_differ_by_more_than_0_5mm_from_the_average": { + "name": "individual_penetration_point_4_if_values_differ_by_more_than_0_5mm_from_the_average", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "non_conforming_test_due_to_penetration_range": { + "name": "non_conforming_test_due_to_penetration_range", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "estimated_undrained_fall_cone_shear_strength": { + "name": "estimated_undrained_fall_cone_shear_strength", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "water_content_of_specimen": { + "name": "water_content_of_specimen", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "water_content_determined_on_specimen_trimmings_or_other_if_applicable": { + "name": "water_content_determined_on_specimen_trimmings_or_other_if_applicable", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_remarks": { + "name": "test_remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "laboratory_fall_cone_test_sample_information_id_sample_information_id_fk": { + "name": "laboratory_fall_cone_test_sample_information_id_sample_information_id_fk", + "tableFrom": "laboratory_fall_cone_test", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_laboratory_fall_cone_test": { + "name": "unique_laboratory_fall_cone_test", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.laboratory_hand_penetrometer_tests": { + "name": "laboratory_hand_penetrometer_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hand_penetrometer_undrained_shear_strength": { + "name": "hand_penetrometer_undrained_shear_strength", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content_local_to_test": { + "name": "water_moisture_content_local_to_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "laboratory_hand_penetrometer_tests_sample_information_id_sample_information_id_fk": { + "name": "laboratory_hand_penetrometer_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "laboratory_hand_penetrometer_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_laboratory_hand_penetrometer_tests": { + "name": "unique_laboratory_hand_penetrometer_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.laboratory_permeability_tests": { + "name": "laboratory_permeability_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "size_cut_off_of_material_too_coarse_for_testing": { + "name": "size_cut_off_of_material_too_coarse_for_testing", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "proportion_of_material_removed_above_ptst": { + "name": "proportion_of_material_removed_above_ptst", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_length": { + "name": "specimen_length", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_water_moisture_content_of_test_specimen": { + "name": "initial_water_moisture_content_of_test_specimen", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_bulk_density_of_test_specimen": { + "name": "initial_bulk_density_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "diameter_of_drain_for_radial_permeability_in_hydraulic_cell": { + "name": "diameter_of_drain_for_radial_permeability_in_hydraulic_cell", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "method_of_forming_central_drain": { + "name": "method_of_forming_central_drain", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_voids_ratio": { + "name": "initial_voids_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "coefficient_of_permeability": { + "name": "coefficient_of_permeability", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mean_effective_stress_at_which_permeability_measured_when_measured_in_triaxial_or_hydraulic_cell": { + "name": "mean_effective_stress_at_which_permeability_measured_when_measured_in_triaxial_or_hydraulic_cell", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "hydraulic_gradient_at_which_permeability_measured_for_constant_head_test": { + "name": "hydraulic_gradient_at_which_permeability_measured_for_constant_head_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "initial_degree_of_saturation": { + "name": "initial_degree_of_saturation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "details_of_saturation": { + "name": "details_of_saturation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_consolidation": { + "name": "details_of_consolidation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "particle_density_with_prefix_if_value_assumed": { + "name": "particle_density_with_prefix_if_value_assumed", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_permeability_measurement": { + "name": "type_of_permeability_measurement", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type_of_permeameter": { + "name": "type_of_permeameter", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks_on_test": { + "name": "remarks_on_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviations_from_the_test_method": { + "name": "deviations_from_the_test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_water_content_source": { + "name": "initial_water_content_source", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "final_water_content_of_test_specimen": { + "name": "final_water_content_of_test_specimen", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "final_degree_of_saturation": { + "name": "final_degree_of_saturation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "average_laboratory_temperature_at_which_the_test_was_performed": { + "name": "average_laboratory_temperature_at_which_the_test_was_performed", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "source_of_permeameter_water": { + "name": "source_of_permeameter_water", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "back_pressure": { + "name": "back_pressure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "b_value": { + "name": "b_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "equipment_head_loss_corrections_applied_to_the_measurements": { + "name": "equipment_head_loss_corrections_applied_to_the_measurements", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_laboratory_permeability_tests_abbr": { + "name": "idx_laboratory_permeability_tests_abbr", + "columns": [ + { + "expression": "sample_condition", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type_of_permeability_measurement", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type_of_permeameter", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "laboratory_permeability_tests_sample_condition_abbreviation_id_fk": { + "name": "laboratory_permeability_tests_sample_condition_abbreviation_id_fk", + "tableFrom": "laboratory_permeability_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "sample_condition" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "laboratory_permeability_tests_type_of_permeability_measurement_abbreviation_id_fk": { + "name": "laboratory_permeability_tests_type_of_permeability_measurement_abbreviation_id_fk", + "tableFrom": "laboratory_permeability_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_permeability_measurement" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "laboratory_permeability_tests_type_of_permeameter_abbreviation_id_fk": { + "name": "laboratory_permeability_tests_type_of_permeameter_abbreviation_id_fk", + "tableFrom": "laboratory_permeability_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_permeameter" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "laboratory_permeability_tests_sample_information_id_sample_information_id_fk": { + "name": "laboratory_permeability_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "laboratory_permeability_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_laboratory_permeability_tests": { + "name": "unique_laboratory_permeability_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.laboratory_resistivity_tests": { + "name": "laboratory_resistivity_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "bulk_density": { + "name": "bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "dry_density": { + "name": "dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content": { + "name": "water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_condition_including_details_of_remoulding": { + "name": "sample_condition_including_details_of_remoulding", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "temperature_corrected_20_degc_resistivity": { + "name": "temperature_corrected_20_degc_resistivity", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "diameter_of_container": { + "name": "diameter_of_container", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "container_cross_sectional_area": { + "name": "container_cross_sectional_area", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "length_of_container": { + "name": "length_of_container", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "temperature_at_which_test_performed": { + "name": "temperature_at_which_test_performed", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type_of_electrodes_including_material": { + "name": "type_of_electrodes_including_material", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "dimensions_of_probes": { + "name": "dimensions_of_probes", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "shape_of_container": { + "name": "shape_of_container", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "volume_of_water_required_to_saturate_the_soil": { + "name": "volume_of_water_required_to_saturate_the_soil", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "water_resistivity": { + "name": "water_resistivity", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "approximate_percentage_of_large_particles_removed_prior_to_test": { + "name": "approximate_percentage_of_large_particles_removed_prior_to_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "laboratory_resistivity_tests_sample_information_id_sample_information_id_fk": { + "name": "laboratory_resistivity_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "laboratory_resistivity_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_laboratory_resistivity_tests": { + "name": "unique_laboratory_resistivity_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.laboratory_thermal_conductivity": { + "name": "laboratory_thermal_conductivity", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "bulk_density": { + "name": "bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "dry_density": { + "name": "dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content": { + "name": "water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thermal_conductivity": { + "name": "thermal_conductivity", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "thermal_resistivity": { + "name": "thermal_resistivity", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "ambient_temperature_at_which_test_is_performed": { + "name": "ambient_temperature_at_which_test_is_performed", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "probe_diameter": { + "name": "probe_diameter", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "probe_spacing": { + "name": "probe_spacing", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "probe_penetration": { + "name": "probe_penetration", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "method_of_probe_insertion": { + "name": "method_of_probe_insertion", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "particle_grain_size_removed": { + "name": "particle_grain_size_removed", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_procedure": { + "name": "deviation_from_the_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "laboratory_thermal_conductivity_sample_information_id_sample_information_id_fk": { + "name": "laboratory_thermal_conductivity_sample_information_id_sample_information_id_fk", + "tableFrom": "laboratory_thermal_conductivity", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_laboratory_thermal_conductivity": { + "name": "unique_laboratory_thermal_conductivity", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.laboratory_unconfined_compression_test": { + "name": "laboratory_unconfined_compression_test", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_procedure": { + "name": "deviation_from_the_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_type": { + "name": "test_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_length": { + "name": "specimen_length", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_initial_water_content": { + "name": "specimen_initial_water_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_bulk_density": { + "name": "initial_bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mean_rate_of_compression": { + "name": "mean_rate_of_compression", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "unconfined_compressive_strength": { + "name": "unconfined_compressive_strength", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "strain_at_failure": { + "name": "strain_at_failure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mode_of_failure": { + "name": "mode_of_failure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_laboratory_unconfined_compression_test_abbr": { + "name": "idx_laboratory_unconfined_compression_test_abbr", + "columns": [ + { + "expression": "test_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "mode_of_failure", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "laboratory_unconfined_compression_test_test_type_abbreviation_id_fk": { + "name": "laboratory_unconfined_compression_test_test_type_abbreviation_id_fk", + "tableFrom": "laboratory_unconfined_compression_test", + "tableTo": "abbreviation", + "columnsFrom": [ + "test_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "laboratory_unconfined_compression_test_mode_of_failure_abbreviation_id_fk": { + "name": "laboratory_unconfined_compression_test_mode_of_failure_abbreviation_id_fk", + "tableFrom": "laboratory_unconfined_compression_test", + "tableTo": "abbreviation", + "columnsFrom": [ + "mode_of_failure" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "laboratory_unconfined_compression_test_sample_information_id_sample_information_id_fk": { + "name": "laboratory_unconfined_compression_test_sample_information_id_sample_information_id_fk", + "tableFrom": "laboratory_unconfined_compression_test", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_laboratory_unconfined_compression_test": { + "name": "unique_laboratory_unconfined_compression_test", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.laboratory_vane_tests": { + "name": "laboratory_vane_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "vane_undrained_shear_strength_peak": { + "name": "vane_undrained_shear_strength_peak", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "vane_undrained_shear_strength_remoulded": { + "name": "vane_undrained_shear_strength_remoulded", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content_local_to_the_test": { + "name": "water_moisture_content_local_to_the_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "equivalent_diameter_of_vane": { + "name": "equivalent_diameter_of_vane", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "length_of_vane": { + "name": "length_of_vane", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "vane_type": { + "name": "vane_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_laboratory_vane_tests_abbr": { + "name": "idx_laboratory_vane_tests_abbr", + "columns": [ + { + "expression": "vane_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "laboratory_vane_tests_vane_type_abbreviation_id_fk": { + "name": "laboratory_vane_tests_vane_type_abbreviation_id_fk", + "tableFrom": "laboratory_vane_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "vane_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "laboratory_vane_tests_sample_information_id_sample_information_id_fk": { + "name": "laboratory_vane_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "laboratory_vane_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_laboratory_vane_tests": { + "name": "unique_laboratory_vane_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.linear_shrinkage_tests": { + "name": "linear_shrinkage_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "linear_shrinkage": { + "name": "linear_shrinkage", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "percentage_passing_0_425mm_sieve": { + "name": "percentage_passing_0_425mm_sieve", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "method_of_preparation": { + "name": "method_of_preparation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "linear_shrinkage_tests_sample_information_id_sample_information_id_fk": { + "name": "linear_shrinkage_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "linear_shrinkage_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_linear_shrinkage_tests": { + "name": "unique_linear_shrinkage_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.liquid_and_plastic_limit_tests": { + "name": "liquid_and_plastic_limit_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "liquid_limit": { + "name": "liquid_limit", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "plastic_limit": { + "name": "plastic_limit", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "plasticity_index": { + "name": "plasticity_index", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "percentage_passing_0_425mm_sieve": { + "name": "percentage_passing_0_425mm_sieve", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "method_of_preparation": { + "name": "method_of_preparation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "amount_of_stabiliser_added": { + "name": "amount_of_stabiliser_added", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_stabiliser_added": { + "name": "type_of_stabiliser_added", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_test": { + "name": "type_of_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "number_of_points": { + "name": "number_of_points", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "for_fall_cone_method": { + "name": "for_fall_cone_method", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mean_of_test_readings": { + "name": "mean_of_test_readings", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "correlation_factor_if_one_point_test": { + "name": "correlation_factor_if_one_point_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "sieve_size_if_other_than_0_425mm": { + "name": "sieve_size_if_other_than_0_425mm", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "percentage_passing_llpl_size_sieve_if_other_than_0_425mm": { + "name": "percentage_passing_llpl_size_sieve_if_other_than_0_425mm", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "the_water_content_of_the_specimen_before_removal_of_particles_prior_to_determination_liquid_or_plastic_limits": { + "name": "the_water_content_of_the_specimen_before_removal_of_particles_prior_to_determination_liquid_or_plastic_limits", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_liquid_and_plastic_limit_tests_abbr": { + "name": "idx_liquid_and_plastic_limit_tests_abbr", + "columns": [ + { + "expression": "type_of_test", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "number_of_points", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "for_fall_cone_method", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "liquid_and_plastic_limit_tests_type_of_test_abbreviation_id_fk": { + "name": "liquid_and_plastic_limit_tests_type_of_test_abbreviation_id_fk", + "tableFrom": "liquid_and_plastic_limit_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_test" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "liquid_and_plastic_limit_tests_number_of_points_abbreviation_id_fk": { + "name": "liquid_and_plastic_limit_tests_number_of_points_abbreviation_id_fk", + "tableFrom": "liquid_and_plastic_limit_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "number_of_points" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "liquid_and_plastic_limit_tests_for_fall_cone_method_abbreviation_id_fk": { + "name": "liquid_and_plastic_limit_tests_for_fall_cone_method_abbreviation_id_fk", + "tableFrom": "liquid_and_plastic_limit_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "for_fall_cone_method" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "liquid_and_plastic_limit_tests_sample_information_id_sample_information_id_fk": { + "name": "liquid_and_plastic_limit_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "liquid_and_plastic_limit_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_liquid_and_plastic_limit_tests": { + "name": "unique_liquid_and_plastic_limit_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.location_details": { + "name": "location_details", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "location_identifier": { + "name": "location_identifier", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_activity": { + "name": "type_of_activity", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status_of_information_relating_to_this_position": { + "name": "status_of_information_relating_to_this_position", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "national_grid_easting_of_location_or_start_of_traverse": { + "name": "national_grid_easting_of_location_or_start_of_traverse", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "national_grid_northing_of_location_or_start_of_traverse": { + "name": "national_grid_northing_of_location_or_start_of_traverse", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "national_grid_referencing_system_used": { + "name": "national_grid_referencing_system_used", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "ground_level_relative_to_datum_of_location_or_start_of_traverse": { + "name": "ground_level_relative_to_datum_of_location_or_start_of_traverse", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "general_remarks": { + "name": "general_remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "final_depth": { + "name": "final_depth", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "date_of_start_of_activity": { + "name": "date_of_start_of_activity", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "purpose_of_activity_at_this_location": { + "name": "purpose_of_activity_at_this_location", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reason_for_activity_termination": { + "name": "reason_for_activity_termination", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "end_date_of_activity": { + "name": "end_date_of_activity", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "osgb_letter_grid_reference": { + "name": "osgb_letter_grid_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "local_grid_x_co_ordinate_or_start_of_traverse": { + "name": "local_grid_x_co_ordinate_or_start_of_traverse", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "local_grid_y_co_ordinate_or_start_of_traverse": { + "name": "local_grid_y_co_ordinate_or_start_of_traverse", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "level_or_start_of_traverse_to_local_datum": { + "name": "level_or_start_of_traverse_to_local_datum", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "local_grid_referencing_system_used": { + "name": "local_grid_referencing_system_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "local_datum_referencing_system_used": { + "name": "local_datum_referencing_system_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "national_grid_easting_of_end_of_traverse": { + "name": "national_grid_easting_of_end_of_traverse", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "national_grid_northing_of_end_of_traverse": { + "name": "national_grid_northing_of_end_of_traverse", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "ground_level_relative_to_datum_of_end_of_traverse": { + "name": "ground_level_relative_to_datum_of_end_of_traverse", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "local_grid_easting_of_end_of_traverse": { + "name": "local_grid_easting_of_end_of_traverse", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "local_grid_northing_of_end_of_traverse": { + "name": "local_grid_northing_of_end_of_traverse", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "local_elevation_of_end_of_traverse": { + "name": "local_elevation_of_end_of_traverse", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "latitude_of_location_or_start_of_traverse": { + "name": "latitude_of_location_or_start_of_traverse", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "longitude_of_location_or_start_of_traverse": { + "name": "longitude_of_location_or_start_of_traverse", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "latitude_of_end_of_traverse": { + "name": "latitude_of_end_of_traverse", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "longitude_of_end_of_traverse": { + "name": "longitude_of_end_of_traverse", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "projection_format": { + "name": "projection_format", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "method_of_location": { + "name": "method_of_location", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "site_location_sub_division_within_project_code_or_description": { + "name": "site_location_sub_division_within_project_code_or_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "investigation_phase_grouping_code_or_description": { + "name": "investigation_phase_grouping_code_or_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "alignment_identifier": { + "name": "alignment_identifier", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "offset": { + "name": "offset", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "chainage": { + "name": "chainage", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reference_to_or_details_of_algorithm_used_to_calculate_local_grid_reference": { + "name": "reference_to_or_details_of_algorithm_used_to_calculate_local_grid_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_boring_or_pitting_instructions": { + "name": "associated_file_reference_e_g_boring_or_pitting_instructions", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "national_datum_referencing_system_used": { + "name": "national_datum_referencing_system_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "original_hole_id": { + "name": "original_hole_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "original_job_reference": { + "name": "original_job_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "originating_company": { + "name": "originating_company", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "geometry": { + "name": "geometry", + "type": "geometry(point)", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "spatial_index": { + "name": "spatial_index", + "columns": [ + { + "expression": "geometry", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gist", + "with": {} + }, + "idx_location_details_project": { + "name": "idx_location_details_project", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_location_details_abbr": { + "name": "idx_location_details_abbr", + "columns": [ + { + "expression": "type_of_activity", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status_of_information_relating_to_this_position", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "national_grid_referencing_system_used", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "location_details_type_of_activity_abbreviation_id_fk": { + "name": "location_details_type_of_activity_abbreviation_id_fk", + "tableFrom": "location_details", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_activity" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "location_details_status_of_information_relating_to_this_position_abbreviation_id_fk": { + "name": "location_details_status_of_information_relating_to_this_position_abbreviation_id_fk", + "tableFrom": "location_details", + "tableTo": "abbreviation", + "columnsFrom": [ + "status_of_information_relating_to_this_position" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "location_details_national_grid_referencing_system_used_abbreviation_id_fk": { + "name": "location_details_national_grid_referencing_system_used_abbreviation_id_fk", + "tableFrom": "location_details", + "tableTo": "abbreviation", + "columnsFrom": [ + "national_grid_referencing_system_used" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "location_details_project_id_project_id_fk": { + "name": "location_details_project_id_project_id_fk", + "tableFrom": "location_details", + "tableTo": "project", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_location_details": { + "name": "unique_location_details", + "nullsNotDistinct": false, + "columns": [ + "project_id", + "location_identifier" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.location_specific_time_related_remarks": { + "name": "location_specific_time_related_remarks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "date_and_time_of_remark_or_start_of_event": { + "name": "date_and_time_of_remark_or_start_of_event", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "component_or_sub_activity": { + "name": "component_or_sub_activity", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "time_related_remark": { + "name": "time_related_remark", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "duration_of_event_or_activity": { + "name": "duration_of_event_or_activity", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "date_and_time_of_end_of_event": { + "name": "date_and_time_of_end_of_event", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_site_journal_records": { + "name": "associated_file_reference_e_g_site_journal_records", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "location_specific_time_related_remarks_location_details_id_location_details_id_fk": { + "name": "location_specific_time_related_remarks_location_details_id_location_details_id_fk", + "tableFrom": "location_specific_time_related_remarks", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_location_specific_time_related_remarks": { + "name": "unique_location_specific_time_related_remarks", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "date_and_time_of_remark_or_start_of_event" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.los_angeles_abrasion_tests": { + "name": "los_angeles_abrasion_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "los_angeles_coefficient": { + "name": "los_angeles_coefficient", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "los_angeles_percentage_wear": { + "name": "los_angeles_percentage_wear", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "los_angeles_wear_ratio": { + "name": "los_angeles_wear_ratio", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "size_fraction_from_which_test_portion_was_obtained": { + "name": "size_fraction_from_which_test_portion_was_obtained", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "ball_load_or_charge_grading": { + "name": "ball_load_or_charge_grading", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "los_angeles_abrasion_tests_sample_information_id_sample_information_id_fk": { + "name": "los_angeles_abrasion_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "los_angeles_abrasion_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_los_angeles_abrasion_tests": { + "name": "unique_los_angeles_abrasion_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mcv_tests_data": { + "name": "mcv_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content_for_mcvt_tesn": { + "name": "water_moisture_content_for_mcvt_tesn", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "method_of_interpretation_of_the_test_curve": { + "name": "method_of_interpretation_of_the_test_curve", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mcv_value_for_mcvt_tesn": { + "name": "mcv_value_for_mcvt_tesn", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "after_test_bulk_density_for_mcvt_tesn": { + "name": "after_test_bulk_density_for_mcvt_tesn", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "difference_between_initial_n_and_final_3n_blows_in_rapid_assessment_test": { + "name": "difference_between_initial_n_and_final_3n_blows_in_rapid_assessment_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "stronger_or_weaker_than_pre_calibrated_standard": { + "name": "stronger_or_weaker_than_pre_calibrated_standard", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "mcv_tests_general_id": { + "name": "mcv_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "mcv_tests_data_mcv_tests_general_id_mcv_tests_general_id_fk": { + "name": "mcv_tests_data_mcv_tests_general_id_mcv_tests_general_id_fk", + "tableFrom": "mcv_tests_data", + "tableTo": "mcv_tests_general", + "columnsFrom": [ + "mcv_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_mcv_tests_data": { + "name": "unique_mcv_tests_data", + "nullsNotDistinct": false, + "columns": [ + "mcv_tests_general_id", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mcv_tests_general": { + "name": "mcv_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "weight_percent_of_sample_retained_on_20_mm_sieve": { + "name": "weight_percent_of_sample_retained_on_20_mm_sieve", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "natural_water_moisture_content_below_20_mm": { + "name": "natural_water_moisture_content_below_20_mm", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "amount_of_stabiliser_added": { + "name": "amount_of_stabiliser_added", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_stabiliser_added": { + "name": "type_of_stabiliser_added", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result": { + "name": "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "mcv_tests_general_sample_information_id_sample_information_id_fk": { + "name": "mcv_tests_general_sample_information_id_sample_information_id_fk", + "tableFrom": "mcv_tests_general", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_mcv_tests_general": { + "name": "unique_mcv_tests_general", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.monitoring_installation_pipe_work": { + "name": "monitoring_installation_pipe_work", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "pipe_reference": { + "name": "pipe_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "top_of_construction_zone": { + "name": "top_of_construction_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "base_of_construction_zone": { + "name": "base_of_construction_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "diameter_of_pipe": { + "name": "diameter_of_pipe", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type_of_pipe": { + "name": "type_of_pipe", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "details_of_pipe_construction": { + "name": "details_of_pipe_construction", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_drilling_journals": { + "name": "associated_file_reference_e_g_drilling_journals", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_monitoring_installation_pipe_work_abbr": { + "name": "idx_monitoring_installation_pipe_work_abbr", + "columns": [ + { + "expression": "type_of_pipe", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "monitoring_installation_pipe_work_type_of_pipe_abbreviation_id_fk": { + "name": "monitoring_installation_pipe_work_type_of_pipe_abbreviation_id_fk", + "tableFrom": "monitoring_installation_pipe_work", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_pipe" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "monitoring_installation_pipe_work_location_details_id_location_details_id_fk": { + "name": "monitoring_installation_pipe_work_location_details_id_location_details_id_fk", + "tableFrom": "monitoring_installation_pipe_work", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_monitoring_installation_pipe_work": { + "name": "unique_monitoring_installation_pipe_work", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "pipe_reference", + "top_of_construction_zone", + "base_of_construction_zone" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.monitoring_installations_and_instruments": { + "name": "monitoring_installations_and_instruments", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "monitoring_point_reference": { + "name": "monitoring_point_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_distance_of_monitoring_point_from_loca_id": { + "name": "initial_distance_of_monitoring_point_from_loca_id", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "pipe_reference": { + "name": "pipe_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "installation_date": { + "name": "installation_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "instrument_type": { + "name": "instrument_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "details_of_instrument": { + "name": "details_of_instrument", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "distance_to_start_of_response_zone_from_loca_id_datum": { + "name": "distance_to_start_of_response_zone_from_loca_id_datum", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "distance_to_end_of_response_zone_from_loca_id_datum": { + "name": "distance_to_end_of_response_zone_from_loca_id_datum", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "bearing_of_monitoring_axis_a_compass_bearing": { + "name": "bearing_of_monitoring_axis_a_compass_bearing", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "bearing_of_monitoring_axis_b_compass_bearing": { + "name": "bearing_of_monitoring_axis_b_compass_bearing", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "bearing_of_monitoring_axis_c_compass_bearing": { + "name": "bearing_of_monitoring_axis_c_compass_bearing", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "inclination_of_instrument_axis_a_measured_positively_down_from_horizontal": { + "name": "inclination_of_instrument_axis_a_measured_positively_down_from_horizontal", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "inclination_of_instrument_axis_b_measured_positively_down_from_horizontal": { + "name": "inclination_of_instrument_axis_b_measured_positively_down_from_horizontal", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "inclination_of_instrument_axis_c_measured_positively_down_from_horizontal": { + "name": "inclination_of_instrument_axis_c_measured_positively_down_from_horizontal", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "reading_sign_convention_in_direction_a": { + "name": "reading_sign_convention_in_direction_a", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reading_sign_convention_in_direction_b": { + "name": "reading_sign_convention_in_direction_b", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reading_sign_convention_in_direction_c": { + "name": "reading_sign_convention_in_direction_c", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "contractor_who_installed_monitoring_instrument": { + "name": "contractor_who_installed_monitoring_instrument", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_monitoring_installations_and_instruments_abbr": { + "name": "idx_monitoring_installations_and_instruments_abbr", + "columns": [ + { + "expression": "instrument_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "monitoring_installations_and_instruments_instrument_type_abbreviation_id_fk": { + "name": "monitoring_installations_and_instruments_instrument_type_abbreviation_id_fk", + "tableFrom": "monitoring_installations_and_instruments", + "tableTo": "abbreviation", + "columnsFrom": [ + "instrument_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "monitoring_installations_and_instruments_location_details_id_location_details_id_fk": { + "name": "monitoring_installations_and_instruments_location_details_id_location_details_id_fk", + "tableFrom": "monitoring_installations_and_instruments", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_monitoring_installations_and_instruments": { + "name": "unique_monitoring_installations_and_instruments", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "monitoring_point_reference", + "initial_distance_of_monitoring_point_from_loca_id" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.monitoring_readings": { + "name": "monitoring_readings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "date_and_time_of_reading": { + "name": "date_and_time_of_reading", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "reading_type": { + "name": "reading_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "reading_reference": { + "name": "reading_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "instrument_reference_serial_number": { + "name": "instrument_reference_serial_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reading": { + "name": "reading", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "units_of_reading": { + "name": "units_of_reading", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "measurement_method": { + "name": "measurement_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "instrument_method_reading_detection_limit": { + "name": "instrument_method_reading_detection_limit", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "instrument_method_upper_reading_detection_when_appropriate": { + "name": "instrument_method_upper_reading_detection_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "client_preferred_name_of_measurement": { + "name": "client_preferred_name_of_measurement", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "organization_taking_reading": { + "name": "organization_taking_reading", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "comments_on_reading": { + "name": "comments_on_reading", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_monitoring_field_sheets": { + "name": "associated_file_reference_e_g_monitoring_field_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "monitoring_installations_and_instruments_id": { + "name": "monitoring_installations_and_instruments_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_monitoring_readings_abbr": { + "name": "idx_monitoring_readings_abbr", + "columns": [ + { + "expression": "reading_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "monitoring_readings_reading_type_abbreviation_id_fk": { + "name": "monitoring_readings_reading_type_abbreviation_id_fk", + "tableFrom": "monitoring_readings", + "tableTo": "abbreviation", + "columnsFrom": [ + "reading_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "monitoring_readings_monitoring_installations_and_instruments_id_monitoring_installations_and_instruments_id_fk": { + "name": "monitoring_readings_monitoring_installations_and_instruments_id_monitoring_installations_and_instruments_id_fk", + "tableFrom": "monitoring_readings", + "tableTo": "monitoring_installations_and_instruments", + "columnsFrom": [ + "monitoring_installations_and_instruments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_monitoring_readings": { + "name": "unique_monitoring_readings", + "nullsNotDistinct": false, + "columns": [ + "monitoring_installations_and_instruments_id", + "date_and_time_of_reading", + "reading_type", + "reading_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.on_site_volatile_headspace_testing_by_photo_ionisation_detector": { + "name": "on_site_volatile_headspace_testing_by_photo_ionisation_detector", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_of_headspace_test_sample": { + "name": "depth_of_headspace_test_sample", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "ambient_temperature_at_time_of_test": { + "name": "ambient_temperature_at_time_of_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "result_of_pid_analysis": { + "name": "result_of_pid_analysis", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks_on_test": { + "name": "remarks_on_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_pid_used_and_method_description": { + "name": "details_of_pid_used_and_method_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stratum_reference_shown_on_trial_pit_or_traverse_sketch": { + "name": "stratum_reference_shown_on_trial_pit_or_traverse_sketch", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "on_site_volatile_headspace_testing_by_photo_ionisation_detector_location_details_id_location_details_id_fk": { + "name": "on_site_volatile_headspace_testing_by_photo_ionisation_detector_location_details_id_location_details_id_fk", + "tableFrom": "on_site_volatile_headspace_testing_by_photo_ionisation_detector", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_on_site_volatile_headspace_testing_by_photo_ionisation_detector": { + "name": "unique_on_site_volatile_headspace_testing_by_photo_ionisation_detector", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_of_headspace_test_sample", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.on_site_volatile_headspace_testing_using_flame_ionisation_detector": { + "name": "on_site_volatile_headspace_testing_using_flame_ionisation_detector", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_of_headspace_test_sample": { + "name": "depth_of_headspace_test_sample", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "result_of_fid_analysis": { + "name": "result_of_fid_analysis", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks_on_test": { + "name": "remarks_on_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_fid_used_and_method_description": { + "name": "details_of_fid_used_and_method_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stratum_reference_shown_on_trial_pit_or_traverse_sketch": { + "name": "stratum_reference_shown_on_trial_pit_or_traverse_sketch", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "on_site_volatile_headspace_testing_using_flame_ionisation_detector_location_details_id_location_details_id_fk": { + "name": "on_site_volatile_headspace_testing_using_flame_ionisation_detector_location_details_id_location_details_id_fk", + "tableFrom": "on_site_volatile_headspace_testing_using_flame_ionisation_detector", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_on_site_volatile_headspace_testing_using_flame_ionisation_detector": { + "name": "unique_on_site_volatile_headspace_testing_using_flame_ionisation_detector", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_of_headspace_test_sample", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.particle_density_tests": { + "name": "particle_density_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "particle_density_with_prefix_if_value_assumed": { + "name": "particle_density_with_prefix_if_value_assumed", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_test": { + "name": "type_of_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "any_deviation_from_the_specified_test_procedure": { + "name": "any_deviation_from_the_specified_test_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "pycnometer_volume_if_used_and_not_50ml": { + "name": "pycnometer_volume_if_used_and_not_50ml", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "identity_of_gas_if_gas_pycnometer_used": { + "name": "identity_of_gas_if_gas_pycnometer_used", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_particle_density_tests_abbr": { + "name": "idx_particle_density_tests_abbr", + "columns": [ + { + "expression": "type_of_test", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "identity_of_gas_if_gas_pycnometer_used", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "particle_density_tests_type_of_test_abbreviation_id_fk": { + "name": "particle_density_tests_type_of_test_abbreviation_id_fk", + "tableFrom": "particle_density_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_test" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "particle_density_tests_identity_of_gas_if_gas_pycnometer_used_abbreviation_id_fk": { + "name": "particle_density_tests_identity_of_gas_if_gas_pycnometer_used_abbreviation_id_fk", + "tableFrom": "particle_density_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "identity_of_gas_if_gas_pycnometer_used" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "particle_density_tests_sample_information_id_sample_information_id_fk": { + "name": "particle_density_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "particle_density_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_particle_density_tests": { + "name": "unique_particle_density_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.particle_size_distribution_analysis_data": { + "name": "particle_size_distribution_analysis_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "sieve_or_particle_size": { + "name": "sieve_or_particle_size", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "percentage_passing_finer_than_grat_size": { + "name": "percentage_passing_finer_than_grat_size", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "test_type": { + "name": "test_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "particle_size_distribution_analysis_general_id": { + "name": "particle_size_distribution_analysis_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_particle_size_distribution_analysis_data_abbr": { + "name": "idx_particle_size_distribution_analysis_data_abbr", + "columns": [ + { + "expression": "test_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "particle_size_distribution_analysis_data_test_type_abbreviation_id_fk": { + "name": "particle_size_distribution_analysis_data_test_type_abbreviation_id_fk", + "tableFrom": "particle_size_distribution_analysis_data", + "tableTo": "abbreviation", + "columnsFrom": [ + "test_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "particle_size_distribution_analysis_data_particle_size_distribution_analysis_general_id_particle_size_distribution_analysis_general_id_fk": { + "name": "particle_size_distribution_analysis_data_particle_size_distribution_analysis_general_id_particle_size_distribution_analysis_general_id_fk", + "tableFrom": "particle_size_distribution_analysis_data", + "tableTo": "particle_size_distribution_analysis_general", + "columnsFrom": [ + "particle_size_distribution_analysis_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_particle_size_distribution_analysis_data": { + "name": "unique_particle_size_distribution_analysis_data", + "nullsNotDistinct": false, + "columns": [ + "particle_size_distribution_analysis_general_id", + "sieve_or_particle_size" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.particle_size_distribution_analysis_general": { + "name": "particle_size_distribution_analysis_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "uniformity_coefficient_d60_d10": { + "name": "uniformity_coefficient_d60_d10", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "percentage_of_material_tested_greater_than_63mm_cobbles": { + "name": "percentage_of_material_tested_greater_than_63mm_cobbles", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "percentage_of_material_tested_in_range_63mm_to_2mm_gravel": { + "name": "percentage_of_material_tested_in_range_63mm_to_2mm_gravel", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "percentage_of_material_tested_in_range_2mm_to_63um_sand": { + "name": "percentage_of_material_tested_in_range_2mm_to_63um_sand", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "percentage_of_material_tested_in_range_63um_to_2um_silt": { + "name": "percentage_of_material_tested_in_range_63um_to_2um_silt", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "percentage_of_material_tested_less_than_2um_clay": { + "name": "percentage_of_material_tested_less_than_2um_clay", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "percentage_less_than_63um": { + "name": "percentage_less_than_63um", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result": { + "name": "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "any_deviation_from_the_specified_test_procedure": { + "name": "any_deviation_from_the_specified_test_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "particle_density_used_in_calculations_with_prefix_if_value_assumed": { + "name": "particle_density_used_in_calculations_with_prefix_if_value_assumed", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "method_of_pre_treatment": { + "name": "method_of_pre_treatment", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "amount_of_soil_tested_was_sufficient_to_comply_with_recommended_minimum_mass": { + "name": "amount_of_soil_tested_was_sufficient_to_comply_with_recommended_minimum_mass", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remark_if_the_size_of_the_fractions_is_not_expressed_as_percentage_of_total_dry_mass": { + "name": "remark_if_the_size_of_the_fractions_is_not_expressed_as_percentage_of_total_dry_mass", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "coefficient_of_curvature": { + "name": "coefficient_of_curvature", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "particle_size_distribution_analysis_general_sample_information_id_sample_information_id_fk": { + "name": "particle_size_distribution_analysis_general_sample_information_id_sample_information_id_fk", + "tableFrom": "particle_size_distribution_analysis_general", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_particle_size_distribution_analysis_general": { + "name": "unique_particle_size_distribution_analysis_general", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.plate_loading_tests_data": { + "name": "plate_loading_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "load_stage": { + "name": "load_stage", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stage_elapsed_time": { + "name": "stage_elapsed_time", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "applied_load": { + "name": "applied_load", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "settlement_gauge_1": { + "name": "settlement_gauge_1", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "settlement_gauge_2": { + "name": "settlement_gauge_2", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "settlement_gauge_3": { + "name": "settlement_gauge_3", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "settlement_gauge_4": { + "name": "settlement_gauge_4", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "comments_on_reading": { + "name": "comments_on_reading", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "plate_loading_tests_general_id": { + "name": "plate_loading_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "plate_loading_tests_data_plate_loading_tests_general_id_plate_loading_tests_general_id_fk": { + "name": "plate_loading_tests_data_plate_loading_tests_general_id_plate_loading_tests_general_id_fk", + "tableFrom": "plate_loading_tests_data", + "tableTo": "plate_loading_tests_general", + "columnsFrom": [ + "plate_loading_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_plate_loading_tests_data": { + "name": "unique_plate_loading_tests_data", + "nullsNotDistinct": false, + "columns": [ + "plate_loading_tests_general_id", + "load_stage", + "stage_elapsed_time" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.plate_loading_tests_general": { + "name": "plate_loading_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_depth": { + "name": "test_depth", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "load_cycle": { + "name": "load_cycle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "plate_diameter": { + "name": "plate_diameter", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "seating_load_including_apparatus_mass": { + "name": "seating_load_including_apparatus_mass", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "factor_a0": { + "name": "factor_a0", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "factor_a1": { + "name": "factor_a1", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "factor_a2": { + "name": "factor_a2", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "strain_modulus": { + "name": "strain_modulus", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "elastic_modulus_for_second_loading_cycle": { + "name": "elastic_modulus_for_second_loading_cycle", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "modulus_of_subgrade_reaction": { + "name": "modulus_of_subgrade_reaction", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "elastic_modulus": { + "name": "elastic_modulus", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "amount_of_stabiliser_added": { + "name": "amount_of_stabiliser_added", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_stabiliser_added": { + "name": "type_of_stabiliser_added", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stratum_reference_shown_on_trial_pit_or_traverse_sketch": { + "name": "stratum_reference_shown_on_trial_pit_or_traverse_sketch", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "plate_loading_tests_general_location_details_id_location_details_id_fk": { + "name": "plate_loading_tests_general_location_details_id_location_details_id_fk", + "tableFrom": "plate_loading_tests_general", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_plate_loading_tests_general": { + "name": "unique_plate_loading_tests_general", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "test_depth", + "test_reference", + "load_cycle" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.point_load_testing": { + "name": "point_load_testing", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "uncorrected_point_load_is": { + "name": "uncorrected_point_load_is", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "size_corrected_point_load_index_is_50": { + "name": "size_corrected_point_load_index_is_50", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "point_load_test_type": { + "name": "point_load_test_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "water_content_of_point_load_test_specimen": { + "name": "water_content_of_point_load_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_point_load_testing_abbr": { + "name": "idx_point_load_testing_abbr", + "columns": [ + { + "expression": "point_load_test_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "point_load_testing_point_load_test_type_abbreviation_id_fk": { + "name": "point_load_testing_point_load_test_type_abbreviation_id_fk", + "tableFrom": "point_load_testing", + "tableTo": "abbreviation", + "columnsFrom": [ + "point_load_test_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "point_load_testing_sample_information_id_sample_information_id_fk": { + "name": "point_load_testing_sample_information_id_sample_information_id_fk", + "tableFrom": "point_load_testing", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_point_load_testing": { + "name": "unique_point_load_testing", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pressuremeter_test_data": { + "name": "pressuremeter_test_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "sequence_number": { + "name": "sequence_number", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "axis_1_displacement": { + "name": "axis_1_displacement", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "axis_2_displacement": { + "name": "axis_2_displacement", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "axis_3_displacement": { + "name": "axis_3_displacement", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "total_pressure": { + "name": "total_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "pore_pressure_cell_a": { + "name": "pore_pressure_cell_a", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "pore_pressure_cell_b": { + "name": "pore_pressure_cell_b", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "volume_change_in_test_cell": { + "name": "volume_change_in_test_cell", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "arm_1_displacement": { + "name": "arm_1_displacement", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "arm_2_displacement": { + "name": "arm_2_displacement", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "arm_3_displacement": { + "name": "arm_3_displacement", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "arm_4_displacement": { + "name": "arm_4_displacement", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "arm_5_displacement": { + "name": "arm_5_displacement", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "arm_6_displacement": { + "name": "arm_6_displacement", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mean_arm_displacement": { + "name": "mean_arm_displacement", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "pressuremeter_test_results_general_id": { + "name": "pressuremeter_test_results_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "pressuremeter_test_data_pressuremeter_test_results_general_id_pressuremeter_test_results_general_id_fk": { + "name": "pressuremeter_test_data_pressuremeter_test_results_general_id_pressuremeter_test_results_general_id_fk", + "tableFrom": "pressuremeter_test_data", + "tableTo": "pressuremeter_test_results_general", + "columnsFrom": [ + "pressuremeter_test_results_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_pressuremeter_test_data": { + "name": "unique_pressuremeter_test_data", + "nullsNotDistinct": false, + "columns": [ + "pressuremeter_test_results_general_id", + "sequence_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pressuremeter_test_results_general": { + "name": "pressuremeter_test_results_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_of_test": { + "name": "depth_of_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "date_of_test": { + "name": "date_of_test", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "measured_or_assumed_ground_water_level": { + "name": "measured_or_assumed_ground_water_level", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "subcontractors_name": { + "name": "subcontractors_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "operators_details": { + "name": "operators_details", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "instrument_reference_serial_number": { + "name": "instrument_reference_serial_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "pressuremeter_type": { + "name": "pressuremeter_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "uninflated_diameter_of_pressuremeter": { + "name": "uninflated_diameter_of_pressuremeter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "estimated_in_situ_horizontal_stress": { + "name": "estimated_in_situ_horizontal_stress", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "initial_shear_modulus": { + "name": "initial_shear_modulus", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "undrained_shear_strength": { + "name": "undrained_shear_strength", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "limit_pressure": { + "name": "limit_pressure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "angle_of_friction": { + "name": "angle_of_friction", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "angle_of_dilation": { + "name": "angle_of_dilation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "angle_of_friction_at_constant_volume_cv_used": { + "name": "angle_of_friction_at_constant_volume_cv_used", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "method_s_used_to_determine_derived_soil_parameters_including_those_in_pmtl": { + "name": "method_s_used_to_determine_derived_soil_parameters_including_those_in_pmtl", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "number_of_arms": { + "name": "number_of_arms", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "bearing_of_arm_1_clockwise_degrees_from_north": { + "name": "bearing_of_arm_1_clockwise_degrees_from_north", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "arm_combination_used_for_analysis": { + "name": "arm_combination_used_for_analysis", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_pressuremeter_test_results_general_abbr": { + "name": "idx_pressuremeter_test_results_general_abbr", + "columns": [ + { + "expression": "pressuremeter_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pressuremeter_test_results_general_pressuremeter_type_abbreviation_id_fk": { + "name": "pressuremeter_test_results_general_pressuremeter_type_abbreviation_id_fk", + "tableFrom": "pressuremeter_test_results_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "pressuremeter_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "pressuremeter_test_results_general_location_details_id_location_details_id_fk": { + "name": "pressuremeter_test_results_general_location_details_id_location_details_id_fk", + "tableFrom": "pressuremeter_test_results_general", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_pressuremeter_test_results_general": { + "name": "unique_pressuremeter_test_results_general", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_of_test", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pressuremeter_test_results_individual_loops": { + "name": "pressuremeter_test_results_individual_loops", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "unload_reload_loop_number": { + "name": "unload_reload_loop_number", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "unload_reload_shear_modulus": { + "name": "unload_reload_shear_modulus", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mean_strain": { + "name": "mean_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mean_pressure": { + "name": "mean_pressure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "strain_range_or_amplitude": { + "name": "strain_range_or_amplitude", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "pressure_range_or_amplitude": { + "name": "pressure_range_or_amplitude", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "shear_stress_coefficient_from_bolton_and_whittle": { + "name": "shear_stress_coefficient_from_bolton_and_whittle", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "linearity_exponent_from_bolton_and_whittle": { + "name": "linearity_exponent_from_bolton_and_whittle", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sequence_number": { + "name": "sequence_number", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "pressuremeter_test_results_general_id": { + "name": "pressuremeter_test_results_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "pressuremeter_test_results_individual_loops_pressuremeter_test_results_general_id_pressuremeter_test_results_general_id_fk": { + "name": "pressuremeter_test_results_individual_loops_pressuremeter_test_results_general_id_pressuremeter_test_results_general_id_fk", + "tableFrom": "pressuremeter_test_results_individual_loops", + "tableTo": "pressuremeter_test_results_general", + "columnsFrom": [ + "pressuremeter_test_results_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_pressuremeter_test_results_individual_loops": { + "name": "unique_pressuremeter_test_results_individual_loops", + "nullsNotDistinct": false, + "columns": [ + "pressuremeter_test_results_general_id", + "unload_reload_loop_number", + "sequence_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pumping_tests_data": { + "name": "pumping_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "date_and_time_of_reading": { + "name": "date_and_time_of_reading", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "depth_to_water_below_ground": { + "name": "depth_to_water_below_ground", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "pumping_rate_from_hole": { + "name": "pumping_rate_from_hole", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "pumping_tests_general_id": { + "name": "pumping_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "pumping_tests_data_pumping_tests_general_id_pumping_tests_general_id_fk": { + "name": "pumping_tests_data_pumping_tests_general_id_pumping_tests_general_id_fk", + "tableFrom": "pumping_tests_data", + "tableTo": "pumping_tests_general", + "columnsFrom": [ + "pumping_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_pumping_tests_data": { + "name": "unique_pumping_tests_data", + "nullsNotDistinct": false, + "columns": [ + "pumping_tests_general_id", + "date_and_time_of_reading" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pumping_tests_general": { + "name": "pumping_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "contractor": { + "name": "contractor", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "method_of_testing": { + "name": "method_of_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks_on_test": { + "name": "remarks_on_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "pumping_tests_general_location_details_id_location_details_id_fk": { + "name": "pumping_tests_general_location_details_id_location_details_id_fk", + "tableFrom": "pumping_tests_general", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_pumping_tests_general": { + "name": "unique_pumping_tests_general", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.relative_density_tests": { + "name": "relative_density_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "maximum_dry_density": { + "name": "maximum_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "weight_percent_of_sample_retained_on_37_5mm_sieve": { + "name": "weight_percent_of_sample_retained_on_37_5mm_sieve", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "weight_percent_of_sample_retained_on_6_3mm_sieve": { + "name": "weight_percent_of_sample_retained_on_6_3mm_sieve", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "weight_percent_of_sample_retained_on_2mm_sieve": { + "name": "weight_percent_of_sample_retained_on_2mm_sieve", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "minimum_dry_density": { + "name": "minimum_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks_on_test": { + "name": "remarks_on_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "relative_density_tests_sample_information_id_sample_information_id_fk": { + "name": "relative_density_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "relative_density_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_relative_density_tests": { + "name": "unique_relative_density_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resonant_column_test_consolidation": { + "name": "resonant_column_test_consolidation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_stage_number": { + "name": "test_stage_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_height": { + "name": "specimen_height", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_consolidation": { + "name": "type_of_consolidation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "duration_of_stage": { + "name": "duration_of_stage", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_height_at_end_of_test_stage": { + "name": "specimen_height_at_end_of_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter_at_end_of_test_stage": { + "name": "specimen_diameter_at_end_of_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "water_content_at_end_of_test_stage": { + "name": "water_content_at_end_of_test_stage", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "dry_density_at_end_of_test_stage": { + "name": "dry_density_at_end_of_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "relative_density_at_end_of_test_stage": { + "name": "relative_density_at_end_of_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "voids_ratio_at_end_of_test_stage": { + "name": "voids_ratio_at_end_of_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "effective_axial_stress_during_consolidation_at_end_of_test_stage": { + "name": "effective_axial_stress_during_consolidation_at_end_of_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "effective_radial_stress_during_consolidation_at_end_of_test_stage": { + "name": "effective_radial_stress_during_consolidation_at_end_of_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviatoric_stress_at_end_of_test_stage": { + "name": "deviatoric_stress_at_end_of_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "shear_stress_at_end_of_test_stage": { + "name": "shear_stress_at_end_of_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mean_effective_stress_at_end_of_test_stage": { + "name": "mean_effective_stress_at_end_of_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "axial_strain_at_end_of_test_stage": { + "name": "axial_strain_at_end_of_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "volumetric_strain_from_measured_volume_change_at_end_of_test_stage": { + "name": "volumetric_strain_from_measured_volume_change_at_end_of_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "radial_strain_from_measured_volume_change": { + "name": "radial_strain_from_measured_volume_change", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "bender_element_test_sequence": { + "name": "bender_element_test_sequence", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "bender_element_axis_of_measurement": { + "name": "bender_element_axis_of_measurement", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "distance_between_bender_elements": { + "name": "distance_between_bender_elements", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "measured_arrival_time_of_propagated_wave": { + "name": "measured_arrival_time_of_propagated_wave", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "method_of_measuring_arrival_time_of_propagated_wave": { + "name": "method_of_measuring_arrival_time_of_propagated_wave", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "calculated_shear_wave_velocity": { + "name": "calculated_shear_wave_velocity", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "shear_modulus_gmax_from_bender_elements": { + "name": "shear_modulus_gmax_from_bender_elements", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "resonant_column_test_general_id": { + "name": "resonant_column_test_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_resonant_column_test_consolidation_abbr": { + "name": "idx_resonant_column_test_consolidation_abbr", + "columns": [ + { + "expression": "type_of_consolidation", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resonant_column_test_consolidation_type_of_consolidation_abbreviation_id_fk": { + "name": "resonant_column_test_consolidation_type_of_consolidation_abbreviation_id_fk", + "tableFrom": "resonant_column_test_consolidation", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_consolidation" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "resonant_column_test_consolidation_resonant_column_test_general_id_resonant_column_test_general_id_fk": { + "name": "resonant_column_test_consolidation_resonant_column_test_general_id_resonant_column_test_general_id_fk", + "tableFrom": "resonant_column_test_consolidation", + "tableTo": "resonant_column_test_general", + "columnsFrom": [ + "resonant_column_test_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_resonant_column_test_consolidation": { + "name": "unique_resonant_column_test_consolidation", + "nullsNotDistinct": false, + "columns": [ + "resonant_column_test_general_id", + "test_stage_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resonant_column_test_data": { + "name": "resonant_column_test_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_stage_number": { + "name": "test_stage_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "measurement_number": { + "name": "measurement_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_conditions": { + "name": "test_conditions", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_height": { + "name": "specimen_height", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "cell_pressure": { + "name": "cell_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "back_pressure": { + "name": "back_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "axial_stress": { + "name": "axial_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "base_pore_water_pressure": { + "name": "base_pore_water_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mid_height_pore_water_pressure": { + "name": "mid_height_pore_water_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "pore_pressure_ratio": { + "name": "pore_pressure_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "maximum_excess_pore_water_pressure": { + "name": "maximum_excess_pore_water_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "external_axial_strain": { + "name": "external_axial_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "volumetric_strain": { + "name": "volumetric_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "principal_stress_difference": { + "name": "principal_stress_difference", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mean_effective_stress": { + "name": "mean_effective_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "minor_principal_stress_sigma_3": { + "name": "minor_principal_stress_sigma_3", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "major_principal_stress_sigma_1": { + "name": "major_principal_stress_sigma_1", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "average_shear_strain": { + "name": "average_shear_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "shear_modulus": { + "name": "shear_modulus", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "damping": { + "name": "damping", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "resonant_column_test_general_id": { + "name": "resonant_column_test_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_resonant_column_test_data_abbr": { + "name": "idx_resonant_column_test_data_abbr", + "columns": [ + { + "expression": "test_conditions", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resonant_column_test_data_test_conditions_abbreviation_id_fk": { + "name": "resonant_column_test_data_test_conditions_abbreviation_id_fk", + "tableFrom": "resonant_column_test_data", + "tableTo": "abbreviation", + "columnsFrom": [ + "test_conditions" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "resonant_column_test_data_resonant_column_test_general_id_resonant_column_test_general_id_fk": { + "name": "resonant_column_test_data_resonant_column_test_general_id_resonant_column_test_general_id_fk", + "tableFrom": "resonant_column_test_data", + "tableTo": "resonant_column_test_general", + "columnsFrom": [ + "resonant_column_test_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_resonant_column_test_data": { + "name": "unique_resonant_column_test_data", + "nullsNotDistinct": false, + "columns": [ + "resonant_column_test_general_id", + "test_stage_number", + "measurement_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resonant_column_test_derived_parameters": { + "name": "resonant_column_test_derived_parameters", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "type_of_consolidation": { + "name": "type_of_consolidation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "consolidation_stage": { + "name": "consolidation_stage", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "isotropic_anisotropic_consolidation_cell_pressure": { + "name": "isotropic_anisotropic_consolidation_cell_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "isotropic_anisotropic_consolidation_back_pressure": { + "name": "isotropic_anisotropic_consolidation_back_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "effective_radial_stress_during_consolidation": { + "name": "effective_radial_stress_during_consolidation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "effective_axial_stress_during_consolidation": { + "name": "effective_axial_stress_during_consolidation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviator_stress_at_end_of_isotropic_anisotropic_consolidation": { + "name": "deviator_stress_at_end_of_isotropic_anisotropic_consolidation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "change_to_volumetric_strain_during_isotropic_anisotropic_consolidation": { + "name": "change_to_volumetric_strain_during_isotropic_anisotropic_consolidation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "axial_strain_after_isotropic_anisotropic_consolidation": { + "name": "axial_strain_after_isotropic_anisotropic_consolidation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "shear_modulus_g0": { + "name": "shear_modulus_g0", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "damping_ratio": { + "name": "damping_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "normalised_shear_modulus_by_maximum_shear_modulus": { + "name": "normalised_shear_modulus_by_maximum_shear_modulus", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "slippage_ratio": { + "name": "slippage_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "resonant_column_test_data_id": { + "name": "resonant_column_test_data_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "resonant_column_test_derived_parameters_resonant_column_test_data_id_resonant_column_test_data_id_fk": { + "name": "resonant_column_test_derived_parameters_resonant_column_test_data_id_resonant_column_test_data_id_fk", + "tableFrom": "resonant_column_test_derived_parameters", + "tableTo": "resonant_column_test_data", + "columnsFrom": [ + "resonant_column_test_data_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_resonant_column_test_derived_parameters": { + "name": "unique_resonant_column_test_derived_parameters", + "nullsNotDistinct": false, + "columns": [ + "resonant_column_test_data_id" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resonant_column_test_general": { + "name": "resonant_column_test_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "specific_condition_statements": { + "name": "specific_condition_statements", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_drainage": { + "name": "type_of_drainage", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "orientation_of_specimen": { + "name": "orientation_of_specimen", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "initial_specimen_diameter": { + "name": "initial_specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_specimen_height": { + "name": "initial_specimen_height", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_water_moisture_content": { + "name": "initial_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "final_water_moisture_content": { + "name": "final_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_bulk_density": { + "name": "initial_bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "minimum_dry_density_for_sand": { + "name": "minimum_dry_density_for_sand", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "maximum_dry_density_for_sand": { + "name": "maximum_dry_density_for_sand", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_relative_density_index": { + "name": "initial_relative_density_index", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_void_ratio": { + "name": "initial_void_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_degree_of_saturation": { + "name": "initial_degree_of_saturation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "particle_density_with_prefix_if_value_assumed": { + "name": "particle_density_with_prefix_if_value_assumed", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "damping_measurement_method": { + "name": "damping_measurement_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference": { + "name": "associated_file_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_resonant_column_test_general_abbr": { + "name": "idx_resonant_column_test_general_abbr", + "columns": [ + { + "expression": "sample_condition", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "orientation_of_specimen", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resonant_column_test_general_sample_condition_abbreviation_id_fk": { + "name": "resonant_column_test_general_sample_condition_abbreviation_id_fk", + "tableFrom": "resonant_column_test_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "sample_condition" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "resonant_column_test_general_orientation_of_specimen_abbreviation_id_fk": { + "name": "resonant_column_test_general_orientation_of_specimen_abbreviation_id_fk", + "tableFrom": "resonant_column_test_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "orientation_of_specimen" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "resonant_column_test_general_sample_information_id_sample_information_id_fk": { + "name": "resonant_column_test_general_sample_information_id_sample_information_id_fk", + "tableFrom": "resonant_column_test_general", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_resonant_column_test_general": { + "name": "unique_resonant_column_test_general", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resonant_column_test_saturation": { + "name": "resonant_column_test_saturation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_stage_number": { + "name": "test_stage_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "pressure_increment": { + "name": "pressure_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "differential_pressure_used": { + "name": "differential_pressure_used", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "final_cell_pressure": { + "name": "final_cell_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "final_base_porewater_pressure": { + "name": "final_base_porewater_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "final_axial_strain": { + "name": "final_axial_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "final_water_content": { + "name": "final_water_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "final_bulk_density": { + "name": "final_bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "final_dry_density": { + "name": "final_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "final_voids_ratio": { + "name": "final_voids_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "final_degree_of_saturation": { + "name": "final_degree_of_saturation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "final_b_value": { + "name": "final_b_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "resonant_column_test_general_id": { + "name": "resonant_column_test_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "resonant_column_test_saturation_resonant_column_test_general_id_resonant_column_test_general_id_fk": { + "name": "resonant_column_test_saturation_resonant_column_test_general_id_resonant_column_test_general_id_fk", + "tableFrom": "resonant_column_test_saturation", + "tableTo": "resonant_column_test_general", + "columnsFrom": [ + "resonant_column_test_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_resonant_column_test_saturation": { + "name": "unique_resonant_column_test_saturation", + "nullsNotDistinct": false, + "columns": [ + "resonant_column_test_general_id", + "test_stage_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.rock_abrasiveness_tests_data": { + "name": "rock_abrasiveness_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "measurement_number": { + "name": "measurement_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "surface_condition_rough": { + "name": "surface_condition_rough", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "direction_of_scratching_with_respect_to_planes_of_weakness_or_anisotropy": { + "name": "direction_of_scratching_with_respect_to_planes_of_weakness_or_anisotropy", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "rockwell_hardness_hrc_of_stylus": { + "name": "rockwell_hardness_hrc_of_stylus", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "stylus_condition_new_or_re_sharpened": { + "name": "stylus_condition_new_or_re_sharpened", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "as_measured_cai_value": { + "name": "as_measured_cai_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "equivalent_cai_value_at_standard_stylus_hardness_hrc_55": { + "name": "equivalent_cai_value_at_standard_stylus_hardness_hrc_55", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "rock_abrasiveness_tests_general_id": { + "name": "rock_abrasiveness_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "rock_abrasiveness_tests_data_rock_abrasiveness_tests_general_id_rock_abrasiveness_tests_general_id_fk": { + "name": "rock_abrasiveness_tests_data_rock_abrasiveness_tests_general_id_rock_abrasiveness_tests_general_id_fk", + "tableFrom": "rock_abrasiveness_tests_data", + "tableTo": "rock_abrasiveness_tests_general", + "columnsFrom": [ + "rock_abrasiveness_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_rock_abrasiveness_tests_data": { + "name": "unique_rock_abrasiveness_tests_data", + "nullsNotDistinct": false, + "columns": [ + "rock_abrasiveness_tests_general_id", + "measurement_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.rock_abrasiveness_tests_general": { + "name": "rock_abrasiveness_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "date_of_test": { + "name": "date_of_test", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "condition_of_specimen_as_tested_saturated": { + "name": "condition_of_specimen_as_tested_saturated", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "maximum_grain_size": { + "name": "maximum_grain_size", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "planes_of_weakness_or_anisotropy_present_bedding": { + "name": "planes_of_weakness_or_anisotropy_present_bedding", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_apparatus": { + "name": "type_of_apparatus", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "measurement_method_side_view": { + "name": "measurement_method_side_view", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cai_mean_value": { + "name": "cai_mean_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "cai_standard_deviation": { + "name": "cai_standard_deviation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "abrasiveness_classification": { + "name": "abrasiveness_classification", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "rock_abrasiveness_tests_general_sample_information_id_sample_information_id_fk": { + "name": "rock_abrasiveness_tests_general_sample_information_id_sample_information_id_fk", + "tableFrom": "rock_abrasiveness_tests_general", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_rock_abrasiveness_tests_general": { + "name": "unique_rock_abrasiveness_tests_general", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.rock_porosity_and_density_tests": { + "name": "rock_porosity_and_density_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "water_content_of_specimen": { + "name": "water_content_of_specimen", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "saturated_water_content": { + "name": "saturated_water_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "bulk_density": { + "name": "bulk_density", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "dry_density": { + "name": "dry_density", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "porosity": { + "name": "porosity", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "apparent_particle_density": { + "name": "apparent_particle_density", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "temperature_sample_dried_at": { + "name": "temperature_sample_dried_at", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "intact_dry_density": { + "name": "intact_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "rock_porosity_and_density_tests_sample_information_id_sample_information_id_fk": { + "name": "rock_porosity_and_density_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "rock_porosity_and_density_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_rock_porosity_and_density_tests": { + "name": "unique_rock_porosity_and_density_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.rock_uniaxial_compressive_strength_and_deformability_tests": { + "name": "rock_uniaxial_compressive_strength_and_deformability_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_length": { + "name": "specimen_length", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "water_content_of_specimen_tested": { + "name": "water_content_of_specimen_tested", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "condition_of_specimen_as_tested": { + "name": "condition_of_specimen_as_tested", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_duration": { + "name": "test_duration", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stress_rate": { + "name": "stress_rate", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "uniaxial_compressive_strength": { + "name": "uniaxial_compressive_strength", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mode_of_failure": { + "name": "mode_of_failure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "youngs_modulus": { + "name": "youngs_modulus", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "poisson_s_ratio": { + "name": "poisson_s_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "stress_level_at_which_modulus_has_been_measured": { + "name": "stress_level_at_which_modulus_has_been_measured", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "method_of_determination_of_young_s_modulus": { + "name": "method_of_determination_of_young_s_modulus", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type_of_testing_machine": { + "name": "type_of_testing_machine", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "youngs_modulus_tangent": { + "name": "youngs_modulus_tangent", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "youngs_modulus_average": { + "name": "youngs_modulus_average", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "stress_level_at_which_secant_young_s_modulus_has_been_measured": { + "name": "stress_level_at_which_secant_young_s_modulus_has_been_measured", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stress_level_at_which_tangent_young_s_modulus_has_been_measured": { + "name": "stress_level_at_which_tangent_young_s_modulus_has_been_measured", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stress_level_at_which_average_mean_young_s_modulus_has_been_measured": { + "name": "stress_level_at_which_average_mean_young_s_modulus_has_been_measured", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "poisson_s_ratio_secant": { + "name": "poisson_s_ratio_secant", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "poissons_ratio_tangent": { + "name": "poissons_ratio_tangent", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "poissons_ratio_average": { + "name": "poissons_ratio_average", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_rock_uniaxial_compressive_strength_and_deformability_tests_abbr": { + "name": "idx_rock_uniaxial_compressive_strength_and_deformability_tests_abbr", + "columns": [ + { + "expression": "mode_of_failure", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "method_of_determination_of_young_s_modulus", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "rock_uniaxial_compressive_strength_and_deformability_tests_mode_of_failure_abbreviation_id_fk": { + "name": "rock_uniaxial_compressive_strength_and_deformability_tests_mode_of_failure_abbreviation_id_fk", + "tableFrom": "rock_uniaxial_compressive_strength_and_deformability_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "mode_of_failure" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "rock_uniaxial_compressive_strength_and_deformability_tests_method_of_determination_of_young_s_modulus_abbreviation_id_fk": { + "name": "rock_uniaxial_compressive_strength_and_deformability_tests_method_of_determination_of_young_s_modulus_abbreviation_id_fk", + "tableFrom": "rock_uniaxial_compressive_strength_and_deformability_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "method_of_determination_of_young_s_modulus" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "rock_uniaxial_compressive_strength_and_deformability_tests_sample_information_id_sample_information_id_fk": { + "name": "rock_uniaxial_compressive_strength_and_deformability_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "rock_uniaxial_compressive_strength_and_deformability_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_rock_uniaxial_compressive_strength_and_deformability_tests": { + "name": "unique_rock_uniaxial_compressive_strength_and_deformability_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sample_container_details": { + "name": "sample_container_details", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "container_unique_identifier": { + "name": "container_unique_identifier", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "sample_container_type": { + "name": "sample_container_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_container_remarks": { + "name": "sample_container_remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "sample_container_details_sample_information_id_sample_information_id_fk": { + "name": "sample_container_details_sample_information_id_sample_information_id_fk", + "tableFrom": "sample_container_details", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_sample_container_details": { + "name": "unique_sample_container_details", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "container_unique_identifier" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sample_information": { + "name": "sample_information", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_sample": { + "name": "depth_to_top_of_sample", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "sample_reference": { + "name": "sample_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_type": { + "name": "sample_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sample_unique_identifier": { + "name": "sample_unique_identifier", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_sample": { + "name": "depth_to_base_of_sample", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "date_and_time_sample_taken": { + "name": "date_and_time_sample_taken", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "number_of_blows_required_to_drive_sampler": { + "name": "number_of_blows_required_to_drive_sampler", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sample_container": { + "name": "sample_container", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_sample_preparation_at_time_of_sampling": { + "name": "details_of_sample_preparation_at_time_of_sampling", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_diameter": { + "name": "sample_diameter", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "depth_to_water_below_ground_surface_at_time_of_sampling": { + "name": "depth_to_water_below_ground_surface_at_time_of_sampling", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "percentage_of_sample_recovered": { + "name": "percentage_of_sample_recovered", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sampling_technique_method": { + "name": "sampling_technique_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_matrix": { + "name": "sample_matrix", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_qa_type_normal": { + "name": "sample_qa_type_normal", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "samplers_initials_or_name": { + "name": "samplers_initials_or_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reason_for_sampling": { + "name": "reason_for_sampling", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_remarks": { + "name": "sample_remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_specimen_description": { + "name": "sample_specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "date_sample_described": { + "name": "date_sample_described", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "person_responsible_for_sample_specimen_description": { + "name": "person_responsible_for_sample_specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "condition_and_representativeness_of_sample": { + "name": "condition_and_representativeness_of_sample", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_classification_as_required_by_en_iso_14688_1": { + "name": "sample_classification_as_required_by_en_iso_14688_1", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "barometric_pressure_at_time_of_sampling": { + "name": "barometric_pressure_at_time_of_sampling", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "sample_temperature_at_time_of_sampling": { + "name": "sample_temperature_at_time_of_sampling", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "gas_pressure_above_barometric": { + "name": "gas_pressure_above_barometric", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "gas_flow_rate": { + "name": "gas_flow_rate", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "date_and_time_sampling_completed": { + "name": "date_and_time_sampling_completed", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "sampling_duration": { + "name": "sampling_duration", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "caption_used_to_describe_sample": { + "name": "caption_used_to_describe_sample", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_record_link": { + "name": "sample_record_link", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stratum_reference_shown_on_trial_pit_or_traverse_sketch": { + "name": "stratum_reference_shown_on_trial_pit_or_traverse_sketch", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_sampling_field_sheets": { + "name": "associated_file_reference_e_g_sampling_field_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "length_of_sample_recovered": { + "name": "length_of_sample_recovered", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_sample_information_abbr": { + "name": "idx_sample_information_abbr", + "columns": [ + { + "expression": "sample_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sample_information_sample_type_abbreviation_id_fk": { + "name": "sample_information_sample_type_abbreviation_id_fk", + "tableFrom": "sample_information", + "tableTo": "abbreviation", + "columnsFrom": [ + "sample_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "sample_information_location_details_id_location_details_id_fk": { + "name": "sample_information_location_details_id_location_details_id_fk", + "tableFrom": "sample_information", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_sample_information": { + "name": "unique_sample_information", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_sample", + "sample_reference", + "sample_type", + "sample_unique_identifier" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.schmidt_rebound_hardness_tests": { + "name": "schmidt_rebound_hardness_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "schmidt_hardness_value": { + "name": "schmidt_hardness_value", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "orientation_of_the_hammer_axis_in_the_test_from_horizontal_positive_numbers_downwards_and_negative_numbers_upward": { + "name": "orientation_of_the_hammer_axis_in_the_test_from_horizontal_positive_numbers_downwards_and_negative_numbers_upward", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "method_of_clamping_specimen": { + "name": "method_of_clamping_specimen", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_type": { + "name": "specimen_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "method_of_excavation_or_block_production": { + "name": "method_of_excavation_or_block_production", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_length": { + "name": "specimen_length", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "water_content_of_specimen": { + "name": "water_content_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "description_of_water_content_if_not_measured": { + "name": "description_of_water_content_if_not_measured", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hammer_type": { + "name": "hammer_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "orientation_of_hammer_axis_with_reference_to_intact_rock_anisotropy_features_e_g_lamination": { + "name": "orientation_of_hammer_axis_with_reference_to_intact_rock_anisotropy_features_e_g_lamination", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "schmidt_hardness_mean_normalized_to_horizontal_impact_direction": { + "name": "schmidt_hardness_mean_normalized_to_horizontal_impact_direction", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "schmidt_hardness_median_normalized_to_horizontal_impact_direction": { + "name": "schmidt_hardness_median_normalized_to_horizontal_impact_direction", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "schmidt_hardness_mode_normalized_to_horizontal_impact_direction": { + "name": "schmidt_hardness_mode_normalized_to_horizontal_impact_direction", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "schmidt_hardness_range_normalized_to_horizontal_impact_direction": { + "name": "schmidt_hardness_range_normalized_to_horizontal_impact_direction", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "number_of_determinations_if_less_than_20_and_reason": { + "name": "number_of_determinations_if_less_than_20_and_reason", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_schmidt_rebound_hardness_tests_abbr": { + "name": "idx_schmidt_rebound_hardness_tests_abbr", + "columns": [ + { + "expression": "specimen_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "method_of_excavation_or_block_production", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "hammer_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "schmidt_rebound_hardness_tests_specimen_type_abbreviation_id_fk": { + "name": "schmidt_rebound_hardness_tests_specimen_type_abbreviation_id_fk", + "tableFrom": "schmidt_rebound_hardness_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "specimen_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "schmidt_rebound_hardness_tests_method_of_excavation_or_block_production_abbreviation_id_fk": { + "name": "schmidt_rebound_hardness_tests_method_of_excavation_or_block_production_abbreviation_id_fk", + "tableFrom": "schmidt_rebound_hardness_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "method_of_excavation_or_block_production" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "schmidt_rebound_hardness_tests_hammer_type_abbreviation_id_fk": { + "name": "schmidt_rebound_hardness_tests_hammer_type_abbreviation_id_fk", + "tableFrom": "schmidt_rebound_hardness_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "hammer_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "schmidt_rebound_hardness_tests_sample_information_id_sample_information_id_fk": { + "name": "schmidt_rebound_hardness_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "schmidt_rebound_hardness_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_schmidt_rebound_hardness_tests": { + "name": "unique_schmidt_rebound_hardness_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shear_box_testing_data": { + "name": "shear_box_testing_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "shear_box_stage_specimen_reference": { + "name": "shear_box_stage_specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_bulk_density": { + "name": "initial_bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "normal_stress_applied": { + "name": "normal_stress_applied", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "displacement_rate_for_peak_stress_stage": { + "name": "displacement_rate_for_peak_stress_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "displacement_rate_for_residual_stress_stage": { + "name": "displacement_rate_for_residual_stress_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "number_of_traverses_if_residual_test": { + "name": "number_of_traverses_if_residual_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "peak_shear_stress": { + "name": "peak_shear_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "residual_shear_stress": { + "name": "residual_shear_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "horizontal_displacement_at_peak_shear_stress": { + "name": "horizontal_displacement_at_peak_shear_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "horizontal_displacement_at_residual_shear_stress": { + "name": "horizontal_displacement_at_residual_shear_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "vertical_displacement_at_peak_shear_stress": { + "name": "vertical_displacement_at_peak_shear_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "vertical_displacement_at_residual_shear_stress": { + "name": "vertical_displacement_at_residual_shear_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "particle_density_with_prefix_if_value_assumed": { + "name": "particle_density_with_prefix_if_value_assumed", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_voids_ratio": { + "name": "initial_voids_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_water_moisture_content": { + "name": "initial_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "final_water_moisture_content": { + "name": "final_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter_in_direction_of_shear_rock_joints": { + "name": "specimen_diameter_in_direction_of_shear_rock_joints", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter_perpendicular_to_shear_rock_joints": { + "name": "specimen_diameter_perpendicular_to_shear_rock_joints", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_height": { + "name": "specimen_height", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "failure_residual_strength_criterion_used": { + "name": "failure_residual_strength_criterion_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "normal_vertical_stress_at_peak_shear_stress": { + "name": "normal_vertical_stress_at_peak_shear_stress", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "normal_vertical_stress_at_residual_shear_stress": { + "name": "normal_vertical_stress_at_residual_shear_stress", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "shear_box_testing_general_id": { + "name": "shear_box_testing_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "shear_box_testing_data_shear_box_testing_general_id_shear_box_testing_general_id_fk": { + "name": "shear_box_testing_data_shear_box_testing_general_id_shear_box_testing_general_id_fk", + "tableFrom": "shear_box_testing_data", + "tableTo": "shear_box_testing_general", + "columnsFrom": [ + "shear_box_testing_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_shear_box_testing_data": { + "name": "unique_shear_box_testing_data", + "nullsNotDistinct": false, + "columns": [ + "shear_box_testing_general_id", + "shear_box_stage_specimen_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shear_box_testing_general": { + "name": "shear_box_testing_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_type": { + "name": "test_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "specific_condition_statements": { + "name": "specific_condition_statements", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "peak_cohesion_intercept": { + "name": "peak_cohesion_intercept", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "peak_angle_of_friction": { + "name": "peak_angle_of_friction", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "residual_cohesion_intercept": { + "name": "residual_cohesion_intercept", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "residual_angle_of_friction": { + "name": "residual_angle_of_friction", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "method_of_encapsulation_of_specimens_tested": { + "name": "method_of_encapsulation_of_specimens_tested", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result": { + "name": "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_shear_box_testing_general_abbr": { + "name": "idx_shear_box_testing_general_abbr", + "columns": [ + { + "expression": "test_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sample_condition", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shear_box_testing_general_test_type_abbreviation_id_fk": { + "name": "shear_box_testing_general_test_type_abbreviation_id_fk", + "tableFrom": "shear_box_testing_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "test_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "shear_box_testing_general_sample_condition_abbreviation_id_fk": { + "name": "shear_box_testing_general_sample_condition_abbreviation_id_fk", + "tableFrom": "shear_box_testing_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "sample_condition" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "shear_box_testing_general_sample_information_id_sample_information_id_fk": { + "name": "shear_box_testing_general_sample_information_id_sample_information_id_fk", + "tableFrom": "shear_box_testing_general", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_shear_box_testing_general": { + "name": "unique_shear_box_testing_general", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shore_scleroscope_hardness_tests": { + "name": "shore_scleroscope_hardness_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "average_shore_hardness_value": { + "name": "average_shore_hardness_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "orientation_of_the_test_surface_relative_to_bedding": { + "name": "orientation_of_the_test_surface_relative_to_bedding", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "number_of_tests_conducted": { + "name": "number_of_tests_conducted", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "shore_scleroscope_hardness_tests_sample_information_id_sample_information_id_fk": { + "name": "shore_scleroscope_hardness_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "shore_scleroscope_hardness_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_shore_scleroscope_hardness_tests": { + "name": "unique_shore_scleroscope_hardness_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shrinkage_limit_tests": { + "name": "shrinkage_limit_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "shrinkage_limit": { + "name": "shrinkage_limit", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "shrinkage_ratio": { + "name": "shrinkage_ratio", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "initial_density": { + "name": "initial_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_water_moisture_content_of_test_specimen": { + "name": "initial_water_moisture_content_of_test_specimen", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "percentage_passing_0_425mm_sieve": { + "name": "percentage_passing_0_425mm_sieve", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "shrinkage_limit_tests_sample_information_id_sample_information_id_fk": { + "name": "shrinkage_limit_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "shrinkage_limit_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_shrinkage_limit_tests": { + "name": "unique_shrinkage_limit_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.slake_durability_index_tests": { + "name": "slake_durability_index_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "first_cycle_slake_durability_index_if_asdi_sdi1_or_asdi_sdi2_is_between_0_and_10": { + "name": "first_cycle_slake_durability_index_if_asdi_sdi1_or_asdi_sdi2_is_between_0_and_10", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "second_cycle_slake_durability_index": { + "name": "second_cycle_slake_durability_index", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "nature_and_temperature_of_slaking_fluid": { + "name": "nature_and_temperature_of_slaking_fluid", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "appearance_of_fragments_retained_in_the_drum": { + "name": "appearance_of_fragments_retained_in_the_drum", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "appearance_of_fragments_passing_through_the_drum": { + "name": "appearance_of_fragments_passing_through_the_drum", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "slake_durability_index_tests_sample_information_id_sample_information_id_fk": { + "name": "slake_durability_index_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "slake_durability_index_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_slake_durability_index_tests": { + "name": "unique_slake_durability_index_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.soakaway_tests_data": { + "name": "soakaway_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "elapsed_time": { + "name": "elapsed_time", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_water": { + "name": "depth_to_water", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remark_relating_to_test_reading": { + "name": "remark_relating_to_test_reading", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "soakaway_tests_general_id": { + "name": "soakaway_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "soakaway_tests_data_soakaway_tests_general_id_soakaway_tests_general_id_fk": { + "name": "soakaway_tests_data_soakaway_tests_general_id_soakaway_tests_general_id_fk", + "tableFrom": "soakaway_tests_data", + "tableTo": "soakaway_tests_general", + "columnsFrom": [ + "soakaway_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_soakaway_tests_data": { + "name": "unique_soakaway_tests_data", + "nullsNotDistinct": false, + "columns": [ + "soakaway_tests_general_id", + "elapsed_time" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.soakaway_tests_general": { + "name": "soakaway_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "test_duration": { + "name": "test_duration", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "soakaway_pit_width": { + "name": "soakaway_pit_width", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "soakaway_pit_length": { + "name": "soakaway_pit_length", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "soakaway_pit_diameter": { + "name": "soakaway_pit_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "soakaway_pit_depth_at_start_of_test": { + "name": "soakaway_pit_depth_at_start_of_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "soakaway_pit_depth_at_end_of_test": { + "name": "soakaway_pit_depth_at_end_of_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "description_of_soakaway_construction": { + "name": "description_of_soakaway_construction", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "soil_infiltration_rate": { + "name": "soil_infiltration_rate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "fill_porosity": { + "name": "fill_porosity", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_operator_carrying_out_test": { + "name": "name_of_operator_carrying_out_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "soakaway_tests_general_location_details_id_location_details_id_fk": { + "name": "soakaway_tests_general_location_details_id_location_details_id_fk", + "tableFrom": "soakaway_tests_general", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_soakaway_tests_general": { + "name": "unique_soakaway_tests_general", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.standard_penetration_test_results": { + "name": "standard_penetration_test_results", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_test": { + "name": "depth_to_top_of_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "number_of_blows_for_seating_drive": { + "name": "number_of_blows_for_seating_drive", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "number_of_blows_for_main_test_drive": { + "name": "number_of_blows_for_main_test_drive", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "total_penetration_for_seating_drive_and_test_drive": { + "name": "total_penetration_for_seating_drive_and_test_drive", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "spt_n_value": { + "name": "spt_n_value", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "spt_reported_result": { + "name": "spt_reported_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "casing_depth_at_time_of_test": { + "name": "casing_depth_at_time_of_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_water_at_time_of_test": { + "name": "depth_to_water_at_time_of_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_spt_test": { + "name": "type_of_spt_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "hammer_serial_number_from_manufacturer": { + "name": "hammer_serial_number_from_manufacturer", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "energy_ratio_of_the_hammer": { + "name": "energy_ratio_of_the_hammer", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "self_weight_penetration": { + "name": "self_weight_penetration", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "number_of_blows_for_1st_increment_seating": { + "name": "number_of_blows_for_1st_increment_seating", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "number_of_blows_for_2nd_increment_seating": { + "name": "number_of_blows_for_2nd_increment_seating", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "number_of_blows_for_1st_increment_test": { + "name": "number_of_blows_for_1st_increment_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "number_of_blows_for_2nd_increment_test": { + "name": "number_of_blows_for_2nd_increment_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "number_of_blows_for_3rd_increment_test": { + "name": "number_of_blows_for_3rd_increment_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "number_of_blows_for_4th_increment_test": { + "name": "number_of_blows_for_4th_increment_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "penetration_for_1st_increment_seating_drive": { + "name": "penetration_for_1st_increment_seating_drive", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "penetration_for_2nd_increment_seating_drive": { + "name": "penetration_for_2nd_increment_seating_drive", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "penetration_for_1st_increment_test": { + "name": "penetration_for_1st_increment_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "penetration_for_2nd_increment_test": { + "name": "penetration_for_2nd_increment_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "penetration_for_3rd_increment_test": { + "name": "penetration_for_3rd_increment_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "penetration_for_4th_increment_test": { + "name": "penetration_for_4th_increment_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "spt_carried_out_in_soft_rock": { + "name": "spt_carried_out_in_soft_rock", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "spt_n_value_corrected_by_energy_ratio_ispt_erat": { + "name": "spt_n_value_corrected_by_energy_ratio_ispt_erat", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_standard_penetration_test_results_abbr": { + "name": "idx_standard_penetration_test_results_abbr", + "columns": [ + { + "expression": "type_of_spt_test", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "standard_penetration_test_results_type_of_spt_test_abbreviation_id_fk": { + "name": "standard_penetration_test_results_type_of_spt_test_abbreviation_id_fk", + "tableFrom": "standard_penetration_test_results", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_spt_test" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "standard_penetration_test_results_location_details_id_location_details_id_fk": { + "name": "standard_penetration_test_results_location_details_id_location_details_id_fk", + "tableFrom": "standard_penetration_test_results", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_standard_penetration_test_results": { + "name": "unique_standard_penetration_test_results", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_test" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.static_cone_dissipation_tests_data": { + "name": "static_cone_dissipation_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "seconds_elapsed_since_start_of_test": { + "name": "seconds_elapsed_since_start_of_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "cone_resistance": { + "name": "cone_resistance", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "face_porewater_pressure_u1": { + "name": "face_porewater_pressure_u1", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "shoulder_porewater_pressure_u2": { + "name": "shoulder_porewater_pressure_u2", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "top_of_sleeve_porewater_pressure_u3": { + "name": "top_of_sleeve_porewater_pressure_u3", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "comments": { + "name": "comments", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "static_cone_dissipation_tests_general_id": { + "name": "static_cone_dissipation_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "static_cone_dissipation_tests_data_static_cone_dissipation_tests_general_id_static_cone_dissipation_tests_general_id_fk": { + "name": "static_cone_dissipation_tests_data_static_cone_dissipation_tests_general_id_static_cone_dissipation_tests_general_id_fk", + "tableFrom": "static_cone_dissipation_tests_data", + "tableTo": "static_cone_dissipation_tests_general", + "columnsFrom": [ + "static_cone_dissipation_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_static_cone_dissipation_tests_data": { + "name": "unique_static_cone_dissipation_tests_data", + "nullsNotDistinct": false, + "columns": [ + "static_cone_dissipation_tests_general_id", + "seconds_elapsed_since_start_of_test" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.static_cone_dissipation_tests_general": { + "name": "static_cone_dissipation_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_of_dissipation_test": { + "name": "depth_of_dissipation_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "measured_or_assumed_initial_pore_water_pressure": { + "name": "measured_or_assumed_initial_pore_water_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "measured_or_assumed_equilibrium_pore_water_pressure": { + "name": "measured_or_assumed_equilibrium_pore_water_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "degree_of_dissipation_for_analysis": { + "name": "degree_of_dissipation_for_analysis", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "time_to_achieve_degree_of_dissipation_stated_in_scdg_ddis": { + "name": "time_to_achieve_degree_of_dissipation_stated_in_scdg_ddis", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "coefficient_of_consolidation_vertical": { + "name": "coefficient_of_consolidation_vertical", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "method_s_used_to_determine_vertical_coefficient_of_consolidation": { + "name": "method_s_used_to_determine_vertical_coefficient_of_consolidation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "coefficient_of_consolidation_horizontal": { + "name": "coefficient_of_consolidation_horizontal", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "method_s_used_to_determine_horizontal_coefficient_of_consolidation": { + "name": "method_s_used_to_determine_horizontal_coefficient_of_consolidation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "static_cone_penetration_tests_general_id": { + "name": "static_cone_penetration_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "static_cone_dissipation_tests_general_static_cone_penetration_tests_general_id_static_cone_penetration_tests_general_id_fk": { + "name": "static_cone_dissipation_tests_general_static_cone_penetration_tests_general_id_static_cone_penetration_tests_general_id_fk", + "tableFrom": "static_cone_dissipation_tests_general", + "tableTo": "static_cone_penetration_tests_general", + "columnsFrom": [ + "static_cone_penetration_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_static_cone_dissipation_tests_general": { + "name": "unique_static_cone_dissipation_tests_general", + "nullsNotDistinct": false, + "columns": [ + "static_cone_penetration_tests_general_id", + "depth_of_dissipation_test" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.static_cone_penetration_tests_data": { + "name": "static_cone_penetration_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_of_result": { + "name": "depth_of_result", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "cone_resistance_qc": { + "name": "cone_resistance_qc", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "local_unit_side_friction_resistance_fs": { + "name": "local_unit_side_friction_resistance_fs", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "face_porewater_pressure_u1": { + "name": "face_porewater_pressure_u1", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "shoulder_porewater_pressure_u2": { + "name": "shoulder_porewater_pressure_u2", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "top_of_sleeve_porewater_pressure_u3": { + "name": "top_of_sleeve_porewater_pressure_u3", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "conductivity": { + "name": "conductivity", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "temperature": { + "name": "temperature", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "ph_reading": { + "name": "ph_reading", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "slope_indicator_no_1": { + "name": "slope_indicator_no_1", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "slope_indicator_no_2": { + "name": "slope_indicator_no_2", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "redox_potential_reading": { + "name": "redox_potential_reading", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "magnetic_flux_total_calculated": { + "name": "magnetic_flux_total_calculated", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "magnetic_flux_x": { + "name": "magnetic_flux_x", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "magnetic_flux_y": { + "name": "magnetic_flux_y", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "magnetic_flux_z": { + "name": "magnetic_flux_z", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "soil_moisture": { + "name": "soil_moisture", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "natural_gamma_radiation": { + "name": "natural_gamma_radiation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "friction_ratio_rf": { + "name": "friction_ratio_rf", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "corrected_cone_resistance_qt_piezocone_only": { + "name": "corrected_cone_resistance_qt_piezocone_only", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "corrected_sleeve_resistance_ft_piezocone_only": { + "name": "corrected_sleeve_resistance_ft_piezocone_only", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "effective_cone_resistance_qe_piezocone_only": { + "name": "effective_cone_resistance_qe_piezocone_only", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "bulk_density_of_material_measured_or_assumed": { + "name": "bulk_density_of_material_measured_or_assumed", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "total_vertical_stress_based_on_scpt_bden": { + "name": "total_vertical_stress_based_on_scpt_bden", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "effective_vertical_stress_calculated_from_scpt_cpo_and_scpt_ispp_or_scpg_wat": { + "name": "effective_vertical_stress_calculated_from_scpt_cpo_and_scpt_ispp_or_scpg_wat", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "net_cone_resistance_qn": { + "name": "net_cone_resistance_qn", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "corrected_friction_ratio_rf_piezocone_only": { + "name": "corrected_friction_ratio_rf_piezocone_only", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "excess_pore_pressure_u_uo_piezocone_only": { + "name": "excess_pore_pressure_u_uo_piezocone_only", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "pore_pressure_ratio_bq_piezocone_only": { + "name": "pore_pressure_ratio_bq_piezocone_only", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "in_situ_pore_pressure_uo_measured_or_assumed_where_not_simple_hydrostatic_based_on_scpg_wat": { + "name": "in_situ_pore_pressure_uo_measured_or_assumed_where_not_simple_hydrostatic_based_on_scpg_wat", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "normalised_cone_resistance_qt": { + "name": "normalised_cone_resistance_qt", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "normalised_friction_ratio_fr": { + "name": "normalised_friction_ratio_fr", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_raw_field_data": { + "name": "associated_file_reference_e_g_raw_field_data", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "static_cone_penetration_tests_general_id": { + "name": "static_cone_penetration_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "static_cone_penetration_tests_data_static_cone_penetration_tests_general_id_static_cone_penetration_tests_general_id_fk": { + "name": "static_cone_penetration_tests_data_static_cone_penetration_tests_general_id_static_cone_penetration_tests_general_id_fk", + "tableFrom": "static_cone_penetration_tests_data", + "tableTo": "static_cone_penetration_tests_general", + "columnsFrom": [ + "static_cone_penetration_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_static_cone_penetration_tests_data": { + "name": "unique_static_cone_penetration_tests_data", + "nullsNotDistinct": false, + "columns": [ + "static_cone_penetration_tests_general_id", + "depth_of_result" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.static_cone_penetration_tests_derived_parameters": { + "name": "static_cone_penetration_tests_derived_parameters", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_layer": { + "name": "depth_to_top_of_layer", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_layer": { + "name": "depth_to_base_of_layer", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "interpretation_reference": { + "name": "interpretation_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "interpreted_soil_type": { + "name": "interpreted_soil_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "undrained_shear_strength_su_fine_soils_only": { + "name": "undrained_shear_strength_su_fine_soils_only", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "relative_density_dr_coarse_soils_only": { + "name": "relative_density_dr_coarse_soils_only", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "internal_friction_angle_coarse_soils_only": { + "name": "internal_friction_angle_coarse_soils_only", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "soil_behaviour_type_index_ic": { + "name": "soil_behaviour_type_index_ic", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "equivalent_spt_n60_value": { + "name": "equivalent_spt_n60_value", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference": { + "name": "associated_file_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "static_cone_penetration_tests_general_id": { + "name": "static_cone_penetration_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "static_cone_penetration_tests_derived_parameters_static_cone_penetration_tests_general_id_static_cone_penetration_tests_general_id_fk": { + "name": "static_cone_penetration_tests_derived_parameters_static_cone_penetration_tests_general_id_static_cone_penetration_tests_general_id_fk", + "tableFrom": "static_cone_penetration_tests_derived_parameters", + "tableTo": "static_cone_penetration_tests_general", + "columnsFrom": [ + "static_cone_penetration_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_static_cone_penetration_tests_derived_parameters": { + "name": "unique_static_cone_penetration_tests_derived_parameters", + "nullsNotDistinct": false, + "columns": [ + "static_cone_penetration_tests_general_id", + "depth_to_top_of_layer", + "depth_to_base_of_layer", + "interpretation_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.static_cone_penetration_tests_general": { + "name": "static_cone_penetration_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_reference_or_push_number": { + "name": "test_reference_or_push_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cone_test_type": { + "name": "cone_test_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cone_reference": { + "name": "cone_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "surface_area_of_cone_tip": { + "name": "surface_area_of_cone_tip", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "nominal_rate_of_penetration_of_the_cone": { + "name": "nominal_rate_of_penetration_of_the_cone", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type_of_filter_material_used": { + "name": "type_of_filter_material_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "friction_reducer_used": { + "name": "friction_reducer_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "groundwater_level_at_time_of_test": { + "name": "groundwater_level_at_time_of_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "origin_of_water_level_in_scpg_wat": { + "name": "origin_of_water_level_in_scpg_wat", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "comments_on_testing_and_basis_of_any_interpreted_parameters_included_in_scpt_and_scpp": { + "name": "comments_on_testing_and_basis_of_any_interpreted_parameters_included_in_scpt_and_scpp", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "subcontractors_name": { + "name": "subcontractors_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "standard_followed_for_testing": { + "name": "standard_followed_for_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cone_area_ratio_used_to_calculate_qt": { + "name": "cone_area_ratio_used_to_calculate_qt", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "sleeve_area_ratio_used_to_calculate_ft": { + "name": "sleeve_area_ratio_used_to_calculate_ft", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_cone_calibration_records": { + "name": "associated_file_reference_e_g_cone_calibration_records", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_static_cone_penetration_tests_general_abbr": { + "name": "idx_static_cone_penetration_tests_general_abbr", + "columns": [ + { + "expression": "cone_test_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "static_cone_penetration_tests_general_cone_test_type_abbreviation_id_fk": { + "name": "static_cone_penetration_tests_general_cone_test_type_abbreviation_id_fk", + "tableFrom": "static_cone_penetration_tests_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "cone_test_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "static_cone_penetration_tests_general_location_details_id_location_details_id_fk": { + "name": "static_cone_penetration_tests_general_location_details_id_location_details_id_fk", + "tableFrom": "static_cone_penetration_tests_general", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_static_cone_penetration_tests_general": { + "name": "unique_static_cone_penetration_tests_general", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "test_reference_or_push_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.stratum_detail_descriptions": { + "name": "stratum_detail_descriptions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_detail_description": { + "name": "depth_to_top_of_detail_description", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_detail_description": { + "name": "depth_to_base_of_detail_description", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "detail_description": { + "name": "detail_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_logging_field_sheets": { + "name": "associated_file_reference_e_g_logging_field_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "stratum_detail_descriptions_location_details_id_location_details_id_fk": { + "name": "stratum_detail_descriptions_location_details_id_location_details_id_fk", + "tableFrom": "stratum_detail_descriptions", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_stratum_detail_descriptions": { + "name": "unique_stratum_detail_descriptions", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_detail_description", + "depth_to_base_of_detail_description" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.suction_tests": { + "name": "suction_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_length": { + "name": "specimen_length", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "initial_bulk_density": { + "name": "initial_bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_water_moisture_content": { + "name": "initial_water_moisture_content", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "suction_value": { + "name": "suction_value", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_suction_tests_abbr": { + "name": "idx_suction_tests_abbr", + "columns": [ + { + "expression": "sample_condition", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "suction_tests_sample_condition_abbreviation_id_fk": { + "name": "suction_tests_sample_condition_abbreviation_id_fk", + "tableFrom": "suction_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "sample_condition" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "suction_tests_sample_information_id_sample_information_id_fk": { + "name": "suction_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "suction_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_suction_tests": { + "name": "unique_suction_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.swelling_index_testing": { + "name": "swelling_index_testing", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "swelling_pressure_index": { + "name": "swelling_pressure_index", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "swelling_strain_index": { + "name": "swelling_strain_index", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_water_content_of_test_specimen": { + "name": "initial_water_content_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_thickness": { + "name": "specimen_thickness", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_bulk_density": { + "name": "initial_bulk_density", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "swelling_index_testing_sample_information_id_sample_information_id_fk": { + "name": "swelling_index_testing_sample_information_id_sample_information_id_fk", + "tableFrom": "swelling_index_testing", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_swelling_index_testing": { + "name": "unique_swelling_index_testing", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ten_per_cent_fines": { + "name": "ten_per_cent_fines", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "ten_fines_values_on_dry_aggregate": { + "name": "ten_fines_values_on_dry_aggregate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "ten_fines_values_on_wet_aggregate": { + "name": "ten_fines_values_on_wet_aggregate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "ten_per_cent_fines_sample_information_id_sample_information_id_fk": { + "name": "ten_per_cent_fines_sample_information_id_sample_information_id_fk", + "tableFrom": "ten_per_cent_fines", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_ten_per_cent_fines": { + "name": "unique_ten_per_cent_fines", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tensile_strength_testing": { + "name": "tensile_strength_testing", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_thickness": { + "name": "specimen_thickness", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "water_content_of_test_specimen": { + "name": "water_content_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "condition_of_specimen_as_tested": { + "name": "condition_of_specimen_as_tested", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_duration": { + "name": "test_duration", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stress_rate": { + "name": "stress_rate", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "tensile_strength": { + "name": "tensile_strength", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mode_of_failure": { + "name": "mode_of_failure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "testing_machine": { + "name": "testing_machine", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_tensile_strength_testing_abbr": { + "name": "idx_tensile_strength_testing_abbr", + "columns": [ + { + "expression": "mode_of_failure", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tensile_strength_testing_mode_of_failure_abbreviation_id_fk": { + "name": "tensile_strength_testing_mode_of_failure_abbreviation_id_fk", + "tableFrom": "tensile_strength_testing", + "tableTo": "abbreviation", + "columnsFrom": [ + "mode_of_failure" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "tensile_strength_testing_sample_information_id_sample_information_id_fk": { + "name": "tensile_strength_testing_sample_information_id_sample_information_id_fk", + "tableFrom": "tensile_strength_testing", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_tensile_strength_testing": { + "name": "unique_tensile_strength_testing", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.triaxial_tests_effective_stress_data": { + "name": "triaxial_tests_effective_stress_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "triaxial_test_stage_number": { + "name": "triaxial_test_stage_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_length": { + "name": "specimen_length", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_initial_water_moisture_content": { + "name": "specimen_initial_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_final_water_moisture_content": { + "name": "specimen_final_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_bulk_density": { + "name": "initial_bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "method_of_saturation": { + "name": "method_of_saturation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_consolidation_stage": { + "name": "details_of_consolidation_stage", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "effective_stress_at_end_of_consolidation_start_of_shear_stage": { + "name": "effective_stress_at_end_of_consolidation_start_of_shear_stage", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "total_cell_pressure_during_shearing_stage": { + "name": "total_cell_pressure_during_shearing_stage", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "porewater_pressure_at_start_of_shear_stage": { + "name": "porewater_pressure_at_start_of_shear_stage", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "rate_of_axial_strain_during_shear": { + "name": "rate_of_axial_strain_during_shear", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "axial_strain_at_failure": { + "name": "axial_strain_at_failure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviator_stress_at_failure": { + "name": "deviator_stress_at_failure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "porewater_pressure_at_failure": { + "name": "porewater_pressure_at_failure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "volumetric_strain_at_failure_drained_only": { + "name": "volumetric_strain_at_failure_drained_only", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mode_of_failure": { + "name": "mode_of_failure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "comments": { + "name": "comments", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "final_back_pressure_applied_prior_to_shearing": { + "name": "final_back_pressure_applied_prior_to_shearing", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vertical_strain_at_end_of_consolidation": { + "name": "vertical_strain_at_end_of_consolidation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "volumetric_strain_at_end_of_consolidation": { + "name": "volumetric_strain_at_end_of_consolidation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "rate_of_volumetric_strain_immediately_prior_to_shearing": { + "name": "rate_of_volumetric_strain_immediately_prior_to_shearing", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "final_b_value_prior_to_shearing": { + "name": "final_b_value_prior_to_shearing", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_drainage_conditions_during_shear": { + "name": "type_of_drainage_conditions_during_shear", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "membrane_corrections_applied_at_failure": { + "name": "membrane_corrections_applied_at_failure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "filter_paper_corrections_applied_at_failure": { + "name": "filter_paper_corrections_applied_at_failure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "initial_voids_ratio": { + "name": "initial_voids_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "saturation_percentage": { + "name": "saturation_percentage", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "effective_vertical_pressure_at_end_of_consolidation": { + "name": "effective_vertical_pressure_at_end_of_consolidation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "effective_radial_pressure_at_end_of_consolidation": { + "name": "effective_radial_pressure_at_end_of_consolidation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "peak_mean_effective_stress_during_shear": { + "name": "peak_mean_effective_stress_during_shear", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "undrained_shear_strength_at_failure": { + "name": "undrained_shear_strength_at_failure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "strain_at_50_peak_deviator_stress": { + "name": "strain_at_50_peak_deviator_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "secant_modulus_at_50_peak_deviator_stress": { + "name": "secant_modulus_at_50_peak_deviator_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "triaxial_tests_effective_stress_general_id": { + "name": "triaxial_tests_effective_stress_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_triaxial_tests_effective_stress_data_abbr": { + "name": "idx_triaxial_tests_effective_stress_data_abbr", + "columns": [ + { + "expression": "mode_of_failure", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "triaxial_tests_effective_stress_data_mode_of_failure_abbreviation_id_fk": { + "name": "triaxial_tests_effective_stress_data_mode_of_failure_abbreviation_id_fk", + "tableFrom": "triaxial_tests_effective_stress_data", + "tableTo": "abbreviation", + "columnsFrom": [ + "mode_of_failure" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "triaxial_tests_effective_stress_data_triaxial_tests_effective_stress_general_id_triaxial_tests_effective_stress_general_id_fk": { + "name": "triaxial_tests_effective_stress_data_triaxial_tests_effective_stress_general_id_triaxial_tests_effective_stress_general_id_fk", + "tableFrom": "triaxial_tests_effective_stress_data", + "tableTo": "triaxial_tests_effective_stress_general", + "columnsFrom": [ + "triaxial_tests_effective_stress_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_triaxial_tests_effective_stress_data": { + "name": "unique_triaxial_tests_effective_stress_data", + "nullsNotDistinct": false, + "columns": [ + "triaxial_tests_effective_stress_general_id", + "triaxial_test_stage_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.triaxial_tests_effective_stress_general": { + "name": "triaxial_tests_effective_stress_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_type": { + "name": "test_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cohesion_intercept_associated_with_treg_phi": { + "name": "cohesion_intercept_associated_with_treg_phi", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "angle_of_friction_for_effective_shear_strength_triaxial_test": { + "name": "angle_of_friction_for_effective_shear_strength_triaxial_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "failure_criterion": { + "name": "failure_criterion", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result": { + "name": "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "any_deviation_from_the_procedure_or_specified_test_conditions": { + "name": "any_deviation_from_the_procedure_or_specified_test_conditions", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_triaxial_tests_effective_stress_general_abbr": { + "name": "idx_triaxial_tests_effective_stress_general_abbr", + "columns": [ + { + "expression": "test_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sample_condition", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "triaxial_tests_effective_stress_general_test_type_abbreviation_id_fk": { + "name": "triaxial_tests_effective_stress_general_test_type_abbreviation_id_fk", + "tableFrom": "triaxial_tests_effective_stress_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "test_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "triaxial_tests_effective_stress_general_sample_condition_abbreviation_id_fk": { + "name": "triaxial_tests_effective_stress_general_sample_condition_abbreviation_id_fk", + "tableFrom": "triaxial_tests_effective_stress_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "sample_condition" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "triaxial_tests_effective_stress_general_sample_information_id_sample_information_id_fk": { + "name": "triaxial_tests_effective_stress_general_sample_information_id_sample_information_id_fk", + "tableFrom": "triaxial_tests_effective_stress_general", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_triaxial_tests_effective_stress_general": { + "name": "unique_triaxial_tests_effective_stress_general", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.triaxial_tests_total_stress_data": { + "name": "triaxial_tests_total_stress_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "triaxial_test_stage_reference": { + "name": "triaxial_test_stage_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_length": { + "name": "specimen_length", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_initial_water_moisture_content": { + "name": "specimen_initial_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_final_water_moisture_content": { + "name": "specimen_final_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "total_cell_pressure": { + "name": "total_cell_pressure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "corrected_deviator_stress_at_failure": { + "name": "corrected_deviator_stress_at_failure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "initial_bulk_density": { + "name": "initial_bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "axial_strain_at_failure": { + "name": "axial_strain_at_failure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "undrained_shear_strength_at_failure": { + "name": "undrained_shear_strength_at_failure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mode_of_failure": { + "name": "mode_of_failure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "comments": { + "name": "comments", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "failure_zone_water_content": { + "name": "failure_zone_water_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mean_rate_of_shear": { + "name": "mean_rate_of_shear", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "triaxial_tests_total_stress_general_id": { + "name": "triaxial_tests_total_stress_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_triaxial_tests_total_stress_data_abbr": { + "name": "idx_triaxial_tests_total_stress_data_abbr", + "columns": [ + { + "expression": "mode_of_failure", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "triaxial_tests_total_stress_data_mode_of_failure_abbreviation_id_fk": { + "name": "triaxial_tests_total_stress_data_mode_of_failure_abbreviation_id_fk", + "tableFrom": "triaxial_tests_total_stress_data", + "tableTo": "abbreviation", + "columnsFrom": [ + "mode_of_failure" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "triaxial_tests_total_stress_data_triaxial_tests_total_stress_general_id_triaxial_tests_total_stress_general_id_fk": { + "name": "triaxial_tests_total_stress_data_triaxial_tests_total_stress_general_id_triaxial_tests_total_stress_general_id_fk", + "tableFrom": "triaxial_tests_total_stress_data", + "tableTo": "triaxial_tests_total_stress_general", + "columnsFrom": [ + "triaxial_tests_total_stress_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_triaxial_tests_total_stress_data": { + "name": "unique_triaxial_tests_total_stress_data", + "nullsNotDistinct": false, + "columns": [ + "triaxial_tests_total_stress_general_id", + "triaxial_test_stage_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.triaxial_tests_total_stress_general": { + "name": "triaxial_tests_total_stress_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_type": { + "name": "test_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result": { + "name": "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_triaxial_tests_total_stress_general_abbr": { + "name": "idx_triaxial_tests_total_stress_general_abbr", + "columns": [ + { + "expression": "test_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sample_condition", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "triaxial_tests_total_stress_general_test_type_abbreviation_id_fk": { + "name": "triaxial_tests_total_stress_general_test_type_abbreviation_id_fk", + "tableFrom": "triaxial_tests_total_stress_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "test_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "triaxial_tests_total_stress_general_sample_condition_abbreviation_id_fk": { + "name": "triaxial_tests_total_stress_general_sample_condition_abbreviation_id_fk", + "tableFrom": "triaxial_tests_total_stress_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "sample_condition" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "triaxial_tests_total_stress_general_sample_information_id_sample_information_id_fk": { + "name": "triaxial_tests_total_stress_general_sample_information_id_sample_information_id_fk", + "tableFrom": "triaxial_tests_total_stress_general", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_triaxial_tests_total_stress_general": { + "name": "unique_triaxial_tests_total_stress_general", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.water_added_records": { + "name": "water_added_records", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_reported_section": { + "name": "depth_to_top_of_reported_section", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_reported_section": { + "name": "depth_to_base_of_reported_section", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "amount_of_water_added": { + "name": "amount_of_water_added", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "boring_drilling_method_associated_with_addition_of_water_hdph_type_abbreviation": { + "name": "boring_drilling_method_associated_with_addition_of_water_hdph_type_abbreviation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks_related_to_addition_of_water_requirements": { + "name": "remarks_related_to_addition_of_water_requirements", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_drilling_journal": { + "name": "associated_file_reference_e_g_drilling_journal", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "water_added_records_location_details_id_location_details_id_fk": { + "name": "water_added_records_location_details_id_location_details_id_fk", + "tableFrom": "water_added_records", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_water_added_records": { + "name": "unique_water_added_records", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_reported_section", + "depth_to_base_of_reported_section" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.water_content_of_rock_tests": { + "name": "water_content_of_rock_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "water_content": { + "name": "water_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "temperature_sample_dried_at": { + "name": "temperature_sample_dried_at", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "water_content_of_rock_tests_sample_information_id_sample_information_id_fk": { + "name": "water_content_of_rock_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "water_content_of_rock_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_water_content_of_rock_tests": { + "name": "unique_water_content_of_rock_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.water_moisture_content_tests": { + "name": "water_moisture_content_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content": { + "name": "water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "temperature_sample_dried_at": { + "name": "temperature_sample_dried_at", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "amount_of_stabiliser_added": { + "name": "amount_of_stabiliser_added", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_stabiliser_added": { + "name": "type_of_stabiliser_added", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "is_test_result_assumed_to_be_a_natural_water_moisture_content": { + "name": "is_test_result_assumed_to_be_a_natural_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reason_water_moisture_content_is_assumed_to_be_other_than_natural": { + "name": "reason_water_moisture_content_is_assumed_to_be_other_than_natural", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "water_moisture_content_tests_sample_information_id_sample_information_id_fk": { + "name": "water_moisture_content_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "water_moisture_content_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_water_moisture_content_tests": { + "name": "unique_water_moisture_content_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.water_strike_details": { + "name": "water_strike_details", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "minutes_after_strike": { + "name": "minutes_after_strike", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "depth_to_water_after_wstd_nmin_minutes": { + "name": "depth_to_water_after_wstd_nmin_minutes", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "water_strike_general_id": { + "name": "water_strike_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "water_strike_details_water_strike_general_id_water_strike_general_id_fk": { + "name": "water_strike_details_water_strike_general_id_water_strike_general_id_fk", + "tableFrom": "water_strike_details", + "tableTo": "water_strike_general", + "columnsFrom": [ + "water_strike_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_water_strike_details": { + "name": "unique_water_strike_details", + "nullsNotDistinct": false, + "columns": [ + "water_strike_general_id", + "minutes_after_strike" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.water_strike_general": { + "name": "water_strike_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_water_strike": { + "name": "depth_to_water_strike", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "date_and_time_of_water_strike": { + "name": "date_and_time_of_water_strike", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "depth_at_which_water_strike_sealed_by_casing": { + "name": "depth_at_which_water_strike_sealed_by_casing", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "casing_depth_at_time_of_water_strike": { + "name": "casing_depth_at_time_of_water_strike", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "water_strike_general_location_details_id_location_details_id_fk": { + "name": "water_strike_general_location_details_id_location_details_id_fk", + "tableFrom": "water_strike_general", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_water_strike_general": { + "name": "unique_water_strike_general", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_water_strike" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.weathering": { + "name": "weathering", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_weathering_subdivision": { + "name": "depth_to_top_of_weathering_subdivision", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_weathering_subdivision": { + "name": "depth_to_base_of_weathering_subdivision", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "weathering_scheme": { + "name": "weathering_scheme", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "material_or_mass_weathering_system": { + "name": "material_or_mass_weathering_system", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "weathering_classifier_for_weth_sch_and_weth_sys": { + "name": "weathering_classifier_for_weth_sch_and_weth_sys", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_logging_sheets": { + "name": "associated_file_reference_e_g_logging_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_weathering_abbr": { + "name": "idx_weathering_abbr", + "columns": [ + { + "expression": "weathering_scheme", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "material_or_mass_weathering_system", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "weathering_weathering_scheme_abbreviation_id_fk": { + "name": "weathering_weathering_scheme_abbreviation_id_fk", + "tableFrom": "weathering", + "tableTo": "abbreviation", + "columnsFrom": [ + "weathering_scheme" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "weathering_material_or_mass_weathering_system_abbreviation_id_fk": { + "name": "weathering_material_or_mass_weathering_system_abbreviation_id_fk", + "tableFrom": "weathering", + "tableTo": "abbreviation", + "columnsFrom": [ + "material_or_mass_weathering_system" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "weathering_location_details_id_location_details_id_fk": { + "name": "weathering_location_details_id_location_details_id_fk", + "tableFrom": "weathering", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_weathering": { + "name": "unique_weathering", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_weathering_subdivision", + "depth_to_base_of_weathering_subdivision" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.window_or_windowless_sampling_run_details": { + "name": "window_or_windowless_sampling_run_details", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "sampler_run_reference": { + "name": "sampler_run_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "top_of_sampling_run": { + "name": "top_of_sampling_run", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "base_of_sampling_run": { + "name": "base_of_sampling_run", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "internal_diameter_of_sampler": { + "name": "internal_diameter_of_sampler", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "duration_of_sampling_run": { + "name": "duration_of_sampling_run", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_recovery": { + "name": "sample_recovery", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks_about_sampling_run": { + "name": "remarks_about_sampling_run", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_field_records": { + "name": "associated_file_reference_e_g_field_records", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "window_or_windowless_sampling_run_details_location_details_id_location_details_id_fk": { + "name": "window_or_windowless_sampling_run_details_location_details_id_location_details_id_fk", + "tableFrom": "window_or_windowless_sampling_run_details", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_window_or_windowless_sampling_run_details": { + "name": "unique_window_or_windowless_sampling_run_details", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "sampler_run_reference", + "top_of_sampling_run", + "base_of_sampling_run" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wireline_geophysics_general": { + "name": "wireline_geophysics_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "tool_used": { + "name": "tool_used", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "test_start_depth": { + "name": "test_start_depth", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_stop_depth": { + "name": "test_stop_depth", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_of_borehole": { + "name": "depth_of_borehole", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_of_water_in_borehole": { + "name": "depth_of_water_in_borehole", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_instrument": { + "name": "details_of_instrument", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "casing_internal_diameter_as_reported_by_drillers": { + "name": "casing_internal_diameter_as_reported_by_drillers", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "measurement_method": { + "name": "measurement_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "contractor_who_undertook_testing": { + "name": "contractor_who_undertook_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_where_appropriate": { + "name": "accrediting_body_and_reference_number_where_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "instrument_method_reading_detection_limit": { + "name": "instrument_method_reading_detection_limit", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "instrument_method_upper_reading_detection_when_appropriate": { + "name": "instrument_method_upper_reading_detection_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_wireline_geophysics_general_abbr": { + "name": "idx_wireline_geophysics_general_abbr", + "columns": [ + { + "expression": "tool_used", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wireline_geophysics_general_tool_used_abbreviation_id_fk": { + "name": "wireline_geophysics_general_tool_used_abbreviation_id_fk", + "tableFrom": "wireline_geophysics_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "tool_used" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "wireline_geophysics_general_location_details_id_location_details_id_fk": { + "name": "wireline_geophysics_general_location_details_id_location_details_id_fk", + "tableFrom": "wireline_geophysics_general", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_wireline_geophysics_general": { + "name": "unique_wireline_geophysics_general", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "test_reference", + "tool_used" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wireline_geophysics_readings": { + "name": "wireline_geophysics_readings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "parameter_recorded_by_tool_wgpg_tool": { + "name": "parameter_recorded_by_tool_wgpg_tool", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "test_result_units": { + "name": "test_result_units", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "depth_of_reading": { + "name": "depth_of_reading", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "reading": { + "name": "reading", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "borehole_casing_details_at_depth_of_reading": { + "name": "borehole_casing_details_at_depth_of_reading", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference": { + "name": "associated_file_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "wireline_geophysics_general_id": { + "name": "wireline_geophysics_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_wireline_geophysics_readings_abbr": { + "name": "idx_wireline_geophysics_readings_abbr", + "columns": [ + { + "expression": "parameter_recorded_by_tool_wgpg_tool", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "borehole_casing_details_at_depth_of_reading", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wireline_geophysics_readings_parameter_recorded_by_tool_wgpg_tool_abbreviation_id_fk": { + "name": "wireline_geophysics_readings_parameter_recorded_by_tool_wgpg_tool_abbreviation_id_fk", + "tableFrom": "wireline_geophysics_readings", + "tableTo": "abbreviation", + "columnsFrom": [ + "parameter_recorded_by_tool_wgpg_tool" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "wireline_geophysics_readings_borehole_casing_details_at_depth_of_reading_abbreviation_id_fk": { + "name": "wireline_geophysics_readings_borehole_casing_details_at_depth_of_reading_abbreviation_id_fk", + "tableFrom": "wireline_geophysics_readings", + "tableTo": "abbreviation", + "columnsFrom": [ + "borehole_casing_details_at_depth_of_reading" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "wireline_geophysics_readings_wireline_geophysics_general_id_wireline_geophysics_general_id_fk": { + "name": "wireline_geophysics_readings_wireline_geophysics_general_id_wireline_geophysics_general_id_fk", + "tableFrom": "wireline_geophysics_readings", + "tableTo": "wireline_geophysics_general", + "columnsFrom": [ + "wireline_geophysics_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_wireline_geophysics_readings": { + "name": "unique_wireline_geophysics_readings", + "nullsNotDistinct": false, + "columns": [ + "wireline_geophysics_general_id", + "parameter_recorded_by_tool_wgpg_tool", + "test_result_units", + "depth_of_reading" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.ags_dictionary_version": { + "name": "ags_dictionary_version", + "schema": "public", + "values": [ + "v4_0_3", + "v4_0_4", + "v4_1", + "v4_1_1" + ] + }, + "public.ags_import_status": { + "name": "ags_import_status", + "schema": "public", + "values": [ + "not_started", + "completed" + ] + }, + "public.ags_validation_status": { + "name": "ags_validation_status", + "schema": "public", + "values": [ + "not_started", + "started", + "completed" + ] + }, + "public.changes_calculation_status": { + "name": "changes_calculation_status", + "schema": "public", + "values": [ + "not_started", + "completed" + ] + }, + "public.excel_import_kind": { + "name": "excel_import_kind", + "schema": "public", + "values": [ + "excel", + "csv" + ] + }, + "public.project_role": { + "name": "project_role", + "schema": "public", + "values": [ + "OWNER", + "CONTRIBUTOR", + "VIEWER" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/packages/common/drizzle/meta/0015_snapshot.json b/packages/common/drizzle/meta/0015_snapshot.json new file mode 100644 index 00000000..2f6c432f --- /dev/null +++ b/packages/common/drizzle/meta/0015_snapshot.json @@ -0,0 +1,25780 @@ +{ + "id": "dc7b55ca-d168-4e4d-bbcb-13877d5ef884", + "prevId": "22eff15d-f822-43a8-85bc-55a50e87a071", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.abbreviation": { + "name": "abbreviation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "code": { + "name": "code", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "abbreviation_collection_id": { + "name": "abbreviation_collection_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "abbreviation_abbreviation_collection_id_abbreviation_collection_id_fk": { + "name": "abbreviation_abbreviation_collection_id_abbreviation_collection_id_fk", + "tableFrom": "abbreviation", + "tableTo": "abbreviation_collection", + "columnsFrom": [ + "abbreviation_collection_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_abbr": { + "name": "unique_abbr", + "nullsNotDistinct": false, + "columns": [ + "code", + "abbreviation_collection_id" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.abbreviation_collection": { + "name": "abbreviation_collection", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "column": { + "name": "column", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "table": { + "name": "table", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "abbreviation_collection_project_id_project_id_fk": { + "name": "abbreviation_collection_project_id_project_id_fk", + "tableFrom": "abbreviation_collection", + "tableTo": "project", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_abbr_collection": { + "name": "unique_abbr_collection", + "nullsNotDistinct": false, + "columns": [ + "project_id", + "column", + "table" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_table": { + "name": "custom_table", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "folder_id": { + "name": "folder_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "definition": { + "name": "definition", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "custom_table_project_id_project_id_fk": { + "name": "custom_table_project_id_project_id_fk", + "tableFrom": "custom_table", + "tableTo": "project", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "custom_table_folder_id_folder_id_fk": { + "name": "custom_table_folder_id_folder_id_fk", + "tableFrom": "custom_table", + "tableTo": "folder", + "columnsFrom": [ + "folder_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_table_zone": { + "name": "custom_table_zone", + "schema": "", + "columns": { + "custom_table_id": { + "name": "custom_table_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "zone_id": { + "name": "zone_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "custom_table_zone_custom_table_id_custom_table_id_fk": { + "name": "custom_table_zone_custom_table_id_custom_table_id_fk", + "tableFrom": "custom_table_zone", + "tableTo": "custom_table", + "columnsFrom": [ + "custom_table_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "custom_table_zone_zone_id_zone_id_fk": { + "name": "custom_table_zone_zone_id_zone_id_fk", + "tableFrom": "custom_table_zone", + "tableTo": "zone", + "columnsFrom": [ + "zone_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.folder": { + "name": "folder", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_folder_id": { + "name": "parent_folder_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'customTable'" + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "folder_project_id_project_id_fk": { + "name": "folder_project_id_project_id_fk", + "tableFrom": "folder", + "tableTo": "project", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "folder_parent_folder_id_folder_id_fk": { + "name": "folder_parent_folder_id_folder_id_fk", + "tableFrom": "folder", + "tableTo": "folder", + "columnsFrom": [ + "parent_folder_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ags_file_upload": { + "name": "ags_file_upload", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "type": "always", + "name": "ags_file_upload_id_seq", + "schema": "public", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "2147483647", + "cache": "1", + "cycle": false + } + }, + "ags_import_id": { + "name": "ags_import_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "validated_data_blob_key": { + "name": "validated_data_blob_key", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "file_name": { + "name": "file_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "file_url": { + "name": "file_url", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "file_url_in_progress": { + "name": "file_url_in_progress", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "file_size": { + "name": "file_size", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "ags_file_upload_ags_import_id_ags_import_id_fk": { + "name": "ags_file_upload_ags_import_id_ags_import_id_fk", + "tableFrom": "ags_file_upload", + "tableTo": "ags_import", + "columnsFrom": [ + "ags_import_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ags_import": { + "name": "ags_import", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "ags_dictionary_version": { + "name": "ags_dictionary_version", + "type": "ags_dictionary_version", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "ags_validation_status": { + "name": "ags_validation_status", + "type": "ags_validation_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "changes_calculation_status": { + "name": "changes_calculation_status", + "type": "changes_calculation_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "import_summary": { + "name": "import_summary", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "ags_import_project_id_project_id_fk": { + "name": "ags_import_project_id_project_id_fk", + "tableFrom": "ags_import", + "tableTo": "project", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.excel_import": { + "name": "excel_import", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "excel_import_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "extracted_data": { + "name": "extracted_data", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "summary": { + "name": "summary", + "type": "jsonb", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "excel_import_project_id_project_id_fk": { + "name": "excel_import_project_id_project_id_fk", + "tableFrom": "excel_import", + "tableTo": "project", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.excel_import_file": { + "name": "excel_import_file", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "excel_import_id": { + "name": "excel_import_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "file_name": { + "name": "file_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "file_size": { + "name": "file_size", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "mapping": { + "name": "mapping", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "blob_key": { + "name": "blob_key", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "excel_import_file_excel_import_id_excel_import_id_fk": { + "name": "excel_import_file_excel_import_id_excel_import_id_fk", + "tableFrom": "excel_import_file", + "tableTo": "excel_import", + "columnsFrom": [ + "excel_import_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.plot": { + "name": "plot", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "folder_id": { + "name": "folder_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "source_custom_table_id": { + "name": "source_custom_table_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "definition": { + "name": "definition", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "plot_project_id_project_id_fk": { + "name": "plot_project_id_project_id_fk", + "tableFrom": "plot", + "tableTo": "project", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "plot_folder_id_folder_id_fk": { + "name": "plot_folder_id_folder_id_fk", + "tableFrom": "plot", + "tableTo": "folder", + "columnsFrom": [ + "folder_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "plot_source_custom_table_id_custom_table_id_fk": { + "name": "plot_source_custom_table_id_custom_table_id_fk", + "tableFrom": "plot", + "tableTo": "custom_table", + "columnsFrom": [ + "source_custom_table_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.project": { + "name": "project", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "srid": { + "name": "srid", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 4326 + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user_project": { + "name": "user_project", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "project_role", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'VIEWER'" + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "user_project_user_id_user_id_fk": { + "name": "user_project_user_id_user_id_fk", + "tableFrom": "user_project", + "tableTo": "user", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "user_project_project_id_project_id_fk": { + "name": "user_project_project_id_project_id_fk", + "tableFrom": "user_project", + "tableTo": "project", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user": { + "name": "user", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "email": { + "name": "email", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "auth_id": { + "name": "auth_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "first_name": { + "name": "first_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "last_name": { + "name": "last_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "picture": { + "name": "picture", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "user_email_unique": { + "name": "user_email_unique", + "nullsNotDistinct": false, + "columns": [ + "email" + ] + }, + "user_auth_id_unique": { + "name": "user_auth_id_unique", + "nullsNotDistinct": false, + "columns": [ + "auth_id" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.zone": { + "name": "zone", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "type": "always", + "name": "zone_id_seq", + "schema": "public", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "2147483647", + "cache": "1", + "cycle": false + } + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "geometry": { + "name": "geometry", + "type": "geometry(Polygon, 4326)", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "zone_project_id_project_id_fk": { + "name": "zone_project_id_project_id_fk", + "tableFrom": "zone", + "tableTo": "project", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aggregate_abrasion_tests": { + "name": "aggregate_abrasion_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "aggregate_abrasion_value": { + "name": "aggregate_abrasion_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "aggregate_abrasion_tests_sample_information_id_sample_information_id_fk": { + "name": "aggregate_abrasion_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "aggregate_abrasion_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_aggregate_abrasion_tests": { + "name": "unique_aggregate_abrasion_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aggregate_crushing_value_tests": { + "name": "aggregate_crushing_value_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "aggregate_crushing_value": { + "name": "aggregate_crushing_value", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "size_fraction_from_which_test_portion_was_obtained": { + "name": "size_fraction_from_which_test_portion_was_obtained", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "aggregate_crushing_value_tests_sample_information_id_sample_information_id_fk": { + "name": "aggregate_crushing_value_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "aggregate_crushing_value_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_aggregate_crushing_value_tests": { + "name": "unique_aggregate_crushing_value_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aggregate_determination_of_the_resistance_to_wear_micro_deval": { + "name": "aggregate_determination_of_the_resistance_to_wear_micro_deval", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "size_fraction_on_which_sample_obtained": { + "name": "size_fraction_on_which_sample_obtained", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_test": { + "name": "type_of_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "micro_deval_coefficient_for_test_specimen_one": { + "name": "micro_deval_coefficient_for_test_specimen_one", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "micro_deval_coefficient_for_test_specimen_two": { + "name": "micro_deval_coefficient_for_test_specimen_two", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mean_micro_deval_value_dry": { + "name": "mean_micro_deval_value_dry", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mean_micro_deval_value_wet": { + "name": "mean_micro_deval_value_wet", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "date_control_2_polished_stone_value_first_run": { + "name": "date_control_2_polished_stone_value_first_run", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_aggregate_determination_of_the_resistance_to_wear_micro_deval_abbr": { + "name": "idx_aggregate_determination_of_the_resistance_to_wear_micro_deval_abbr", + "columns": [ + { + "expression": "type_of_test", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "aggregate_determination_of_the_resistance_to_wear_micro_deval_type_of_test_abbreviation_id_fk": { + "name": "aggregate_determination_of_the_resistance_to_wear_micro_deval_type_of_test_abbreviation_id_fk", + "tableFrom": "aggregate_determination_of_the_resistance_to_wear_micro_deval", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_test" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "aggregate_determination_of_the_resistance_to_wear_micro_deval_sample_information_id_sample_information_id_fk": { + "name": "aggregate_determination_of_the_resistance_to_wear_micro_deval_sample_information_id_sample_information_id_fk", + "tableFrom": "aggregate_determination_of_the_resistance_to_wear_micro_deval", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_aggregate_determination_of_the_resistance_to_wear_micro_deval": { + "name": "unique_aggregate_determination_of_the_resistance_to_wear_micro_deval", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aggregate_elongation_index_tests": { + "name": "aggregate_elongation_index_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "aggregate_elongation_index": { + "name": "aggregate_elongation_index", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "aggregate_elongation_index_tests_sample_information_id_sample_information_id_fk": { + "name": "aggregate_elongation_index_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "aggregate_elongation_index_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_aggregate_elongation_index_tests": { + "name": "unique_aggregate_elongation_index_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aggregate_flakiness_tests": { + "name": "aggregate_flakiness_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "aggregate_flakiness_index": { + "name": "aggregate_flakiness_index", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mass_of_test_portion": { + "name": "mass_of_test_portion", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "aggregate_flakiness_tests_sample_information_id_sample_information_id_fk": { + "name": "aggregate_flakiness_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "aggregate_flakiness_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_aggregate_flakiness_tests": { + "name": "unique_aggregate_flakiness_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aggregate_impact_value_tests": { + "name": "aggregate_impact_value_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "aggregate_impact_value_test_1": { + "name": "aggregate_impact_value_test_1", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "aggregate_impact_value_test_2": { + "name": "aggregate_impact_value_test_2", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mean_aggregate_impact_value": { + "name": "mean_aggregate_impact_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "size_fraction_from_which_test_portion_was_obtained": { + "name": "size_fraction_from_which_test_portion_was_obtained", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "particle_density_of_size_fraction_between_8_mm_and_12_5mm": { + "name": "particle_density_of_size_fraction_between_8_mm_and_12_5mm", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "aggregate_impact_value_tests_sample_information_id_sample_information_id_fk": { + "name": "aggregate_impact_value_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "aggregate_impact_value_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_aggregate_impact_value_tests": { + "name": "unique_aggregate_impact_value_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aggregate_polished_stone_tests": { + "name": "aggregate_polished_stone_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "aggregate_polished_stone_value": { + "name": "aggregate_polished_stone_value", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "aggregate_polished_stone_tests_sample_information_id_sample_information_id_fk": { + "name": "aggregate_polished_stone_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "aggregate_polished_stone_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_aggregate_polished_stone_tests": { + "name": "unique_aggregate_polished_stone_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aggregate_soundness_tests": { + "name": "aggregate_soundness_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "aggregate_soundness_test": { + "name": "aggregate_soundness_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "size_fraction_from_which_test_portion_was_obtained": { + "name": "size_fraction_from_which_test_portion_was_obtained", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "aggregate_soundness_tests_sample_information_id_sample_information_id_fk": { + "name": "aggregate_soundness_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "aggregate_soundness_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_aggregate_soundness_tests": { + "name": "unique_aggregate_soundness_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aggregate_water_absorption_tests": { + "name": "aggregate_water_absorption_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "aggregate_water_absorption": { + "name": "aggregate_water_absorption", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "aggregate_water_absorption_tests_sample_information_id_sample_information_id_fk": { + "name": "aggregate_water_absorption_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "aggregate_water_absorption_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_aggregate_water_absorption_tests": { + "name": "unique_aggregate_water_absorption_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.boring_drilling_progress_by_time": { + "name": "boring_drilling_progress_by_time", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "date_and_time_of_progress_reading": { + "name": "date_and_time_of_progress_reading", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "hole_depth": { + "name": "hole_depth", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_of_casing": { + "name": "depth_of_casing", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_water": { + "name": "depth_to_water", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_drilling_journals": { + "name": "associated_file_reference_e_g_drilling_journals", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "boring_drilling_progress_by_time_location_details_id_location_details_id_fk": { + "name": "boring_drilling_progress_by_time_location_details_id_location_details_id_fk", + "tableFrom": "boring_drilling_progress_by_time", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_boring_drilling_progress_by_time": { + "name": "unique_boring_drilling_progress_by_time", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "date_and_time_of_progress_reading" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.california_bearing_ratio_tests_data": { + "name": "california_bearing_ratio_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cbr_at_top": { + "name": "cbr_at_top", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "cbr_at_bottom": { + "name": "cbr_at_bottom", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content_at_top_after_test": { + "name": "water_moisture_content_at_top_after_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content_at_bottom_after_test": { + "name": "water_moisture_content_at_bottom_after_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_water_moisture_content": { + "name": "initial_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_bulk_density": { + "name": "initial_bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "surcharge_pressure_applied": { + "name": "surcharge_pressure_applied", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "details_of_soaking": { + "name": "details_of_soaking", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "amount_of_swell_recorded_during_soaking_if_applicable": { + "name": "amount_of_swell_recorded_during_soaking_if_applicable", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_specific_remarks": { + "name": "test_specific_remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "california_bearing_ratio_tests_general_id": { + "name": "california_bearing_ratio_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "california_bearing_ratio_tests_data_california_bearing_ratio_tests_general_id_california_bearing_ratio_tests_general_id_fk": { + "name": "california_bearing_ratio_tests_data_california_bearing_ratio_tests_general_id_california_bearing_ratio_tests_general_id_fk", + "tableFrom": "california_bearing_ratio_tests_data", + "tableTo": "california_bearing_ratio_tests_general", + "columnsFrom": [ + "california_bearing_ratio_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_california_bearing_ratio_tests_data": { + "name": "unique_california_bearing_ratio_tests_data", + "nullsNotDistinct": false, + "columns": [ + "california_bearing_ratio_tests_general_id", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.california_bearing_ratio_tests_general": { + "name": "california_bearing_ratio_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "natural_water_moisture_content_of_specimen_prior_to_test": { + "name": "natural_water_moisture_content_of_specimen_prior_to_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "weight_percent_retained_on_20mm_sieve": { + "name": "weight_percent_retained_on_20mm_sieve", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "amount_of_stabiliser_added": { + "name": "amount_of_stabiliser_added", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_stabiliser_added": { + "name": "type_of_stabiliser_added", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result": { + "name": "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method_including_remoulding": { + "name": "test_method_including_remoulding", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_california_bearing_ratio_tests_general_abbr": { + "name": "idx_california_bearing_ratio_tests_general_abbr", + "columns": [ + { + "expression": "sample_condition", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "california_bearing_ratio_tests_general_sample_condition_abbreviation_id_fk": { + "name": "california_bearing_ratio_tests_general_sample_condition_abbreviation_id_fk", + "tableFrom": "california_bearing_ratio_tests_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "sample_condition" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "california_bearing_ratio_tests_general_sample_information_id_sample_information_id_fk": { + "name": "california_bearing_ratio_tests_general_sample_information_id_sample_information_id_fk", + "tableFrom": "california_bearing_ratio_tests_general", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_california_bearing_ratio_tests_general": { + "name": "unique_california_bearing_ratio_tests_general", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.casing_diameter_by_depth": { + "name": "casing_diameter_by_depth", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_of_base_of_casing_recorded_in_cdia_diam": { + "name": "depth_of_base_of_casing_recorded_in_cdia_diam", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "casing_diameter": { + "name": "casing_diameter", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_casing_cement_records": { + "name": "associated_file_reference_e_g_casing_cement_records", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "casing_diameter_by_depth_location_details_id_location_details_id_fk": { + "name": "casing_diameter_by_depth_location_details_id_location_details_id_fk", + "tableFrom": "casing_diameter_by_depth", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_casing_diameter_by_depth": { + "name": "unique_casing_diameter_by_depth", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_of_base_of_casing_recorded_in_cdia_diam", + "casing_diameter" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.chain_of_custody_information": { + "name": "chain_of_custody_information", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "chain_of_custody_reference": { + "name": "chain_of_custody_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "samples_despatched_from": { + "name": "samples_despatched_from", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "samples_despatched_to": { + "name": "samples_despatched_to", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "date_dispatched": { + "name": "date_dispatched", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "batch_reference": { + "name": "batch_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "number_of_sample_containers": { + "name": "number_of_sample_containers", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_chain_of_custody_sheets": { + "name": "associated_file_reference_chain_of_custody_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "chain_of_custody_information_sample_information_id_sample_information_id_fk": { + "name": "chain_of_custody_information_sample_information_id_sample_information_id_fk", + "tableFrom": "chain_of_custody_information", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_chain_of_custody_information": { + "name": "unique_chain_of_custody_information", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "chain_of_custody_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.chalk_crushing_value_tests": { + "name": "chalk_crushing_value_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "water_content_of_specimen_tested": { + "name": "water_content_of_specimen_tested", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "chalk_crushing_value": { + "name": "chalk_crushing_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "percentage_larger_than_10mm_in_original_sample": { + "name": "percentage_larger_than_10mm_in_original_sample", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "chalk_crushing_value_tests_sample_information_id_sample_information_id_fk": { + "name": "chalk_crushing_value_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "chalk_crushing_value_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_chalk_crushing_value_tests": { + "name": "unique_chalk_crushing_value_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.chiselling_details": { + "name": "chiselling_details", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_at_start_of_chiselling": { + "name": "depth_at_start_of_chiselling", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_at_end_of_chiselling": { + "name": "depth_at_end_of_chiselling", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "time_taken": { + "name": "time_taken", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "start_time": { + "name": "start_time", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "chiselling_tool_used": { + "name": "chiselling_tool_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "notes_on_chiselling": { + "name": "notes_on_chiselling", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_drilling_journals": { + "name": "associated_file_reference_e_g_drilling_journals", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "chiselling_details_location_details_id_location_details_id_fk": { + "name": "chiselling_details_location_details_id_location_details_id_fk", + "tableFrom": "chiselling_details", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_chiselling_details": { + "name": "unique_chiselling_details", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_at_start_of_chiselling" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.compaction_tests_data": { + "name": "compaction_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "compaction_point_number": { + "name": "compaction_point_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content": { + "name": "water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "dry_density_at_cmpt_mc_water_moisture_content": { + "name": "dry_density_at_cmpt_mc_water_moisture_content", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "compaction_tests_general_id": { + "name": "compaction_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "compaction_tests_data_compaction_tests_general_id_compaction_tests_general_id_fk": { + "name": "compaction_tests_data_compaction_tests_general_id_compaction_tests_general_id_fk", + "tableFrom": "compaction_tests_data", + "tableTo": "compaction_tests_general", + "columnsFrom": [ + "compaction_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_compaction_tests_data": { + "name": "unique_compaction_tests_data", + "nullsNotDistinct": false, + "columns": [ + "compaction_tests_general_id", + "compaction_point_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.compaction_tests_general": { + "name": "compaction_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_number": { + "name": "test_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "compaction_test_type": { + "name": "compaction_test_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "compaction_mould_type": { + "name": "compaction_mould_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "weight_percent_of_material_retained_on_37_5mm_sieve": { + "name": "weight_percent_of_material_retained_on_37_5mm_sieve", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "weight_percent_of_material_retained_on_20mm_sieve": { + "name": "weight_percent_of_material_retained_on_20mm_sieve", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "particle_density_with_prefix_if_value_assumed": { + "name": "particle_density_with_prefix_if_value_assumed", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "maximum_dry_density": { + "name": "maximum_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content_at_maximum_dry_density_optimum": { + "name": "water_moisture_content_at_maximum_dry_density_optimum", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "amount_of_stabiliser_added": { + "name": "amount_of_stabiliser_added", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_stabiliser_added": { + "name": "type_of_stabiliser_added", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result": { + "name": "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_compaction_tests_general_abbr": { + "name": "idx_compaction_tests_general_abbr", + "columns": [ + { + "expression": "compaction_test_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "compaction_mould_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "compaction_tests_general_compaction_test_type_abbreviation_id_fk": { + "name": "compaction_tests_general_compaction_test_type_abbreviation_id_fk", + "tableFrom": "compaction_tests_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "compaction_test_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "compaction_tests_general_compaction_mould_type_abbreviation_id_fk": { + "name": "compaction_tests_general_compaction_mould_type_abbreviation_id_fk", + "tableFrom": "compaction_tests_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "compaction_mould_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "compaction_tests_general_sample_information_id_sample_information_id_fk": { + "name": "compaction_tests_general_sample_information_id_sample_information_id_fk", + "tableFrom": "compaction_tests_general", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_compaction_tests_general": { + "name": "unique_compaction_tests_general", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen", + "test_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.consolidation_tests_data": { + "name": "consolidation_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "oedometer_stress_increment": { + "name": "oedometer_stress_increment", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "voids_ratio_at_start_of_increment": { + "name": "voids_ratio_at_start_of_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "stress_at_end_of_stress_increment_decrement": { + "name": "stress_at_end_of_stress_increment_decrement", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "voids_ratio_at_end_of_stress_increment": { + "name": "voids_ratio_at_end_of_stress_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "reported_coefficient_of_volume_compressibility_over_stress_increment": { + "name": "reported_coefficient_of_volume_compressibility_over_stress_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "coefficient_of_secondary_compression_over_stress_increment": { + "name": "coefficient_of_secondary_compression_over_stress_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "coefficient_of_consolidation_determined_by_the_root_time_method": { + "name": "coefficient_of_consolidation_determined_by_the_root_time_method", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "coefficient_of_consolidation_determined_by_the_log_time_method": { + "name": "coefficient_of_consolidation_determined_by_the_log_time_method", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "average_temperature_over_stress_increment": { + "name": "average_temperature_over_stress_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "consolidation_tests_general_id": { + "name": "consolidation_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "consolidation_tests_data_consolidation_tests_general_id_consolidation_tests_general_id_fk": { + "name": "consolidation_tests_data_consolidation_tests_general_id_consolidation_tests_general_id_fk", + "tableFrom": "consolidation_tests_data", + "tableTo": "consolidation_tests_general", + "columnsFrom": [ + "consolidation_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_consolidation_tests_data": { + "name": "unique_consolidation_tests_data", + "nullsNotDistinct": false, + "columns": [ + "consolidation_tests_general_id", + "oedometer_stress_increment" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.consolidation_tests_general": { + "name": "consolidation_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_consolidation_test": { + "name": "type_of_consolidation_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "test_specimen_diameter": { + "name": "test_specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_specimen_height": { + "name": "test_specimen_height", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_water_moisture_content": { + "name": "initial_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "final_water_moisture_content": { + "name": "final_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_bulk_density": { + "name": "initial_bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "particle_density_with_prefix_if_value_assumed": { + "name": "particle_density_with_prefix_if_value_assumed", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_degree_of_saturation": { + "name": "initial_degree_of_saturation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "swelling_pressure": { + "name": "swelling_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "height_change_of_specimen_on_saturation": { + "name": "height_change_of_specimen_on_saturation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_voids_ratio": { + "name": "initial_voids_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result": { + "name": "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviations_from_the_test_method": { + "name": "deviations_from_the_test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_water_moisture_content_source": { + "name": "initial_water_moisture_content_source", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "results_corrected_for_equipment_deformation": { + "name": "results_corrected_for_equipment_deformation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_consolidation_tests_general_abbr": { + "name": "idx_consolidation_tests_general_abbr", + "columns": [ + { + "expression": "type_of_consolidation_test", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sample_condition", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "consolidation_tests_general_type_of_consolidation_test_abbreviation_id_fk": { + "name": "consolidation_tests_general_type_of_consolidation_test_abbreviation_id_fk", + "tableFrom": "consolidation_tests_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_consolidation_test" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "consolidation_tests_general_sample_condition_abbreviation_id_fk": { + "name": "consolidation_tests_general_sample_condition_abbreviation_id_fk", + "tableFrom": "consolidation_tests_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "sample_condition" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "consolidation_tests_general_sample_information_id_sample_information_id_fk": { + "name": "consolidation_tests_general_sample_information_id_sample_information_id_fk", + "tableFrom": "consolidation_tests_general", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_consolidation_tests_general": { + "name": "unique_consolidation_tests_general", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.coring_information": { + "name": "coring_information", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_core_run": { + "name": "depth_to_top_of_core_run", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_core_run": { + "name": "depth_to_base_of_core_run", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "percentage_of_core_recovered_in_core_run_tcr": { + "name": "percentage_of_core_recovered_in_core_run_tcr", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "percentage_of_solid_core_recovered_in_core_run_scr": { + "name": "percentage_of_solid_core_recovered_in_core_run_scr", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "rock_quality_designation_for_core_run_rqd": { + "name": "rock_quality_designation_for_core_run_rqd", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "core_diameter": { + "name": "core_diameter", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "time_taken_to_drill_core_run": { + "name": "time_taken_to_drill_core_run", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_photographs_of_rock_cores": { + "name": "associated_file_reference_e_g_photographs_of_rock_cores", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "coring_information_location_details_id_location_details_id_fk": { + "name": "coring_information_location_details_id_location_details_id_fk", + "tableFrom": "coring_information", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_coring_information": { + "name": "unique_coring_information", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_core_run", + "depth_to_base_of_core_run" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.cyclic_triaxial_test_derived_parameters": { + "name": "cyclic_triaxial_test_derived_parameters", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "cycle_number": { + "name": "cycle_number", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cycle_number_of_failure": { + "name": "cycle_number_of_failure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "maximum_excess_porewater_pressure": { + "name": "maximum_excess_porewater_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "minimum_excess_porewater_pressure": { + "name": "minimum_excess_porewater_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "maximum_shear_stress": { + "name": "maximum_shear_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "minimum_shear_stress": { + "name": "minimum_shear_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mean_shear_stress": { + "name": "mean_shear_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "cyclic_shear_stress_max_min_2": { + "name": "cyclic_shear_stress_max_min_2", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "average_cyclic_axial_stress": { + "name": "average_cyclic_axial_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "axial_strain_at_failure": { + "name": "axial_strain_at_failure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "porewater_pressure_at_failure": { + "name": "porewater_pressure_at_failure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "maximum_deviatoric_stress": { + "name": "maximum_deviatoric_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "minimum_deviatoric_stress": { + "name": "minimum_deviatoric_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mean_effective_stress_at_end_of_ctrd_cyc": { + "name": "mean_effective_stress_at_end_of_ctrd_cyc", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "maximum_axial_strain": { + "name": "maximum_axial_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "minimum_axial_strain": { + "name": "minimum_axial_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "final_voids_ratio": { + "name": "final_voids_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviatoric_stress_at_maximum_axial_strain": { + "name": "deviatoric_stress_at_maximum_axial_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviatoric_stress_at_minimum_axial_strain": { + "name": "deviatoric_stress_at_minimum_axial_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "secant_modulus": { + "name": "secant_modulus", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "damping_ratio": { + "name": "damping_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mode_of_failure": { + "name": "mode_of_failure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "percent_difference_from_programmed_load": { + "name": "percent_difference_from_programmed_load", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "observed_performance_visual": { + "name": "observed_performance_visual", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "cyclic_triaxial_tests_consolidation_id": { + "name": "cyclic_triaxial_tests_consolidation_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "cyclic_triaxial_test_derived_parameters_cyclic_triaxial_tests_consolidation_id_cyclic_triaxial_tests_consolidation_id_fk": { + "name": "cyclic_triaxial_test_derived_parameters_cyclic_triaxial_tests_consolidation_id_cyclic_triaxial_tests_consolidation_id_fk", + "tableFrom": "cyclic_triaxial_test_derived_parameters", + "tableTo": "cyclic_triaxial_tests_consolidation", + "columnsFrom": [ + "cyclic_triaxial_tests_consolidation_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_cyclic_triaxial_test_derived_parameters": { + "name": "unique_cyclic_triaxial_test_derived_parameters", + "nullsNotDistinct": false, + "columns": [ + "cyclic_triaxial_tests_consolidation_id", + "cycle_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.cyclic_triaxial_test_general": { + "name": "cyclic_triaxial_test_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_preparation_technique_used": { + "name": "specimen_preparation_technique_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_test": { + "name": "type_of_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "initial_water_moisture_content": { + "name": "initial_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "final_water_moisture_content": { + "name": "final_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description_of_type_of_water_used_for_filter_flushing": { + "name": "description_of_type_of_water_used_for_filter_flushing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "saturation_back_pressure": { + "name": "saturation_back_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_degree_of_saturation_after_back_pressure": { + "name": "initial_degree_of_saturation_after_back_pressure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "initial_sample_relative_density": { + "name": "initial_sample_relative_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_specimen_diameter": { + "name": "initial_specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_height_of_specimen": { + "name": "initial_height_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "total_mass_of_installed_specimen": { + "name": "total_mass_of_installed_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "particle_density_with_prefix_if_value_assumed": { + "name": "particle_density_with_prefix_if_value_assumed", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "maximum_density_of_sand": { + "name": "maximum_density_of_sand", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "minimum_density_of_sand": { + "name": "minimum_density_of_sand", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_bulk_density": { + "name": "initial_bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_voids_ratio": { + "name": "initial_voids_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "method_of_saturation": { + "name": "method_of_saturation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_duration": { + "name": "test_duration", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "deviations_from_the_test_method": { + "name": "deviations_from_the_test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_cyclic_triaxial_test_general_abbr": { + "name": "idx_cyclic_triaxial_test_general_abbr", + "columns": [ + { + "expression": "type_of_test", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "cyclic_triaxial_test_general_type_of_test_abbreviation_id_fk": { + "name": "cyclic_triaxial_test_general_type_of_test_abbreviation_id_fk", + "tableFrom": "cyclic_triaxial_test_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_test" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "cyclic_triaxial_test_general_sample_information_id_sample_information_id_fk": { + "name": "cyclic_triaxial_test_general_sample_information_id_sample_information_id_fk", + "tableFrom": "cyclic_triaxial_test_general", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_cyclic_triaxial_test_general": { + "name": "unique_cyclic_triaxial_test_general", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.cyclic_triaxial_tests_consolidation": { + "name": "cyclic_triaxial_tests_consolidation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_stage_number": { + "name": "test_stage_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "final_cell_pressure": { + "name": "final_cell_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "base_porewater_pressure": { + "name": "base_porewater_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mid_height_porewater_pressure": { + "name": "mid_height_porewater_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mid_height_b_value": { + "name": "mid_height_b_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "base_b_value": { + "name": "base_b_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_consolidation": { + "name": "type_of_consolidation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "final_back_pressure": { + "name": "final_back_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "duration_of_test_stage_number": { + "name": "duration_of_test_stage_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_height_at_end_of_stage": { + "name": "specimen_height_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter_at_end_of_stage": { + "name": "specimen_diameter_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "water_content_at_end_of_stage": { + "name": "water_content_at_end_of_stage", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "bulk_density_at_end_of_stage": { + "name": "bulk_density_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "dry_density_at_end_of_stage": { + "name": "dry_density_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "relative_density_index_of_sand_at_end_of_stage": { + "name": "relative_density_index_of_sand_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "voids_ratio_at_end_of_stage": { + "name": "voids_ratio_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "effective_axial_stress_at_end_of_stage": { + "name": "effective_axial_stress_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "effective_radial_stress_at_end_of_stage": { + "name": "effective_radial_stress_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "shear_stress_at_end_of_stage": { + "name": "shear_stress_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviatoric_stress_at_end_of_stage": { + "name": "deviatoric_stress_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mean_effective_stress_at_end_of_stage": { + "name": "mean_effective_stress_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "ratio_of_radial_to_axial_effective_stress_at_end_of_stage": { + "name": "ratio_of_radial_to_axial_effective_stress_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "external_axial_strain_at_end_of_stage": { + "name": "external_axial_strain_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "volumetric_strain_from_measured_volume_change_at_end_of_stage": { + "name": "volumetric_strain_from_measured_volume_change_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "radial_strain_from_measured_volume_change_at_end_of_stage": { + "name": "radial_strain_from_measured_volume_change_at_end_of_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "b_value": { + "name": "b_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "bender_element_test_sequence": { + "name": "bender_element_test_sequence", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "bender_element_axis_of_measurement": { + "name": "bender_element_axis_of_measurement", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "distance_between_bender_elements": { + "name": "distance_between_bender_elements", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "measured_arrival_time_of_propagated_wave": { + "name": "measured_arrival_time_of_propagated_wave", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "method_of_measuring_arrival_time_of_propagated_wave": { + "name": "method_of_measuring_arrival_time_of_propagated_wave", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "calculated_shear_wave_velocity": { + "name": "calculated_shear_wave_velocity", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "shear_modulus_gmax": { + "name": "shear_modulus_gmax", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference": { + "name": "associated_file_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "cyclic_triaxial_test_general_id": { + "name": "cyclic_triaxial_test_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_cyclic_triaxial_tests_consolidation_abbr": { + "name": "idx_cyclic_triaxial_tests_consolidation_abbr", + "columns": [ + { + "expression": "type_of_consolidation", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "bender_element_axis_of_measurement", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "cyclic_triaxial_tests_consolidation_type_of_consolidation_abbreviation_id_fk": { + "name": "cyclic_triaxial_tests_consolidation_type_of_consolidation_abbreviation_id_fk", + "tableFrom": "cyclic_triaxial_tests_consolidation", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_consolidation" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "cyclic_triaxial_tests_consolidation_bender_element_axis_of_measurement_abbreviation_id_fk": { + "name": "cyclic_triaxial_tests_consolidation_bender_element_axis_of_measurement_abbreviation_id_fk", + "tableFrom": "cyclic_triaxial_tests_consolidation", + "tableTo": "abbreviation", + "columnsFrom": [ + "bender_element_axis_of_measurement" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "cyclic_triaxial_tests_consolidation_cyclic_triaxial_test_general_id_cyclic_triaxial_test_general_id_fk": { + "name": "cyclic_triaxial_tests_consolidation_cyclic_triaxial_test_general_id_cyclic_triaxial_test_general_id_fk", + "tableFrom": "cyclic_triaxial_tests_consolidation", + "tableTo": "cyclic_triaxial_test_general", + "columnsFrom": [ + "cyclic_triaxial_test_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_cyclic_triaxial_tests_consolidation": { + "name": "unique_cyclic_triaxial_tests_consolidation", + "nullsNotDistinct": false, + "columns": [ + "cyclic_triaxial_test_general_id", + "test_stage_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.cyclic_triaxial_tests_data": { + "name": "cyclic_triaxial_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "date_time_of_reading": { + "name": "date_time_of_reading", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "test_conditions": { + "name": "test_conditions", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_height": { + "name": "specimen_height", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "cell_pressure": { + "name": "cell_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "base_porewater_pressure": { + "name": "base_porewater_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mid_plane_porewater_pressure": { + "name": "mid_plane_porewater_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "external_axial_strain": { + "name": "external_axial_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "local_axial_strain_1": { + "name": "local_axial_strain_1", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "local_axial_strain_2": { + "name": "local_axial_strain_2", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "volumetric_strain": { + "name": "volumetric_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "radial_strain": { + "name": "radial_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "shear_strain": { + "name": "shear_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "shear_stress": { + "name": "shear_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviatoric_stress": { + "name": "deviatoric_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "principal_stress_difference": { + "name": "principal_stress_difference", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mean_effective_stress": { + "name": "mean_effective_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "secant_young_s_modulus_local": { + "name": "secant_young_s_modulus_local", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "tangent_young_s_modulus": { + "name": "tangent_young_s_modulus", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "loading_frequency": { + "name": "loading_frequency", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "cyclic_amplitude": { + "name": "cyclic_amplitude", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "double_amplitude_axial_strain": { + "name": "double_amplitude_axial_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "compression_extension_stress_ratio": { + "name": "compression_extension_stress_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "excess_mid_plane_pore_pressure_ratio": { + "name": "excess_mid_plane_pore_pressure_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "excess_base_pore_pressure_ratio": { + "name": "excess_base_pore_pressure_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "cyclic_triaxial_test_derived_parameters_id": { + "name": "cyclic_triaxial_test_derived_parameters_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_cyclic_triaxial_tests_data_abbr": { + "name": "idx_cyclic_triaxial_tests_data_abbr", + "columns": [ + { + "expression": "test_conditions", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "cyclic_triaxial_tests_data_test_conditions_abbreviation_id_fk": { + "name": "cyclic_triaxial_tests_data_test_conditions_abbreviation_id_fk", + "tableFrom": "cyclic_triaxial_tests_data", + "tableTo": "abbreviation", + "columnsFrom": [ + "test_conditions" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "cyclic_triaxial_tests_data_cyclic_triaxial_test_derived_parameters_id_cyclic_triaxial_test_derived_parameters_id_fk": { + "name": "cyclic_triaxial_tests_data_cyclic_triaxial_test_derived_parameters_id_cyclic_triaxial_test_derived_parameters_id_fk", + "tableFrom": "cyclic_triaxial_tests_data", + "tableTo": "cyclic_triaxial_test_derived_parameters", + "columnsFrom": [ + "cyclic_triaxial_test_derived_parameters_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_cyclic_triaxial_tests_data": { + "name": "unique_cyclic_triaxial_tests_data", + "nullsNotDistinct": false, + "columns": [ + "cyclic_triaxial_test_derived_parameters_id" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.cyclic_triaxial_tests_saturation": { + "name": "cyclic_triaxial_tests_saturation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_stage_number": { + "name": "test_stage_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "saturation_cell_pressure": { + "name": "saturation_cell_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "saturation_base_porewater_pressure": { + "name": "saturation_base_porewater_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "saturation_mid_height_porewater_pressure": { + "name": "saturation_mid_height_porewater_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "saturation_mid_height_b_value": { + "name": "saturation_mid_height_b_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "saturation_base_b_value": { + "name": "saturation_base_b_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "saturation_method": { + "name": "saturation_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "final_saturation": { + "name": "final_saturation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "cyclic_triaxial_test_general_id": { + "name": "cyclic_triaxial_test_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "cyclic_triaxial_tests_saturation_cyclic_triaxial_test_general_id_cyclic_triaxial_test_general_id_fk": { + "name": "cyclic_triaxial_tests_saturation_cyclic_triaxial_test_general_id_cyclic_triaxial_test_general_id_fk", + "tableFrom": "cyclic_triaxial_tests_saturation", + "tableTo": "cyclic_triaxial_test_general", + "columnsFrom": [ + "cyclic_triaxial_test_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_cyclic_triaxial_tests_saturation": { + "name": "unique_cyclic_triaxial_tests_saturation", + "nullsNotDistinct": false, + "columns": [ + "cyclic_triaxial_test_general_id", + "test_stage_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.density_tests": { + "name": "density_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_test_performed": { + "name": "type_of_test_performed", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type_of_sample": { + "name": "type_of_sample", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content": { + "name": "water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "bulk_density": { + "name": "bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "dry_density": { + "name": "dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_size_if_less_than_50cm3_and_any_deviation_from_the_specified_procedure": { + "name": "specimen_size_if_less_than_50cm3_and_any_deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_density_tests_abbr": { + "name": "idx_density_tests_abbr", + "columns": [ + { + "expression": "type_of_test_performed", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sample_condition", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type_of_sample", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "density_tests_type_of_test_performed_abbreviation_id_fk": { + "name": "density_tests_type_of_test_performed_abbreviation_id_fk", + "tableFrom": "density_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_test_performed" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "density_tests_sample_condition_abbreviation_id_fk": { + "name": "density_tests_sample_condition_abbreviation_id_fk", + "tableFrom": "density_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "sample_condition" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "density_tests_type_of_sample_abbreviation_id_fk": { + "name": "density_tests_type_of_sample_abbreviation_id_fk", + "tableFrom": "density_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_sample" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "density_tests_sample_information_id_sample_information_id_fk": { + "name": "density_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "density_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_density_tests": { + "name": "unique_density_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.depth_related_exploratory_hole_information": { + "name": "depth_related_exploratory_hole_information", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_section": { + "name": "depth_to_top_of_section", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_section": { + "name": "depth_to_base_of_section", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_depth_related_information": { + "name": "type_of_depth_related_information", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "date_and_time_of_start_of_section": { + "name": "date_and_time_of_start_of_section", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "date_and_time_of_end_of_section": { + "name": "date_and_time_of_end_of_section", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "name_of_rig_drill_crew_operator": { + "name": "name_of_rig_drill_crew_operator", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "plant_used": { + "name": "plant_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "shoring_support_used": { + "name": "shoring_support_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stability_of_trial_pit_trial_trench_or_logged_traverse_length": { + "name": "stability_of_trial_pit_trial_trench_or_logged_traverse_length", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "trial_pit_trial_trench_or_logged_traverse_length": { + "name": "trial_pit_trial_trench_or_logged_traverse_length", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "trial_pit_trial_trench_or_logged_traverse_width": { + "name": "trial_pit_trial_trench_or_logged_traverse_width", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "drill_bit_used": { + "name": "drill_bit_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "bit_condition": { + "name": "bit_condition", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "barrel_type": { + "name": "barrel_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "barrel_length": { + "name": "barrel_length", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "definitive_person_responsible_for_logging_the_section": { + "name": "definitive_person_responsible_for_logging_the_section", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "start_date_of_hole_section_logging": { + "name": "start_date_of_hole_section_logging", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_hole_section_construction": { + "name": "details_of_weather_and_environmental_conditions_during_hole_section_construction", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_method_of_hole_section_construction": { + "name": "details_of_method_of_hole_section_construction", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "drilling_contractor": { + "name": "drilling_contractor", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_drilling_journals": { + "name": "associated_file_reference_e_g_drilling_journals", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_depth_related_exploratory_hole_information_abbr": { + "name": "idx_depth_related_exploratory_hole_information_abbr", + "columns": [ + { + "expression": "type_of_depth_related_information", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "depth_related_exploratory_hole_information_type_of_depth_related_information_abbreviation_id_fk": { + "name": "depth_related_exploratory_hole_information_type_of_depth_related_information_abbreviation_id_fk", + "tableFrom": "depth_related_exploratory_hole_information", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_depth_related_information" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "depth_related_exploratory_hole_information_location_details_id_location_details_id_fk": { + "name": "depth_related_exploratory_hole_information_location_details_id_location_details_id_fk", + "tableFrom": "depth_related_exploratory_hole_information", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_depth_related_exploratory_hole_information": { + "name": "unique_depth_related_exploratory_hole_information", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_section", + "depth_to_base_of_section", + "type_of_depth_related_information" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.depth_related_remarks": { + "name": "depth_related_remarks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_of_remark_drem_rem": { + "name": "depth_of_remark_drem_rem", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "base_depth": { + "name": "base_depth", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_related_remark": { + "name": "depth_related_remark", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_drilling_journals": { + "name": "associated_file_reference_e_g_drilling_journals", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "depth_related_remarks_location_details_id_location_details_id_fk": { + "name": "depth_related_remarks_location_details_id_location_details_id_fk", + "tableFrom": "depth_related_remarks", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_depth_related_remarks": { + "name": "unique_depth_related_remarks", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_of_remark_drem_rem", + "base_depth" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.discontinuity_data": { + "name": "discontinuity_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_in_hole": { + "name": "depth_to_top_in_hole", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_in_hole": { + "name": "depth_to_base_in_hole", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "discontinuity_set_reference": { + "name": "discontinuity_set_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discontinuity_reference": { + "name": "discontinuity_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_discontinuity": { + "name": "type_of_discontinuity", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "dip_of_discontinuity": { + "name": "dip_of_discontinuity", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "dip_direction_of_discontinuity": { + "name": "dip_direction_of_discontinuity", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "small_scale_roughness": { + "name": "small_scale_roughness", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "medium_scale_roughness": { + "name": "medium_scale_roughness", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "large_scale_roughness": { + "name": "large_scale_roughness", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "joint_roughness_coefficient": { + "name": "joint_roughness_coefficient", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "surface_appearance": { + "name": "surface_appearance", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discontinuity_aperture_measurement": { + "name": "discontinuity_aperture_measurement", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discontinuity_aperture_observation": { + "name": "discontinuity_aperture_observation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "infilling_material": { + "name": "infilling_material", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discontinuity_termination_lower": { + "name": "discontinuity_termination_lower", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "persistence_measurement": { + "name": "persistence_measurement", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "discontinuity_wall_strength": { + "name": "discontinuity_wall_strength", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "discontinuity_wall_weathering": { + "name": "discontinuity_wall_weathering", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "seepage_rating": { + "name": "seepage_rating", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "water_flow_estimate": { + "name": "water_flow_estimate", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_logging_field_sheets": { + "name": "associated_file_reference_e_g_logging_field_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_discontinuity_data_abbr": { + "name": "idx_discontinuity_data_abbr", + "columns": [ + { + "expression": "type_of_discontinuity", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "discontinuity_termination_lower", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "discontinuity_data_type_of_discontinuity_abbreviation_id_fk": { + "name": "discontinuity_data_type_of_discontinuity_abbreviation_id_fk", + "tableFrom": "discontinuity_data", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_discontinuity" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "discontinuity_data_discontinuity_termination_lower_abbreviation_id_fk": { + "name": "discontinuity_data_discontinuity_termination_lower_abbreviation_id_fk", + "tableFrom": "discontinuity_data", + "tableTo": "abbreviation", + "columnsFrom": [ + "discontinuity_termination_lower" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "discontinuity_data_location_details_id_location_details_id_fk": { + "name": "discontinuity_data_location_details_id_location_details_id_fk", + "tableFrom": "discontinuity_data", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_discontinuity_data": { + "name": "unique_discontinuity_data", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_in_hole", + "depth_to_base_in_hole", + "discontinuity_set_reference", + "discontinuity_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.driller_geological_description": { + "name": "driller_geological_description", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_drillers_stratum_description": { + "name": "depth_to_top_of_drillers_stratum_description", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_drillers_stratum_description": { + "name": "depth_to_base_of_drillers_stratum_description", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "drillers_description_of_stratum": { + "name": "drillers_description_of_stratum", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_sampling_field_sheets": { + "name": "associated_file_reference_e_g_sampling_field_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "driller_geological_description_location_details_id_location_details_id_fk": { + "name": "driller_geological_description_location_details_id_location_details_id_fk", + "tableFrom": "driller_geological_description", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_driller_geological_description": { + "name": "unique_driller_geological_description", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_drillers_stratum_description", + "depth_to_base_of_drillers_stratum_description" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.drilling_advancement_observations_parameters": { + "name": "drilling_advancement_observations_parameters", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_reported_section": { + "name": "depth_to_top_of_reported_section", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_reported_section": { + "name": "depth_to_base_of_reported_section", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "readings_set_reference": { + "name": "readings_set_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "duration_to_advance_reported_section": { + "name": "duration_to_advance_reported_section", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "date_and_time_of_start_of_reported_section": { + "name": "date_and_time_of_start_of_reported_section", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "date_and_time_at_end_of_reported_section": { + "name": "date_and_time_at_end_of_reported_section", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "drill_head_rotational_torque": { + "name": "drill_head_rotational_torque", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "drill_head_rotational_speed": { + "name": "drill_head_rotational_speed", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "penetration_rate": { + "name": "penetration_rate", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "hammering_used_during_section": { + "name": "hammering_used_during_section", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "pressure_of_downthrust_system": { + "name": "pressure_of_downthrust_system", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "pressure_of_restraining_holdback_system": { + "name": "pressure_of_restraining_holdback_system", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "torque_pressure": { + "name": "torque_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "torque_applied_to_top_of_drill_rods": { + "name": "torque_applied_to_top_of_drill_rods", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "downward_thrust_on_bit": { + "name": "downward_thrust_on_bit", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "restraining_holdback_force": { + "name": "restraining_holdback_force", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "supply_pressure_to_downhole_hammer": { + "name": "supply_pressure_to_downhole_hammer", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specific_energy": { + "name": "specific_energy", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "flushing_medium_pressure_at_the_output_of_the_pump_over_flush_zone": { + "name": "flushing_medium_pressure_at_the_output_of_the_pump_over_flush_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "flushing_medium_circulation_rate_input_over_flush_zone": { + "name": "flushing_medium_circulation_rate_input_over_flush_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "flushing_medium_recovery_rate_over_flush_zone": { + "name": "flushing_medium_recovery_rate_over_flush_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_drilling_journals_or_log_files": { + "name": "associated_file_reference_e_g_drilling_journals_or_log_files", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "drilling_advancement_observations_parameters_location_details_id_location_details_id_fk": { + "name": "drilling_advancement_observations_parameters_location_details_id_location_details_id_fk", + "tableFrom": "drilling_advancement_observations_parameters", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_drilling_advancement_observations_parameters": { + "name": "unique_drilling_advancement_observations_parameters", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_reported_section", + "depth_to_base_of_reported_section", + "readings_set_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.drilling_flush_details": { + "name": "drilling_flush_details", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_flush_zone": { + "name": "depth_to_top_of_flush_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_bottom_of_flush_zone": { + "name": "depth_to_bottom_of_flush_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_flush": { + "name": "type_of_flush", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "flush_return_minimum_as_percentage": { + "name": "flush_return_minimum_as_percentage", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "flush_return_maximum_as_percentage": { + "name": "flush_return_maximum_as_percentage", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "colour_of_flush_return": { + "name": "colour_of_flush_return", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_drilling_journal": { + "name": "associated_file_reference_e_g_drilling_journal", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_drilling_flush_details_abbr": { + "name": "idx_drilling_flush_details_abbr", + "columns": [ + { + "expression": "type_of_flush", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "drilling_flush_details_type_of_flush_abbreviation_id_fk": { + "name": "drilling_flush_details_type_of_flush_abbreviation_id_fk", + "tableFrom": "drilling_flush_details", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_flush" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "drilling_flush_details_location_details_id_location_details_id_fk": { + "name": "drilling_flush_details_location_details_id_location_details_id_fk", + "tableFrom": "drilling_flush_details", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_drilling_flush_details": { + "name": "unique_drilling_flush_details", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_flush_zone", + "depth_to_bottom_of_flush_zone" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.dynamic_cone_penetrometer_tests_data": { + "name": "dynamic_cone_penetrometer_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "cumulative_blows": { + "name": "cumulative_blows", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "penetration_at_dcpt_cblo": { + "name": "penetration_at_dcpt_cblo", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "delay_before_increment_started": { + "name": "delay_before_increment_started", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_reading_remarks": { + "name": "test_reading_remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "dynamic_cone_penetrometer_tests_general_id": { + "name": "dynamic_cone_penetrometer_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "dynamic_cone_penetrometer_tests_data_dynamic_cone_penetrometer_tests_general_id_dynamic_cone_penetrometer_tests_general_id_fk": { + "name": "dynamic_cone_penetrometer_tests_data_dynamic_cone_penetrometer_tests_general_id_dynamic_cone_penetrometer_tests_general_id_fk", + "tableFrom": "dynamic_cone_penetrometer_tests_data", + "tableTo": "dynamic_cone_penetrometer_tests_general", + "columnsFrom": [ + "dynamic_cone_penetrometer_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_dynamic_cone_penetrometer_tests_data": { + "name": "unique_dynamic_cone_penetrometer_tests_data", + "nullsNotDistinct": false, + "columns": [ + "dynamic_cone_penetrometer_tests_general_id", + "cumulative_blows" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.dynamic_cone_penetrometer_tests_general": { + "name": "dynamic_cone_penetrometer_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_from_surface_to_start_of_test": { + "name": "depth_from_surface_to_start_of_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "zero_reading": { + "name": "zero_reading", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "details_of_surface_and_base_layers_removed_prior_to_during_the_test_if_applicable": { + "name": "details_of_surface_and_base_layers_removed_prior_to_during_the_test_if_applicable", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_remarks": { + "name": "test_remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_field_record_sheets": { + "name": "associated_file_reference_e_g_field_record_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "dynamic_cone_penetrometer_tests_general_location_details_id_location_details_id_fk": { + "name": "dynamic_cone_penetrometer_tests_general_location_details_id_location_details_id_fk", + "tableFrom": "dynamic_cone_penetrometer_tests_general", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_dynamic_cone_penetrometer_tests_general": { + "name": "unique_dynamic_cone_penetrometer_tests_general", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "test_date", + "test_reference", + "depth_from_surface_to_start_of_test" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.dynamic_probe_tests_data": { + "name": "dynamic_probe_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_start_of_dynamic_probe_increment": { + "name": "depth_to_start_of_dynamic_probe_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "dynamic_probe_blows_for_increment_dprb_inc": { + "name": "dynamic_probe_blows_for_increment_dprb_inc", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cumulative_blows_for_test": { + "name": "cumulative_blows_for_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "maximum_torque_required_to_rotate_rods": { + "name": "maximum_torque_required_to_rotate_rods", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "delay_before_increment_started": { + "name": "delay_before_increment_started", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "dynamic_probe_increment": { + "name": "dynamic_probe_increment", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "notes_on_events_during_increment": { + "name": "notes_on_events_during_increment", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference": { + "name": "associated_file_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "dynamic_probe_tests_general_id": { + "name": "dynamic_probe_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "dynamic_probe_tests_data_dynamic_probe_tests_general_id_dynamic_probe_tests_general_id_fk": { + "name": "dynamic_probe_tests_data_dynamic_probe_tests_general_id_dynamic_probe_tests_general_id_fk", + "tableFrom": "dynamic_probe_tests_data", + "tableTo": "dynamic_probe_tests_general", + "columnsFrom": [ + "dynamic_probe_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_dynamic_probe_tests_data": { + "name": "unique_dynamic_probe_tests_data", + "nullsNotDistinct": false, + "columns": [ + "dynamic_probe_tests_general_id", + "depth_to_start_of_dynamic_probe_increment" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.dynamic_probe_tests_general": { + "name": "dynamic_probe_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "dynamic_probe_type": { + "name": "dynamic_probe_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hammer_mass": { + "name": "hammer_mass", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "standard_drop": { + "name": "standard_drop", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cone_base_diameter": { + "name": "cone_base_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "rod_diameter": { + "name": "rod_diameter", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type_of_anvil": { + "name": "type_of_anvil", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_anvil_damper": { + "name": "type_of_anvil_damper", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_of_cone_if_left_in_ground": { + "name": "depth_of_cone_if_left_in_ground", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "cone_angle": { + "name": "cone_angle", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "rod_mass": { + "name": "rod_mass", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "precautions_against_rod_friction": { + "name": "precautions_against_rod_friction", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "pre_drilling_if_used": { + "name": "pre_drilling_if_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "blow_count_frequency": { + "name": "blow_count_frequency", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "groundwater_level": { + "name": "groundwater_level", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "reasons_for_early_end_of_test": { + "name": "reasons_for_early_end_of_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_dynamic_probe_tests_general_abbr": { + "name": "idx_dynamic_probe_tests_general_abbr", + "columns": [ + { + "expression": "dynamic_probe_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "dynamic_probe_tests_general_dynamic_probe_type_abbreviation_id_fk": { + "name": "dynamic_probe_tests_general_dynamic_probe_type_abbreviation_id_fk", + "tableFrom": "dynamic_probe_tests_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "dynamic_probe_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "dynamic_probe_tests_general_location_details_id_location_details_id_fk": { + "name": "dynamic_probe_tests_general_location_details_id_location_details_id_fk", + "tableFrom": "dynamic_probe_tests_general", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_dynamic_probe_tests_general": { + "name": "unique_dynamic_probe_tests_general", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.dynamic_testing": { + "name": "dynamic_testing", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "p_wave_velocity": { + "name": "p_wave_velocity", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "s_wave_velocity": { + "name": "s_wave_velocity", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "dynamic_elastic_modulus": { + "name": "dynamic_elastic_modulus", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "shear_modulus_derived_from_ldyn_swav": { + "name": "shear_modulus_derived_from_ldyn_swav", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "dynamic_testing_sample_information_id_sample_information_id_fk": { + "name": "dynamic_testing_sample_information_id_sample_information_id_fk", + "tableFrom": "dynamic_testing", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_dynamic_testing": { + "name": "unique_dynamic_testing", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.effective_stress_consolidation_tests_data": { + "name": "effective_stress_consolidation_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "consolidation_stage_number": { + "name": "consolidation_stage_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "additional_stage_specific_details": { + "name": "additional_stage_specific_details", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cell_or_diaphragm_pressure_applied_during_stage": { + "name": "cell_or_diaphragm_pressure_applied_during_stage", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "back_pressure_applied_during_stage": { + "name": "back_pressure_applied_during_stage", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "pore_pressure_at_end_of_undrained_loading": { + "name": "pore_pressure_at_end_of_undrained_loading", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "pore_pressure_at_end_of_consolidation_stage": { + "name": "pore_pressure_at_end_of_consolidation_stage", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "effective_stress_at_end_of_consolidation_stage": { + "name": "effective_stress_at_end_of_consolidation_stage", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "voids_ratio_at_start_of_increment": { + "name": "voids_ratio_at_start_of_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "voids_ratio_at_end_of_stress_increment": { + "name": "voids_ratio_at_end_of_stress_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "percentage_pore_pressure_dissipation_at_end_of_stage": { + "name": "percentage_pore_pressure_dissipation_at_end_of_stage", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "settlement_measured_during_consolidation_stage": { + "name": "settlement_measured_during_consolidation_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "volume_change_measured_during_consolidation_stage": { + "name": "volume_change_measured_during_consolidation_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "reported_coefficient_of_volume_compressibility_over_stress_increment": { + "name": "reported_coefficient_of_volume_compressibility_over_stress_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "reported_coefficient_of_consolidation_over_stress_increment": { + "name": "reported_coefficient_of_consolidation_over_stress_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "coefficient_of_secondary_compression_over_stress_increment": { + "name": "coefficient_of_secondary_compression_over_stress_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "method_used_for_deriving_cv": { + "name": "method_used_for_deriving_cv", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "average_temperature_over_stress_increment": { + "name": "average_temperature_over_stress_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "permeability_over_stress_increment_t90": { + "name": "permeability_over_stress_increment_t90", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "effective_stress_consolidation_tests_general_id": { + "name": "effective_stress_consolidation_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "effective_stress_consolidation_tests_data_effective_stress_consolidation_tests_general_id_effective_stress_consolidation_tests_general_id_fk": { + "name": "effective_stress_consolidation_tests_data_effective_stress_consolidation_tests_general_id_effective_stress_consolidation_tests_general_id_fk", + "tableFrom": "effective_stress_consolidation_tests_data", + "tableTo": "effective_stress_consolidation_tests_general", + "columnsFrom": [ + "effective_stress_consolidation_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_effective_stress_consolidation_tests_data": { + "name": "unique_effective_stress_consolidation_tests_data", + "nullsNotDistinct": false, + "columns": [ + "effective_stress_consolidation_tests_general_id", + "consolidation_stage_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.effective_stress_consolidation_tests_general": { + "name": "effective_stress_consolidation_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_type": { + "name": "test_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type_of_equipment_used": { + "name": "type_of_equipment_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "test_specimen_diameter": { + "name": "test_specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_specimen_height": { + "name": "test_specimen_height", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_water_moisture_content": { + "name": "initial_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "final_water_moisture_content": { + "name": "final_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_bulk_density": { + "name": "initial_bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "final_bulk_density": { + "name": "final_bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "particle_density_with_prefix_if_value_assumed": { + "name": "particle_density_with_prefix_if_value_assumed", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_voids_ratio": { + "name": "initial_voids_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_degree_of_saturation": { + "name": "initial_degree_of_saturation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type_of_loading_strain": { + "name": "type_of_loading_strain", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_drainage": { + "name": "type_of_drainage", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "pore_pressure_measurement_location": { + "name": "pore_pressure_measurement_location", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "swelling_pressure": { + "name": "swelling_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "method_of_saturation": { + "name": "method_of_saturation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "saturation_increments": { + "name": "saturation_increments", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "differential_pressure_during_saturation": { + "name": "differential_pressure_during_saturation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cell_or_diaphragm_pressure_at_end_of_saturation": { + "name": "cell_or_diaphragm_pressure_at_end_of_saturation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "back_pressure_at_end_of_saturation": { + "name": "back_pressure_at_end_of_saturation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "b_value_at_end_of_saturation": { + "name": "b_value_at_end_of_saturation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "volume_of_water_taken_in_during_saturation": { + "name": "volume_of_water_taken_in_during_saturation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result": { + "name": "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviations_from_the_test_method": { + "name": "deviations_from_the_test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "voids_ratio_at_in_situ_vertical_stress": { + "name": "voids_ratio_at_in_situ_vertical_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "in_situ_vertical_effective_stress": { + "name": "in_situ_vertical_effective_stress", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "axial_strain_at_in_situ_vertical_effective_stress": { + "name": "axial_strain_at_in_situ_vertical_effective_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "preconsolidation_stress_yield_stress": { + "name": "preconsolidation_stress_yield_stress", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "yield_stress_ratio_based_on_casagrande_method": { + "name": "yield_stress_ratio_based_on_casagrande_method", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "compression_index_over_stress_increment": { + "name": "compression_index_over_stress_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "swelling_index_over_stress_increment": { + "name": "swelling_index_over_stress_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_effective_stress_consolidation_tests_general_abbr": { + "name": "idx_effective_stress_consolidation_tests_general_abbr", + "columns": [ + { + "expression": "test_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sample_condition", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "effective_stress_consolidation_tests_general_test_type_abbreviation_id_fk": { + "name": "effective_stress_consolidation_tests_general_test_type_abbreviation_id_fk", + "tableFrom": "effective_stress_consolidation_tests_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "test_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "effective_stress_consolidation_tests_general_sample_condition_abbreviation_id_fk": { + "name": "effective_stress_consolidation_tests_general_sample_condition_abbreviation_id_fk", + "tableFrom": "effective_stress_consolidation_tests_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "sample_condition" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "effective_stress_consolidation_tests_general_sample_information_id_sample_information_id_fk": { + "name": "effective_stress_consolidation_tests_general_sample_information_id_sample_information_id_fk", + "tableFrom": "effective_stress_consolidation_tests_general", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_effective_stress_consolidation_tests_general": { + "name": "unique_effective_stress_consolidation_tests_general", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.environmental_contaminant_testing": { + "name": "environmental_contaminant_testing", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "laboratory_specimen_reference_or_laboratory_id": { + "name": "laboratory_specimen_reference_or_laboratory_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "chemical_code": { + "name": "chemical_code", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "laboratory_test_matrix": { + "name": "laboratory_test_matrix", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "run_type_initial_or_reanalysis": { + "name": "run_type_initial_or_reanalysis", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "chemical_name": { + "name": "chemical_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "laboratory_analytical_test_name": { + "name": "laboratory_analytical_test_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "result_value": { + "name": "result_value", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "result_unit": { + "name": "result_unit", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "reported_result": { + "name": "reported_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "result_type": { + "name": "result_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "reportable_result": { + "name": "reportable_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "detect_flag": { + "name": "detect_flag", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "organic": { + "name": "organic", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "interpreted_qualifiers": { + "name": "interpreted_qualifiers", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "laboratory_qualifiers": { + "name": "laboratory_qualifiers", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reporting_detection_limit": { + "name": "reporting_detection_limit", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "method_detection_limit": { + "name": "method_detection_limit", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "quantification_limit": { + "name": "quantification_limit", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "unit_of_detection_quantification_limits": { + "name": "unit_of_detection_quantification_limits", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "tentatively_identified_compound_tic_probability": { + "name": "tentatively_identified_compound_tic_probability", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "tentatively_identified_compound_tic_retention_time": { + "name": "tentatively_identified_compound_tic_retention_time", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sample_receipt_date_at_laboratory": { + "name": "sample_receipt_date_at_laboratory", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "sample_delivery_or_batch_code": { + "name": "sample_delivery_or_batch_code", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "analysis_date_and_time_date": { + "name": "analysis_date_and_time_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "test_name_as_defined_in_lbst_test_during_electronic_scheduling": { + "name": "test_name_as_defined_in_lbst_test_during_electronic_scheduling", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "total_or_dissolved": { + "name": "total_or_dissolved", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "analysis_location": { + "name": "analysis_location", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "basis": { + "name": "basis", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "dilution_factor": { + "name": "dilution_factor", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "leachate_preparation_method": { + "name": "leachate_preparation_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "leachate_preparation_date_and_time": { + "name": "leachate_preparation_date_and_time", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "instrument_reference_no_or_identifier": { + "name": "instrument_reference_no_or_identifier", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "size_of_material_removed_prior_to_test_value_given_indicates_lowest_sized_material_removed": { + "name": "size_of_material_removed_prior_to_test_value_given_indicates_lowest_sized_material_removed", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "percentage_of_material_removed": { + "name": "percentage_of_material_removed", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_environmental_contaminant_testing_abbr": { + "name": "idx_environmental_contaminant_testing_abbr", + "columns": [ + { + "expression": "chemical_code", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "laboratory_test_matrix", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "run_type_initial_or_reanalysis", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "result_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "analysis_location", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "basis", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "environmental_contaminant_testing_chemical_code_abbreviation_id_fk": { + "name": "environmental_contaminant_testing_chemical_code_abbreviation_id_fk", + "tableFrom": "environmental_contaminant_testing", + "tableTo": "abbreviation", + "columnsFrom": [ + "chemical_code" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "environmental_contaminant_testing_laboratory_test_matrix_abbreviation_id_fk": { + "name": "environmental_contaminant_testing_laboratory_test_matrix_abbreviation_id_fk", + "tableFrom": "environmental_contaminant_testing", + "tableTo": "abbreviation", + "columnsFrom": [ + "laboratory_test_matrix" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "environmental_contaminant_testing_run_type_initial_or_reanalysis_abbreviation_id_fk": { + "name": "environmental_contaminant_testing_run_type_initial_or_reanalysis_abbreviation_id_fk", + "tableFrom": "environmental_contaminant_testing", + "tableTo": "abbreviation", + "columnsFrom": [ + "run_type_initial_or_reanalysis" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "environmental_contaminant_testing_result_type_abbreviation_id_fk": { + "name": "environmental_contaminant_testing_result_type_abbreviation_id_fk", + "tableFrom": "environmental_contaminant_testing", + "tableTo": "abbreviation", + "columnsFrom": [ + "result_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "environmental_contaminant_testing_analysis_location_abbreviation_id_fk": { + "name": "environmental_contaminant_testing_analysis_location_abbreviation_id_fk", + "tableFrom": "environmental_contaminant_testing", + "tableTo": "abbreviation", + "columnsFrom": [ + "analysis_location" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "environmental_contaminant_testing_basis_abbreviation_id_fk": { + "name": "environmental_contaminant_testing_basis_abbreviation_id_fk", + "tableFrom": "environmental_contaminant_testing", + "tableTo": "abbreviation", + "columnsFrom": [ + "basis" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "environmental_contaminant_testing_sample_information_id_sample_information_id_fk": { + "name": "environmental_contaminant_testing_sample_information_id_sample_information_id_fk", + "tableFrom": "environmental_contaminant_testing", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_environmental_contaminant_testing": { + "name": "unique_environmental_contaminant_testing", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "laboratory_specimen_reference_or_laboratory_id", + "depth_to_top_of_test_specimen", + "chemical_code", + "test_method", + "laboratory_test_matrix", + "run_type_initial_or_reanalysis" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.environmental_laboratory_reporting": { + "name": "environmental_laboratory_reporting", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "determinand_code": { + "name": "determinand_code", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "laboratory_test_matrix": { + "name": "laboratory_test_matrix", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "run_type_initial_or_reanalysis": { + "name": "run_type_initial_or_reanalysis", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "test_additional_descriptor": { + "name": "test_additional_descriptor", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "tentatively_identified_compound_tic": { + "name": "tentatively_identified_compound_tic", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "result_unit": { + "name": "result_unit", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "laboratory_sample_id": { + "name": "laboratory_sample_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "result_type": { + "name": "result_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "interpreted_qualifiers": { + "name": "interpreted_qualifiers", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "laboratory_qualifiers": { + "name": "laboratory_qualifiers", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "result_value": { + "name": "result_value", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reported_result": { + "name": "reported_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "determinand_name": { + "name": "determinand_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "laboratory_analytical_name": { + "name": "laboratory_analytical_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "determinand_category": { + "name": "determinand_category", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "flagged_deviation": { + "name": "flagged_deviation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "result_deviation_description_s": { + "name": "result_deviation_description_s", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reportable_result": { + "name": "reportable_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "detect_flag": { + "name": "detect_flag", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "organic": { + "name": "organic", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reporting_detection_limit": { + "name": "reporting_detection_limit", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "method_detection_limit": { + "name": "method_detection_limit", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "quantification_limit": { + "name": "quantification_limit", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "unit_of_detection_quantification_limits": { + "name": "unit_of_detection_quantification_limits", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cas_code": { + "name": "cas_code", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "tentatively_identified_compound_tic_probability": { + "name": "tentatively_identified_compound_tic_probability", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "tentatively_identified_compound_tic_retention_time": { + "name": "tentatively_identified_compound_tic_retention_time", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sample_receipt_date_time_at_laboratory": { + "name": "sample_receipt_date_time_at_laboratory", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "sample_delivery_or_batch_code": { + "name": "sample_delivery_or_batch_code", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "analysis_date_and_time": { + "name": "analysis_date_and_time", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "test_or_suite_name": { + "name": "test_or_suite_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "total_or_dissolved": { + "name": "total_or_dissolved", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "analysis_location": { + "name": "analysis_location", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "basis": { + "name": "basis", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "dilution_factor": { + "name": "dilution_factor", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "leachate_preparation_method": { + "name": "leachate_preparation_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "leachate_preparation_date_and_time": { + "name": "leachate_preparation_date_and_time", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "instrument_reference_number_or_identifier": { + "name": "instrument_reference_number_or_identifier", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "instrument_type": { + "name": "instrument_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "size_of_material_removed_prior_to_test_value_given_indicates_lowest_sized_material_removed": { + "name": "size_of_material_removed_prior_to_test_value_given_indicates_lowest_sized_material_removed", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "percentage_of_material_removed": { + "name": "percentage_of_material_removed", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_environmental_laboratory_reporting_abbr": { + "name": "idx_environmental_laboratory_reporting_abbr", + "columns": [ + { + "expression": "determinand_code", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "laboratory_test_matrix", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "run_type_initial_or_reanalysis", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "test_additional_descriptor", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "result_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "analysis_location", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "basis", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "environmental_laboratory_reporting_determinand_code_abbreviation_id_fk": { + "name": "environmental_laboratory_reporting_determinand_code_abbreviation_id_fk", + "tableFrom": "environmental_laboratory_reporting", + "tableTo": "abbreviation", + "columnsFrom": [ + "determinand_code" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "environmental_laboratory_reporting_laboratory_test_matrix_abbreviation_id_fk": { + "name": "environmental_laboratory_reporting_laboratory_test_matrix_abbreviation_id_fk", + "tableFrom": "environmental_laboratory_reporting", + "tableTo": "abbreviation", + "columnsFrom": [ + "laboratory_test_matrix" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "environmental_laboratory_reporting_run_type_initial_or_reanalysis_abbreviation_id_fk": { + "name": "environmental_laboratory_reporting_run_type_initial_or_reanalysis_abbreviation_id_fk", + "tableFrom": "environmental_laboratory_reporting", + "tableTo": "abbreviation", + "columnsFrom": [ + "run_type_initial_or_reanalysis" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "environmental_laboratory_reporting_test_additional_descriptor_abbreviation_id_fk": { + "name": "environmental_laboratory_reporting_test_additional_descriptor_abbreviation_id_fk", + "tableFrom": "environmental_laboratory_reporting", + "tableTo": "abbreviation", + "columnsFrom": [ + "test_additional_descriptor" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "environmental_laboratory_reporting_result_type_abbreviation_id_fk": { + "name": "environmental_laboratory_reporting_result_type_abbreviation_id_fk", + "tableFrom": "environmental_laboratory_reporting", + "tableTo": "abbreviation", + "columnsFrom": [ + "result_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "environmental_laboratory_reporting_analysis_location_abbreviation_id_fk": { + "name": "environmental_laboratory_reporting_analysis_location_abbreviation_id_fk", + "tableFrom": "environmental_laboratory_reporting", + "tableTo": "abbreviation", + "columnsFrom": [ + "analysis_location" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "environmental_laboratory_reporting_basis_abbreviation_id_fk": { + "name": "environmental_laboratory_reporting_basis_abbreviation_id_fk", + "tableFrom": "environmental_laboratory_reporting", + "tableTo": "abbreviation", + "columnsFrom": [ + "basis" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "environmental_laboratory_reporting_sample_information_id_sample_information_id_fk": { + "name": "environmental_laboratory_reporting_sample_information_id_sample_information_id_fk", + "tableFrom": "environmental_laboratory_reporting", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_environmental_laboratory_reporting": { + "name": "unique_environmental_laboratory_reporting", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen", + "determinand_code", + "test_method", + "laboratory_test_matrix", + "run_type_initial_or_reanalysis", + "test_additional_descriptor", + "tentatively_identified_compound_tic", + "result_unit" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.exploratory_hole_backfill_details": { + "name": "exploratory_hole_backfill_details", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_section": { + "name": "depth_to_top_of_section", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_section": { + "name": "depth_to_base_of_section", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "backfill_description": { + "name": "backfill_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "backfill_legend_abbreviation": { + "name": "backfill_legend_abbreviation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "date_of_completion_of_backfill": { + "name": "date_of_completion_of_backfill", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "backfill_remarks_including_how_it_was_placed": { + "name": "backfill_remarks_including_how_it_was_placed", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_drilling_journals": { + "name": "associated_file_reference_e_g_drilling_journals", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_exploratory_hole_backfill_details_abbr": { + "name": "idx_exploratory_hole_backfill_details_abbr", + "columns": [ + { + "expression": "backfill_legend_abbreviation", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "exploratory_hole_backfill_details_backfill_legend_abbreviation_abbreviation_id_fk": { + "name": "exploratory_hole_backfill_details_backfill_legend_abbreviation_abbreviation_id_fk", + "tableFrom": "exploratory_hole_backfill_details", + "tableTo": "abbreviation", + "columnsFrom": [ + "backfill_legend_abbreviation" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "exploratory_hole_backfill_details_location_details_id_location_details_id_fk": { + "name": "exploratory_hole_backfill_details_location_details_id_location_details_id_fk", + "tableFrom": "exploratory_hole_backfill_details", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_exploratory_hole_backfill_details": { + "name": "unique_exploratory_hole_backfill_details", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_section" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.exploratory_hole_orientation_and_inclination": { + "name": "exploratory_hole_orientation_and_inclination", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_exploratory_hole_section": { + "name": "depth_to_top_of_exploratory_hole_section", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_exploratory_hole_section": { + "name": "depth_to_base_of_exploratory_hole_section", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "orientation_of_exploratory_hole_section_or_traverse_degrees_from_north": { + "name": "orientation_of_exploratory_hole_section_or_traverse_degrees_from_north", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "inclination_of_exploratory_hole_section_or_traverse_measured_positively_down_from_horizontal": { + "name": "inclination_of_exploratory_hole_section_or_traverse_measured_positively_down_from_horizontal", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks_relating_to_orientation_and_inclination_of_hole_section": { + "name": "remarks_relating_to_orientation_and_inclination_of_hole_section", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_contract_data_specification": { + "name": "associated_file_reference_e_g_contract_data_specification", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "exploratory_hole_orientation_and_inclination_location_details_id_location_details_id_fk": { + "name": "exploratory_hole_orientation_and_inclination_location_details_id_location_details_id_fk", + "tableFrom": "exploratory_hole_orientation_and_inclination", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_exploratory_hole_orientation_and_inclination": { + "name": "unique_exploratory_hole_orientation_and_inclination", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_exploratory_hole_section", + "depth_to_base_of_exploratory_hole_section" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.field_geohydraulic_testing_data": { + "name": "field_geohydraulic_testing_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_date_clock_time_of_reading": { + "name": "test_date_clock_time_of_reading", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "test_record_type": { + "name": "test_record_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "stage_number_of_multistage_test": { + "name": "stage_number_of_multistage_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "elapsed_time_of_reading_during_test_or_test_stage": { + "name": "elapsed_time_of_reading_during_test_or_test_stage", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_record_reading": { + "name": "test_record_reading", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reading_units": { + "name": "reading_units", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_record_remark": { + "name": "test_record_remark", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "field_geohydraulic_testing_instrumentation_details_id": { + "name": "field_geohydraulic_testing_instrumentation_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_field_geohydraulic_testing_data_abbr": { + "name": "idx_field_geohydraulic_testing_data_abbr", + "columns": [ + { + "expression": "test_record_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "field_geohydraulic_testing_data_test_record_type_abbreviation_id_fk": { + "name": "field_geohydraulic_testing_data_test_record_type_abbreviation_id_fk", + "tableFrom": "field_geohydraulic_testing_data", + "tableTo": "abbreviation", + "columnsFrom": [ + "test_record_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "field_geohydraulic_testing_data_field_geohydraulic_testing_instrumentation_details_id_field_geohydraulic_testing_instrumentation_details_id_fk": { + "name": "field_geohydraulic_testing_data_field_geohydraulic_testing_instrumentation_details_id_field_geohydraulic_testing_instrumentation_details_id_fk", + "tableFrom": "field_geohydraulic_testing_data", + "tableTo": "field_geohydraulic_testing_instrumentation_details", + "columnsFrom": [ + "field_geohydraulic_testing_instrumentation_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_field_geohydraulic_testing_data": { + "name": "unique_field_geohydraulic_testing_data", + "nullsNotDistinct": false, + "columns": [ + "field_geohydraulic_testing_instrumentation_details_id", + "test_date_clock_time_of_reading", + "test_record_type" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.field_geohydraulic_testing_general": { + "name": "field_geohydraulic_testing_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_test_zone": { + "name": "depth_to_top_of_test_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_test_zone": { + "name": "depth_to_base_of_test_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "diameter_of_test_zone": { + "name": "diameter_of_test_zone", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "inside_diameter_of_installation_standpipe_or_borehole_casing": { + "name": "inside_diameter_of_installation_standpipe_or_borehole_casing", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "outside_diameter_of_installation_standpipe_or_borehole_casing": { + "name": "outside_diameter_of_installation_standpipe_or_borehole_casing", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "depth_of_borehole_during_test_excluding_tests_in_installations": { + "name": "depth_of_borehole_during_test_excluding_tests_in_installations", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_of_casing_during_test_excluding_tests_in_installations": { + "name": "depth_of_casing_during_test_excluding_tests_in_installations", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "shape_factor_for_test_zone": { + "name": "shape_factor_for_test_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "shape_factor_reference": { + "name": "shape_factor_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "type_of_test": { + "name": "type_of_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "test_configuration": { + "name": "test_configuration", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_water_in_borehole_or_installation_prior_to_test": { + "name": "depth_to_water_in_borehole_or_installation_prior_to_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_assumed_standing_water_level_used_for_calculations_of_head_during_test": { + "name": "depth_to_assumed_standing_water_level_used_for_calculations_of_head_during_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "applied_total_head_of_water_at_centre_of_test_zone": { + "name": "applied_total_head_of_water_at_centre_of_test_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "average_flow_rate_during_test": { + "name": "average_flow_rate_during_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "representative_permeability_for_test": { + "name": "representative_permeability_for_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "representative_lugeon_value_for_water_pressure_test": { + "name": "representative_lugeon_value_for_water_pressure_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "flow_type_for_water_pressure_test": { + "name": "flow_type_for_water_pressure_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "test_remarks": { + "name": "test_remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_test_operator": { + "name": "name_of_test_operator", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_field_geohydraulic_testing_general_abbr": { + "name": "idx_field_geohydraulic_testing_general_abbr", + "columns": [ + { + "expression": "type_of_test", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "test_configuration", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "flow_type_for_water_pressure_test", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "field_geohydraulic_testing_general_type_of_test_abbreviation_id_fk": { + "name": "field_geohydraulic_testing_general_type_of_test_abbreviation_id_fk", + "tableFrom": "field_geohydraulic_testing_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_test" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "field_geohydraulic_testing_general_test_configuration_abbreviation_id_fk": { + "name": "field_geohydraulic_testing_general_test_configuration_abbreviation_id_fk", + "tableFrom": "field_geohydraulic_testing_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "test_configuration" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "field_geohydraulic_testing_general_flow_type_for_water_pressure_test_abbreviation_id_fk": { + "name": "field_geohydraulic_testing_general_flow_type_for_water_pressure_test_abbreviation_id_fk", + "tableFrom": "field_geohydraulic_testing_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "flow_type_for_water_pressure_test" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "field_geohydraulic_testing_general_location_details_id_location_details_id_fk": { + "name": "field_geohydraulic_testing_general_location_details_id_location_details_id_fk", + "tableFrom": "field_geohydraulic_testing_general", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_field_geohydraulic_testing_general": { + "name": "unique_field_geohydraulic_testing_general", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_test_zone", + "depth_to_base_of_test_zone", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.field_geohydraulic_testing_instrumentation_details": { + "name": "field_geohydraulic_testing_instrumentation_details", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "instrument_reference_serial_number": { + "name": "instrument_reference_serial_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "instrument_measured_parameters": { + "name": "instrument_measured_parameters", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_instrument": { + "name": "details_of_instrument", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "instrument_position": { + "name": "instrument_position", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "field_geohydraulic_testing_general_id": { + "name": "field_geohydraulic_testing_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "field_geohydraulic_testing_instrumentation_details_field_geohydraulic_testing_general_id_field_geohydraulic_testing_general_id_fk": { + "name": "field_geohydraulic_testing_instrumentation_details_field_geohydraulic_testing_general_id_field_geohydraulic_testing_general_id_fk", + "tableFrom": "field_geohydraulic_testing_instrumentation_details", + "tableTo": "field_geohydraulic_testing_general", + "columnsFrom": [ + "field_geohydraulic_testing_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_field_geohydraulic_testing_instrumentation_details": { + "name": "unique_field_geohydraulic_testing_instrumentation_details", + "nullsNotDistinct": false, + "columns": [ + "field_geohydraulic_testing_general_id", + "instrument_reference_serial_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.field_geohydraulic_testing_test_results_per_stage": { + "name": "field_geohydraulic_testing_test_results_per_stage", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "stage_number_of_multistage_test": { + "name": "stage_number_of_multistage_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "start_of_stage_date_time": { + "name": "start_of_stage_date_time", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "end_of_stage_date_time": { + "name": "end_of_stage_date_time", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "applied_head_of_water_during_test_stage_at_centre_of_test_zone": { + "name": "applied_head_of_water_during_test_stage_at_centre_of_test_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "average_flow_rate_during_test_stage": { + "name": "average_flow_rate_during_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "permeability_for_test_stage": { + "name": "permeability_for_test_stage", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "lugeon_value_for_test_stage": { + "name": "lugeon_value_for_test_stage", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "field_geohydraulic_testing_general_id": { + "name": "field_geohydraulic_testing_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "field_geohydraulic_testing_test_results_per_stage_field_geohydraulic_testing_general_id_field_geohydraulic_testing_general_id_fk": { + "name": "field_geohydraulic_testing_test_results_per_stage_field_geohydraulic_testing_general_id_field_geohydraulic_testing_general_id_fk", + "tableFrom": "field_geohydraulic_testing_test_results_per_stage", + "tableTo": "field_geohydraulic_testing_general", + "columnsFrom": [ + "field_geohydraulic_testing_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_field_geohydraulic_testing_test_results_per_stage": { + "name": "unique_field_geohydraulic_testing_test_results_per_stage", + "nullsNotDistinct": false, + "columns": [ + "field_geohydraulic_testing_general_id", + "stage_number_of_multistage_test" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.field_geological_descriptions": { + "name": "field_geological_descriptions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_the_top_of_stratum": { + "name": "depth_to_the_top_of_stratum", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_the_base_of_description": { + "name": "depth_to_the_base_of_description", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "general_description_of_stratum": { + "name": "general_description_of_stratum", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "legend_code": { + "name": "legend_code", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "geology_code": { + "name": "geology_code", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "second_geology_code": { + "name": "second_geology_code", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "stratum_reference_shown_on_trial_pit_or_traverse_sketch": { + "name": "stratum_reference_shown_on_trial_pit_or_traverse_sketch", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "bgs_lexicon_code": { + "name": "bgs_lexicon_code", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "geological_formation_or_stratum_name": { + "name": "geological_formation_or_stratum_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_logging_field_sheets": { + "name": "associated_file_reference_e_g_logging_field_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_field_geological_descriptions_abbr": { + "name": "idx_field_geological_descriptions_abbr", + "columns": [ + { + "expression": "legend_code", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "geology_code", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "second_geology_code", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "bgs_lexicon_code", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "field_geological_descriptions_legend_code_abbreviation_id_fk": { + "name": "field_geological_descriptions_legend_code_abbreviation_id_fk", + "tableFrom": "field_geological_descriptions", + "tableTo": "abbreviation", + "columnsFrom": [ + "legend_code" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "field_geological_descriptions_geology_code_abbreviation_id_fk": { + "name": "field_geological_descriptions_geology_code_abbreviation_id_fk", + "tableFrom": "field_geological_descriptions", + "tableTo": "abbreviation", + "columnsFrom": [ + "geology_code" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "field_geological_descriptions_second_geology_code_abbreviation_id_fk": { + "name": "field_geological_descriptions_second_geology_code_abbreviation_id_fk", + "tableFrom": "field_geological_descriptions", + "tableTo": "abbreviation", + "columnsFrom": [ + "second_geology_code" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "field_geological_descriptions_bgs_lexicon_code_abbreviation_id_fk": { + "name": "field_geological_descriptions_bgs_lexicon_code_abbreviation_id_fk", + "tableFrom": "field_geological_descriptions", + "tableTo": "abbreviation", + "columnsFrom": [ + "bgs_lexicon_code" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "field_geological_descriptions_location_details_id_location_details_id_fk": { + "name": "field_geological_descriptions_location_details_id_location_details_id_fk", + "tableFrom": "field_geological_descriptions", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_field_geological_descriptions": { + "name": "unique_field_geological_descriptions", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_the_top_of_stratum", + "depth_to_the_base_of_description" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.fracture_spacing": { + "name": "fracture_spacing", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_in_hole": { + "name": "depth_to_top_in_hole", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_in_hole": { + "name": "depth_to_base_in_hole", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "discontinuity_set_reference": { + "name": "discontinuity_set_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "maximum_fracture_spacing_over_zone": { + "name": "maximum_fracture_spacing_over_zone", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "average_fracture_modal_spacing_over_zone": { + "name": "average_fracture_modal_spacing_over_zone", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "minimum_fracture_spacing_over_zone": { + "name": "minimum_fracture_spacing_over_zone", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "fracture_index_frequency_over_zone_fractures_per_metre": { + "name": "fracture_index_frequency_over_zone_fractures_per_metre", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "comments_on_fracture_set": { + "name": "comments_on_fracture_set", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_logging_field_sheets": { + "name": "associated_file_reference_e_g_logging_field_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "fracture_spacing_location_details_id_location_details_id_fk": { + "name": "fracture_spacing_location_details_id_location_details_id_fk", + "tableFrom": "fracture_spacing", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_fracture_spacing": { + "name": "unique_fracture_spacing", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_in_hole", + "depth_to_base_in_hole", + "discontinuity_set_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.frost_susceptibility_tests": { + "name": "frost_susceptibility_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "dry_density_of_specimens_after_preparation": { + "name": "dry_density_of_specimens_after_preparation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content_of_specimens_at_preparation": { + "name": "water_moisture_content_of_specimens_at_preparation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "frost_heave": { + "name": "frost_heave", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mean_heave_of_3_specimens": { + "name": "mean_heave_of_3_specimens", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "amount_of_stabiliser_added": { + "name": "amount_of_stabiliser_added", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_stabiliser_added": { + "name": "type_of_stabiliser_added", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "notes_on_frost_susceptibility_testing_as_per_trrl_sr_829": { + "name": "notes_on_frost_susceptibility_testing_as_per_trrl_sr_829", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviations_from_the_test_method": { + "name": "deviations_from_the_test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_frost_susceptibility_tests_abbr": { + "name": "idx_frost_susceptibility_tests_abbr", + "columns": [ + { + "expression": "sample_condition", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "frost_susceptibility_tests_sample_condition_abbreviation_id_fk": { + "name": "frost_susceptibility_tests_sample_condition_abbreviation_id_fk", + "tableFrom": "frost_susceptibility_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "sample_condition" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "frost_susceptibility_tests_sample_information_id_sample_information_id_fk": { + "name": "frost_susceptibility_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "frost_susceptibility_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_frost_susceptibility_tests": { + "name": "unique_frost_susceptibility_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.geotechnical_chemistry_testing": { + "name": "geotechnical_chemistry_testing", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "determinand": { + "name": "determinand", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_type": { + "name": "test_type", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "test_result": { + "name": "test_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_result_units": { + "name": "test_result_units", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "client_laboratory_preferred_name_of_determinand": { + "name": "client_laboratory_preferred_name_of_determinand", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks_on_test": { + "name": "remarks_on_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reported_result": { + "name": "reported_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "lower_detection_limit": { + "name": "lower_detection_limit", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviations_from_the_test_method": { + "name": "deviations_from_the_test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_delivery_or_batch_code": { + "name": "sample_delivery_or_batch_code", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "laboratory_sample_id": { + "name": "laboratory_sample_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_receipt_date_time_at_laboratory": { + "name": "sample_receipt_date_time_at_laboratory", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "analysis_date_and_time": { + "name": "analysis_date_and_time", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "test_of_suite_name": { + "name": "test_of_suite_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "instrument_reference_no_or_identifier": { + "name": "instrument_reference_no_or_identifier", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "instrument_type": { + "name": "instrument_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "size_of_material_removed_prior_to_test_value_given_indicates_lowest_sized_material_removed": { + "name": "size_of_material_removed_prior_to_test_value_given_indicates_lowest_sized_material_removed", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "percentage_of_material_removed": { + "name": "percentage_of_material_removed", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "result_deviation_description_s": { + "name": "result_deviation_description_s", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_geotechnical_chemistry_testing_abbr": { + "name": "idx_geotechnical_chemistry_testing_abbr", + "columns": [ + { + "expression": "determinand", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "test_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "geotechnical_chemistry_testing_determinand_abbreviation_id_fk": { + "name": "geotechnical_chemistry_testing_determinand_abbreviation_id_fk", + "tableFrom": "geotechnical_chemistry_testing", + "tableTo": "abbreviation", + "columnsFrom": [ + "determinand" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "geotechnical_chemistry_testing_test_type_abbreviation_id_fk": { + "name": "geotechnical_chemistry_testing_test_type_abbreviation_id_fk", + "tableFrom": "geotechnical_chemistry_testing", + "tableTo": "abbreviation", + "columnsFrom": [ + "test_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "geotechnical_chemistry_testing_sample_information_id_sample_information_id_fk": { + "name": "geotechnical_chemistry_testing_sample_information_id_sample_information_id_fk", + "tableFrom": "geotechnical_chemistry_testing", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_geotechnical_chemistry_testing": { + "name": "unique_geotechnical_chemistry_testing", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen", + "determinand", + "test_method", + "test_type" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.hole_diameter_by_depth": { + "name": "hole_diameter_by_depth", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_of_base_of_hole_at_the_diameter_recorded_in_hdia_diam": { + "name": "depth_of_base_of_hole_at_the_diameter_recorded_in_hdia_diam", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "hole_diameter": { + "name": "hole_diameter", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_drilling_journals": { + "name": "associated_file_reference_e_g_drilling_journals", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "hole_diameter_by_depth_location_details_id_location_details_id_fk": { + "name": "hole_diameter_by_depth_location_details_id_location_details_id_fk", + "tableFrom": "hole_diameter_by_depth", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_hole_diameter_by_depth": { + "name": "unique_hole_diameter_by_depth", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_of_base_of_hole_at_the_diameter_recorded_in_hdia_diam", + "hole_diameter" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.in_situ_california_bearing_ratio_tests": { + "name": "in_situ_california_bearing_ratio_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_cbr_test": { + "name": "depth_to_top_of_cbr_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cbr_value": { + "name": "cbr_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content_relating_to_test": { + "name": "water_moisture_content_relating_to_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "details_of_kentledge_reaction_load": { + "name": "details_of_kentledge_reaction_load", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "seating_force": { + "name": "seating_force", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "surcharge_pressure": { + "name": "surcharge_pressure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type_of_cbr": { + "name": "type_of_cbr", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stratum_reference_shown_on_trial_pit_or_traverse_sketch": { + "name": "stratum_reference_shown_on_trial_pit_or_traverse_sketch", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_in_situ_california_bearing_ratio_tests_abbr": { + "name": "idx_in_situ_california_bearing_ratio_tests_abbr", + "columns": [ + { + "expression": "type_of_cbr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "in_situ_california_bearing_ratio_tests_type_of_cbr_abbreviation_id_fk": { + "name": "in_situ_california_bearing_ratio_tests_type_of_cbr_abbreviation_id_fk", + "tableFrom": "in_situ_california_bearing_ratio_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_cbr" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "in_situ_california_bearing_ratio_tests_location_details_id_location_details_id_fk": { + "name": "in_situ_california_bearing_ratio_tests_location_details_id_location_details_id_fk", + "tableFrom": "in_situ_california_bearing_ratio_tests", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_in_situ_california_bearing_ratio_tests": { + "name": "unique_in_situ_california_bearing_ratio_tests", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_cbr_test", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.in_situ_density_tests": { + "name": "in_situ_density_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_of_in_situ_density_test": { + "name": "depth_of_in_situ_density_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "type_of_density_test_performed": { + "name": "type_of_density_test_performed", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "in_situ_bulk_density_after_any_calibration_corrections_applied": { + "name": "in_situ_bulk_density_after_any_calibration_corrections_applied", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content_relating_to_in_situ_test_after_any_calibration_corrections_applied": { + "name": "water_moisture_content_relating_to_in_situ_test_after_any_calibration_corrections_applied", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "amount_of_stabiliser_added": { + "name": "amount_of_stabiliser_added", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_stabiliser_added": { + "name": "type_of_stabiliser_added", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stratum_reference_shown_on_trial_pit_or_traverse_sketch": { + "name": "stratum_reference_shown_on_trial_pit_or_traverse_sketch", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_in_situ_density_tests_abbr": { + "name": "idx_in_situ_density_tests_abbr", + "columns": [ + { + "expression": "type_of_density_test_performed", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "in_situ_density_tests_type_of_density_test_performed_abbreviation_id_fk": { + "name": "in_situ_density_tests_type_of_density_test_performed_abbreviation_id_fk", + "tableFrom": "in_situ_density_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_density_test_performed" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "in_situ_density_tests_location_details_id_location_details_id_fk": { + "name": "in_situ_density_tests_location_details_id_location_details_id_fk", + "tableFrom": "in_situ_density_tests", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_in_situ_density_tests": { + "name": "unique_in_situ_density_tests", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_of_in_situ_density_test", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.in_situ_hand_penetrometer_tests": { + "name": "in_situ_hand_penetrometer_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_of_test": { + "name": "depth_of_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hand_penetrometer_result": { + "name": "hand_penetrometer_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "remarks_on_test": { + "name": "remarks_on_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stratum_reference_shown_on_trial_pit_or_traverse_sketch": { + "name": "stratum_reference_shown_on_trial_pit_or_traverse_sketch", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "in_situ_hand_penetrometer_tests_location_details_id_location_details_id_fk": { + "name": "in_situ_hand_penetrometer_tests_location_details_id_location_details_id_fk", + "tableFrom": "in_situ_hand_penetrometer_tests", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_in_situ_hand_penetrometer_tests": { + "name": "unique_in_situ_hand_penetrometer_tests", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_of_test", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.in_situ_permeability_tests_data": { + "name": "in_situ_permeability_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "stage_number_of_multistage_packer_test": { + "name": "stage_number_of_multistage_packer_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "elapsed_time": { + "name": "elapsed_time", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_water_at_time_iprt_time": { + "name": "depth_to_water_at_time_iprt_time", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reading_remark": { + "name": "test_reading_remark", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "in_situ_permeability_tests_general_id": { + "name": "in_situ_permeability_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "in_situ_permeability_tests_data_in_situ_permeability_tests_general_id_in_situ_permeability_tests_general_id_fk": { + "name": "in_situ_permeability_tests_data_in_situ_permeability_tests_general_id_in_situ_permeability_tests_general_id_fk", + "tableFrom": "in_situ_permeability_tests_data", + "tableTo": "in_situ_permeability_tests_general", + "columnsFrom": [ + "in_situ_permeability_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_in_situ_permeability_tests_data": { + "name": "unique_in_situ_permeability_tests_data", + "nullsNotDistinct": false, + "columns": [ + "in_situ_permeability_tests_general_id", + "stage_number_of_multistage_packer_test", + "elapsed_time" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.in_situ_permeability_tests_general": { + "name": "in_situ_permeability_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_test_zone": { + "name": "depth_to_top_of_test_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_test_zone": { + "name": "depth_to_base_of_test_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "stage_number_of_multistage_test": { + "name": "stage_number_of_multistage_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type_of_test": { + "name": "type_of_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "depth_to_water_in_test_zone_immediately_prior_to_test": { + "name": "depth_to_water_in_test_zone_immediately_prior_to_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_water_at_start_of_test": { + "name": "depth_to_water_at_start_of_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "diameter_of_test_zone": { + "name": "diameter_of_test_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "diameter_of_test_installation_e_g_standpipe_or_casing": { + "name": "diameter_of_test_installation_e_g_standpipe_or_casing", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "permeability": { + "name": "permeability", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "average_flow_during_test_stage": { + "name": "average_flow_during_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_assumed_standing_water_level": { + "name": "depth_to_assumed_standing_water_level", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "applied_total_head_of_water_during_test_stage_at_centre_of_test_zone": { + "name": "applied_total_head_of_water_during_test_stage_at_centre_of_test_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "test_remarks": { + "name": "test_remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_in_situ_permeability_tests_general_abbr": { + "name": "idx_in_situ_permeability_tests_general_abbr", + "columns": [ + { + "expression": "type_of_test", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "in_situ_permeability_tests_general_type_of_test_abbreviation_id_fk": { + "name": "in_situ_permeability_tests_general_type_of_test_abbreviation_id_fk", + "tableFrom": "in_situ_permeability_tests_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_test" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "in_situ_permeability_tests_general_location_details_id_location_details_id_fk": { + "name": "in_situ_permeability_tests_general_location_details_id_location_details_id_fk", + "tableFrom": "in_situ_permeability_tests_general", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_in_situ_permeability_tests_general": { + "name": "unique_in_situ_permeability_tests_general", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_test_zone", + "test_reference", + "depth_to_base_of_test_zone", + "stage_number_of_multistage_test" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.in_situ_redox_tests": { + "name": "in_situ_redox_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_of_redox_test": { + "name": "depth_of_redox_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "ph": { + "name": "ph", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mean_value_of_the_potential_of_the_two_platinum_probes": { + "name": "mean_value_of_the_potential_of_the_two_platinum_probes", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "redox_potential": { + "name": "redox_potential", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "details_of_redox_test_and_probe_type": { + "name": "details_of_redox_test_and_probe_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stratum_reference_shown_on_trial_pit_or_traverse_sketch": { + "name": "stratum_reference_shown_on_trial_pit_or_traverse_sketch", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "in_situ_redox_tests_location_details_id_location_details_id_fk": { + "name": "in_situ_redox_tests_location_details_id_location_details_id_fk", + "tableFrom": "in_situ_redox_tests", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_in_situ_redox_tests": { + "name": "unique_in_situ_redox_tests", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_of_redox_test", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.in_situ_resistivity_tests": { + "name": "in_situ_resistivity_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_which_in_situ_resistivity_test_relates": { + "name": "depth_to_which_in_situ_resistivity_test_relates", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "base_depth_to_which_in_situ_resistivity_test_relates": { + "name": "base_depth_to_which_in_situ_resistivity_test_relates", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_resistivity_test": { + "name": "type_of_resistivity_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "mean_value_of_the_apparent_resistivity": { + "name": "mean_value_of_the_apparent_resistivity", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "first_value_of_apparent_resistivity_when_more_than_15_different_to_mean": { + "name": "first_value_of_apparent_resistivity_when_more_than_15_different_to_mean", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "second_value_of_apparent_resistivity_when_more_than_15_different_to_mean": { + "name": "second_value_of_apparent_resistivity_when_more_than_15_different_to_mean", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "details_of_test_e_g_electrode_spacing_and_configuration": { + "name": "details_of_test_e_g_electrode_spacing_and_configuration", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stratum_reference_shown_on_trial_pit_or_traverse_sketch": { + "name": "stratum_reference_shown_on_trial_pit_or_traverse_sketch", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_in_situ_resistivity_tests_abbr": { + "name": "idx_in_situ_resistivity_tests_abbr", + "columns": [ + { + "expression": "type_of_resistivity_test", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "in_situ_resistivity_tests_type_of_resistivity_test_abbreviation_id_fk": { + "name": "in_situ_resistivity_tests_type_of_resistivity_test_abbreviation_id_fk", + "tableFrom": "in_situ_resistivity_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_resistivity_test" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "in_situ_resistivity_tests_location_details_id_location_details_id_fk": { + "name": "in_situ_resistivity_tests_location_details_id_location_details_id_fk", + "tableFrom": "in_situ_resistivity_tests", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_in_situ_resistivity_tests": { + "name": "unique_in_situ_resistivity_tests", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_which_in_situ_resistivity_test_relates", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.in_situ_vane_tests": { + "name": "in_situ_vane_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_of_vane_test": { + "name": "depth_of_vane_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "vane_type": { + "name": "vane_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vane_test_result": { + "name": "vane_test_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "vane_test_residual_result": { + "name": "vane_test_residual_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "details_of_vane_test": { + "name": "details_of_vane_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stratum_reference_shown_on_trial_pit_or_traverse_sketch": { + "name": "stratum_reference_shown_on_trial_pit_or_traverse_sketch", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_in_situ_vane_tests_abbr": { + "name": "idx_in_situ_vane_tests_abbr", + "columns": [ + { + "expression": "vane_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "in_situ_vane_tests_vane_type_abbreviation_id_fk": { + "name": "in_situ_vane_tests_vane_type_abbreviation_id_fk", + "tableFrom": "in_situ_vane_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "vane_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "in_situ_vane_tests_location_details_id_location_details_id_fk": { + "name": "in_situ_vane_tests_location_details_id_location_details_id_fk", + "tableFrom": "in_situ_vane_tests", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_in_situ_vane_tests": { + "name": "unique_in_situ_vane_tests", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_of_vane_test", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.initial_consumption_of_lime_tests_data": { + "name": "initial_consumption_of_lime_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "percentage_of_lime_added": { + "name": "percentage_of_lime_added", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "ph_of_lime_soil_suspension": { + "name": "ph_of_lime_soil_suspension", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "initial_consumption_of_lime_tests_general_id": { + "name": "initial_consumption_of_lime_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "initial_consumption_of_lime_tests_data_initial_consumption_of_lime_tests_general_id_initial_consumption_of_lime_tests_general_id_fk": { + "name": "initial_consumption_of_lime_tests_data_initial_consumption_of_lime_tests_general_id_initial_consumption_of_lime_tests_general_id_fk", + "tableFrom": "initial_consumption_of_lime_tests_data", + "tableTo": "initial_consumption_of_lime_tests_general", + "columnsFrom": [ + "initial_consumption_of_lime_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_initial_consumption_of_lime_tests_data": { + "name": "unique_initial_consumption_of_lime_tests_data", + "nullsNotDistinct": false, + "columns": [ + "initial_consumption_of_lime_tests_general_id", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.initial_consumption_of_lime_tests_general": { + "name": "initial_consumption_of_lime_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_consumption_of_lime": { + "name": "initial_consumption_of_lime", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "ph_value_used_for_interpretation_of_lstg_icl": { + "name": "ph_value_used_for_interpretation_of_lstg_icl", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "details_of_lime_used_for_test": { + "name": "details_of_lime_used_for_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "ph_of_saturated_lime_solution_suitability": { + "name": "ph_of_saturated_lime_solution_suitability", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "percentage_passing_0_425mm_sieve": { + "name": "percentage_passing_0_425mm_sieve", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result": { + "name": "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "initial_consumption_of_lime_tests_general_sample_information_id_sample_information_id_fk": { + "name": "initial_consumption_of_lime_tests_general_sample_information_id_sample_information_id_fk", + "tableFrom": "initial_consumption_of_lime_tests_general", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_initial_consumption_of_lime_tests_general": { + "name": "unique_initial_consumption_of_lime_tests_general", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.laboratory_fall_cone_test": { + "name": "laboratory_fall_cone_test", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviations_from_the_procedure": { + "name": "deviations_from_the_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mass_of_cone_used": { + "name": "mass_of_cone_used", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "angle_of_cone_tip": { + "name": "angle_of_cone_tip", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "average_cone_penetration": { + "name": "average_cone_penetration", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "individual_penetration_point_1_if_values_differ_by_more_than_0_5mm_from_the_average": { + "name": "individual_penetration_point_1_if_values_differ_by_more_than_0_5mm_from_the_average", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "individual_penetration_point_2_if_values_differ_by_more_than_0_5mm_from_the_average": { + "name": "individual_penetration_point_2_if_values_differ_by_more_than_0_5mm_from_the_average", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "individual_penetration_point_3_if_values_differ_by_more_than_0_5mm_from_the_average": { + "name": "individual_penetration_point_3_if_values_differ_by_more_than_0_5mm_from_the_average", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "individual_penetration_point_4_if_values_differ_by_more_than_0_5mm_from_the_average": { + "name": "individual_penetration_point_4_if_values_differ_by_more_than_0_5mm_from_the_average", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "non_conforming_test_due_to_penetration_range": { + "name": "non_conforming_test_due_to_penetration_range", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "estimated_undrained_fall_cone_shear_strength": { + "name": "estimated_undrained_fall_cone_shear_strength", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "water_content_of_specimen": { + "name": "water_content_of_specimen", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "water_content_determined_on_specimen_trimmings_or_other_if_applicable": { + "name": "water_content_determined_on_specimen_trimmings_or_other_if_applicable", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_remarks": { + "name": "test_remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "laboratory_fall_cone_test_sample_information_id_sample_information_id_fk": { + "name": "laboratory_fall_cone_test_sample_information_id_sample_information_id_fk", + "tableFrom": "laboratory_fall_cone_test", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_laboratory_fall_cone_test": { + "name": "unique_laboratory_fall_cone_test", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.laboratory_hand_penetrometer_tests": { + "name": "laboratory_hand_penetrometer_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hand_penetrometer_undrained_shear_strength": { + "name": "hand_penetrometer_undrained_shear_strength", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content_local_to_test": { + "name": "water_moisture_content_local_to_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "laboratory_hand_penetrometer_tests_sample_information_id_sample_information_id_fk": { + "name": "laboratory_hand_penetrometer_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "laboratory_hand_penetrometer_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_laboratory_hand_penetrometer_tests": { + "name": "unique_laboratory_hand_penetrometer_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.laboratory_permeability_tests": { + "name": "laboratory_permeability_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "size_cut_off_of_material_too_coarse_for_testing": { + "name": "size_cut_off_of_material_too_coarse_for_testing", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "proportion_of_material_removed_above_ptst": { + "name": "proportion_of_material_removed_above_ptst", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_length": { + "name": "specimen_length", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_water_moisture_content_of_test_specimen": { + "name": "initial_water_moisture_content_of_test_specimen", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_bulk_density_of_test_specimen": { + "name": "initial_bulk_density_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "diameter_of_drain_for_radial_permeability_in_hydraulic_cell": { + "name": "diameter_of_drain_for_radial_permeability_in_hydraulic_cell", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "method_of_forming_central_drain": { + "name": "method_of_forming_central_drain", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_voids_ratio": { + "name": "initial_voids_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "coefficient_of_permeability": { + "name": "coefficient_of_permeability", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mean_effective_stress_at_which_permeability_measured_when_measured_in_triaxial_or_hydraulic_cell": { + "name": "mean_effective_stress_at_which_permeability_measured_when_measured_in_triaxial_or_hydraulic_cell", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "hydraulic_gradient_at_which_permeability_measured_for_constant_head_test": { + "name": "hydraulic_gradient_at_which_permeability_measured_for_constant_head_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "initial_degree_of_saturation": { + "name": "initial_degree_of_saturation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "details_of_saturation": { + "name": "details_of_saturation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_consolidation": { + "name": "details_of_consolidation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "particle_density_with_prefix_if_value_assumed": { + "name": "particle_density_with_prefix_if_value_assumed", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_permeability_measurement": { + "name": "type_of_permeability_measurement", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type_of_permeameter": { + "name": "type_of_permeameter", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks_on_test": { + "name": "remarks_on_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviations_from_the_test_method": { + "name": "deviations_from_the_test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_water_content_source": { + "name": "initial_water_content_source", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "final_water_content_of_test_specimen": { + "name": "final_water_content_of_test_specimen", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "final_degree_of_saturation": { + "name": "final_degree_of_saturation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "average_laboratory_temperature_at_which_the_test_was_performed": { + "name": "average_laboratory_temperature_at_which_the_test_was_performed", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "source_of_permeameter_water": { + "name": "source_of_permeameter_water", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "back_pressure": { + "name": "back_pressure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "b_value": { + "name": "b_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "equipment_head_loss_corrections_applied_to_the_measurements": { + "name": "equipment_head_loss_corrections_applied_to_the_measurements", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_laboratory_permeability_tests_abbr": { + "name": "idx_laboratory_permeability_tests_abbr", + "columns": [ + { + "expression": "sample_condition", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type_of_permeability_measurement", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type_of_permeameter", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "laboratory_permeability_tests_sample_condition_abbreviation_id_fk": { + "name": "laboratory_permeability_tests_sample_condition_abbreviation_id_fk", + "tableFrom": "laboratory_permeability_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "sample_condition" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "laboratory_permeability_tests_type_of_permeability_measurement_abbreviation_id_fk": { + "name": "laboratory_permeability_tests_type_of_permeability_measurement_abbreviation_id_fk", + "tableFrom": "laboratory_permeability_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_permeability_measurement" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "laboratory_permeability_tests_type_of_permeameter_abbreviation_id_fk": { + "name": "laboratory_permeability_tests_type_of_permeameter_abbreviation_id_fk", + "tableFrom": "laboratory_permeability_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_permeameter" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "laboratory_permeability_tests_sample_information_id_sample_information_id_fk": { + "name": "laboratory_permeability_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "laboratory_permeability_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_laboratory_permeability_tests": { + "name": "unique_laboratory_permeability_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.laboratory_resistivity_tests": { + "name": "laboratory_resistivity_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "bulk_density": { + "name": "bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "dry_density": { + "name": "dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content": { + "name": "water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_condition_including_details_of_remoulding": { + "name": "sample_condition_including_details_of_remoulding", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "temperature_corrected_20_degc_resistivity": { + "name": "temperature_corrected_20_degc_resistivity", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "diameter_of_container": { + "name": "diameter_of_container", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "container_cross_sectional_area": { + "name": "container_cross_sectional_area", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "length_of_container": { + "name": "length_of_container", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "temperature_at_which_test_performed": { + "name": "temperature_at_which_test_performed", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type_of_electrodes_including_material": { + "name": "type_of_electrodes_including_material", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "dimensions_of_probes": { + "name": "dimensions_of_probes", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "shape_of_container": { + "name": "shape_of_container", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "volume_of_water_required_to_saturate_the_soil": { + "name": "volume_of_water_required_to_saturate_the_soil", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "water_resistivity": { + "name": "water_resistivity", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "approximate_percentage_of_large_particles_removed_prior_to_test": { + "name": "approximate_percentage_of_large_particles_removed_prior_to_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "laboratory_resistivity_tests_sample_information_id_sample_information_id_fk": { + "name": "laboratory_resistivity_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "laboratory_resistivity_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_laboratory_resistivity_tests": { + "name": "unique_laboratory_resistivity_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.laboratory_thermal_conductivity": { + "name": "laboratory_thermal_conductivity", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "bulk_density": { + "name": "bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "dry_density": { + "name": "dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content": { + "name": "water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thermal_conductivity": { + "name": "thermal_conductivity", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "thermal_resistivity": { + "name": "thermal_resistivity", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "ambient_temperature_at_which_test_is_performed": { + "name": "ambient_temperature_at_which_test_is_performed", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "probe_diameter": { + "name": "probe_diameter", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "probe_spacing": { + "name": "probe_spacing", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "probe_penetration": { + "name": "probe_penetration", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "method_of_probe_insertion": { + "name": "method_of_probe_insertion", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "particle_grain_size_removed": { + "name": "particle_grain_size_removed", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_procedure": { + "name": "deviation_from_the_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "laboratory_thermal_conductivity_sample_information_id_sample_information_id_fk": { + "name": "laboratory_thermal_conductivity_sample_information_id_sample_information_id_fk", + "tableFrom": "laboratory_thermal_conductivity", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_laboratory_thermal_conductivity": { + "name": "unique_laboratory_thermal_conductivity", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.laboratory_unconfined_compression_test": { + "name": "laboratory_unconfined_compression_test", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_procedure": { + "name": "deviation_from_the_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_type": { + "name": "test_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_length": { + "name": "specimen_length", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_initial_water_content": { + "name": "specimen_initial_water_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_bulk_density": { + "name": "initial_bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mean_rate_of_compression": { + "name": "mean_rate_of_compression", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "unconfined_compressive_strength": { + "name": "unconfined_compressive_strength", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "strain_at_failure": { + "name": "strain_at_failure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mode_of_failure": { + "name": "mode_of_failure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_laboratory_unconfined_compression_test_abbr": { + "name": "idx_laboratory_unconfined_compression_test_abbr", + "columns": [ + { + "expression": "test_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "mode_of_failure", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "laboratory_unconfined_compression_test_test_type_abbreviation_id_fk": { + "name": "laboratory_unconfined_compression_test_test_type_abbreviation_id_fk", + "tableFrom": "laboratory_unconfined_compression_test", + "tableTo": "abbreviation", + "columnsFrom": [ + "test_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "laboratory_unconfined_compression_test_mode_of_failure_abbreviation_id_fk": { + "name": "laboratory_unconfined_compression_test_mode_of_failure_abbreviation_id_fk", + "tableFrom": "laboratory_unconfined_compression_test", + "tableTo": "abbreviation", + "columnsFrom": [ + "mode_of_failure" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "laboratory_unconfined_compression_test_sample_information_id_sample_information_id_fk": { + "name": "laboratory_unconfined_compression_test_sample_information_id_sample_information_id_fk", + "tableFrom": "laboratory_unconfined_compression_test", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_laboratory_unconfined_compression_test": { + "name": "unique_laboratory_unconfined_compression_test", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.laboratory_vane_tests": { + "name": "laboratory_vane_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "vane_undrained_shear_strength_peak": { + "name": "vane_undrained_shear_strength_peak", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "vane_undrained_shear_strength_remoulded": { + "name": "vane_undrained_shear_strength_remoulded", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content_local_to_the_test": { + "name": "water_moisture_content_local_to_the_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "equivalent_diameter_of_vane": { + "name": "equivalent_diameter_of_vane", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "length_of_vane": { + "name": "length_of_vane", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "vane_type": { + "name": "vane_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_laboratory_vane_tests_abbr": { + "name": "idx_laboratory_vane_tests_abbr", + "columns": [ + { + "expression": "vane_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "laboratory_vane_tests_vane_type_abbreviation_id_fk": { + "name": "laboratory_vane_tests_vane_type_abbreviation_id_fk", + "tableFrom": "laboratory_vane_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "vane_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "laboratory_vane_tests_sample_information_id_sample_information_id_fk": { + "name": "laboratory_vane_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "laboratory_vane_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_laboratory_vane_tests": { + "name": "unique_laboratory_vane_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.linear_shrinkage_tests": { + "name": "linear_shrinkage_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "linear_shrinkage": { + "name": "linear_shrinkage", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "percentage_passing_0_425mm_sieve": { + "name": "percentage_passing_0_425mm_sieve", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "method_of_preparation": { + "name": "method_of_preparation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "linear_shrinkage_tests_sample_information_id_sample_information_id_fk": { + "name": "linear_shrinkage_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "linear_shrinkage_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_linear_shrinkage_tests": { + "name": "unique_linear_shrinkage_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.liquid_and_plastic_limit_tests": { + "name": "liquid_and_plastic_limit_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "liquid_limit": { + "name": "liquid_limit", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "plastic_limit": { + "name": "plastic_limit", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "plasticity_index": { + "name": "plasticity_index", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "percentage_passing_0_425mm_sieve": { + "name": "percentage_passing_0_425mm_sieve", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "method_of_preparation": { + "name": "method_of_preparation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "amount_of_stabiliser_added": { + "name": "amount_of_stabiliser_added", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_stabiliser_added": { + "name": "type_of_stabiliser_added", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_test": { + "name": "type_of_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "number_of_points": { + "name": "number_of_points", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "for_fall_cone_method": { + "name": "for_fall_cone_method", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mean_of_test_readings": { + "name": "mean_of_test_readings", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "correlation_factor_if_one_point_test": { + "name": "correlation_factor_if_one_point_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "sieve_size_if_other_than_0_425mm": { + "name": "sieve_size_if_other_than_0_425mm", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "percentage_passing_llpl_size_sieve_if_other_than_0_425mm": { + "name": "percentage_passing_llpl_size_sieve_if_other_than_0_425mm", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "the_water_content_of_the_specimen_before_removal_of_particles_prior_to_determination_liquid_or_plastic_limits": { + "name": "the_water_content_of_the_specimen_before_removal_of_particles_prior_to_determination_liquid_or_plastic_limits", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_liquid_and_plastic_limit_tests_abbr": { + "name": "idx_liquid_and_plastic_limit_tests_abbr", + "columns": [ + { + "expression": "type_of_test", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "number_of_points", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "for_fall_cone_method", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "liquid_and_plastic_limit_tests_type_of_test_abbreviation_id_fk": { + "name": "liquid_and_plastic_limit_tests_type_of_test_abbreviation_id_fk", + "tableFrom": "liquid_and_plastic_limit_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_test" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "liquid_and_plastic_limit_tests_number_of_points_abbreviation_id_fk": { + "name": "liquid_and_plastic_limit_tests_number_of_points_abbreviation_id_fk", + "tableFrom": "liquid_and_plastic_limit_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "number_of_points" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "liquid_and_plastic_limit_tests_for_fall_cone_method_abbreviation_id_fk": { + "name": "liquid_and_plastic_limit_tests_for_fall_cone_method_abbreviation_id_fk", + "tableFrom": "liquid_and_plastic_limit_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "for_fall_cone_method" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "liquid_and_plastic_limit_tests_sample_information_id_sample_information_id_fk": { + "name": "liquid_and_plastic_limit_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "liquid_and_plastic_limit_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_liquid_and_plastic_limit_tests": { + "name": "unique_liquid_and_plastic_limit_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.location_details": { + "name": "location_details", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "location_identifier": { + "name": "location_identifier", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_activity": { + "name": "type_of_activity", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status_of_information_relating_to_this_position": { + "name": "status_of_information_relating_to_this_position", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "national_grid_easting_of_location_or_start_of_traverse": { + "name": "national_grid_easting_of_location_or_start_of_traverse", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "national_grid_northing_of_location_or_start_of_traverse": { + "name": "national_grid_northing_of_location_or_start_of_traverse", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "national_grid_referencing_system_used": { + "name": "national_grid_referencing_system_used", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "ground_level_relative_to_datum_of_location_or_start_of_traverse": { + "name": "ground_level_relative_to_datum_of_location_or_start_of_traverse", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "general_remarks": { + "name": "general_remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "final_depth": { + "name": "final_depth", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "date_of_start_of_activity": { + "name": "date_of_start_of_activity", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "purpose_of_activity_at_this_location": { + "name": "purpose_of_activity_at_this_location", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reason_for_activity_termination": { + "name": "reason_for_activity_termination", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "end_date_of_activity": { + "name": "end_date_of_activity", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "osgb_letter_grid_reference": { + "name": "osgb_letter_grid_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "local_grid_x_co_ordinate_or_start_of_traverse": { + "name": "local_grid_x_co_ordinate_or_start_of_traverse", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "local_grid_y_co_ordinate_or_start_of_traverse": { + "name": "local_grid_y_co_ordinate_or_start_of_traverse", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "level_or_start_of_traverse_to_local_datum": { + "name": "level_or_start_of_traverse_to_local_datum", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "local_grid_referencing_system_used": { + "name": "local_grid_referencing_system_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "local_datum_referencing_system_used": { + "name": "local_datum_referencing_system_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "national_grid_easting_of_end_of_traverse": { + "name": "national_grid_easting_of_end_of_traverse", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "national_grid_northing_of_end_of_traverse": { + "name": "national_grid_northing_of_end_of_traverse", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "ground_level_relative_to_datum_of_end_of_traverse": { + "name": "ground_level_relative_to_datum_of_end_of_traverse", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "local_grid_easting_of_end_of_traverse": { + "name": "local_grid_easting_of_end_of_traverse", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "local_grid_northing_of_end_of_traverse": { + "name": "local_grid_northing_of_end_of_traverse", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "local_elevation_of_end_of_traverse": { + "name": "local_elevation_of_end_of_traverse", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "latitude_of_location_or_start_of_traverse": { + "name": "latitude_of_location_or_start_of_traverse", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "longitude_of_location_or_start_of_traverse": { + "name": "longitude_of_location_or_start_of_traverse", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "latitude_of_end_of_traverse": { + "name": "latitude_of_end_of_traverse", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "longitude_of_end_of_traverse": { + "name": "longitude_of_end_of_traverse", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "projection_format": { + "name": "projection_format", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "method_of_location": { + "name": "method_of_location", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "site_location_sub_division_within_project_code_or_description": { + "name": "site_location_sub_division_within_project_code_or_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "investigation_phase_grouping_code_or_description": { + "name": "investigation_phase_grouping_code_or_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "alignment_identifier": { + "name": "alignment_identifier", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "offset": { + "name": "offset", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "chainage": { + "name": "chainage", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reference_to_or_details_of_algorithm_used_to_calculate_local_grid_reference": { + "name": "reference_to_or_details_of_algorithm_used_to_calculate_local_grid_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_boring_or_pitting_instructions": { + "name": "associated_file_reference_e_g_boring_or_pitting_instructions", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "national_datum_referencing_system_used": { + "name": "national_datum_referencing_system_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "original_hole_id": { + "name": "original_hole_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "original_job_reference": { + "name": "original_job_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "originating_company": { + "name": "originating_company", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "geometry": { + "name": "geometry", + "type": "geometry(point)", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "spatial_index": { + "name": "spatial_index", + "columns": [ + { + "expression": "geometry", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gist", + "with": {} + }, + "idx_location_details_project": { + "name": "idx_location_details_project", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_location_details_abbr": { + "name": "idx_location_details_abbr", + "columns": [ + { + "expression": "type_of_activity", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status_of_information_relating_to_this_position", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "national_grid_referencing_system_used", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "location_details_type_of_activity_abbreviation_id_fk": { + "name": "location_details_type_of_activity_abbreviation_id_fk", + "tableFrom": "location_details", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_activity" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "location_details_status_of_information_relating_to_this_position_abbreviation_id_fk": { + "name": "location_details_status_of_information_relating_to_this_position_abbreviation_id_fk", + "tableFrom": "location_details", + "tableTo": "abbreviation", + "columnsFrom": [ + "status_of_information_relating_to_this_position" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "location_details_national_grid_referencing_system_used_abbreviation_id_fk": { + "name": "location_details_national_grid_referencing_system_used_abbreviation_id_fk", + "tableFrom": "location_details", + "tableTo": "abbreviation", + "columnsFrom": [ + "national_grid_referencing_system_used" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "location_details_project_id_project_id_fk": { + "name": "location_details_project_id_project_id_fk", + "tableFrom": "location_details", + "tableTo": "project", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_location_details": { + "name": "unique_location_details", + "nullsNotDistinct": false, + "columns": [ + "project_id", + "location_identifier" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.location_specific_time_related_remarks": { + "name": "location_specific_time_related_remarks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "date_and_time_of_remark_or_start_of_event": { + "name": "date_and_time_of_remark_or_start_of_event", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "component_or_sub_activity": { + "name": "component_or_sub_activity", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "time_related_remark": { + "name": "time_related_remark", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "duration_of_event_or_activity": { + "name": "duration_of_event_or_activity", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "date_and_time_of_end_of_event": { + "name": "date_and_time_of_end_of_event", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_site_journal_records": { + "name": "associated_file_reference_e_g_site_journal_records", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "location_specific_time_related_remarks_location_details_id_location_details_id_fk": { + "name": "location_specific_time_related_remarks_location_details_id_location_details_id_fk", + "tableFrom": "location_specific_time_related_remarks", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_location_specific_time_related_remarks": { + "name": "unique_location_specific_time_related_remarks", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "date_and_time_of_remark_or_start_of_event" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.los_angeles_abrasion_tests": { + "name": "los_angeles_abrasion_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "los_angeles_coefficient": { + "name": "los_angeles_coefficient", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "los_angeles_percentage_wear": { + "name": "los_angeles_percentage_wear", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "los_angeles_wear_ratio": { + "name": "los_angeles_wear_ratio", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "size_fraction_from_which_test_portion_was_obtained": { + "name": "size_fraction_from_which_test_portion_was_obtained", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "ball_load_or_charge_grading": { + "name": "ball_load_or_charge_grading", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "los_angeles_abrasion_tests_sample_information_id_sample_information_id_fk": { + "name": "los_angeles_abrasion_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "los_angeles_abrasion_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_los_angeles_abrasion_tests": { + "name": "unique_los_angeles_abrasion_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mcv_tests_data": { + "name": "mcv_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content_for_mcvt_tesn": { + "name": "water_moisture_content_for_mcvt_tesn", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "method_of_interpretation_of_the_test_curve": { + "name": "method_of_interpretation_of_the_test_curve", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mcv_value_for_mcvt_tesn": { + "name": "mcv_value_for_mcvt_tesn", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "after_test_bulk_density_for_mcvt_tesn": { + "name": "after_test_bulk_density_for_mcvt_tesn", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "difference_between_initial_n_and_final_3n_blows_in_rapid_assessment_test": { + "name": "difference_between_initial_n_and_final_3n_blows_in_rapid_assessment_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "stronger_or_weaker_than_pre_calibrated_standard": { + "name": "stronger_or_weaker_than_pre_calibrated_standard", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "mcv_tests_general_id": { + "name": "mcv_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "mcv_tests_data_mcv_tests_general_id_mcv_tests_general_id_fk": { + "name": "mcv_tests_data_mcv_tests_general_id_mcv_tests_general_id_fk", + "tableFrom": "mcv_tests_data", + "tableTo": "mcv_tests_general", + "columnsFrom": [ + "mcv_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_mcv_tests_data": { + "name": "unique_mcv_tests_data", + "nullsNotDistinct": false, + "columns": [ + "mcv_tests_general_id", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mcv_tests_general": { + "name": "mcv_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "weight_percent_of_sample_retained_on_20_mm_sieve": { + "name": "weight_percent_of_sample_retained_on_20_mm_sieve", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "natural_water_moisture_content_below_20_mm": { + "name": "natural_water_moisture_content_below_20_mm", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "amount_of_stabiliser_added": { + "name": "amount_of_stabiliser_added", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_stabiliser_added": { + "name": "type_of_stabiliser_added", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result": { + "name": "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "mcv_tests_general_sample_information_id_sample_information_id_fk": { + "name": "mcv_tests_general_sample_information_id_sample_information_id_fk", + "tableFrom": "mcv_tests_general", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_mcv_tests_general": { + "name": "unique_mcv_tests_general", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.monitoring_installation_pipe_work": { + "name": "monitoring_installation_pipe_work", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "pipe_reference": { + "name": "pipe_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "top_of_construction_zone": { + "name": "top_of_construction_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "base_of_construction_zone": { + "name": "base_of_construction_zone", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "diameter_of_pipe": { + "name": "diameter_of_pipe", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type_of_pipe": { + "name": "type_of_pipe", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "details_of_pipe_construction": { + "name": "details_of_pipe_construction", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_drilling_journals": { + "name": "associated_file_reference_e_g_drilling_journals", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_monitoring_installation_pipe_work_abbr": { + "name": "idx_monitoring_installation_pipe_work_abbr", + "columns": [ + { + "expression": "type_of_pipe", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "monitoring_installation_pipe_work_type_of_pipe_abbreviation_id_fk": { + "name": "monitoring_installation_pipe_work_type_of_pipe_abbreviation_id_fk", + "tableFrom": "monitoring_installation_pipe_work", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_pipe" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "monitoring_installation_pipe_work_location_details_id_location_details_id_fk": { + "name": "monitoring_installation_pipe_work_location_details_id_location_details_id_fk", + "tableFrom": "monitoring_installation_pipe_work", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_monitoring_installation_pipe_work": { + "name": "unique_monitoring_installation_pipe_work", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "pipe_reference", + "top_of_construction_zone", + "base_of_construction_zone" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.monitoring_installations_and_instruments": { + "name": "monitoring_installations_and_instruments", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "monitoring_point_reference": { + "name": "monitoring_point_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_distance_of_monitoring_point_from_loca_id": { + "name": "initial_distance_of_monitoring_point_from_loca_id", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "pipe_reference": { + "name": "pipe_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "installation_date": { + "name": "installation_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "instrument_type": { + "name": "instrument_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "details_of_instrument": { + "name": "details_of_instrument", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "distance_to_start_of_response_zone_from_loca_id_datum": { + "name": "distance_to_start_of_response_zone_from_loca_id_datum", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "distance_to_end_of_response_zone_from_loca_id_datum": { + "name": "distance_to_end_of_response_zone_from_loca_id_datum", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "bearing_of_monitoring_axis_a_compass_bearing": { + "name": "bearing_of_monitoring_axis_a_compass_bearing", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "bearing_of_monitoring_axis_b_compass_bearing": { + "name": "bearing_of_monitoring_axis_b_compass_bearing", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "bearing_of_monitoring_axis_c_compass_bearing": { + "name": "bearing_of_monitoring_axis_c_compass_bearing", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "inclination_of_instrument_axis_a_measured_positively_down_from_horizontal": { + "name": "inclination_of_instrument_axis_a_measured_positively_down_from_horizontal", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "inclination_of_instrument_axis_b_measured_positively_down_from_horizontal": { + "name": "inclination_of_instrument_axis_b_measured_positively_down_from_horizontal", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "inclination_of_instrument_axis_c_measured_positively_down_from_horizontal": { + "name": "inclination_of_instrument_axis_c_measured_positively_down_from_horizontal", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "reading_sign_convention_in_direction_a": { + "name": "reading_sign_convention_in_direction_a", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reading_sign_convention_in_direction_b": { + "name": "reading_sign_convention_in_direction_b", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reading_sign_convention_in_direction_c": { + "name": "reading_sign_convention_in_direction_c", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "contractor_who_installed_monitoring_instrument": { + "name": "contractor_who_installed_monitoring_instrument", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_monitoring_installations_and_instruments_abbr": { + "name": "idx_monitoring_installations_and_instruments_abbr", + "columns": [ + { + "expression": "instrument_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "monitoring_installations_and_instruments_instrument_type_abbreviation_id_fk": { + "name": "monitoring_installations_and_instruments_instrument_type_abbreviation_id_fk", + "tableFrom": "monitoring_installations_and_instruments", + "tableTo": "abbreviation", + "columnsFrom": [ + "instrument_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "monitoring_installations_and_instruments_location_details_id_location_details_id_fk": { + "name": "monitoring_installations_and_instruments_location_details_id_location_details_id_fk", + "tableFrom": "monitoring_installations_and_instruments", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_monitoring_installations_and_instruments": { + "name": "unique_monitoring_installations_and_instruments", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "monitoring_point_reference", + "initial_distance_of_monitoring_point_from_loca_id" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.monitoring_readings": { + "name": "monitoring_readings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "date_and_time_of_reading": { + "name": "date_and_time_of_reading", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "reading_type": { + "name": "reading_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "reading_reference": { + "name": "reading_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "instrument_reference_serial_number": { + "name": "instrument_reference_serial_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reading": { + "name": "reading", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "units_of_reading": { + "name": "units_of_reading", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "measurement_method": { + "name": "measurement_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "instrument_method_reading_detection_limit": { + "name": "instrument_method_reading_detection_limit", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "instrument_method_upper_reading_detection_when_appropriate": { + "name": "instrument_method_upper_reading_detection_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "client_preferred_name_of_measurement": { + "name": "client_preferred_name_of_measurement", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "organization_taking_reading": { + "name": "organization_taking_reading", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "comments_on_reading": { + "name": "comments_on_reading", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_monitoring_field_sheets": { + "name": "associated_file_reference_e_g_monitoring_field_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "monitoring_installations_and_instruments_id": { + "name": "monitoring_installations_and_instruments_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_monitoring_readings_abbr": { + "name": "idx_monitoring_readings_abbr", + "columns": [ + { + "expression": "reading_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "monitoring_readings_reading_type_abbreviation_id_fk": { + "name": "monitoring_readings_reading_type_abbreviation_id_fk", + "tableFrom": "monitoring_readings", + "tableTo": "abbreviation", + "columnsFrom": [ + "reading_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "monitoring_readings_monitoring_installations_and_instruments_id_monitoring_installations_and_instruments_id_fk": { + "name": "monitoring_readings_monitoring_installations_and_instruments_id_monitoring_installations_and_instruments_id_fk", + "tableFrom": "monitoring_readings", + "tableTo": "monitoring_installations_and_instruments", + "columnsFrom": [ + "monitoring_installations_and_instruments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_monitoring_readings": { + "name": "unique_monitoring_readings", + "nullsNotDistinct": false, + "columns": [ + "monitoring_installations_and_instruments_id", + "date_and_time_of_reading", + "reading_type", + "reading_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.on_site_volatile_headspace_testing_by_photo_ionisation_detector": { + "name": "on_site_volatile_headspace_testing_by_photo_ionisation_detector", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_of_headspace_test_sample": { + "name": "depth_of_headspace_test_sample", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "ambient_temperature_at_time_of_test": { + "name": "ambient_temperature_at_time_of_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "result_of_pid_analysis": { + "name": "result_of_pid_analysis", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks_on_test": { + "name": "remarks_on_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_pid_used_and_method_description": { + "name": "details_of_pid_used_and_method_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stratum_reference_shown_on_trial_pit_or_traverse_sketch": { + "name": "stratum_reference_shown_on_trial_pit_or_traverse_sketch", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "on_site_volatile_headspace_testing_by_photo_ionisation_detector_location_details_id_location_details_id_fk": { + "name": "on_site_volatile_headspace_testing_by_photo_ionisation_detector_location_details_id_location_details_id_fk", + "tableFrom": "on_site_volatile_headspace_testing_by_photo_ionisation_detector", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_on_site_volatile_headspace_testing_by_photo_ionisation_detector": { + "name": "unique_on_site_volatile_headspace_testing_by_photo_ionisation_detector", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_of_headspace_test_sample", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.on_site_volatile_headspace_testing_using_flame_ionisation_detector": { + "name": "on_site_volatile_headspace_testing_using_flame_ionisation_detector", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_of_headspace_test_sample": { + "name": "depth_of_headspace_test_sample", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "result_of_fid_analysis": { + "name": "result_of_fid_analysis", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks_on_test": { + "name": "remarks_on_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_fid_used_and_method_description": { + "name": "details_of_fid_used_and_method_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stratum_reference_shown_on_trial_pit_or_traverse_sketch": { + "name": "stratum_reference_shown_on_trial_pit_or_traverse_sketch", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "on_site_volatile_headspace_testing_using_flame_ionisation_detector_location_details_id_location_details_id_fk": { + "name": "on_site_volatile_headspace_testing_using_flame_ionisation_detector_location_details_id_location_details_id_fk", + "tableFrom": "on_site_volatile_headspace_testing_using_flame_ionisation_detector", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_on_site_volatile_headspace_testing_using_flame_ionisation_detector": { + "name": "unique_on_site_volatile_headspace_testing_using_flame_ionisation_detector", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_of_headspace_test_sample", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.particle_density_tests": { + "name": "particle_density_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "particle_density_with_prefix_if_value_assumed": { + "name": "particle_density_with_prefix_if_value_assumed", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_test": { + "name": "type_of_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "any_deviation_from_the_specified_test_procedure": { + "name": "any_deviation_from_the_specified_test_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "pycnometer_volume_if_used_and_not_50ml": { + "name": "pycnometer_volume_if_used_and_not_50ml", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "identity_of_gas_if_gas_pycnometer_used": { + "name": "identity_of_gas_if_gas_pycnometer_used", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_particle_density_tests_abbr": { + "name": "idx_particle_density_tests_abbr", + "columns": [ + { + "expression": "type_of_test", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "identity_of_gas_if_gas_pycnometer_used", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "particle_density_tests_type_of_test_abbreviation_id_fk": { + "name": "particle_density_tests_type_of_test_abbreviation_id_fk", + "tableFrom": "particle_density_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_test" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "particle_density_tests_identity_of_gas_if_gas_pycnometer_used_abbreviation_id_fk": { + "name": "particle_density_tests_identity_of_gas_if_gas_pycnometer_used_abbreviation_id_fk", + "tableFrom": "particle_density_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "identity_of_gas_if_gas_pycnometer_used" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "particle_density_tests_sample_information_id_sample_information_id_fk": { + "name": "particle_density_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "particle_density_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_particle_density_tests": { + "name": "unique_particle_density_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.particle_size_distribution_analysis_data": { + "name": "particle_size_distribution_analysis_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "sieve_or_particle_size": { + "name": "sieve_or_particle_size", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "percentage_passing_finer_than_grat_size": { + "name": "percentage_passing_finer_than_grat_size", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "test_type": { + "name": "test_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "particle_size_distribution_analysis_general_id": { + "name": "particle_size_distribution_analysis_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_particle_size_distribution_analysis_data_abbr": { + "name": "idx_particle_size_distribution_analysis_data_abbr", + "columns": [ + { + "expression": "test_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "particle_size_distribution_analysis_data_test_type_abbreviation_id_fk": { + "name": "particle_size_distribution_analysis_data_test_type_abbreviation_id_fk", + "tableFrom": "particle_size_distribution_analysis_data", + "tableTo": "abbreviation", + "columnsFrom": [ + "test_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "particle_size_distribution_analysis_data_particle_size_distribution_analysis_general_id_particle_size_distribution_analysis_general_id_fk": { + "name": "particle_size_distribution_analysis_data_particle_size_distribution_analysis_general_id_particle_size_distribution_analysis_general_id_fk", + "tableFrom": "particle_size_distribution_analysis_data", + "tableTo": "particle_size_distribution_analysis_general", + "columnsFrom": [ + "particle_size_distribution_analysis_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_particle_size_distribution_analysis_data": { + "name": "unique_particle_size_distribution_analysis_data", + "nullsNotDistinct": false, + "columns": [ + "particle_size_distribution_analysis_general_id", + "sieve_or_particle_size" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.particle_size_distribution_analysis_general": { + "name": "particle_size_distribution_analysis_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "uniformity_coefficient_d60_d10": { + "name": "uniformity_coefficient_d60_d10", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "percentage_of_material_tested_greater_than_63mm_cobbles": { + "name": "percentage_of_material_tested_greater_than_63mm_cobbles", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "percentage_of_material_tested_in_range_63mm_to_2mm_gravel": { + "name": "percentage_of_material_tested_in_range_63mm_to_2mm_gravel", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "percentage_of_material_tested_in_range_2mm_to_63um_sand": { + "name": "percentage_of_material_tested_in_range_2mm_to_63um_sand", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "percentage_of_material_tested_in_range_63um_to_2um_silt": { + "name": "percentage_of_material_tested_in_range_63um_to_2um_silt", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "percentage_of_material_tested_less_than_2um_clay": { + "name": "percentage_of_material_tested_less_than_2um_clay", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "percentage_less_than_63um": { + "name": "percentage_less_than_63um", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result": { + "name": "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "any_deviation_from_the_specified_test_procedure": { + "name": "any_deviation_from_the_specified_test_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "particle_density_used_in_calculations_with_prefix_if_value_assumed": { + "name": "particle_density_used_in_calculations_with_prefix_if_value_assumed", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "method_of_pre_treatment": { + "name": "method_of_pre_treatment", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "amount_of_soil_tested_was_sufficient_to_comply_with_recommended_minimum_mass": { + "name": "amount_of_soil_tested_was_sufficient_to_comply_with_recommended_minimum_mass", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remark_if_the_size_of_the_fractions_is_not_expressed_as_percentage_of_total_dry_mass": { + "name": "remark_if_the_size_of_the_fractions_is_not_expressed_as_percentage_of_total_dry_mass", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "coefficient_of_curvature": { + "name": "coefficient_of_curvature", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "particle_size_distribution_analysis_general_sample_information_id_sample_information_id_fk": { + "name": "particle_size_distribution_analysis_general_sample_information_id_sample_information_id_fk", + "tableFrom": "particle_size_distribution_analysis_general", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_particle_size_distribution_analysis_general": { + "name": "unique_particle_size_distribution_analysis_general", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.plate_loading_tests_data": { + "name": "plate_loading_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "load_stage": { + "name": "load_stage", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stage_elapsed_time": { + "name": "stage_elapsed_time", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "applied_load": { + "name": "applied_load", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "settlement_gauge_1": { + "name": "settlement_gauge_1", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "settlement_gauge_2": { + "name": "settlement_gauge_2", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "settlement_gauge_3": { + "name": "settlement_gauge_3", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "settlement_gauge_4": { + "name": "settlement_gauge_4", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "comments_on_reading": { + "name": "comments_on_reading", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "plate_loading_tests_general_id": { + "name": "plate_loading_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "plate_loading_tests_data_plate_loading_tests_general_id_plate_loading_tests_general_id_fk": { + "name": "plate_loading_tests_data_plate_loading_tests_general_id_plate_loading_tests_general_id_fk", + "tableFrom": "plate_loading_tests_data", + "tableTo": "plate_loading_tests_general", + "columnsFrom": [ + "plate_loading_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_plate_loading_tests_data": { + "name": "unique_plate_loading_tests_data", + "nullsNotDistinct": false, + "columns": [ + "plate_loading_tests_general_id", + "load_stage", + "stage_elapsed_time" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.plate_loading_tests_general": { + "name": "plate_loading_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_depth": { + "name": "test_depth", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "load_cycle": { + "name": "load_cycle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "plate_diameter": { + "name": "plate_diameter", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "seating_load_including_apparatus_mass": { + "name": "seating_load_including_apparatus_mass", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "factor_a0": { + "name": "factor_a0", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "factor_a1": { + "name": "factor_a1", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "factor_a2": { + "name": "factor_a2", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "strain_modulus": { + "name": "strain_modulus", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "elastic_modulus_for_second_loading_cycle": { + "name": "elastic_modulus_for_second_loading_cycle", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "modulus_of_subgrade_reaction": { + "name": "modulus_of_subgrade_reaction", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "elastic_modulus": { + "name": "elastic_modulus", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "amount_of_stabiliser_added": { + "name": "amount_of_stabiliser_added", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_stabiliser_added": { + "name": "type_of_stabiliser_added", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stratum_reference_shown_on_trial_pit_or_traverse_sketch": { + "name": "stratum_reference_shown_on_trial_pit_or_traverse_sketch", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "plate_loading_tests_general_location_details_id_location_details_id_fk": { + "name": "plate_loading_tests_general_location_details_id_location_details_id_fk", + "tableFrom": "plate_loading_tests_general", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_plate_loading_tests_general": { + "name": "unique_plate_loading_tests_general", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "test_depth", + "test_reference", + "load_cycle" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.point_load_testing": { + "name": "point_load_testing", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "uncorrected_point_load_is": { + "name": "uncorrected_point_load_is", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "size_corrected_point_load_index_is_50": { + "name": "size_corrected_point_load_index_is_50", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "point_load_test_type": { + "name": "point_load_test_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "water_content_of_point_load_test_specimen": { + "name": "water_content_of_point_load_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_point_load_testing_abbr": { + "name": "idx_point_load_testing_abbr", + "columns": [ + { + "expression": "point_load_test_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "point_load_testing_point_load_test_type_abbreviation_id_fk": { + "name": "point_load_testing_point_load_test_type_abbreviation_id_fk", + "tableFrom": "point_load_testing", + "tableTo": "abbreviation", + "columnsFrom": [ + "point_load_test_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "point_load_testing_sample_information_id_sample_information_id_fk": { + "name": "point_load_testing_sample_information_id_sample_information_id_fk", + "tableFrom": "point_load_testing", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_point_load_testing": { + "name": "unique_point_load_testing", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pressuremeter_test_data": { + "name": "pressuremeter_test_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "sequence_number": { + "name": "sequence_number", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "axis_1_displacement": { + "name": "axis_1_displacement", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "axis_2_displacement": { + "name": "axis_2_displacement", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "axis_3_displacement": { + "name": "axis_3_displacement", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "total_pressure": { + "name": "total_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "pore_pressure_cell_a": { + "name": "pore_pressure_cell_a", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "pore_pressure_cell_b": { + "name": "pore_pressure_cell_b", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "volume_change_in_test_cell": { + "name": "volume_change_in_test_cell", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "arm_1_displacement": { + "name": "arm_1_displacement", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "arm_2_displacement": { + "name": "arm_2_displacement", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "arm_3_displacement": { + "name": "arm_3_displacement", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "arm_4_displacement": { + "name": "arm_4_displacement", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "arm_5_displacement": { + "name": "arm_5_displacement", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "arm_6_displacement": { + "name": "arm_6_displacement", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mean_arm_displacement": { + "name": "mean_arm_displacement", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "pressuremeter_test_results_general_id": { + "name": "pressuremeter_test_results_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "pressuremeter_test_data_pressuremeter_test_results_general_id_pressuremeter_test_results_general_id_fk": { + "name": "pressuremeter_test_data_pressuremeter_test_results_general_id_pressuremeter_test_results_general_id_fk", + "tableFrom": "pressuremeter_test_data", + "tableTo": "pressuremeter_test_results_general", + "columnsFrom": [ + "pressuremeter_test_results_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_pressuremeter_test_data": { + "name": "unique_pressuremeter_test_data", + "nullsNotDistinct": false, + "columns": [ + "pressuremeter_test_results_general_id", + "sequence_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pressuremeter_test_results_general": { + "name": "pressuremeter_test_results_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_of_test": { + "name": "depth_of_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "date_of_test": { + "name": "date_of_test", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "measured_or_assumed_ground_water_level": { + "name": "measured_or_assumed_ground_water_level", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "subcontractors_name": { + "name": "subcontractors_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "operators_details": { + "name": "operators_details", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "instrument_reference_serial_number": { + "name": "instrument_reference_serial_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "pressuremeter_type": { + "name": "pressuremeter_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "uninflated_diameter_of_pressuremeter": { + "name": "uninflated_diameter_of_pressuremeter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "estimated_in_situ_horizontal_stress": { + "name": "estimated_in_situ_horizontal_stress", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "initial_shear_modulus": { + "name": "initial_shear_modulus", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "undrained_shear_strength": { + "name": "undrained_shear_strength", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "limit_pressure": { + "name": "limit_pressure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "angle_of_friction": { + "name": "angle_of_friction", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "angle_of_dilation": { + "name": "angle_of_dilation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "angle_of_friction_at_constant_volume_cv_used": { + "name": "angle_of_friction_at_constant_volume_cv_used", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "method_s_used_to_determine_derived_soil_parameters_including_those_in_pmtl": { + "name": "method_s_used_to_determine_derived_soil_parameters_including_those_in_pmtl", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "number_of_arms": { + "name": "number_of_arms", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "bearing_of_arm_1_clockwise_degrees_from_north": { + "name": "bearing_of_arm_1_clockwise_degrees_from_north", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "arm_combination_used_for_analysis": { + "name": "arm_combination_used_for_analysis", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_pressuremeter_test_results_general_abbr": { + "name": "idx_pressuremeter_test_results_general_abbr", + "columns": [ + { + "expression": "pressuremeter_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pressuremeter_test_results_general_pressuremeter_type_abbreviation_id_fk": { + "name": "pressuremeter_test_results_general_pressuremeter_type_abbreviation_id_fk", + "tableFrom": "pressuremeter_test_results_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "pressuremeter_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "pressuremeter_test_results_general_location_details_id_location_details_id_fk": { + "name": "pressuremeter_test_results_general_location_details_id_location_details_id_fk", + "tableFrom": "pressuremeter_test_results_general", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_pressuremeter_test_results_general": { + "name": "unique_pressuremeter_test_results_general", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_of_test", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pressuremeter_test_results_individual_loops": { + "name": "pressuremeter_test_results_individual_loops", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "unload_reload_loop_number": { + "name": "unload_reload_loop_number", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "unload_reload_shear_modulus": { + "name": "unload_reload_shear_modulus", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mean_strain": { + "name": "mean_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mean_pressure": { + "name": "mean_pressure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "strain_range_or_amplitude": { + "name": "strain_range_or_amplitude", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "pressure_range_or_amplitude": { + "name": "pressure_range_or_amplitude", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "shear_stress_coefficient_from_bolton_and_whittle": { + "name": "shear_stress_coefficient_from_bolton_and_whittle", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "linearity_exponent_from_bolton_and_whittle": { + "name": "linearity_exponent_from_bolton_and_whittle", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sequence_number": { + "name": "sequence_number", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "pressuremeter_test_results_general_id": { + "name": "pressuremeter_test_results_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "pressuremeter_test_results_individual_loops_pressuremeter_test_results_general_id_pressuremeter_test_results_general_id_fk": { + "name": "pressuremeter_test_results_individual_loops_pressuremeter_test_results_general_id_pressuremeter_test_results_general_id_fk", + "tableFrom": "pressuremeter_test_results_individual_loops", + "tableTo": "pressuremeter_test_results_general", + "columnsFrom": [ + "pressuremeter_test_results_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_pressuremeter_test_results_individual_loops": { + "name": "unique_pressuremeter_test_results_individual_loops", + "nullsNotDistinct": false, + "columns": [ + "pressuremeter_test_results_general_id", + "unload_reload_loop_number", + "sequence_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pumping_tests_data": { + "name": "pumping_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "date_and_time_of_reading": { + "name": "date_and_time_of_reading", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "depth_to_water_below_ground": { + "name": "depth_to_water_below_ground", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "pumping_rate_from_hole": { + "name": "pumping_rate_from_hole", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "pumping_tests_general_id": { + "name": "pumping_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "pumping_tests_data_pumping_tests_general_id_pumping_tests_general_id_fk": { + "name": "pumping_tests_data_pumping_tests_general_id_pumping_tests_general_id_fk", + "tableFrom": "pumping_tests_data", + "tableTo": "pumping_tests_general", + "columnsFrom": [ + "pumping_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_pumping_tests_data": { + "name": "unique_pumping_tests_data", + "nullsNotDistinct": false, + "columns": [ + "pumping_tests_general_id", + "date_and_time_of_reading" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pumping_tests_general": { + "name": "pumping_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "contractor": { + "name": "contractor", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "method_of_testing": { + "name": "method_of_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks_on_test": { + "name": "remarks_on_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "pumping_tests_general_location_details_id_location_details_id_fk": { + "name": "pumping_tests_general_location_details_id_location_details_id_fk", + "tableFrom": "pumping_tests_general", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_pumping_tests_general": { + "name": "unique_pumping_tests_general", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.relative_density_tests": { + "name": "relative_density_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "maximum_dry_density": { + "name": "maximum_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "weight_percent_of_sample_retained_on_37_5mm_sieve": { + "name": "weight_percent_of_sample_retained_on_37_5mm_sieve", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "weight_percent_of_sample_retained_on_6_3mm_sieve": { + "name": "weight_percent_of_sample_retained_on_6_3mm_sieve", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "weight_percent_of_sample_retained_on_2mm_sieve": { + "name": "weight_percent_of_sample_retained_on_2mm_sieve", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "minimum_dry_density": { + "name": "minimum_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks_on_test": { + "name": "remarks_on_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "relative_density_tests_sample_information_id_sample_information_id_fk": { + "name": "relative_density_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "relative_density_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_relative_density_tests": { + "name": "unique_relative_density_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resonant_column_test_consolidation": { + "name": "resonant_column_test_consolidation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_stage_number": { + "name": "test_stage_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_height": { + "name": "specimen_height", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_consolidation": { + "name": "type_of_consolidation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "duration_of_stage": { + "name": "duration_of_stage", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_height_at_end_of_test_stage": { + "name": "specimen_height_at_end_of_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter_at_end_of_test_stage": { + "name": "specimen_diameter_at_end_of_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "water_content_at_end_of_test_stage": { + "name": "water_content_at_end_of_test_stage", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "dry_density_at_end_of_test_stage": { + "name": "dry_density_at_end_of_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "relative_density_at_end_of_test_stage": { + "name": "relative_density_at_end_of_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "voids_ratio_at_end_of_test_stage": { + "name": "voids_ratio_at_end_of_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "effective_axial_stress_during_consolidation_at_end_of_test_stage": { + "name": "effective_axial_stress_during_consolidation_at_end_of_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "effective_radial_stress_during_consolidation_at_end_of_test_stage": { + "name": "effective_radial_stress_during_consolidation_at_end_of_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviatoric_stress_at_end_of_test_stage": { + "name": "deviatoric_stress_at_end_of_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "shear_stress_at_end_of_test_stage": { + "name": "shear_stress_at_end_of_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mean_effective_stress_at_end_of_test_stage": { + "name": "mean_effective_stress_at_end_of_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "axial_strain_at_end_of_test_stage": { + "name": "axial_strain_at_end_of_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "volumetric_strain_from_measured_volume_change_at_end_of_test_stage": { + "name": "volumetric_strain_from_measured_volume_change_at_end_of_test_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "radial_strain_from_measured_volume_change": { + "name": "radial_strain_from_measured_volume_change", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "bender_element_test_sequence": { + "name": "bender_element_test_sequence", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "bender_element_axis_of_measurement": { + "name": "bender_element_axis_of_measurement", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "distance_between_bender_elements": { + "name": "distance_between_bender_elements", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "measured_arrival_time_of_propagated_wave": { + "name": "measured_arrival_time_of_propagated_wave", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "method_of_measuring_arrival_time_of_propagated_wave": { + "name": "method_of_measuring_arrival_time_of_propagated_wave", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "calculated_shear_wave_velocity": { + "name": "calculated_shear_wave_velocity", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "shear_modulus_gmax_from_bender_elements": { + "name": "shear_modulus_gmax_from_bender_elements", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "resonant_column_test_general_id": { + "name": "resonant_column_test_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_resonant_column_test_consolidation_abbr": { + "name": "idx_resonant_column_test_consolidation_abbr", + "columns": [ + { + "expression": "type_of_consolidation", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resonant_column_test_consolidation_type_of_consolidation_abbreviation_id_fk": { + "name": "resonant_column_test_consolidation_type_of_consolidation_abbreviation_id_fk", + "tableFrom": "resonant_column_test_consolidation", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_consolidation" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "resonant_column_test_consolidation_resonant_column_test_general_id_resonant_column_test_general_id_fk": { + "name": "resonant_column_test_consolidation_resonant_column_test_general_id_resonant_column_test_general_id_fk", + "tableFrom": "resonant_column_test_consolidation", + "tableTo": "resonant_column_test_general", + "columnsFrom": [ + "resonant_column_test_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_resonant_column_test_consolidation": { + "name": "unique_resonant_column_test_consolidation", + "nullsNotDistinct": false, + "columns": [ + "resonant_column_test_general_id", + "test_stage_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resonant_column_test_data": { + "name": "resonant_column_test_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_stage_number": { + "name": "test_stage_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "measurement_number": { + "name": "measurement_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_conditions": { + "name": "test_conditions", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_height": { + "name": "specimen_height", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "cell_pressure": { + "name": "cell_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "back_pressure": { + "name": "back_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "axial_stress": { + "name": "axial_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "base_pore_water_pressure": { + "name": "base_pore_water_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mid_height_pore_water_pressure": { + "name": "mid_height_pore_water_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "pore_pressure_ratio": { + "name": "pore_pressure_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "maximum_excess_pore_water_pressure": { + "name": "maximum_excess_pore_water_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "external_axial_strain": { + "name": "external_axial_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "volumetric_strain": { + "name": "volumetric_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "principal_stress_difference": { + "name": "principal_stress_difference", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mean_effective_stress": { + "name": "mean_effective_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "minor_principal_stress_sigma_3": { + "name": "minor_principal_stress_sigma_3", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "major_principal_stress_sigma_1": { + "name": "major_principal_stress_sigma_1", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "average_shear_strain": { + "name": "average_shear_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "shear_modulus": { + "name": "shear_modulus", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "damping": { + "name": "damping", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "resonant_column_test_general_id": { + "name": "resonant_column_test_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_resonant_column_test_data_abbr": { + "name": "idx_resonant_column_test_data_abbr", + "columns": [ + { + "expression": "test_conditions", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resonant_column_test_data_test_conditions_abbreviation_id_fk": { + "name": "resonant_column_test_data_test_conditions_abbreviation_id_fk", + "tableFrom": "resonant_column_test_data", + "tableTo": "abbreviation", + "columnsFrom": [ + "test_conditions" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "resonant_column_test_data_resonant_column_test_general_id_resonant_column_test_general_id_fk": { + "name": "resonant_column_test_data_resonant_column_test_general_id_resonant_column_test_general_id_fk", + "tableFrom": "resonant_column_test_data", + "tableTo": "resonant_column_test_general", + "columnsFrom": [ + "resonant_column_test_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_resonant_column_test_data": { + "name": "unique_resonant_column_test_data", + "nullsNotDistinct": false, + "columns": [ + "resonant_column_test_general_id", + "test_stage_number", + "measurement_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resonant_column_test_derived_parameters": { + "name": "resonant_column_test_derived_parameters", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "type_of_consolidation": { + "name": "type_of_consolidation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "consolidation_stage": { + "name": "consolidation_stage", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "isotropic_anisotropic_consolidation_cell_pressure": { + "name": "isotropic_anisotropic_consolidation_cell_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "isotropic_anisotropic_consolidation_back_pressure": { + "name": "isotropic_anisotropic_consolidation_back_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "effective_radial_stress_during_consolidation": { + "name": "effective_radial_stress_during_consolidation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "effective_axial_stress_during_consolidation": { + "name": "effective_axial_stress_during_consolidation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviator_stress_at_end_of_isotropic_anisotropic_consolidation": { + "name": "deviator_stress_at_end_of_isotropic_anisotropic_consolidation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "change_to_volumetric_strain_during_isotropic_anisotropic_consolidation": { + "name": "change_to_volumetric_strain_during_isotropic_anisotropic_consolidation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "axial_strain_after_isotropic_anisotropic_consolidation": { + "name": "axial_strain_after_isotropic_anisotropic_consolidation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "shear_modulus_g0": { + "name": "shear_modulus_g0", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "damping_ratio": { + "name": "damping_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "normalised_shear_modulus_by_maximum_shear_modulus": { + "name": "normalised_shear_modulus_by_maximum_shear_modulus", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "slippage_ratio": { + "name": "slippage_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "resonant_column_test_data_id": { + "name": "resonant_column_test_data_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "resonant_column_test_derived_parameters_resonant_column_test_data_id_resonant_column_test_data_id_fk": { + "name": "resonant_column_test_derived_parameters_resonant_column_test_data_id_resonant_column_test_data_id_fk", + "tableFrom": "resonant_column_test_derived_parameters", + "tableTo": "resonant_column_test_data", + "columnsFrom": [ + "resonant_column_test_data_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_resonant_column_test_derived_parameters": { + "name": "unique_resonant_column_test_derived_parameters", + "nullsNotDistinct": false, + "columns": [ + "resonant_column_test_data_id" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resonant_column_test_general": { + "name": "resonant_column_test_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "specific_condition_statements": { + "name": "specific_condition_statements", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_drainage": { + "name": "type_of_drainage", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "orientation_of_specimen": { + "name": "orientation_of_specimen", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "initial_specimen_diameter": { + "name": "initial_specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_specimen_height": { + "name": "initial_specimen_height", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_water_moisture_content": { + "name": "initial_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "final_water_moisture_content": { + "name": "final_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_bulk_density": { + "name": "initial_bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "minimum_dry_density_for_sand": { + "name": "minimum_dry_density_for_sand", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "maximum_dry_density_for_sand": { + "name": "maximum_dry_density_for_sand", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_relative_density_index": { + "name": "initial_relative_density_index", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_void_ratio": { + "name": "initial_void_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_degree_of_saturation": { + "name": "initial_degree_of_saturation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "particle_density_with_prefix_if_value_assumed": { + "name": "particle_density_with_prefix_if_value_assumed", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "damping_measurement_method": { + "name": "damping_measurement_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference": { + "name": "associated_file_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_resonant_column_test_general_abbr": { + "name": "idx_resonant_column_test_general_abbr", + "columns": [ + { + "expression": "sample_condition", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "orientation_of_specimen", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resonant_column_test_general_sample_condition_abbreviation_id_fk": { + "name": "resonant_column_test_general_sample_condition_abbreviation_id_fk", + "tableFrom": "resonant_column_test_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "sample_condition" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "resonant_column_test_general_orientation_of_specimen_abbreviation_id_fk": { + "name": "resonant_column_test_general_orientation_of_specimen_abbreviation_id_fk", + "tableFrom": "resonant_column_test_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "orientation_of_specimen" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "resonant_column_test_general_sample_information_id_sample_information_id_fk": { + "name": "resonant_column_test_general_sample_information_id_sample_information_id_fk", + "tableFrom": "resonant_column_test_general", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_resonant_column_test_general": { + "name": "unique_resonant_column_test_general", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resonant_column_test_saturation": { + "name": "resonant_column_test_saturation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_stage_number": { + "name": "test_stage_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "pressure_increment": { + "name": "pressure_increment", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "differential_pressure_used": { + "name": "differential_pressure_used", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "final_cell_pressure": { + "name": "final_cell_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "final_base_porewater_pressure": { + "name": "final_base_porewater_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "final_axial_strain": { + "name": "final_axial_strain", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "final_water_content": { + "name": "final_water_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "final_bulk_density": { + "name": "final_bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "final_dry_density": { + "name": "final_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "final_voids_ratio": { + "name": "final_voids_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "final_degree_of_saturation": { + "name": "final_degree_of_saturation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "final_b_value": { + "name": "final_b_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "resonant_column_test_general_id": { + "name": "resonant_column_test_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "resonant_column_test_saturation_resonant_column_test_general_id_resonant_column_test_general_id_fk": { + "name": "resonant_column_test_saturation_resonant_column_test_general_id_resonant_column_test_general_id_fk", + "tableFrom": "resonant_column_test_saturation", + "tableTo": "resonant_column_test_general", + "columnsFrom": [ + "resonant_column_test_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_resonant_column_test_saturation": { + "name": "unique_resonant_column_test_saturation", + "nullsNotDistinct": false, + "columns": [ + "resonant_column_test_general_id", + "test_stage_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.rock_abrasiveness_tests_data": { + "name": "rock_abrasiveness_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "measurement_number": { + "name": "measurement_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "surface_condition_rough": { + "name": "surface_condition_rough", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "direction_of_scratching_with_respect_to_planes_of_weakness_or_anisotropy": { + "name": "direction_of_scratching_with_respect_to_planes_of_weakness_or_anisotropy", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "rockwell_hardness_hrc_of_stylus": { + "name": "rockwell_hardness_hrc_of_stylus", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "stylus_condition_new_or_re_sharpened": { + "name": "stylus_condition_new_or_re_sharpened", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "as_measured_cai_value": { + "name": "as_measured_cai_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "equivalent_cai_value_at_standard_stylus_hardness_hrc_55": { + "name": "equivalent_cai_value_at_standard_stylus_hardness_hrc_55", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "rock_abrasiveness_tests_general_id": { + "name": "rock_abrasiveness_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "rock_abrasiveness_tests_data_rock_abrasiveness_tests_general_id_rock_abrasiveness_tests_general_id_fk": { + "name": "rock_abrasiveness_tests_data_rock_abrasiveness_tests_general_id_rock_abrasiveness_tests_general_id_fk", + "tableFrom": "rock_abrasiveness_tests_data", + "tableTo": "rock_abrasiveness_tests_general", + "columnsFrom": [ + "rock_abrasiveness_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_rock_abrasiveness_tests_data": { + "name": "unique_rock_abrasiveness_tests_data", + "nullsNotDistinct": false, + "columns": [ + "rock_abrasiveness_tests_general_id", + "measurement_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.rock_abrasiveness_tests_general": { + "name": "rock_abrasiveness_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "date_of_test": { + "name": "date_of_test", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "condition_of_specimen_as_tested_saturated": { + "name": "condition_of_specimen_as_tested_saturated", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "maximum_grain_size": { + "name": "maximum_grain_size", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "planes_of_weakness_or_anisotropy_present_bedding": { + "name": "planes_of_weakness_or_anisotropy_present_bedding", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_apparatus": { + "name": "type_of_apparatus", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "measurement_method_side_view": { + "name": "measurement_method_side_view", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cai_mean_value": { + "name": "cai_mean_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "cai_standard_deviation": { + "name": "cai_standard_deviation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "abrasiveness_classification": { + "name": "abrasiveness_classification", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "rock_abrasiveness_tests_general_sample_information_id_sample_information_id_fk": { + "name": "rock_abrasiveness_tests_general_sample_information_id_sample_information_id_fk", + "tableFrom": "rock_abrasiveness_tests_general", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_rock_abrasiveness_tests_general": { + "name": "unique_rock_abrasiveness_tests_general", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.rock_porosity_and_density_tests": { + "name": "rock_porosity_and_density_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "water_content_of_specimen": { + "name": "water_content_of_specimen", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "saturated_water_content": { + "name": "saturated_water_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "bulk_density": { + "name": "bulk_density", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "dry_density": { + "name": "dry_density", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "porosity": { + "name": "porosity", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "apparent_particle_density": { + "name": "apparent_particle_density", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "temperature_sample_dried_at": { + "name": "temperature_sample_dried_at", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "intact_dry_density": { + "name": "intact_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "rock_porosity_and_density_tests_sample_information_id_sample_information_id_fk": { + "name": "rock_porosity_and_density_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "rock_porosity_and_density_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_rock_porosity_and_density_tests": { + "name": "unique_rock_porosity_and_density_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.rock_uniaxial_compressive_strength_and_deformability_tests": { + "name": "rock_uniaxial_compressive_strength_and_deformability_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_length": { + "name": "specimen_length", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "water_content_of_specimen_tested": { + "name": "water_content_of_specimen_tested", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "condition_of_specimen_as_tested": { + "name": "condition_of_specimen_as_tested", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_duration": { + "name": "test_duration", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stress_rate": { + "name": "stress_rate", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "uniaxial_compressive_strength": { + "name": "uniaxial_compressive_strength", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mode_of_failure": { + "name": "mode_of_failure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "youngs_modulus": { + "name": "youngs_modulus", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "poisson_s_ratio": { + "name": "poisson_s_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "stress_level_at_which_modulus_has_been_measured": { + "name": "stress_level_at_which_modulus_has_been_measured", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "method_of_determination_of_young_s_modulus": { + "name": "method_of_determination_of_young_s_modulus", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type_of_testing_machine": { + "name": "type_of_testing_machine", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "youngs_modulus_tangent": { + "name": "youngs_modulus_tangent", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "youngs_modulus_average": { + "name": "youngs_modulus_average", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "stress_level_at_which_secant_young_s_modulus_has_been_measured": { + "name": "stress_level_at_which_secant_young_s_modulus_has_been_measured", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stress_level_at_which_tangent_young_s_modulus_has_been_measured": { + "name": "stress_level_at_which_tangent_young_s_modulus_has_been_measured", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stress_level_at_which_average_mean_young_s_modulus_has_been_measured": { + "name": "stress_level_at_which_average_mean_young_s_modulus_has_been_measured", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "poisson_s_ratio_secant": { + "name": "poisson_s_ratio_secant", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "poissons_ratio_tangent": { + "name": "poissons_ratio_tangent", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "poissons_ratio_average": { + "name": "poissons_ratio_average", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_rock_uniaxial_compressive_strength_and_deformability_tests_abbr": { + "name": "idx_rock_uniaxial_compressive_strength_and_deformability_tests_abbr", + "columns": [ + { + "expression": "mode_of_failure", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "method_of_determination_of_young_s_modulus", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "rock_uniaxial_compressive_strength_and_deformability_tests_mode_of_failure_abbreviation_id_fk": { + "name": "rock_uniaxial_compressive_strength_and_deformability_tests_mode_of_failure_abbreviation_id_fk", + "tableFrom": "rock_uniaxial_compressive_strength_and_deformability_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "mode_of_failure" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "rock_uniaxial_compressive_strength_and_deformability_tests_method_of_determination_of_young_s_modulus_abbreviation_id_fk": { + "name": "rock_uniaxial_compressive_strength_and_deformability_tests_method_of_determination_of_young_s_modulus_abbreviation_id_fk", + "tableFrom": "rock_uniaxial_compressive_strength_and_deformability_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "method_of_determination_of_young_s_modulus" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "rock_uniaxial_compressive_strength_and_deformability_tests_sample_information_id_sample_information_id_fk": { + "name": "rock_uniaxial_compressive_strength_and_deformability_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "rock_uniaxial_compressive_strength_and_deformability_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_rock_uniaxial_compressive_strength_and_deformability_tests": { + "name": "unique_rock_uniaxial_compressive_strength_and_deformability_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sample_container_details": { + "name": "sample_container_details", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "container_unique_identifier": { + "name": "container_unique_identifier", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "sample_container_type": { + "name": "sample_container_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_container_remarks": { + "name": "sample_container_remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "sample_container_details_sample_information_id_sample_information_id_fk": { + "name": "sample_container_details_sample_information_id_sample_information_id_fk", + "tableFrom": "sample_container_details", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_sample_container_details": { + "name": "unique_sample_container_details", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "container_unique_identifier" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sample_information": { + "name": "sample_information", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_sample": { + "name": "depth_to_top_of_sample", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "sample_reference": { + "name": "sample_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_type": { + "name": "sample_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sample_unique_identifier": { + "name": "sample_unique_identifier", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_sample": { + "name": "depth_to_base_of_sample", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "date_and_time_sample_taken": { + "name": "date_and_time_sample_taken", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "number_of_blows_required_to_drive_sampler": { + "name": "number_of_blows_required_to_drive_sampler", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sample_container": { + "name": "sample_container", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_sample_preparation_at_time_of_sampling": { + "name": "details_of_sample_preparation_at_time_of_sampling", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_diameter": { + "name": "sample_diameter", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "depth_to_water_below_ground_surface_at_time_of_sampling": { + "name": "depth_to_water_below_ground_surface_at_time_of_sampling", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "percentage_of_sample_recovered": { + "name": "percentage_of_sample_recovered", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sampling_technique_method": { + "name": "sampling_technique_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_matrix": { + "name": "sample_matrix", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_qa_type_normal": { + "name": "sample_qa_type_normal", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "samplers_initials_or_name": { + "name": "samplers_initials_or_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reason_for_sampling": { + "name": "reason_for_sampling", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_remarks": { + "name": "sample_remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_specimen_description": { + "name": "sample_specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "date_sample_described": { + "name": "date_sample_described", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "person_responsible_for_sample_specimen_description": { + "name": "person_responsible_for_sample_specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "condition_and_representativeness_of_sample": { + "name": "condition_and_representativeness_of_sample", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_classification_as_required_by_en_iso_14688_1": { + "name": "sample_classification_as_required_by_en_iso_14688_1", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "barometric_pressure_at_time_of_sampling": { + "name": "barometric_pressure_at_time_of_sampling", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "sample_temperature_at_time_of_sampling": { + "name": "sample_temperature_at_time_of_sampling", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "gas_pressure_above_barometric": { + "name": "gas_pressure_above_barometric", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "gas_flow_rate": { + "name": "gas_flow_rate", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "date_and_time_sampling_completed": { + "name": "date_and_time_sampling_completed", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "sampling_duration": { + "name": "sampling_duration", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "caption_used_to_describe_sample": { + "name": "caption_used_to_describe_sample", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_record_link": { + "name": "sample_record_link", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stratum_reference_shown_on_trial_pit_or_traverse_sketch": { + "name": "stratum_reference_shown_on_trial_pit_or_traverse_sketch", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_sampling_field_sheets": { + "name": "associated_file_reference_e_g_sampling_field_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "length_of_sample_recovered": { + "name": "length_of_sample_recovered", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_sample_information_abbr": { + "name": "idx_sample_information_abbr", + "columns": [ + { + "expression": "sample_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sample_information_sample_type_abbreviation_id_fk": { + "name": "sample_information_sample_type_abbreviation_id_fk", + "tableFrom": "sample_information", + "tableTo": "abbreviation", + "columnsFrom": [ + "sample_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "sample_information_location_details_id_location_details_id_fk": { + "name": "sample_information_location_details_id_location_details_id_fk", + "tableFrom": "sample_information", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_sample_information": { + "name": "unique_sample_information", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_sample", + "sample_reference", + "sample_type", + "sample_unique_identifier" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.schmidt_rebound_hardness_tests": { + "name": "schmidt_rebound_hardness_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "schmidt_hardness_value": { + "name": "schmidt_hardness_value", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "orientation_of_the_hammer_axis_in_the_test_from_horizontal_positive_numbers_downwards_and_negative_numbers_upward": { + "name": "orientation_of_the_hammer_axis_in_the_test_from_horizontal_positive_numbers_downwards_and_negative_numbers_upward", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "method_of_clamping_specimen": { + "name": "method_of_clamping_specimen", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_type": { + "name": "specimen_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "method_of_excavation_or_block_production": { + "name": "method_of_excavation_or_block_production", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_length": { + "name": "specimen_length", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "water_content_of_specimen": { + "name": "water_content_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "description_of_water_content_if_not_measured": { + "name": "description_of_water_content_if_not_measured", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hammer_type": { + "name": "hammer_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "orientation_of_hammer_axis_with_reference_to_intact_rock_anisotropy_features_e_g_lamination": { + "name": "orientation_of_hammer_axis_with_reference_to_intact_rock_anisotropy_features_e_g_lamination", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "schmidt_hardness_mean_normalized_to_horizontal_impact_direction": { + "name": "schmidt_hardness_mean_normalized_to_horizontal_impact_direction", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "schmidt_hardness_median_normalized_to_horizontal_impact_direction": { + "name": "schmidt_hardness_median_normalized_to_horizontal_impact_direction", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "schmidt_hardness_mode_normalized_to_horizontal_impact_direction": { + "name": "schmidt_hardness_mode_normalized_to_horizontal_impact_direction", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "schmidt_hardness_range_normalized_to_horizontal_impact_direction": { + "name": "schmidt_hardness_range_normalized_to_horizontal_impact_direction", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "number_of_determinations_if_less_than_20_and_reason": { + "name": "number_of_determinations_if_less_than_20_and_reason", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_schmidt_rebound_hardness_tests_abbr": { + "name": "idx_schmidt_rebound_hardness_tests_abbr", + "columns": [ + { + "expression": "specimen_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "method_of_excavation_or_block_production", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "hammer_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "schmidt_rebound_hardness_tests_specimen_type_abbreviation_id_fk": { + "name": "schmidt_rebound_hardness_tests_specimen_type_abbreviation_id_fk", + "tableFrom": "schmidt_rebound_hardness_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "specimen_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "schmidt_rebound_hardness_tests_method_of_excavation_or_block_production_abbreviation_id_fk": { + "name": "schmidt_rebound_hardness_tests_method_of_excavation_or_block_production_abbreviation_id_fk", + "tableFrom": "schmidt_rebound_hardness_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "method_of_excavation_or_block_production" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "schmidt_rebound_hardness_tests_hammer_type_abbreviation_id_fk": { + "name": "schmidt_rebound_hardness_tests_hammer_type_abbreviation_id_fk", + "tableFrom": "schmidt_rebound_hardness_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "hammer_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "schmidt_rebound_hardness_tests_sample_information_id_sample_information_id_fk": { + "name": "schmidt_rebound_hardness_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "schmidt_rebound_hardness_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_schmidt_rebound_hardness_tests": { + "name": "unique_schmidt_rebound_hardness_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shear_box_testing_data": { + "name": "shear_box_testing_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "shear_box_stage_specimen_reference": { + "name": "shear_box_stage_specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_bulk_density": { + "name": "initial_bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "normal_stress_applied": { + "name": "normal_stress_applied", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "displacement_rate_for_peak_stress_stage": { + "name": "displacement_rate_for_peak_stress_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "displacement_rate_for_residual_stress_stage": { + "name": "displacement_rate_for_residual_stress_stage", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "number_of_traverses_if_residual_test": { + "name": "number_of_traverses_if_residual_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "peak_shear_stress": { + "name": "peak_shear_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "residual_shear_stress": { + "name": "residual_shear_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "horizontal_displacement_at_peak_shear_stress": { + "name": "horizontal_displacement_at_peak_shear_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "horizontal_displacement_at_residual_shear_stress": { + "name": "horizontal_displacement_at_residual_shear_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "vertical_displacement_at_peak_shear_stress": { + "name": "vertical_displacement_at_peak_shear_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "vertical_displacement_at_residual_shear_stress": { + "name": "vertical_displacement_at_residual_shear_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "particle_density_with_prefix_if_value_assumed": { + "name": "particle_density_with_prefix_if_value_assumed", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_voids_ratio": { + "name": "initial_voids_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_water_moisture_content": { + "name": "initial_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "final_water_moisture_content": { + "name": "final_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter_in_direction_of_shear_rock_joints": { + "name": "specimen_diameter_in_direction_of_shear_rock_joints", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter_perpendicular_to_shear_rock_joints": { + "name": "specimen_diameter_perpendicular_to_shear_rock_joints", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_height": { + "name": "specimen_height", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "failure_residual_strength_criterion_used": { + "name": "failure_residual_strength_criterion_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "normal_vertical_stress_at_peak_shear_stress": { + "name": "normal_vertical_stress_at_peak_shear_stress", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "normal_vertical_stress_at_residual_shear_stress": { + "name": "normal_vertical_stress_at_residual_shear_stress", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "shear_box_testing_general_id": { + "name": "shear_box_testing_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "shear_box_testing_data_shear_box_testing_general_id_shear_box_testing_general_id_fk": { + "name": "shear_box_testing_data_shear_box_testing_general_id_shear_box_testing_general_id_fk", + "tableFrom": "shear_box_testing_data", + "tableTo": "shear_box_testing_general", + "columnsFrom": [ + "shear_box_testing_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_shear_box_testing_data": { + "name": "unique_shear_box_testing_data", + "nullsNotDistinct": false, + "columns": [ + "shear_box_testing_general_id", + "shear_box_stage_specimen_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shear_box_testing_general": { + "name": "shear_box_testing_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_type": { + "name": "test_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "specific_condition_statements": { + "name": "specific_condition_statements", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "peak_cohesion_intercept": { + "name": "peak_cohesion_intercept", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "peak_angle_of_friction": { + "name": "peak_angle_of_friction", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "residual_cohesion_intercept": { + "name": "residual_cohesion_intercept", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "residual_angle_of_friction": { + "name": "residual_angle_of_friction", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "method_of_encapsulation_of_specimens_tested": { + "name": "method_of_encapsulation_of_specimens_tested", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result": { + "name": "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_shear_box_testing_general_abbr": { + "name": "idx_shear_box_testing_general_abbr", + "columns": [ + { + "expression": "test_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sample_condition", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shear_box_testing_general_test_type_abbreviation_id_fk": { + "name": "shear_box_testing_general_test_type_abbreviation_id_fk", + "tableFrom": "shear_box_testing_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "test_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "shear_box_testing_general_sample_condition_abbreviation_id_fk": { + "name": "shear_box_testing_general_sample_condition_abbreviation_id_fk", + "tableFrom": "shear_box_testing_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "sample_condition" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "shear_box_testing_general_sample_information_id_sample_information_id_fk": { + "name": "shear_box_testing_general_sample_information_id_sample_information_id_fk", + "tableFrom": "shear_box_testing_general", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_shear_box_testing_general": { + "name": "unique_shear_box_testing_general", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shore_scleroscope_hardness_tests": { + "name": "shore_scleroscope_hardness_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "average_shore_hardness_value": { + "name": "average_shore_hardness_value", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "orientation_of_the_test_surface_relative_to_bedding": { + "name": "orientation_of_the_test_surface_relative_to_bedding", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "number_of_tests_conducted": { + "name": "number_of_tests_conducted", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "shore_scleroscope_hardness_tests_sample_information_id_sample_information_id_fk": { + "name": "shore_scleroscope_hardness_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "shore_scleroscope_hardness_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_shore_scleroscope_hardness_tests": { + "name": "unique_shore_scleroscope_hardness_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shrinkage_limit_tests": { + "name": "shrinkage_limit_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "shrinkage_limit": { + "name": "shrinkage_limit", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "shrinkage_ratio": { + "name": "shrinkage_ratio", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "initial_density": { + "name": "initial_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_water_moisture_content_of_test_specimen": { + "name": "initial_water_moisture_content_of_test_specimen", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "percentage_passing_0_425mm_sieve": { + "name": "percentage_passing_0_425mm_sieve", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "shrinkage_limit_tests_sample_information_id_sample_information_id_fk": { + "name": "shrinkage_limit_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "shrinkage_limit_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_shrinkage_limit_tests": { + "name": "unique_shrinkage_limit_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.slake_durability_index_tests": { + "name": "slake_durability_index_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "first_cycle_slake_durability_index_if_asdi_sdi1_or_asdi_sdi2_is_between_0_and_10": { + "name": "first_cycle_slake_durability_index_if_asdi_sdi1_or_asdi_sdi2_is_between_0_and_10", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "second_cycle_slake_durability_index": { + "name": "second_cycle_slake_durability_index", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "nature_and_temperature_of_slaking_fluid": { + "name": "nature_and_temperature_of_slaking_fluid", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "appearance_of_fragments_retained_in_the_drum": { + "name": "appearance_of_fragments_retained_in_the_drum", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "appearance_of_fragments_passing_through_the_drum": { + "name": "appearance_of_fragments_passing_through_the_drum", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "slake_durability_index_tests_sample_information_id_sample_information_id_fk": { + "name": "slake_durability_index_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "slake_durability_index_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_slake_durability_index_tests": { + "name": "unique_slake_durability_index_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.soakaway_tests_data": { + "name": "soakaway_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "elapsed_time": { + "name": "elapsed_time", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_water": { + "name": "depth_to_water", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remark_relating_to_test_reading": { + "name": "remark_relating_to_test_reading", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "soakaway_tests_general_id": { + "name": "soakaway_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "soakaway_tests_data_soakaway_tests_general_id_soakaway_tests_general_id_fk": { + "name": "soakaway_tests_data_soakaway_tests_general_id_soakaway_tests_general_id_fk", + "tableFrom": "soakaway_tests_data", + "tableTo": "soakaway_tests_general", + "columnsFrom": [ + "soakaway_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_soakaway_tests_data": { + "name": "unique_soakaway_tests_data", + "nullsNotDistinct": false, + "columns": [ + "soakaway_tests_general_id", + "elapsed_time" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.soakaway_tests_general": { + "name": "soakaway_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "test_duration": { + "name": "test_duration", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "soakaway_pit_width": { + "name": "soakaway_pit_width", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "soakaway_pit_length": { + "name": "soakaway_pit_length", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "soakaway_pit_diameter": { + "name": "soakaway_pit_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "soakaway_pit_depth_at_start_of_test": { + "name": "soakaway_pit_depth_at_start_of_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "soakaway_pit_depth_at_end_of_test": { + "name": "soakaway_pit_depth_at_end_of_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "description_of_soakaway_construction": { + "name": "description_of_soakaway_construction", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "soil_infiltration_rate": { + "name": "soil_infiltration_rate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "fill_porosity": { + "name": "fill_porosity", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_organization": { + "name": "name_of_testing_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_operator_carrying_out_test": { + "name": "name_of_operator_carrying_out_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "soakaway_tests_general_location_details_id_location_details_id_fk": { + "name": "soakaway_tests_general_location_details_id_location_details_id_fk", + "tableFrom": "soakaway_tests_general", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_soakaway_tests_general": { + "name": "unique_soakaway_tests_general", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "test_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.standard_penetration_test_results": { + "name": "standard_penetration_test_results", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_test": { + "name": "depth_to_top_of_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "number_of_blows_for_seating_drive": { + "name": "number_of_blows_for_seating_drive", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "number_of_blows_for_main_test_drive": { + "name": "number_of_blows_for_main_test_drive", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "total_penetration_for_seating_drive_and_test_drive": { + "name": "total_penetration_for_seating_drive_and_test_drive", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "spt_n_value": { + "name": "spt_n_value", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "spt_reported_result": { + "name": "spt_reported_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "casing_depth_at_time_of_test": { + "name": "casing_depth_at_time_of_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_water_at_time_of_test": { + "name": "depth_to_water_at_time_of_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_spt_test": { + "name": "type_of_spt_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "hammer_serial_number_from_manufacturer": { + "name": "hammer_serial_number_from_manufacturer", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "energy_ratio_of_the_hammer": { + "name": "energy_ratio_of_the_hammer", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "self_weight_penetration": { + "name": "self_weight_penetration", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "number_of_blows_for_1st_increment_seating": { + "name": "number_of_blows_for_1st_increment_seating", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "number_of_blows_for_2nd_increment_seating": { + "name": "number_of_blows_for_2nd_increment_seating", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "number_of_blows_for_1st_increment_test": { + "name": "number_of_blows_for_1st_increment_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "number_of_blows_for_2nd_increment_test": { + "name": "number_of_blows_for_2nd_increment_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "number_of_blows_for_3rd_increment_test": { + "name": "number_of_blows_for_3rd_increment_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "number_of_blows_for_4th_increment_test": { + "name": "number_of_blows_for_4th_increment_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "penetration_for_1st_increment_seating_drive": { + "name": "penetration_for_1st_increment_seating_drive", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "penetration_for_2nd_increment_seating_drive": { + "name": "penetration_for_2nd_increment_seating_drive", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "penetration_for_1st_increment_test": { + "name": "penetration_for_1st_increment_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "penetration_for_2nd_increment_test": { + "name": "penetration_for_2nd_increment_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "penetration_for_3rd_increment_test": { + "name": "penetration_for_3rd_increment_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "penetration_for_4th_increment_test": { + "name": "penetration_for_4th_increment_test", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "spt_carried_out_in_soft_rock": { + "name": "spt_carried_out_in_soft_rock", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "spt_n_value_corrected_by_energy_ratio_ispt_erat": { + "name": "spt_n_value_corrected_by_energy_ratio_ispt_erat", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_standard_penetration_test_results_abbr": { + "name": "idx_standard_penetration_test_results_abbr", + "columns": [ + { + "expression": "type_of_spt_test", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "standard_penetration_test_results_type_of_spt_test_abbreviation_id_fk": { + "name": "standard_penetration_test_results_type_of_spt_test_abbreviation_id_fk", + "tableFrom": "standard_penetration_test_results", + "tableTo": "abbreviation", + "columnsFrom": [ + "type_of_spt_test" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "standard_penetration_test_results_location_details_id_location_details_id_fk": { + "name": "standard_penetration_test_results_location_details_id_location_details_id_fk", + "tableFrom": "standard_penetration_test_results", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_standard_penetration_test_results": { + "name": "unique_standard_penetration_test_results", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_test" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.static_cone_dissipation_tests_data": { + "name": "static_cone_dissipation_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "seconds_elapsed_since_start_of_test": { + "name": "seconds_elapsed_since_start_of_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "cone_resistance": { + "name": "cone_resistance", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "face_porewater_pressure_u1": { + "name": "face_porewater_pressure_u1", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "shoulder_porewater_pressure_u2": { + "name": "shoulder_porewater_pressure_u2", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "top_of_sleeve_porewater_pressure_u3": { + "name": "top_of_sleeve_porewater_pressure_u3", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "comments": { + "name": "comments", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "static_cone_dissipation_tests_general_id": { + "name": "static_cone_dissipation_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "static_cone_dissipation_tests_data_static_cone_dissipation_tests_general_id_static_cone_dissipation_tests_general_id_fk": { + "name": "static_cone_dissipation_tests_data_static_cone_dissipation_tests_general_id_static_cone_dissipation_tests_general_id_fk", + "tableFrom": "static_cone_dissipation_tests_data", + "tableTo": "static_cone_dissipation_tests_general", + "columnsFrom": [ + "static_cone_dissipation_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_static_cone_dissipation_tests_data": { + "name": "unique_static_cone_dissipation_tests_data", + "nullsNotDistinct": false, + "columns": [ + "static_cone_dissipation_tests_general_id", + "seconds_elapsed_since_start_of_test" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.static_cone_dissipation_tests_general": { + "name": "static_cone_dissipation_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_of_dissipation_test": { + "name": "depth_of_dissipation_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "measured_or_assumed_initial_pore_water_pressure": { + "name": "measured_or_assumed_initial_pore_water_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "measured_or_assumed_equilibrium_pore_water_pressure": { + "name": "measured_or_assumed_equilibrium_pore_water_pressure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "degree_of_dissipation_for_analysis": { + "name": "degree_of_dissipation_for_analysis", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "time_to_achieve_degree_of_dissipation_stated_in_scdg_ddis": { + "name": "time_to_achieve_degree_of_dissipation_stated_in_scdg_ddis", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "coefficient_of_consolidation_vertical": { + "name": "coefficient_of_consolidation_vertical", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "method_s_used_to_determine_vertical_coefficient_of_consolidation": { + "name": "method_s_used_to_determine_vertical_coefficient_of_consolidation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "coefficient_of_consolidation_horizontal": { + "name": "coefficient_of_consolidation_horizontal", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "method_s_used_to_determine_horizontal_coefficient_of_consolidation": { + "name": "method_s_used_to_determine_horizontal_coefficient_of_consolidation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "static_cone_penetration_tests_general_id": { + "name": "static_cone_penetration_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "static_cone_dissipation_tests_general_static_cone_penetration_tests_general_id_static_cone_penetration_tests_general_id_fk": { + "name": "static_cone_dissipation_tests_general_static_cone_penetration_tests_general_id_static_cone_penetration_tests_general_id_fk", + "tableFrom": "static_cone_dissipation_tests_general", + "tableTo": "static_cone_penetration_tests_general", + "columnsFrom": [ + "static_cone_penetration_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_static_cone_dissipation_tests_general": { + "name": "unique_static_cone_dissipation_tests_general", + "nullsNotDistinct": false, + "columns": [ + "static_cone_penetration_tests_general_id", + "depth_of_dissipation_test" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.static_cone_penetration_tests_data": { + "name": "static_cone_penetration_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_of_result": { + "name": "depth_of_result", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "cone_resistance_qc": { + "name": "cone_resistance_qc", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "local_unit_side_friction_resistance_fs": { + "name": "local_unit_side_friction_resistance_fs", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "face_porewater_pressure_u1": { + "name": "face_porewater_pressure_u1", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "shoulder_porewater_pressure_u2": { + "name": "shoulder_porewater_pressure_u2", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "top_of_sleeve_porewater_pressure_u3": { + "name": "top_of_sleeve_porewater_pressure_u3", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "conductivity": { + "name": "conductivity", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "temperature": { + "name": "temperature", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "ph_reading": { + "name": "ph_reading", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "slope_indicator_no_1": { + "name": "slope_indicator_no_1", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "slope_indicator_no_2": { + "name": "slope_indicator_no_2", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "redox_potential_reading": { + "name": "redox_potential_reading", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "magnetic_flux_total_calculated": { + "name": "magnetic_flux_total_calculated", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "magnetic_flux_x": { + "name": "magnetic_flux_x", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "magnetic_flux_y": { + "name": "magnetic_flux_y", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "magnetic_flux_z": { + "name": "magnetic_flux_z", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "soil_moisture": { + "name": "soil_moisture", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "natural_gamma_radiation": { + "name": "natural_gamma_radiation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "friction_ratio_rf": { + "name": "friction_ratio_rf", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "corrected_cone_resistance_qt_piezocone_only": { + "name": "corrected_cone_resistance_qt_piezocone_only", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "corrected_sleeve_resistance_ft_piezocone_only": { + "name": "corrected_sleeve_resistance_ft_piezocone_only", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "effective_cone_resistance_qe_piezocone_only": { + "name": "effective_cone_resistance_qe_piezocone_only", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "bulk_density_of_material_measured_or_assumed": { + "name": "bulk_density_of_material_measured_or_assumed", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "total_vertical_stress_based_on_scpt_bden": { + "name": "total_vertical_stress_based_on_scpt_bden", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "effective_vertical_stress_calculated_from_scpt_cpo_and_scpt_ispp_or_scpg_wat": { + "name": "effective_vertical_stress_calculated_from_scpt_cpo_and_scpt_ispp_or_scpg_wat", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "net_cone_resistance_qn": { + "name": "net_cone_resistance_qn", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "corrected_friction_ratio_rf_piezocone_only": { + "name": "corrected_friction_ratio_rf_piezocone_only", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "excess_pore_pressure_u_uo_piezocone_only": { + "name": "excess_pore_pressure_u_uo_piezocone_only", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "pore_pressure_ratio_bq_piezocone_only": { + "name": "pore_pressure_ratio_bq_piezocone_only", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "in_situ_pore_pressure_uo_measured_or_assumed_where_not_simple_hydrostatic_based_on_scpg_wat": { + "name": "in_situ_pore_pressure_uo_measured_or_assumed_where_not_simple_hydrostatic_based_on_scpg_wat", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "normalised_cone_resistance_qt": { + "name": "normalised_cone_resistance_qt", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "normalised_friction_ratio_fr": { + "name": "normalised_friction_ratio_fr", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_raw_field_data": { + "name": "associated_file_reference_e_g_raw_field_data", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "static_cone_penetration_tests_general_id": { + "name": "static_cone_penetration_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "static_cone_penetration_tests_data_static_cone_penetration_tests_general_id_static_cone_penetration_tests_general_id_fk": { + "name": "static_cone_penetration_tests_data_static_cone_penetration_tests_general_id_static_cone_penetration_tests_general_id_fk", + "tableFrom": "static_cone_penetration_tests_data", + "tableTo": "static_cone_penetration_tests_general", + "columnsFrom": [ + "static_cone_penetration_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_static_cone_penetration_tests_data": { + "name": "unique_static_cone_penetration_tests_data", + "nullsNotDistinct": false, + "columns": [ + "static_cone_penetration_tests_general_id", + "depth_of_result" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.static_cone_penetration_tests_derived_parameters": { + "name": "static_cone_penetration_tests_derived_parameters", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_layer": { + "name": "depth_to_top_of_layer", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_layer": { + "name": "depth_to_base_of_layer", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "interpretation_reference": { + "name": "interpretation_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "interpreted_soil_type": { + "name": "interpreted_soil_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "undrained_shear_strength_su_fine_soils_only": { + "name": "undrained_shear_strength_su_fine_soils_only", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "relative_density_dr_coarse_soils_only": { + "name": "relative_density_dr_coarse_soils_only", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "internal_friction_angle_coarse_soils_only": { + "name": "internal_friction_angle_coarse_soils_only", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "soil_behaviour_type_index_ic": { + "name": "soil_behaviour_type_index_ic", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "equivalent_spt_n60_value": { + "name": "equivalent_spt_n60_value", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference": { + "name": "associated_file_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "static_cone_penetration_tests_general_id": { + "name": "static_cone_penetration_tests_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "static_cone_penetration_tests_derived_parameters_static_cone_penetration_tests_general_id_static_cone_penetration_tests_general_id_fk": { + "name": "static_cone_penetration_tests_derived_parameters_static_cone_penetration_tests_general_id_static_cone_penetration_tests_general_id_fk", + "tableFrom": "static_cone_penetration_tests_derived_parameters", + "tableTo": "static_cone_penetration_tests_general", + "columnsFrom": [ + "static_cone_penetration_tests_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_static_cone_penetration_tests_derived_parameters": { + "name": "unique_static_cone_penetration_tests_derived_parameters", + "nullsNotDistinct": false, + "columns": [ + "static_cone_penetration_tests_general_id", + "depth_to_top_of_layer", + "depth_to_base_of_layer", + "interpretation_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.static_cone_penetration_tests_general": { + "name": "static_cone_penetration_tests_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_reference_or_push_number": { + "name": "test_reference_or_push_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cone_test_type": { + "name": "cone_test_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cone_reference": { + "name": "cone_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "surface_area_of_cone_tip": { + "name": "surface_area_of_cone_tip", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "nominal_rate_of_penetration_of_the_cone": { + "name": "nominal_rate_of_penetration_of_the_cone", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type_of_filter_material_used": { + "name": "type_of_filter_material_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "friction_reducer_used": { + "name": "friction_reducer_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "groundwater_level_at_time_of_test": { + "name": "groundwater_level_at_time_of_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "origin_of_water_level_in_scpg_wat": { + "name": "origin_of_water_level_in_scpg_wat", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "comments_on_testing_and_basis_of_any_interpreted_parameters_included_in_scpt_and_scpp": { + "name": "comments_on_testing_and_basis_of_any_interpreted_parameters_included_in_scpt_and_scpp", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "subcontractors_name": { + "name": "subcontractors_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "standard_followed_for_testing": { + "name": "standard_followed_for_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cone_area_ratio_used_to_calculate_qt": { + "name": "cone_area_ratio_used_to_calculate_qt", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "sleeve_area_ratio_used_to_calculate_ft": { + "name": "sleeve_area_ratio_used_to_calculate_ft", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_cone_calibration_records": { + "name": "associated_file_reference_e_g_cone_calibration_records", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_static_cone_penetration_tests_general_abbr": { + "name": "idx_static_cone_penetration_tests_general_abbr", + "columns": [ + { + "expression": "cone_test_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "static_cone_penetration_tests_general_cone_test_type_abbreviation_id_fk": { + "name": "static_cone_penetration_tests_general_cone_test_type_abbreviation_id_fk", + "tableFrom": "static_cone_penetration_tests_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "cone_test_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "static_cone_penetration_tests_general_location_details_id_location_details_id_fk": { + "name": "static_cone_penetration_tests_general_location_details_id_location_details_id_fk", + "tableFrom": "static_cone_penetration_tests_general", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_static_cone_penetration_tests_general": { + "name": "unique_static_cone_penetration_tests_general", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "test_reference_or_push_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.stratum_detail_descriptions": { + "name": "stratum_detail_descriptions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_detail_description": { + "name": "depth_to_top_of_detail_description", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_detail_description": { + "name": "depth_to_base_of_detail_description", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "detail_description": { + "name": "detail_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_logging_field_sheets": { + "name": "associated_file_reference_e_g_logging_field_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "stratum_detail_descriptions_location_details_id_location_details_id_fk": { + "name": "stratum_detail_descriptions_location_details_id_location_details_id_fk", + "tableFrom": "stratum_detail_descriptions", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_stratum_detail_descriptions": { + "name": "unique_stratum_detail_descriptions", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_detail_description", + "depth_to_base_of_detail_description" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.suction_tests": { + "name": "suction_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_length": { + "name": "specimen_length", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "initial_bulk_density": { + "name": "initial_bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_water_moisture_content": { + "name": "initial_water_moisture_content", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "suction_value": { + "name": "suction_value", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_suction_tests_abbr": { + "name": "idx_suction_tests_abbr", + "columns": [ + { + "expression": "sample_condition", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "suction_tests_sample_condition_abbreviation_id_fk": { + "name": "suction_tests_sample_condition_abbreviation_id_fk", + "tableFrom": "suction_tests", + "tableTo": "abbreviation", + "columnsFrom": [ + "sample_condition" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "suction_tests_sample_information_id_sample_information_id_fk": { + "name": "suction_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "suction_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_suction_tests": { + "name": "unique_suction_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.swelling_index_testing": { + "name": "swelling_index_testing", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "swelling_pressure_index": { + "name": "swelling_pressure_index", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "swelling_strain_index": { + "name": "swelling_strain_index", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_water_content_of_test_specimen": { + "name": "initial_water_content_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_thickness": { + "name": "specimen_thickness", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_bulk_density": { + "name": "initial_bulk_density", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "swelling_index_testing_sample_information_id_sample_information_id_fk": { + "name": "swelling_index_testing_sample_information_id_sample_information_id_fk", + "tableFrom": "swelling_index_testing", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_swelling_index_testing": { + "name": "unique_swelling_index_testing", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ten_per_cent_fines": { + "name": "ten_per_cent_fines", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "ten_fines_values_on_dry_aggregate": { + "name": "ten_fines_values_on_dry_aggregate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "ten_fines_values_on_wet_aggregate": { + "name": "ten_fines_values_on_wet_aggregate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "ten_per_cent_fines_sample_information_id_sample_information_id_fk": { + "name": "ten_per_cent_fines_sample_information_id_sample_information_id_fk", + "tableFrom": "ten_per_cent_fines", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_ten_per_cent_fines": { + "name": "unique_ten_per_cent_fines", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tensile_strength_testing": { + "name": "tensile_strength_testing", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_thickness": { + "name": "specimen_thickness", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "water_content_of_test_specimen": { + "name": "water_content_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "condition_of_specimen_as_tested": { + "name": "condition_of_specimen_as_tested", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_duration": { + "name": "test_duration", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stress_rate": { + "name": "stress_rate", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "tensile_strength": { + "name": "tensile_strength", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mode_of_failure": { + "name": "mode_of_failure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "testing_machine": { + "name": "testing_machine", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_tensile_strength_testing_abbr": { + "name": "idx_tensile_strength_testing_abbr", + "columns": [ + { + "expression": "mode_of_failure", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tensile_strength_testing_mode_of_failure_abbreviation_id_fk": { + "name": "tensile_strength_testing_mode_of_failure_abbreviation_id_fk", + "tableFrom": "tensile_strength_testing", + "tableTo": "abbreviation", + "columnsFrom": [ + "mode_of_failure" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "tensile_strength_testing_sample_information_id_sample_information_id_fk": { + "name": "tensile_strength_testing_sample_information_id_sample_information_id_fk", + "tableFrom": "tensile_strength_testing", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_tensile_strength_testing": { + "name": "unique_tensile_strength_testing", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.triaxial_tests_effective_stress_data": { + "name": "triaxial_tests_effective_stress_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "triaxial_test_stage_number": { + "name": "triaxial_test_stage_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_length": { + "name": "specimen_length", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_initial_water_moisture_content": { + "name": "specimen_initial_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_final_water_moisture_content": { + "name": "specimen_final_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_bulk_density": { + "name": "initial_bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "method_of_saturation": { + "name": "method_of_saturation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_consolidation_stage": { + "name": "details_of_consolidation_stage", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "effective_stress_at_end_of_consolidation_start_of_shear_stage": { + "name": "effective_stress_at_end_of_consolidation_start_of_shear_stage", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "total_cell_pressure_during_shearing_stage": { + "name": "total_cell_pressure_during_shearing_stage", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "porewater_pressure_at_start_of_shear_stage": { + "name": "porewater_pressure_at_start_of_shear_stage", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "rate_of_axial_strain_during_shear": { + "name": "rate_of_axial_strain_during_shear", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "axial_strain_at_failure": { + "name": "axial_strain_at_failure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviator_stress_at_failure": { + "name": "deviator_stress_at_failure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "porewater_pressure_at_failure": { + "name": "porewater_pressure_at_failure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "volumetric_strain_at_failure_drained_only": { + "name": "volumetric_strain_at_failure_drained_only", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "mode_of_failure": { + "name": "mode_of_failure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "comments": { + "name": "comments", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "final_back_pressure_applied_prior_to_shearing": { + "name": "final_back_pressure_applied_prior_to_shearing", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vertical_strain_at_end_of_consolidation": { + "name": "vertical_strain_at_end_of_consolidation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "volumetric_strain_at_end_of_consolidation": { + "name": "volumetric_strain_at_end_of_consolidation", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "rate_of_volumetric_strain_immediately_prior_to_shearing": { + "name": "rate_of_volumetric_strain_immediately_prior_to_shearing", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "final_b_value_prior_to_shearing": { + "name": "final_b_value_prior_to_shearing", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_drainage_conditions_during_shear": { + "name": "type_of_drainage_conditions_during_shear", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "membrane_corrections_applied_at_failure": { + "name": "membrane_corrections_applied_at_failure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "filter_paper_corrections_applied_at_failure": { + "name": "filter_paper_corrections_applied_at_failure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "initial_voids_ratio": { + "name": "initial_voids_ratio", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "saturation_percentage": { + "name": "saturation_percentage", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "effective_vertical_pressure_at_end_of_consolidation": { + "name": "effective_vertical_pressure_at_end_of_consolidation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "effective_radial_pressure_at_end_of_consolidation": { + "name": "effective_radial_pressure_at_end_of_consolidation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "peak_mean_effective_stress_during_shear": { + "name": "peak_mean_effective_stress_during_shear", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "undrained_shear_strength_at_failure": { + "name": "undrained_shear_strength_at_failure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "strain_at_50_peak_deviator_stress": { + "name": "strain_at_50_peak_deviator_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "secant_modulus_at_50_peak_deviator_stress": { + "name": "secant_modulus_at_50_peak_deviator_stress", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "triaxial_tests_effective_stress_general_id": { + "name": "triaxial_tests_effective_stress_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_triaxial_tests_effective_stress_data_abbr": { + "name": "idx_triaxial_tests_effective_stress_data_abbr", + "columns": [ + { + "expression": "mode_of_failure", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "triaxial_tests_effective_stress_data_mode_of_failure_abbreviation_id_fk": { + "name": "triaxial_tests_effective_stress_data_mode_of_failure_abbreviation_id_fk", + "tableFrom": "triaxial_tests_effective_stress_data", + "tableTo": "abbreviation", + "columnsFrom": [ + "mode_of_failure" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "triaxial_tests_effective_stress_data_triaxial_tests_effective_stress_general_id_triaxial_tests_effective_stress_general_id_fk": { + "name": "triaxial_tests_effective_stress_data_triaxial_tests_effective_stress_general_id_triaxial_tests_effective_stress_general_id_fk", + "tableFrom": "triaxial_tests_effective_stress_data", + "tableTo": "triaxial_tests_effective_stress_general", + "columnsFrom": [ + "triaxial_tests_effective_stress_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_triaxial_tests_effective_stress_data": { + "name": "unique_triaxial_tests_effective_stress_data", + "nullsNotDistinct": false, + "columns": [ + "triaxial_tests_effective_stress_general_id", + "triaxial_test_stage_number" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.triaxial_tests_effective_stress_general": { + "name": "triaxial_tests_effective_stress_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_type": { + "name": "test_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cohesion_intercept_associated_with_treg_phi": { + "name": "cohesion_intercept_associated_with_treg_phi", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "angle_of_friction_for_effective_shear_strength_triaxial_test": { + "name": "angle_of_friction_for_effective_shear_strength_triaxial_test", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "failure_criterion": { + "name": "failure_criterion", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result": { + "name": "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "any_deviation_from_the_procedure_or_specified_test_conditions": { + "name": "any_deviation_from_the_procedure_or_specified_test_conditions", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_triaxial_tests_effective_stress_general_abbr": { + "name": "idx_triaxial_tests_effective_stress_general_abbr", + "columns": [ + { + "expression": "test_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sample_condition", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "triaxial_tests_effective_stress_general_test_type_abbreviation_id_fk": { + "name": "triaxial_tests_effective_stress_general_test_type_abbreviation_id_fk", + "tableFrom": "triaxial_tests_effective_stress_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "test_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "triaxial_tests_effective_stress_general_sample_condition_abbreviation_id_fk": { + "name": "triaxial_tests_effective_stress_general_sample_condition_abbreviation_id_fk", + "tableFrom": "triaxial_tests_effective_stress_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "sample_condition" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "triaxial_tests_effective_stress_general_sample_information_id_sample_information_id_fk": { + "name": "triaxial_tests_effective_stress_general_sample_information_id_sample_information_id_fk", + "tableFrom": "triaxial_tests_effective_stress_general", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_triaxial_tests_effective_stress_general": { + "name": "unique_triaxial_tests_effective_stress_general", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.triaxial_tests_total_stress_data": { + "name": "triaxial_tests_total_stress_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "triaxial_test_stage_reference": { + "name": "triaxial_test_stage_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_length": { + "name": "specimen_length", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_initial_water_moisture_content": { + "name": "specimen_initial_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_final_water_moisture_content": { + "name": "specimen_final_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "total_cell_pressure": { + "name": "total_cell_pressure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "corrected_deviator_stress_at_failure": { + "name": "corrected_deviator_stress_at_failure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "initial_bulk_density": { + "name": "initial_bulk_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "axial_strain_at_failure": { + "name": "axial_strain_at_failure", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "undrained_shear_strength_at_failure": { + "name": "undrained_shear_strength_at_failure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mode_of_failure": { + "name": "mode_of_failure", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "comments": { + "name": "comments", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "failure_zone_water_content": { + "name": "failure_zone_water_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mean_rate_of_shear": { + "name": "mean_rate_of_shear", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "triaxial_tests_total_stress_general_id": { + "name": "triaxial_tests_total_stress_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_triaxial_tests_total_stress_data_abbr": { + "name": "idx_triaxial_tests_total_stress_data_abbr", + "columns": [ + { + "expression": "mode_of_failure", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "triaxial_tests_total_stress_data_mode_of_failure_abbreviation_id_fk": { + "name": "triaxial_tests_total_stress_data_mode_of_failure_abbreviation_id_fk", + "tableFrom": "triaxial_tests_total_stress_data", + "tableTo": "abbreviation", + "columnsFrom": [ + "mode_of_failure" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "triaxial_tests_total_stress_data_triaxial_tests_total_stress_general_id_triaxial_tests_total_stress_general_id_fk": { + "name": "triaxial_tests_total_stress_data_triaxial_tests_total_stress_general_id_triaxial_tests_total_stress_general_id_fk", + "tableFrom": "triaxial_tests_total_stress_data", + "tableTo": "triaxial_tests_total_stress_general", + "columnsFrom": [ + "triaxial_tests_total_stress_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_triaxial_tests_total_stress_data": { + "name": "unique_triaxial_tests_total_stress_data", + "nullsNotDistinct": false, + "columns": [ + "triaxial_tests_total_stress_general_id", + "triaxial_test_stage_reference" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.triaxial_tests_total_stress_general": { + "name": "triaxial_tests_total_stress_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_type": { + "name": "test_type", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result": { + "name": "remarks_including_commentary_on_effect_of_specimen_disturbance_on_test_result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_triaxial_tests_total_stress_general_abbr": { + "name": "idx_triaxial_tests_total_stress_general_abbr", + "columns": [ + { + "expression": "test_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sample_condition", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "triaxial_tests_total_stress_general_test_type_abbreviation_id_fk": { + "name": "triaxial_tests_total_stress_general_test_type_abbreviation_id_fk", + "tableFrom": "triaxial_tests_total_stress_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "test_type" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "triaxial_tests_total_stress_general_sample_condition_abbreviation_id_fk": { + "name": "triaxial_tests_total_stress_general_sample_condition_abbreviation_id_fk", + "tableFrom": "triaxial_tests_total_stress_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "sample_condition" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "triaxial_tests_total_stress_general_sample_information_id_sample_information_id_fk": { + "name": "triaxial_tests_total_stress_general_sample_information_id_sample_information_id_fk", + "tableFrom": "triaxial_tests_total_stress_general", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_triaxial_tests_total_stress_general": { + "name": "unique_triaxial_tests_total_stress_general", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.water_added_records": { + "name": "water_added_records", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_reported_section": { + "name": "depth_to_top_of_reported_section", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_reported_section": { + "name": "depth_to_base_of_reported_section", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "amount_of_water_added": { + "name": "amount_of_water_added", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "boring_drilling_method_associated_with_addition_of_water_hdph_type_abbreviation": { + "name": "boring_drilling_method_associated_with_addition_of_water_hdph_type_abbreviation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks_related_to_addition_of_water_requirements": { + "name": "remarks_related_to_addition_of_water_requirements", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_drilling_journal": { + "name": "associated_file_reference_e_g_drilling_journal", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "water_added_records_location_details_id_location_details_id_fk": { + "name": "water_added_records_location_details_id_location_details_id_fk", + "tableFrom": "water_added_records", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_water_added_records": { + "name": "unique_water_added_records", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_reported_section", + "depth_to_base_of_reported_section" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.water_content_of_rock_tests": { + "name": "water_content_of_rock_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "water_content": { + "name": "water_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "temperature_sample_dried_at": { + "name": "temperature_sample_dried_at", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "water_content_of_rock_tests_sample_information_id_sample_information_id_fk": { + "name": "water_content_of_rock_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "water_content_of_rock_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_water_content_of_rock_tests": { + "name": "unique_water_content_of_rock_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.water_moisture_content_tests": { + "name": "water_moisture_content_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "specimen_reference": { + "name": "specimen_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_top_of_test_specimen": { + "name": "depth_to_top_of_test_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "specimen_description": { + "name": "specimen_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_specimen_preparation_including_time_between_preparation_and_testing": { + "name": "details_of_specimen_preparation_including_time_between_preparation_and_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content": { + "name": "water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "temperature_sample_dried_at": { + "name": "temperature_sample_dried_at", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "amount_of_stabiliser_added": { + "name": "amount_of_stabiliser_added", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "type_of_stabiliser_added": { + "name": "type_of_stabiliser_added", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "is_test_result_assumed_to_be_a_natural_water_moisture_content": { + "name": "is_test_result_assumed_to_be_a_natural_water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reason_water_moisture_content_is_assumed_to_be_other_than_natural": { + "name": "reason_water_moisture_content_is_assumed_to_be_other_than_natural", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name_of_testing_laboratory_organization": { + "name": "name_of_testing_laboratory_organization", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_when_appropriate": { + "name": "accrediting_body_and_reference_number_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "deviation_from_the_specified_procedure": { + "name": "deviation_from_the_specified_procedure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "sample_information_id": { + "name": "sample_information_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "water_moisture_content_tests_sample_information_id_sample_information_id_fk": { + "name": "water_moisture_content_tests_sample_information_id_sample_information_id_fk", + "tableFrom": "water_moisture_content_tests", + "tableTo": "sample_information", + "columnsFrom": [ + "sample_information_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_water_moisture_content_tests": { + "name": "unique_water_moisture_content_tests", + "nullsNotDistinct": false, + "columns": [ + "sample_information_id", + "specimen_reference", + "depth_to_top_of_test_specimen" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.water_strike_details": { + "name": "water_strike_details", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "minutes_after_strike": { + "name": "minutes_after_strike", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "depth_to_water_after_wstd_nmin_minutes": { + "name": "depth_to_water_after_wstd_nmin_minutes", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "water_strike_general_id": { + "name": "water_strike_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "water_strike_details_water_strike_general_id_water_strike_general_id_fk": { + "name": "water_strike_details_water_strike_general_id_water_strike_general_id_fk", + "tableFrom": "water_strike_details", + "tableTo": "water_strike_general", + "columnsFrom": [ + "water_strike_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_water_strike_details": { + "name": "unique_water_strike_details", + "nullsNotDistinct": false, + "columns": [ + "water_strike_general_id", + "minutes_after_strike" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.water_strike_general": { + "name": "water_strike_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_water_strike": { + "name": "depth_to_water_strike", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "date_and_time_of_water_strike": { + "name": "date_and_time_of_water_strike", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "depth_at_which_water_strike_sealed_by_casing": { + "name": "depth_at_which_water_strike_sealed_by_casing", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "casing_depth_at_time_of_water_strike": { + "name": "casing_depth_at_time_of_water_strike", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_test_result_sheets": { + "name": "associated_file_reference_e_g_test_result_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "water_strike_general_location_details_id_location_details_id_fk": { + "name": "water_strike_general_location_details_id_location_details_id_fk", + "tableFrom": "water_strike_general", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_water_strike_general": { + "name": "unique_water_strike_general", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_water_strike" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.weathering": { + "name": "weathering", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_weathering_subdivision": { + "name": "depth_to_top_of_weathering_subdivision", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_weathering_subdivision": { + "name": "depth_to_base_of_weathering_subdivision", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "weathering_scheme": { + "name": "weathering_scheme", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "material_or_mass_weathering_system": { + "name": "material_or_mass_weathering_system", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "weathering_classifier_for_weth_sch_and_weth_sys": { + "name": "weathering_classifier_for_weth_sch_and_weth_sys", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_logging_sheets": { + "name": "associated_file_reference_e_g_logging_sheets", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_weathering_abbr": { + "name": "idx_weathering_abbr", + "columns": [ + { + "expression": "weathering_scheme", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "material_or_mass_weathering_system", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "weathering_weathering_scheme_abbreviation_id_fk": { + "name": "weathering_weathering_scheme_abbreviation_id_fk", + "tableFrom": "weathering", + "tableTo": "abbreviation", + "columnsFrom": [ + "weathering_scheme" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "weathering_material_or_mass_weathering_system_abbreviation_id_fk": { + "name": "weathering_material_or_mass_weathering_system_abbreviation_id_fk", + "tableFrom": "weathering", + "tableTo": "abbreviation", + "columnsFrom": [ + "material_or_mass_weathering_system" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "weathering_location_details_id_location_details_id_fk": { + "name": "weathering_location_details_id_location_details_id_fk", + "tableFrom": "weathering", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_weathering": { + "name": "unique_weathering", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "depth_to_top_of_weathering_subdivision", + "depth_to_base_of_weathering_subdivision" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.window_or_windowless_sampling_run_details": { + "name": "window_or_windowless_sampling_run_details", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "sampler_run_reference": { + "name": "sampler_run_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "top_of_sampling_run": { + "name": "top_of_sampling_run", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "base_of_sampling_run": { + "name": "base_of_sampling_run", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "internal_diameter_of_sampler": { + "name": "internal_diameter_of_sampler", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "duration_of_sampling_run": { + "name": "duration_of_sampling_run", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_recovery": { + "name": "sample_recovery", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "remarks_about_sampling_run": { + "name": "remarks_about_sampling_run", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_field_records": { + "name": "associated_file_reference_e_g_field_records", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "window_or_windowless_sampling_run_details_location_details_id_location_details_id_fk": { + "name": "window_or_windowless_sampling_run_details_location_details_id_location_details_id_fk", + "tableFrom": "window_or_windowless_sampling_run_details", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_window_or_windowless_sampling_run_details": { + "name": "unique_window_or_windowless_sampling_run_details", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "sampler_run_reference", + "top_of_sampling_run", + "base_of_sampling_run" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wireline_geophysics_general": { + "name": "wireline_geophysics_general", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "tool_used": { + "name": "tool_used", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "test_start_depth": { + "name": "test_start_depth", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "test_stop_depth": { + "name": "test_stop_depth", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_of_borehole": { + "name": "depth_of_borehole", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "depth_of_water_in_borehole": { + "name": "depth_of_water_in_borehole", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_instrument": { + "name": "details_of_instrument", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "casing_internal_diameter_as_reported_by_drillers": { + "name": "casing_internal_diameter_as_reported_by_drillers", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_of_weather_and_environmental_conditions_during_test": { + "name": "details_of_weather_and_environmental_conditions_during_test", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "measurement_method": { + "name": "measurement_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "contractor_who_undertook_testing": { + "name": "contractor_who_undertook_testing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "accrediting_body_and_reference_number_where_appropriate": { + "name": "accrediting_body_and_reference_number_where_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_status": { + "name": "test_status", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference_e_g_equipment_calibrations": { + "name": "associated_file_reference_e_g_equipment_calibrations", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "instrument_method_reading_detection_limit": { + "name": "instrument_method_reading_detection_limit", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "instrument_method_upper_reading_detection_when_appropriate": { + "name": "instrument_method_upper_reading_detection_when_appropriate", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "location_details_id": { + "name": "location_details_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_wireline_geophysics_general_abbr": { + "name": "idx_wireline_geophysics_general_abbr", + "columns": [ + { + "expression": "tool_used", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wireline_geophysics_general_tool_used_abbreviation_id_fk": { + "name": "wireline_geophysics_general_tool_used_abbreviation_id_fk", + "tableFrom": "wireline_geophysics_general", + "tableTo": "abbreviation", + "columnsFrom": [ + "tool_used" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "wireline_geophysics_general_location_details_id_location_details_id_fk": { + "name": "wireline_geophysics_general_location_details_id_location_details_id_fk", + "tableFrom": "wireline_geophysics_general", + "tableTo": "location_details", + "columnsFrom": [ + "location_details_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_wireline_geophysics_general": { + "name": "unique_wireline_geophysics_general", + "nullsNotDistinct": false, + "columns": [ + "location_details_id", + "test_reference", + "tool_used" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wireline_geophysics_readings": { + "name": "wireline_geophysics_readings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "parameter_recorded_by_tool_wgpg_tool": { + "name": "parameter_recorded_by_tool_wgpg_tool", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "test_result_units": { + "name": "test_result_units", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "depth_of_reading": { + "name": "depth_of_reading", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "reading": { + "name": "reading", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "borehole_casing_details_at_depth_of_reading": { + "name": "borehole_casing_details_at_depth_of_reading", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "associated_file_reference": { + "name": "associated_file_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "wireline_geophysics_general_id": { + "name": "wireline_geophysics_general_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_wireline_geophysics_readings_abbr": { + "name": "idx_wireline_geophysics_readings_abbr", + "columns": [ + { + "expression": "parameter_recorded_by_tool_wgpg_tool", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "borehole_casing_details_at_depth_of_reading", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wireline_geophysics_readings_parameter_recorded_by_tool_wgpg_tool_abbreviation_id_fk": { + "name": "wireline_geophysics_readings_parameter_recorded_by_tool_wgpg_tool_abbreviation_id_fk", + "tableFrom": "wireline_geophysics_readings", + "tableTo": "abbreviation", + "columnsFrom": [ + "parameter_recorded_by_tool_wgpg_tool" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "wireline_geophysics_readings_borehole_casing_details_at_depth_of_reading_abbreviation_id_fk": { + "name": "wireline_geophysics_readings_borehole_casing_details_at_depth_of_reading_abbreviation_id_fk", + "tableFrom": "wireline_geophysics_readings", + "tableTo": "abbreviation", + "columnsFrom": [ + "borehole_casing_details_at_depth_of_reading" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "wireline_geophysics_readings_wireline_geophysics_general_id_wireline_geophysics_general_id_fk": { + "name": "wireline_geophysics_readings_wireline_geophysics_general_id_wireline_geophysics_general_id_fk", + "tableFrom": "wireline_geophysics_readings", + "tableTo": "wireline_geophysics_general", + "columnsFrom": [ + "wireline_geophysics_general_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_wireline_geophysics_readings": { + "name": "unique_wireline_geophysics_readings", + "nullsNotDistinct": false, + "columns": [ + "wireline_geophysics_general_id", + "parameter_recorded_by_tool_wgpg_tool", + "test_result_units", + "depth_of_reading" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.ags_dictionary_version": { + "name": "ags_dictionary_version", + "schema": "public", + "values": [ + "v4_0_3", + "v4_0_4", + "v4_1", + "v4_1_1" + ] + }, + "public.ags_import_status": { + "name": "ags_import_status", + "schema": "public", + "values": [ + "not_started", + "completed" + ] + }, + "public.ags_validation_status": { + "name": "ags_validation_status", + "schema": "public", + "values": [ + "not_started", + "started", + "completed" + ] + }, + "public.changes_calculation_status": { + "name": "changes_calculation_status", + "schema": "public", + "values": [ + "not_started", + "completed" + ] + }, + "public.excel_import_kind": { + "name": "excel_import_kind", + "schema": "public", + "values": [ + "excel", + "csv" + ] + }, + "public.project_role": { + "name": "project_role", + "schema": "public", + "values": [ + "OWNER", + "CONTRIBUTOR", + "VIEWER" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/packages/common/drizzle/meta/_journal.json b/packages/common/drizzle/meta/_journal.json index 0a9f4d9d..135e198c 100644 --- a/packages/common/drizzle/meta/_journal.json +++ b/packages/common/drizzle/meta/_journal.json @@ -99,6 +99,20 @@ "when": 1749740176393, "tag": "0013_medical_juggernaut", "breakpoints": true + }, + { + "idx": 14, + "version": "7", + "when": 1750326966802, + "tag": "0014_quiet_romulus", + "breakpoints": true + }, + { + "idx": 15, + "version": "7", + "when": 1750339841236, + "tag": "0015_flowery_cyclops", + "breakpoints": true } ] -} +} \ No newline at end of file diff --git a/packages/common/drizzle/migrations/0014_add_folders.sql b/packages/common/drizzle/migrations/0014_add_folders.sql new file mode 100644 index 00000000..2d942955 --- /dev/null +++ b/packages/common/drizzle/migrations/0014_add_folders.sql @@ -0,0 +1,19 @@ +-- Create folder table +CREATE TABLE IF NOT EXISTS "folder" ( + "id" serial PRIMARY KEY NOT NULL, + "name" varchar NOT NULL, + "project_id" integer NOT NULL, + "parent_folder_id" integer, + "createdAt" timestamp (3) DEFAULT now() NOT NULL, + "updatedAt" timestamp (3) DEFAULT now() NOT NULL, + CONSTRAINT "folder_project_id_project_id_fk" FOREIGN KEY ("project_id") REFERENCES "project"("id") ON DELETE cascade ON UPDATE no action, + CONSTRAINT "folder_parent_folder_id_folder_id_fk" FOREIGN KEY ("parent_folder_id") REFERENCES "folder"("id") ON DELETE cascade ON UPDATE no action +); + +-- Add folder_id column to custom_table +ALTER TABLE "custom_table" ADD COLUMN "folder_id" integer; +ALTER TABLE "custom_table" ADD CONSTRAINT "custom_table_folder_id_folder_id_fk" FOREIGN KEY ("folder_id") REFERENCES "folder"("id") ON DELETE set null ON UPDATE no action; + +-- Add folder_id column to plot +ALTER TABLE "plot" ADD COLUMN "folder_id" integer; +ALTER TABLE "plot" ADD CONSTRAINT "plot_folder_id_folder_id_fk" FOREIGN KEY ("folder_id") REFERENCES "folder"("id") ON DELETE set null ON UPDATE no action; \ No newline at end of file diff --git a/packages/common/src/db/schema/custom_table.ts b/packages/common/src/db/schema/custom_table.ts index be14f5b1..65ed22e5 100644 --- a/packages/common/src/db/schema/custom_table.ts +++ b/packages/common/src/db/schema/custom_table.ts @@ -11,6 +11,7 @@ import { project } from "./project"; import { TableName, foreignKeys } from "./data"; import { DepthJoinConfig } from "./depth"; import { zone } from "./zone"; +import { folder } from "./folder"; type DataGridFilter = { values: unknown[]; @@ -48,6 +49,9 @@ export const customTable = pgTable("custom_table", { projectId: integer("project_id") .references((): AnyPgColumn => project.id, { onDelete: "cascade" }) .notNull(), + folderId: integer("folder_id").references((): AnyPgColumn => folder.id, { + onDelete: "set null", + }), definition: jsonb("definition").$type(), createdAt: createdAt(), updatedAt: updatedAt(), diff --git a/packages/common/src/db/schema/folder.ts b/packages/common/src/db/schema/folder.ts new file mode 100644 index 00000000..d379dd32 --- /dev/null +++ b/packages/common/src/db/schema/folder.ts @@ -0,0 +1,27 @@ +import { + AnyPgColumn, + integer, + pgTable, + serial, + varchar, +} from "drizzle-orm/pg-core"; +import { createdAt, updatedAt } from "./common"; +import { project } from "./project"; + +export const folder = pgTable("folder", { + id: serial("id").primaryKey(), + name: varchar("name").notNull(), + projectId: integer("project_id") + .references((): AnyPgColumn => project.id, { onDelete: "cascade" }) + .notNull(), + parentFolderId: integer("parent_folder_id").references( + (): AnyPgColumn => folder.id, + { onDelete: "cascade" } + ), + type: varchar("type").notNull().default("customTable"), // "customTable" or "plot" + createdAt: createdAt(), + updatedAt: updatedAt(), +}); + +export type Folder = typeof folder.$inferSelect; +export type FolderInsert = typeof folder.$inferInsert; diff --git a/packages/common/src/db/schema/plot.ts b/packages/common/src/db/schema/plot.ts index 149aead2..f449b278 100644 --- a/packages/common/src/db/schema/plot.ts +++ b/packages/common/src/db/schema/plot.ts @@ -9,6 +9,7 @@ import { import { createdAt, updatedAt } from "./common"; import { project } from "./project"; import { customTable } from "./custom_table"; +import { folder } from "./folder"; import { z } from "zod"; // Base axis configuration @@ -236,6 +237,9 @@ export const plot = pgTable("plot", { projectId: integer("project_id") .references((): AnyPgColumn => project.id, { onDelete: "cascade" }) .notNull(), + folderId: integer("folder_id").references((): AnyPgColumn => folder.id, { + onDelete: "set null", + }), sourceCustomTableId: integer("source_custom_table_id").references( (): AnyPgColumn => customTable.id, { onDelete: "cascade" } From 888cee6686103e12d65dab34bb9acf10e04d68fe Mon Sep 17 00:00:00 2001 From: James Holcombe Date: Mon, 23 Jun 2025 15:38:45 +0100 Subject: [PATCH 08/18] schema for templtes --- .../app/src/actions/data/plots/deletePlot.ts | 8 ++- .../app/src/actions/data/plots/movePlot.ts | 8 ++- .../app/src/actions/data/plots/updatePlot.ts | 8 ++- .../data/data-sidebar/folder-tree.tsx | 26 ++++++- .../components/data/data-sidebar/plot-tab.tsx | 9 +-- packages/common/src/db/schema/template.ts | 72 +++++++++++++++++++ 6 files changed, 120 insertions(+), 11 deletions(-) create mode 100644 packages/common/src/db/schema/template.ts diff --git a/packages/app/src/actions/data/plots/deletePlot.ts b/packages/app/src/actions/data/plots/deletePlot.ts index ca5b58aa..3c6592de 100644 --- a/packages/app/src/actions/data/plots/deletePlot.ts +++ b/packages/app/src/actions/data/plots/deletePlot.ts @@ -1,7 +1,7 @@ "use server"; import { getServerUser } from "@/lib/auth"; -import { deletePlot } from "@/db/crud/plot"; +import { deletePlot, readPlotForProject } from "@/db/crud/plot"; import { redirect } from "next/navigation"; import { getProjectForUser } from "@/lib/dal/projects"; import { revalidatePlotCache } from "@/lib/dal/plots"; @@ -14,6 +14,12 @@ export async function deletePlotAction(projectId: number, plotId: number) { throw new Error("Project not found"); } + const plot = await readPlotForProject(projectId, plotId); + + if (!plot) { + throw new Error("Plot not found"); + } + await deletePlot(plotId); revalidatePlotCache(plotId, projectId); diff --git a/packages/app/src/actions/data/plots/movePlot.ts b/packages/app/src/actions/data/plots/movePlot.ts index f7f270dd..b88c8a83 100644 --- a/packages/app/src/actions/data/plots/movePlot.ts +++ b/packages/app/src/actions/data/plots/movePlot.ts @@ -1,7 +1,7 @@ "use server"; import { getServerUser } from "@/lib/auth"; -import { updatePlot } from "@/db/crud/plot"; +import { readPlotForProject, updatePlot } from "@/db/crud/plot"; import { getProjectForUser } from "@/lib/dal/projects"; import { revalidateTag } from "next/cache"; @@ -17,6 +17,12 @@ export async function movePlotAction( throw new Error("Project not found"); } + const plot = await readPlotForProject(projectId, plotId); + + if (!plot) { + throw new Error("Plot not found"); + } + const updatedPlot = await updatePlot(plotId, { folderId: newFolderId, }); diff --git a/packages/app/src/actions/data/plots/updatePlot.ts b/packages/app/src/actions/data/plots/updatePlot.ts index 2b11bacd..447b551f 100644 --- a/packages/app/src/actions/data/plots/updatePlot.ts +++ b/packages/app/src/actions/data/plots/updatePlot.ts @@ -2,7 +2,7 @@ import { getServerUser } from "@/lib/auth"; import { getProjectForUser } from "@/lib/dal/projects"; -import { updatePlot } from "@/db/crud/plot"; +import { readPlotForProject, updatePlot } from "@/db/crud/plot"; import { PlotInsert } from "@common/db/schema/plot"; import { revalidatePlotCache } from "@/lib/dal/plots"; @@ -18,6 +18,12 @@ export async function updatePlotAction( throw new Error("Project not found"); } + const plot = await readPlotForProject(projectId, plotId); + + if (!plot) { + throw new Error("Plot not found"); + } + await updatePlot(plotId, data); revalidatePlotCache(plotId, projectId); diff --git a/packages/app/src/components/data/data-sidebar/folder-tree.tsx b/packages/app/src/components/data/data-sidebar/folder-tree.tsx index d29e4f79..37ae04b5 100644 --- a/packages/app/src/components/data/data-sidebar/folder-tree.tsx +++ b/packages/app/src/components/data/data-sidebar/folder-tree.tsx @@ -413,6 +413,15 @@ export function FolderTree({ onItemDelete, onItemDuplicate, }: FolderTreeProps) { + console.log( + "FolderTree received folders:", + folders.map((f) => ({ + id: f.id, + name: f.name, + parentFolderId: f.parentFolderId, + })), + ); + const [expandedFolders, setExpandedFolders] = useState>( new Set(), ); @@ -488,18 +497,32 @@ export function FolderTree({ const [draggedType, draggedId] = (active.id as string).split(":"); const [droppedType, droppedId] = (over.id as string).split(":"); + console.log("Drag end:", { + draggedType, + draggedId, + droppedType, + droppedId, + }); + // Only allow dropping on folders if (droppedType !== "folder") return; const targetFolderId = droppedId === "root" ? null : parseInt(droppedId); const draggedItemId = parseInt(draggedId); + console.log("Moving item:", { draggedItemId, targetFolderId }); + try { if (draggedType === "folder") { // Prevent dropping a folder into itself or its descendants - if (targetFolderId === draggedItemId) return; + if (targetFolderId === draggedItemId) { + console.log("Cannot drop folder into itself"); + return; + } + console.log("Moving folder:", { draggedItemId, targetFolderId }); await moveFolderAction(projectId, draggedItemId, targetFolderId); + console.log("Folder moved successfully"); } else if (draggedType === "item") { if (itemType === "customTable") { await moveCustomTableAction(projectId, draggedItemId, targetFolderId); @@ -508,6 +531,7 @@ export function FolderTree({ } } + console.log("Refreshing page data"); router.refresh(); } catch (error) { console.error("Error moving item:", error); diff --git a/packages/app/src/components/data/data-sidebar/plot-tab.tsx b/packages/app/src/components/data/data-sidebar/plot-tab.tsx index 9aa16f24..833469e9 100644 --- a/packages/app/src/components/data/data-sidebar/plot-tab.tsx +++ b/packages/app/src/components/data/data-sidebar/plot-tab.tsx @@ -25,11 +25,6 @@ type PlotItem = { export function PlotTab({ projectId, plots, folders }: Props) { const [currentFolderId, setCurrentFolderId] = useState(null); - // Filter plots based on current folder - const filteredPlots = plots.filter( - (plot) => plot.folderId === currentFolderId, - ); - const plotItems: PlotItem[] = plots.map((plot: Plot) => { return { id: plot.id, @@ -47,11 +42,11 @@ export function PlotTab({ projectId, plots, folders }: Props) { await updatePlotAction(projectId, itemId, { name: newName }); }; - const handleDelete = async (itemId: number, itemName: string) => { + const handleDelete = async (itemId: number, _itemName: string) => { await deletePlotAction(projectId, itemId); }; - const handleDuplicate = async (itemId: number) => {}; + const handleDuplicate = async (_itemId: number) => {}; return (
diff --git a/packages/common/src/db/schema/template.ts b/packages/common/src/db/schema/template.ts new file mode 100644 index 00000000..9825f6ea --- /dev/null +++ b/packages/common/src/db/schema/template.ts @@ -0,0 +1,72 @@ +import { + AnyPgColumn, + boolean, + integer, + jsonb, + pgEnum, + pgTable, + serial, + varchar, +} from "drizzle-orm/pg-core"; +import { createdAt, updatedAt } from "./common"; + +import { user } from "@/db/schema/user"; +import { SQL, sql } from "drizzle-orm"; +import { CustomTableDefinition } from "@/db/schema/custom_table"; +import { PlotDefinition } from "@/db/schema/plot"; +import { TableName } from "@/db/schema/data"; +export const scope = pgEnum("scope", ["public", "private"]); + +type CustomTableWithoutFilters = Record< + TableName, + Omit +>; + +type PlotDefinitionWithoutSource = Omit; + +export const template = pgTable("template", { + id: serial("id").primaryKey(), + name: varchar("name").notNull(), + ownerId: integer("owner_id") + .references((): AnyPgColumn => user.id, { onDelete: "set null" }) + .notNull(), + createdAt: createdAt(), + updatedAt: updatedAt(), + customTableDefinition: jsonb("custom_table_definition") + .$type() + .notNull(), + plotDefinition: jsonb("plot_definition").$type(), + isPlot: boolean("is_plot").generatedAlwaysAs( + (): SQL => sql`( + ${template.plotDefinition} IS NOT NULL + )` + ), + scope: scope("scope").notNull().default("private"), +}); + +export const templateTag = pgTable("template_tag", { + templateId: integer("template_id") + .references((): AnyPgColumn => template.id, { onDelete: "cascade" }) + .notNull(), + tagId: integer("tag_id").references((): AnyPgColumn => tag.id, { + onDelete: "cascade", + }), + createdAt: createdAt(), + updatedAt: updatedAt(), +}); + +export const tag = pgTable("tag", { + id: serial("id").primaryKey(), + name: varchar("name").notNull(), + color: varchar("color").notNull(), + ownerId: integer("owner_id") + .references((): AnyPgColumn => user.id, { onDelete: "set null" }) + .notNull(), + createdAt: createdAt(), + updatedAt: updatedAt(), + usageCount: integer("usage_count").generatedAlwaysAs( + (): SQL => sql`( + SELECT COUNT(*) FROM template_tag WHERE tag_id = ${tag.id} + )` + ), +}); From 4d6bc2de9709e1893ee6beec2cab035d81b7854e Mon Sep 17 00:00:00 2001 From: James Holcombe Date: Tue, 24 Jun 2025 15:50:45 +0100 Subject: [PATCH 09/18] feat: setup templates --- .../actions/data/templates/applyTemplate.ts | 74 + .../actions/data/templates/createTemplate.ts | 84 + .../actions/data/templates/readTemplates.ts | 9 + .../data/views/[customTableId]/data/page.tsx | 2 +- .../views/[customTableId]/definition/page.tsx | 4 +- .../data/views/[customTableId]/layout.tsx | 43 +- .../data/custom-table/custom-table-data.tsx | 5 +- .../custom-table/custom-table-definition.tsx | 2 +- .../custom-table/custom-table-nav-bar.tsx | 60 - .../custom-table-toggle-button.tsx | 67 + .../custom-table/save-as-template-button.tsx | 51 + .../data/data-sidebar/custom-table-tab.tsx | 20 + .../data/data-sidebar/folder-tree.tsx | 25 +- .../components/data/data-sidebar/plot-tab.tsx | 20 + .../components/data/plot/plot-data-view.tsx | 26 +- .../src/components/data/templates/index.ts | 4 + .../data/templates/save-as-template-modal.tsx | 207 + .../data/templates/template-application.tsx | 174 + .../data/templates/template-browser-modal.tsx | 205 + .../data/templates/template-card.tsx | 110 + packages/app/src/db/crud/template.ts | 59 + packages/common/drizzle/0016_rich_joseph.sql | 35 + .../common/drizzle/meta/0016_snapshot.json | 26008 ++++++++++++++++ packages/common/drizzle/meta/_journal.json | 7 + packages/common/src/db/schema/template.ts | 22 +- 25 files changed, 27232 insertions(+), 91 deletions(-) create mode 100644 packages/app/src/actions/data/templates/applyTemplate.ts create mode 100644 packages/app/src/actions/data/templates/createTemplate.ts create mode 100644 packages/app/src/actions/data/templates/readTemplates.ts delete mode 100644 packages/app/src/components/data/custom-table/custom-table-nav-bar.tsx create mode 100644 packages/app/src/components/data/custom-table/custom-table-toggle-button.tsx create mode 100644 packages/app/src/components/data/custom-table/save-as-template-button.tsx create mode 100644 packages/app/src/components/data/templates/index.ts create mode 100644 packages/app/src/components/data/templates/save-as-template-modal.tsx create mode 100644 packages/app/src/components/data/templates/template-application.tsx create mode 100644 packages/app/src/components/data/templates/template-browser-modal.tsx create mode 100644 packages/app/src/components/data/templates/template-card.tsx create mode 100644 packages/app/src/db/crud/template.ts create mode 100644 packages/common/drizzle/0016_rich_joseph.sql create mode 100644 packages/common/drizzle/meta/0016_snapshot.json diff --git a/packages/app/src/actions/data/templates/applyTemplate.ts b/packages/app/src/actions/data/templates/applyTemplate.ts new file mode 100644 index 00000000..d1e34022 --- /dev/null +++ b/packages/app/src/actions/data/templates/applyTemplate.ts @@ -0,0 +1,74 @@ +"use server"; + +import { getServerUser } from "@/lib/auth"; +import { createCustomTable } from "@/db/crud/custom_table"; +import { createPlot } from "@/db/crud/plot"; +import { getProjectForUser } from "@/lib/dal/projects"; +import { revalidateCustomTableCache } from "@/lib/dal/custom-tables"; +import { revalidateTag } from "next/cache"; +import { CustomTableDefinition } from "@common/db/schema/custom_table"; +import { PlotDefinition } from "@common/db/schema/plot"; + +interface ApplyTemplateParams { + projectId: number; + customTableName: string; + customTableDefinition: CustomTableDefinition; + plotName?: string; + plotDefinition?: PlotDefinition; + folderId?: number | null; +} + +export async function applyTemplateAction({ + projectId, + customTableName, + customTableDefinition, + plotName, + plotDefinition, + folderId, +}: ApplyTemplateParams) { + const user = await getServerUser(); + const userProject = await getProjectForUser(user, projectId); + + if (!userProject) { + throw new Error("Project not found"); + } + + // Create custom table + const newCustomTable = await createCustomTable({ + name: customTableName, + projectId, + folderId: folderId || null, + definition: customTableDefinition, + }); + + revalidateCustomTableCache(newCustomTable.id, projectId); + + let newPlot = null; + + // Create plot if provided + if (plotName && plotDefinition) { + const plotDefinitionWithSource = { + ...plotDefinition, + dataSource: { + isCustomTable: true, + customTableId: newCustomTable.id, + }, + }; + + newPlot = await createPlot({ + name: plotName, + projectId, + folderId: folderId || null, + definition: plotDefinitionWithSource, + sourceCustomTableId: newCustomTable.id, + }); + + revalidateTag(`project-${projectId}-plots`); + revalidateTag(`project-${projectId}-data`); + } + + return { + customTable: newCustomTable, + plot: newPlot, + }; +} diff --git a/packages/app/src/actions/data/templates/createTemplate.ts b/packages/app/src/actions/data/templates/createTemplate.ts new file mode 100644 index 00000000..df151dc8 --- /dev/null +++ b/packages/app/src/actions/data/templates/createTemplate.ts @@ -0,0 +1,84 @@ +"use server"; + +import { getServerUser } from "@/lib/auth"; +import { createTemplate } from "@/db/crud/template"; +import { getCustomTableForProject } from "@/lib/dal/custom-tables"; +import { getPlotForProject } from "@/lib/dal/plots"; + +import { TableName } from "@common/db/schema/data"; +import { + CustomTableWithoutFilters, + PlotDefinitionWithoutSource, +} from "@common/db/schema/template"; +interface CreateTemplateParams { + name: string; + description?: string; + scope: "public" | "private"; + customTableId?: number; + plotId?: number; + projectId: number; +} + +export async function createTemplateAction({ + name, + description, + scope, + customTableId, + plotId, + projectId, +}: CreateTemplateParams) { + const user = await getServerUser(); + + if (!user) { + throw new Error("User not authenticated"); + } + + let customTableDefinition: CustomTableWithoutFilters | null = null; + let plotDefinition: PlotDefinitionWithoutSource | null = null; + + // Get custom table definition if provided + if (customTableId) { + const customTable = await getCustomTableForProject( + projectId, + customTableId, + ); + if (!customTable || !customTable.definition) { + throw new Error("Custom table not found or has no definition"); + } + + // Remove filters from the definition for the template + customTableDefinition = Object.fromEntries( + Object.entries(customTable.definition).map(([tableName, tableDef]) => [ + tableName, + { + ...tableDef, + filters: undefined, // Remove filters + }, + ]), + ) as Record; + } + + // Get plot definition if provided + if (plotId) { + const plot = await getPlotForProject(projectId, plotId); + if (!plot || !plot.definition) { + throw new Error("Plot not found or has no definition"); + } + + // Remove data source from the definition for the template + const { dataSource, ...plotDefWithoutSource } = plot.definition; + plotDefinition = plotDefWithoutSource; + } + + // Create the template + const newTemplate = await createTemplate({ + name, + ownerId: user.id, + customTableDefinition: + customTableDefinition || ({} as CustomTableWithoutFilters), + plotDefinition: plotDefinition || null, + scope, + }); + + return newTemplate; +} diff --git a/packages/app/src/actions/data/templates/readTemplates.ts b/packages/app/src/actions/data/templates/readTemplates.ts new file mode 100644 index 00000000..ac55ec85 --- /dev/null +++ b/packages/app/src/actions/data/templates/readTemplates.ts @@ -0,0 +1,9 @@ +"use server"; + +import { getServerUser } from "@/lib/auth"; +import { readTemplatesByUserId } from "@/db/crud/template"; + +export async function readTemplatesAction() { + const user = await getServerUser(); + return readTemplatesByUserId(user.id); +} diff --git a/packages/app/src/app/(app)/projects/[projectId]/data/views/[customTableId]/data/page.tsx b/packages/app/src/app/(app)/projects/[projectId]/data/views/[customTableId]/data/page.tsx index c75e28cd..b8d4fcb3 100644 --- a/packages/app/src/app/(app)/projects/[projectId]/data/views/[customTableId]/data/page.tsx +++ b/packages/app/src/app/(app)/projects/[projectId]/data/views/[customTableId]/data/page.tsx @@ -41,7 +41,7 @@ export default async function Page({ params }: Props) { })); return ( -
+
}> +
)} -
+
+ + + + +
+ ); +} diff --git a/packages/app/src/components/data/custom-table/save-as-template-button.tsx b/packages/app/src/components/data/custom-table/save-as-template-button.tsx new file mode 100644 index 00000000..923e5532 --- /dev/null +++ b/packages/app/src/components/data/custom-table/save-as-template-button.tsx @@ -0,0 +1,51 @@ +"use client"; + +import { useState } from "react"; +import { Button } from "@/components/ui/button"; +import { Save } from "lucide-react"; +import { SaveAsTemplateModal } from "../templates/save-as-template-modal"; + +type Props = { + projectId: number; + customTableId: number; + itemName: string; + disabled?: boolean; +}; + +export function SaveAsTemplateButton({ + projectId, + customTableId, + itemName, + disabled = false, +}: Props) { + const [showSaveAsTemplate, setShowSaveAsTemplate] = useState(false); + + const handleTemplateCreated = () => { + // Optionally refresh the page or show a success message + // For now, the toast in the modal will handle the success feedback + }; + + return ( + <> + + + setShowSaveAsTemplate(false)} + projectId={projectId} + customTableId={customTableId} + itemName={itemName} + itemType="customTable" + onTemplateCreated={handleTemplateCreated} + /> + + ); +} diff --git a/packages/app/src/components/data/data-sidebar/custom-table-tab.tsx b/packages/app/src/components/data/data-sidebar/custom-table-tab.tsx index 36735e54..2e3e93b4 100644 --- a/packages/app/src/components/data/data-sidebar/custom-table-tab.tsx +++ b/packages/app/src/components/data/data-sidebar/custom-table-tab.tsx @@ -8,6 +8,7 @@ import { updateCustomTableAction } from "@/actions/data/custom-tables/updateCust import { deleteCustomTableAction } from "@/actions/data/custom-tables/deleteCustomTable"; import { duplicateCustomTableAction } from "@/actions/data/custom-tables/duplicateCustomTable"; import { FolderTree } from "./folder-tree"; +import { TemplateBrowserModal } from "../templates/template-browser-modal"; type Props = { projectId: number; @@ -24,6 +25,7 @@ type CustomTableItem = { export function CustomTableTab({ projectId, customTables, folders }: Props) { const [currentFolderId, setCurrentFolderId] = useState(null); + const [showTemplateBrowser, setShowTemplateBrowser] = useState(false); // Filter tables based on current folder const filteredTables = customTables.filter( @@ -45,6 +47,10 @@ export function CustomTableTab({ projectId, customTables, folders }: Props) { await createCustomTableAction(projectId, folderId); }; + const handleNewFromTemplate = () => { + setShowTemplateBrowser(true); + }; + const handleRename = async (itemId: number, newName: string) => { await updateCustomTableAction(projectId, itemId, { name: newName }); }; @@ -57,6 +63,11 @@ export function CustomTableTab({ projectId, customTables, folders }: Props) { await duplicateCustomTableAction(projectId, itemId); }; + const handleTemplateApplied = (result: { customTable?: any; plot?: any }) => { + // Refresh the page to show the new custom table + window.location.reload(); + }; + return (
+ + setShowTemplateBrowser(false)} + onTemplateApplied={handleTemplateApplied} + />
); } diff --git a/packages/app/src/components/data/data-sidebar/folder-tree.tsx b/packages/app/src/components/data/data-sidebar/folder-tree.tsx index 37ae04b5..96e959d5 100644 --- a/packages/app/src/components/data/data-sidebar/folder-tree.tsx +++ b/packages/app/src/components/data/data-sidebar/folder-tree.tsx @@ -54,6 +54,7 @@ interface FolderTreeProps { currentFolderId: number | null; onFolderSelect: (folderId: number | null) => void; onNewItem: (folderId: number | null) => void; + onNewFromTemplate?: () => void; items: Array<{ id: number; label: string; @@ -342,7 +343,7 @@ function FolderNode({ onNewSubfolder(folder.id)}> - New Subfolder + New subfolder setIsRenaming(true)}> Rename @@ -359,7 +360,7 @@ function FolderNode({ onNewSubfolder(folder.id)}> - New Subfolder + New subfolder setIsRenaming(true)}> Rename @@ -392,7 +393,7 @@ function FolderNode({ !open && setIsRenaming(false)} - title="Rename Folder" + title="Rename folder" initialName={folder.name} onRename={handleRename} placeholderText="Folder name" @@ -407,6 +408,7 @@ export function FolderTree({ currentFolderId, onFolderSelect, onNewItem, + onNewFromTemplate, items, itemType, onItemRename, @@ -601,13 +603,24 @@ export function FolderTree({
{/* Header with action buttons */} -
+
+ {onNewFromTemplate && ( + + )} diff --git a/packages/app/src/components/data/data-sidebar/plot-tab.tsx b/packages/app/src/components/data/data-sidebar/plot-tab.tsx index 833469e9..2a85eefa 100644 --- a/packages/app/src/components/data/data-sidebar/plot-tab.tsx +++ b/packages/app/src/components/data/data-sidebar/plot-tab.tsx @@ -8,6 +8,7 @@ import { updatePlotAction } from "@/actions/data/plots/updatePlot"; import { deletePlotAction } from "@/actions/data/plots/deletePlot"; // import { duplicatePlotAction } from "@/actions/data/plots/duplicatePlot"; import { FolderTree } from "./folder-tree"; +import { TemplateBrowserModal } from "../templates/template-browser-modal"; type Props = { projectId: number; @@ -24,6 +25,7 @@ type PlotItem = { export function PlotTab({ projectId, plots, folders }: Props) { const [currentFolderId, setCurrentFolderId] = useState(null); + const [showTemplateBrowser, setShowTemplateBrowser] = useState(false); const plotItems: PlotItem[] = plots.map((plot: Plot) => { return { @@ -38,6 +40,10 @@ export function PlotTab({ projectId, plots, folders }: Props) { await createPlotAction(projectId, folderId); }; + const handleNewFromTemplate = () => { + setShowTemplateBrowser(true); + }; + const handleRename = async (itemId: number, newName: string) => { await updatePlotAction(projectId, itemId, { name: newName }); }; @@ -48,6 +54,11 @@ export function PlotTab({ projectId, plots, folders }: Props) { const handleDuplicate = async (_itemId: number) => {}; + const handleTemplateApplied = (result: { customTable?: any; plot?: any }) => { + // Refresh the page to show the new plot + window.location.reload(); + }; + return (
+ + setShowTemplateBrowser(false)} + onTemplateApplied={handleTemplateApplied} + />
); } diff --git a/packages/app/src/components/data/plot/plot-data-view.tsx b/packages/app/src/components/data/plot/plot-data-view.tsx index be10b0d2..babd5e39 100644 --- a/packages/app/src/components/data/plot/plot-data-view.tsx +++ b/packages/app/src/components/data/plot/plot-data-view.tsx @@ -1,6 +1,6 @@ "use client"; -import { DownloadIcon } from "lucide-react"; -import { useRef } from "react"; +import { DownloadIcon, Save } from "lucide-react"; +import { useRef, useState } from "react"; import { Button } from "@/components/ui/button"; import { toast } from "sonner"; import { exportPlotAsImage } from "./plot-export"; @@ -8,6 +8,7 @@ import { PlotPreview } from "./plot-preview"; import { ResizableBox } from "react-resizable"; import "react-resizable/css/styles.css"; import { useLocalStorage } from "@uidotdev/usehooks"; +import { SaveAsTemplateModal } from "../templates/save-as-template-modal"; import { Plot, PlotDefinition } from "@common/db/schema/plot"; import { isDefined } from "@/utils/helpers"; @@ -38,22 +39,33 @@ const DEFAULT_DIMENSIONS: PlotDimensions = { export function PlotDataView({ plot, data, + projectId, }: { projectId: number; plot: Plot; data: Record[]; }) { const plotRef = useRef(null); + const [showSaveAsTemplate, setShowSaveAsTemplate] = useState(false); const [dimensions, setDimensions] = useLocalStorage( "plot-dimensions", DEFAULT_DIMENSIONS, ); + const handleTemplateCreated = () => { + // Optionally refresh the page or show a success message + // For now, the toast in the modal will handle the success feedback + }; + return (
+
+ + setShowSaveAsTemplate(false)} + projectId={projectId} + plotId={plot.id} + itemName={plot.name} + itemType="plot" + onTemplateCreated={handleTemplateCreated} + />
); } diff --git a/packages/app/src/components/data/templates/index.ts b/packages/app/src/components/data/templates/index.ts new file mode 100644 index 00000000..ef3e9ea2 --- /dev/null +++ b/packages/app/src/components/data/templates/index.ts @@ -0,0 +1,4 @@ +export { TemplateBrowserModal } from "./template-browser-modal"; +export { TemplateCard } from "./template-card"; +export { TemplateApplication } from "./template-application"; +export { SaveAsTemplateModal } from "./save-as-template-modal"; diff --git a/packages/app/src/components/data/templates/save-as-template-modal.tsx b/packages/app/src/components/data/templates/save-as-template-modal.tsx new file mode 100644 index 00000000..84e45474 --- /dev/null +++ b/packages/app/src/components/data/templates/save-as-template-modal.tsx @@ -0,0 +1,207 @@ +"use client"; + +import { useState } from "react"; +import { + Dialog, + DialogContent, + DialogHeader, + DialogTitle, +} from "@/components/ui/dialog"; +import { Button } from "@/components/ui/button"; +import { Input } from "@/components/ui/input"; +import { Label } from "@/components/ui/label"; +import { Textarea } from "@/components/ui/textarea"; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/components/ui/select"; +import { Badge } from "@/components/ui/badge"; +import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; +import { TableColumnsSplit, ChartLine, Save, Globe, Lock } from "lucide-react"; +import { createTemplateAction } from "@/actions/data/templates/createTemplate"; +import { toast } from "sonner"; + +interface SaveAsTemplateModalProps { + isOpen: boolean; + onClose: () => void; + projectId: number; + customTableId?: number; + plotId?: number; + itemName: string; + itemType: "customTable" | "plot"; + onTemplateCreated?: () => void; +} + +export function SaveAsTemplateModal({ + isOpen, + onClose, + projectId, + customTableId, + plotId, + itemName, + itemType, + onTemplateCreated, +}: SaveAsTemplateModalProps) { + const [name, setName] = useState(`${itemName} template`); + const [description, setDescription] = useState(""); + const [scope, setScope] = useState<"public" | "private">("private"); + const [isSaving, setIsSaving] = useState(false); + + const handleSave = async () => { + if (!name.trim()) { + toast.error("Template name is required"); + return; + } + + setIsSaving(true); + try { + await createTemplateAction({ + name: name.trim(), + description: description.trim() || undefined, + scope, + customTableId, + plotId, + projectId, + }); + + toast.success("Template saved successfully!"); + onTemplateCreated?.(); + onClose(); + + // Reset form + setName(`${itemName} template`); + setDescription(""); + setScope("private"); + } catch (error) { + console.error("Failed to save template:", error); + toast.error("Failed to save template. Please try again."); + } finally { + setIsSaving(false); + } + }; + + const handleClose = () => { + if (!isSaving) { + onClose(); + } + }; + + const getItemSummary = () => { + if (itemType === "customTable") { + return "Custom table configuration (columns, joins, sorting)"; + } else { + return "Plot configuration (axes, grouping, styling)"; + } + }; + + const ItemIcon = itemType === "customTable" ? TableColumnsSplit : ChartLine; + + return ( + + + + + + Save as template + + + +
+ {/* Item Preview */} + + + Item preview + + +
+ + + {itemType === "customTable" ? "Custom table" : "Plot"} + +
+

{itemName}

+

+ {getItemSummary()} +

+
+
+ + {/* Template Configuration */} +
+

Template configuration

+ + {/* Name */} +
+ + setName(e.target.value)} + placeholder="Enter template name" + /> +
+ + {/* Description */} +
+ +