From 07c3ab5752ce4e85d3ef839bbc18a9c0c6ae5ff0 Mon Sep 17 00:00:00 2001 From: Kushagra Agarwal Date: Thu, 31 Jul 2025 15:03:41 +0530 Subject: [PATCH 01/37] computed column --- package-lock.json | 128 +++++- packages/app/package.json | 13 +- .../data/queries/[queryId]/layout.tsx | 43 +- .../data/query/query-layout-client.tsx | 89 +++++ .../query/query-sidebar-toggle-button.tsx | 28 ++ .../components/data/query/query-sidebar.tsx | 377 ++++++++++++++++++ packages/app/src/db/crud/data/query.ts | 2 + .../app/src/hooks/queries/use-query-data.tsx | 1 + packages/app/src/hooks/use-debounced-value.ts | 12 + 9 files changed, 654 insertions(+), 39 deletions(-) create mode 100644 packages/app/src/components/data/query/query-layout-client.tsx create mode 100644 packages/app/src/components/data/query/query-sidebar-toggle-button.tsx create mode 100644 packages/app/src/components/data/query/query-sidebar.tsx create mode 100644 packages/app/src/hooks/use-debounced-value.ts diff --git a/package-lock.json b/package-lock.json index f09dc074..4b782027 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1525,6 +1525,123 @@ "@lezer/common": "^1.0.0" } }, + "node_modules/@codemirror/basic-setup": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@codemirror/basic-setup/-/basic-setup-0.20.0.tgz", + "integrity": "sha512-W/ERKMLErWkrVLyP5I8Yh8PXl4r+WFNkdYVSzkXYPQv2RMPSkWpr2BgggiSJ8AHF/q3GuApncDD8I4BZz65fyg==", + "deprecated": "In version 6.0, this package has been renamed to just 'codemirror'", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^0.20.0", + "@codemirror/commands": "^0.20.0", + "@codemirror/language": "^0.20.0", + "@codemirror/lint": "^0.20.0", + "@codemirror/search": "^0.20.0", + "@codemirror/state": "^0.20.0", + "@codemirror/view": "^0.20.0" + } + }, + "node_modules/@codemirror/basic-setup/node_modules/@codemirror/autocomplete": { + "version": "0.20.3", + "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-0.20.3.tgz", + "integrity": "sha512-lYB+NPGP+LEzAudkWhLfMxhTrxtLILGl938w+RcFrGdrIc54A+UgmCoz+McE3IYRFp4xyQcL4uFJwo+93YdgHw==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^0.20.0", + "@codemirror/state": "^0.20.0", + "@codemirror/view": "^0.20.0", + "@lezer/common": "^0.16.0" + } + }, + "node_modules/@codemirror/basic-setup/node_modules/@codemirror/commands": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-0.20.0.tgz", + "integrity": "sha512-v9L5NNVA+A9R6zaFvaTbxs30kc69F6BkOoiEbeFw4m4I0exmDEKBILN6mK+GksJtvTzGBxvhAPlVFTdQW8GB7Q==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^0.20.0", + "@codemirror/state": "^0.20.0", + "@codemirror/view": "^0.20.0", + "@lezer/common": "^0.16.0" + } + }, + "node_modules/@codemirror/basic-setup/node_modules/@codemirror/language": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-0.20.2.tgz", + "integrity": "sha512-WB3Bnuusw0xhVvhBocieYKwJm04SOk5bPoOEYksVHKHcGHFOaYaw+eZVxR4gIqMMcGzOIUil0FsCmFk8yrhHpw==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^0.20.0", + "@codemirror/view": "^0.20.0", + "@lezer/common": "^0.16.0", + "@lezer/highlight": "^0.16.0", + "@lezer/lr": "^0.16.0", + "style-mod": "^4.0.0" + } + }, + "node_modules/@codemirror/basic-setup/node_modules/@codemirror/lint": { + "version": "0.20.3", + "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-0.20.3.tgz", + "integrity": "sha512-06xUScbbspZ8mKoODQCEx6hz1bjaq9m8W8DxdycWARMiiX1wMtfCh/MoHpaL7ws/KUMwlsFFfp2qhm32oaCvVA==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^0.20.0", + "@codemirror/view": "^0.20.2", + "crelt": "^1.0.5" + } + }, + "node_modules/@codemirror/basic-setup/node_modules/@codemirror/search": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@codemirror/search/-/search-0.20.1.tgz", + "integrity": "sha512-ROe6gRboQU5E4z6GAkNa2kxhXqsGNbeLEisbvzbOeB7nuDYXUZ70vGIgmqPu0tB+1M3F9yWk6W8k2vrFpJaD4Q==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^0.20.0", + "@codemirror/view": "^0.20.0", + "crelt": "^1.0.5" + } + }, + "node_modules/@codemirror/basic-setup/node_modules/@codemirror/state": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-0.20.1.tgz", + "integrity": "sha512-ms0tlV5A02OK0pFvTtSUGMLkoarzh1F8mr6jy1cD7ucSC2X/VLHtQCxfhdSEGqTYlQF2hoZtmLv+amqhdgbwjQ==", + "license": "MIT" + }, + "node_modules/@codemirror/basic-setup/node_modules/@codemirror/view": { + "version": "0.20.7", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-0.20.7.tgz", + "integrity": "sha512-pqEPCb9QFTOtHgAH5XU/oVy9UR/Anj6r+tG5CRmkNVcqSKEPmBU05WtN/jxJCFZBXf6HumzWC9ydE4qstO3TxQ==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^0.20.0", + "style-mod": "^4.0.0", + "w3c-keyname": "^2.2.4" + } + }, + "node_modules/@codemirror/basic-setup/node_modules/@lezer/common": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@lezer/common/-/common-0.16.1.tgz", + "integrity": "sha512-qPmG7YTZ6lATyTOAWf8vXE+iRrt1NJd4cm2nJHK+v7X9TsOF6+HtuU/ctaZy2RCrluxDb89hI6KWQ5LfQGQWuA==", + "license": "MIT" + }, + "node_modules/@codemirror/basic-setup/node_modules/@lezer/highlight": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-0.16.0.tgz", + "integrity": "sha512-iE5f4flHlJ1g1clOStvXNLbORJoiW4Kytso6ubfYzHnaNo/eo5SKhxs4wv/rtvwZQeZrK3we8S9SyA7OGOoRKQ==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^0.16.0" + } + }, + "node_modules/@codemirror/basic-setup/node_modules/@lezer/lr": { + "version": "0.16.3", + "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-0.16.3.tgz", + "integrity": "sha512-pau7um4eAw94BEuuShUIeQDTf3k4Wt6oIUOYxMmkZgDHdqtIcxWND4LRxi8nI9KuT4I1bXQv67BCapkxt7Ywqw==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^0.16.0" + } + }, "node_modules/@codemirror/commands": { "version": "6.8.1", "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.8.1.tgz", @@ -24639,7 +24756,14 @@ "@aws-sdk/client-s3": "^3.716.0", "@aws-sdk/s3-request-presigner": "^3.716.0", "@clerk/nextjs": "^6.12.10", - "@codemirror/view": "^6.33.0", + "@codemirror/autocomplete": "^6.18.6", + "@codemirror/basic-setup": "^0.20.0", + "@codemirror/commands": "^6.8.1", + "@codemirror/language": "^6.11.2", + "@codemirror/search": "^6.5.11", + "@codemirror/state": "^6.5.2", + "@codemirror/theme-one-dark": "^6.1.3", + "@codemirror/view": "^6.38.0", "@dnd-kit/core": "^6.3.1", "@glideapps/glide-data-grid": "^6.0.3", "@groundup-dev/ags": "^0.2.2", @@ -24685,7 +24809,7 @@ "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cmdk": "^1.0.0", - "codemirror": "^6.0.1", + "codemirror": "^6.0.2", "d3": "^7.9.0", "date-fns": "^3.6.0", "deck.gl": "^9.1.11", diff --git a/packages/app/package.json b/packages/app/package.json index f28d5c1b..9e730583 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -10,11 +10,17 @@ "lint": "next lint && npm run type-check" }, "dependencies": { - "@turf/turf": "^7.2.0", "@aws-sdk/client-s3": "^3.716.0", "@aws-sdk/s3-request-presigner": "^3.716.0", "@clerk/nextjs": "^6.12.10", - "@codemirror/view": "^6.33.0", + "@codemirror/autocomplete": "^6.18.6", + "@codemirror/basic-setup": "^0.20.0", + "@codemirror/commands": "^6.8.1", + "@codemirror/language": "^6.11.2", + "@codemirror/search": "^6.5.11", + "@codemirror/state": "^6.5.2", + "@codemirror/theme-one-dark": "^6.1.3", + "@codemirror/view": "^6.38.0", "@dnd-kit/core": "^6.3.1", "@glideapps/glide-data-grid": "^6.0.3", "@groundup-dev/ags": "^0.2.2", @@ -45,6 +51,7 @@ "@tanstack/react-query-devtools": "^5.66.9", "@tanstack/react-table": "^8.20.6", "@tanstack/react-virtual": "^3.11.2", + "@turf/turf": "^7.2.0", "@types/d3": "^7.4.3", "@types/react-resizable": "^3.0.8", "@types/recharts": "^1.8.29", @@ -59,7 +66,7 @@ "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cmdk": "^1.0.0", - "codemirror": "^6.0.1", + "codemirror": "^6.0.2", "d3": "^7.9.0", "date-fns": "^3.6.0", "deck.gl": "^9.1.11", diff --git a/packages/app/src/app/(app)/projects/[projectId]/data/queries/[queryId]/layout.tsx b/packages/app/src/app/(app)/projects/[projectId]/data/queries/[queryId]/layout.tsx index 965ba30e..a33430e8 100644 --- a/packages/app/src/app/(app)/projects/[projectId]/data/queries/[queryId]/layout.tsx +++ b/packages/app/src/app/(app)/projects/[projectId]/data/queries/[queryId]/layout.tsx @@ -3,10 +3,7 @@ import { getProjectForUser } from "@/lib/dal/projects"; import { parseStringParam } from "@/lib/routing"; import { notFound } from "next/navigation"; -import { QueryToggleButton } from "@/components/data/query/query-toggle-button"; -import { QueryNameInput } from "@/components/data/query/query-name-input"; -import { QuerySaveButton } from "@/components/data/query/query-save-button"; -import { BreadcrumbSetter } from "@/components/data/breadcrumb-setter"; +import { QueryLayoutClient } from "@/components/data/query/query-layout-client"; import { isDefinitionConfigured } from "@/components/data/query/helpers"; import { getQueryForProject } from "@/lib/dal/queries"; @@ -30,36 +27,14 @@ export default async function Layout({ params, children, modal }: Props) { const definitionConfigured = isDefinitionConfigured(query); return ( -
- {/* Header with name input, breadcrumbs, and toggle button */} -
-
- - -
-
- - - -
-
+ {children} - {modal} -
+ ); } diff --git a/packages/app/src/components/data/query/query-layout-client.tsx b/packages/app/src/components/data/query/query-layout-client.tsx new file mode 100644 index 00000000..2e79380c --- /dev/null +++ b/packages/app/src/components/data/query/query-layout-client.tsx @@ -0,0 +1,89 @@ +"use client"; + +import { useState } from "react"; +import { QueryToggleButton } from "@/components/data/query/query-toggle-button"; +import { QueryNameInput } from "@/components/data/query/query-name-input"; +import { QuerySaveButton } from "@/components/data/query/query-save-button"; +import { QuerySidebarToggleButton } from "@/components/data/query/query-sidebar-toggle-button"; +import { QuerySidebar } from "@/components/data/query/query-sidebar"; +import { BreadcrumbSetter } from "@/components/data/breadcrumb-setter"; +import { useQueryData } from "@/hooks/queries/use-query-data"; + +function QueryLayoutClient({ + projectId, + queryId, + query, + definitionConfigured, + children, + modal, +}: { + projectId: string; + queryId: string; + query: any; + definitionConfigured: boolean; + children: React.ReactNode; + modal: React.ReactNode; +}) { + const [sidebarOpen, setSidebarOpen] = useState(false); + + // Fetch data once for the entire query + const { data: queryData, isLoading: isDataLoading, error: dataError } = useQueryData( + projectId, + query as any, + 100, // Fetch more rows for sidebar use + 0, + [] // Empty zones for now + ); + + return ( +
+
+ {/* Header with name input, breadcrumbs, and toggle button */} +
+
+ + +
+
+ setSidebarOpen(!sidebarOpen)} + /> + + + +
+
+ {children} + {modal} +
+ {sidebarOpen && ( + setSidebarOpen(false)} + queryData={queryData} + isLoading={isDataLoading} + error={dataError} + /> + )} +
+ ); +} + +export { QueryLayoutClient }; \ No newline at end of file diff --git a/packages/app/src/components/data/query/query-sidebar-toggle-button.tsx b/packages/app/src/components/data/query/query-sidebar-toggle-button.tsx new file mode 100644 index 00000000..52652cac --- /dev/null +++ b/packages/app/src/components/data/query/query-sidebar-toggle-button.tsx @@ -0,0 +1,28 @@ +"use client"; + +import { Button } from "@/components/ui/button"; +import { PanelRight } from "lucide-react"; + +type QuerySidebarToggleButtonProps = { + isOpen: boolean; + onToggle: () => void; +}; + +export function QuerySidebarToggleButton({ + isOpen, + onToggle, +}: QuerySidebarToggleButtonProps) { + return ( + + ); +} \ No newline at end of file diff --git a/packages/app/src/components/data/query/query-sidebar.tsx b/packages/app/src/components/data/query/query-sidebar.tsx new file mode 100644 index 00000000..19475a9c --- /dev/null +++ b/packages/app/src/components/data/query/query-sidebar.tsx @@ -0,0 +1,377 @@ +"use client"; + +import { useState, useEffect, useRef, useMemo } from "react"; +import { Query } from "@common/db/schema/query"; +import { Button } from "@/components/ui/button"; +import { X, Save, Trash2, Database, Calculator } from "lucide-react"; +import { cn } from "@/utils/styles"; +import { useDebouncedValue } from "@/hooks/use-debounced-value"; +import { basicSetup, EditorView } from "codemirror"; +import { autocompletion } from "@codemirror/autocomplete"; +import { EditorState } from "@codemirror/state"; + +type QuerySidebarProps = { + query: Query; + projectId: string; + onClose: () => void; + queryData?: { + rows: any[]; + rowCount: number; + } | null; + isLoading?: boolean; + error?: Error | null; +}; + +type ComputedResult = { + value: any; + error?: string; + rowIndex: number; +}; + +export function QuerySidebar({ + query, + projectId, + onClose, + queryData, + isLoading, + error +}: QuerySidebarProps) { + const [editorCode, setEditorCode] = useState(""); + const debouncedEditorCode = useDebouncedValue(editorCode, 500); + const editorRef = useRef(null); + const viewRef = useRef(null); + + // Parse column names from the debounced code editor + const parseColumnNames = (code: string): string[] => { + return code + .split("\n") + .map((line) => line.trim()) + .filter((line) => line.length > 0 && !line.startsWith("//")) + .map((line) => { + // Extract column name from various formats + const match = line.match(/['"`]?([a-zA-Z_][a-zA-Z0-9_]*)['"`]?/); + return match ? match[1] : line; + }) + .filter((name, index, arr) => arr.indexOf(name) === index); // Remove duplicates + }; + + const columnNames = parseColumnNames(debouncedEditorCode); + + // Generate dynamic completions from query data + const completions = useMemo(() => { + if (!queryData?.rows || queryData.rows.length === 0) { + // Fallback to common column names if no data available + return [ + { label: "category", type: "variable", info: "Column name" }, + { label: "status", type: "variable", info: "Column name" }, + { label: "priority", type: "variable", info: "Column name" }, + { label: "user_id", type: "variable", info: "Column name" }, + { label: "created_at", type: "variable", info: "Column name" }, + { label: "updated_at", type: "variable", info: "Column name" }, + { label: "id", type: "variable", info: "Column name" }, + { label: "name", type: "variable", info: "Column name" }, + { label: "description", type: "variable", info: "Column name" }, + ]; + } + + // Extract column names from the first row + const firstRow = queryData.rows[0]; + const availableColumns = Object.keys(firstRow); + + return availableColumns.map(columnName => ({ + label: columnName, + type: "variable" as const, + info: `Column from query data (${queryData.rowCount} rows)`, + })); + }, [queryData]); + + // Process function body and compute results + const computedResults = useMemo(() => { + if (!queryData?.rows || !debouncedEditorCode.trim()) { + return []; + } + + const functionBody = debouncedEditorCode.trim(); + if (!functionBody) return []; + + try { + // Extract column names from the function body + const columnRegex = /\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g; + const detectedColumns = new Set(); + let match; + + while ((match = columnRegex.exec(functionBody)) !== null) { + const columnName = match[1]; + // Skip JavaScript keywords and common words + const jsKeywords = ['function', 'return', 'if', 'else', 'for', 'while', 'var', 'let', 'const', 'true', 'false', 'null', 'undefined']; + if (!jsKeywords.includes(columnName)) { + detectedColumns.add(columnName); + } + } + + // Create the function with column replacement + let processedBody = functionBody; + const availableColumns = Object.keys(queryData.rows[0] || {}); + + // Replace column names with row access + detectedColumns.forEach(columnName => { + if (availableColumns.includes(columnName)) { + const regex = new RegExp(`\\b${columnName}\\b`, 'g'); + processedBody = processedBody.replace(regex, `row.${columnName}`); + } + }); + + // Create the function with proper wrapping + const functionString = `function compute(row) {\n${processedBody}\n}`; + + // Create a safe evaluation environment + const computeFunction = new Function('row', processedBody); + + // Execute for each row + const results: ComputedResult[] = []; + + queryData.rows.forEach((row, index) => { + try { + const result = computeFunction(row); + results.push({ + value: result, + rowIndex: index, + }); + } catch (error) { + results.push({ + value: null, + error: error instanceof Error ? error.message : String(error), + rowIndex: index, + }); + } + }); + + return results; + } catch (error) { + return [{ + value: null, + error: error instanceof Error ? error.message : String(error), + rowIndex: 0, + }]; + } + }, [debouncedEditorCode, queryData]); + + function myCompletions(context: any) { + let before = context.matchBefore(/\w+/); + // If completion wasn't explicitly started and there + // is no word before the cursor, don't open completions. + if (!context.explicit && !before) return null; + return { + from: before ? before.from : context.pos, + options: completions, + validFor: /^\w*$/, + }; + } + + // Initialize CodeMirror + useEffect(() => { + if (!editorRef.current || viewRef.current) return; + + const state = EditorState.create({ + doc: "// Enter function body for computed column\n// Examples:\n// Simple: category + '_' + status\n// With logic:\n// if(priority > 3) {\n// return 'High'\n// }\n// return 'Low'\n// With variables:\n// let total = col1 + col2\n// if(total > 100) {\n// return 'Large'\n// }\n// return 'Small'", + extensions: [ + basicSetup, + autocompletion({ override: [myCompletions] }), + EditorView.updateListener.of((update) => { + if (update.docChanged) { + setEditorCode(update.state.doc.toString()); + } + }), + EditorView.theme({ + "&": { + fontSize: "13px", + fontFamily: 'ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace', + }, + ".cm-content": { + padding: "8px", + minHeight: "200px", + }, + ".cm-editor": { + border: "2px solid hsl(var(--input))", + borderRadius: "6px", + backgroundColor: "hsl(var(--background))", + }, + ".cm-editor.cm-focused": { + borderColor: "hsl(var(--primary))", + outline: "none", + }, + }), + ], + }); + + const view = new EditorView({ + state, + parent: editorRef.current, + }); + + viewRef.current = view; + + return () => { + view.destroy(); + viewRef.current = null; + }; + }, []); + + const handleSave = () => { + console.log("Saving computed column:", editorCode); + console.log("Computed results:", computedResults); + }; + + const handleClear = () => { + if (viewRef.current) { + const transaction = viewRef.current.state.update({ + changes: { from: 0, to: viewRef.current.state.doc.length, insert: "" }, + }); + viewRef.current.dispatch(transaction); + } + }; + + const lineCount = editorCode.split("\n").length; + const hasErrors = computedResults.some(result => result.error); + const successCount = computedResults.filter(result => !result.error).length; + + return ( +
+
+

Computed Columns

+ +
+
+
+
+
+ + + {lineCount} line{lineCount !== 1 ? "s" : ""} • {computedResults.length} result{computedResults.length !== 1 ? "s" : ""} + +
+
+
+
+
+
+ + +
+ + {/* Computed Results Display */} + {computedResults.length > 0 && ( +
+

+ + Computed Results + {hasErrors && ( + + ({successCount}/{computedResults.length} successful) + + )} +

+ {isLoading && ( +
Loading data...
+ )} + {error && ( +
+ Error: {error instanceof Error ? error.message : String(error)} +
+ )} + {!isLoading && !error && ( +
+ {/* Sample Results */} +
+
+
Sample Results
+ + {computedResults.length} computed value{computedResults.length !== 1 ? "s" : ""} + +
+
+ {computedResults.slice(0, 10).map((result, index) => ( +
+
+ + Row {result.rowIndex + 1}: {result.error ? "ERROR" : String(result.value)} + + {result.error && ( + + {result.error} + + )} +
+
+ ))} + {computedResults.length > 10 && ( +
+ ... and {computedResults.length - 10} more +
+ )} +
+
+ + {/* Error Summary */} + {hasErrors && ( +
+
Errors Found
+
+ {computedResults + .filter(result => result.error) + .slice(0, 3) + .map((result, index) => ( +
+ Row {result.rowIndex + 1}: {result.error} +
+ ))} + {computedResults.filter(result => result.error).length > 3 && ( +
+ ... and {computedResults.filter(result => result.error).length - 3} more errors +
+ )} +
+
+ )} +
+ )} +
+ )} +
+
+
+ ); +} \ No newline at end of file diff --git a/packages/app/src/db/crud/data/query.ts b/packages/app/src/db/crud/data/query.ts index 9e48778d..07e6827e 100644 --- a/packages/app/src/db/crud/data/query.ts +++ b/packages/app/src/db/crud/data/query.ts @@ -163,6 +163,8 @@ export async function countDataForQuery( const tableColumns = getTableColumns(defTable); const selectedColumns = tableConfig?.columns || []; + console.log("selectedColumns", selectedColumns); + // Create a mapping of snake_case to camelCase column names const columnMapping = Object.entries(tableColumns).reduce( (acc, [camelCase, column]) => { diff --git a/packages/app/src/hooks/queries/use-query-data.tsx b/packages/app/src/hooks/queries/use-query-data.tsx index 5dc016d7..ede039e4 100644 --- a/packages/app/src/hooks/queries/use-query-data.tsx +++ b/packages/app/src/hooks/queries/use-query-data.tsx @@ -45,6 +45,7 @@ export async function fetchQueryData( const controller = new AbortController(); const timeoutId = setTimeout(() => controller.abort(), 30000); // 30 second timeout + try { const response = await fetch( `${process.env.NEXT_PUBLIC_API_URL}/api/projects/${params.projectId}/queries/${params.query.id}/data?limit=${params.limit}&offset=${params.offset}`, diff --git a/packages/app/src/hooks/use-debounced-value.ts b/packages/app/src/hooks/use-debounced-value.ts new file mode 100644 index 00000000..420431ab --- /dev/null +++ b/packages/app/src/hooks/use-debounced-value.ts @@ -0,0 +1,12 @@ +import { useEffect, useState } from "react"; + +export function useDebouncedValue(value: T, delay: number): T { + const [debouncedValue, setDebouncedValue] = useState(value); + + useEffect(() => { + const handler = setTimeout(() => setDebouncedValue(value), delay); + return () => clearTimeout(handler); + }, [value, delay]); + + return debouncedValue; +} \ No newline at end of file From bab170fa8d591452401ca0a732b366fbba380019 Mon Sep 17 00:00:00 2001 From: Kushagra Agarwal Date: Mon, 11 Aug 2025 17:56:08 +0530 Subject: [PATCH 02/37] basic complete --- packages/app/.gitignore | 4 +- .../actions/data/queries/addComputedColumn.ts | 24 + .../data/queries/updateComputedColumn.ts | 25 + .../components/data/query/query-sidebar.tsx | 109 +- packages/app/src/db/crud/query.ts | 48 +- .../common/drizzle/0005_smart_calypso.sql | 1 + .../common/drizzle/meta/0005_snapshot.json | 26076 ++++++++++++++++ packages/common/drizzle/meta/_journal.json | 7 + packages/common/src/db/schema/query.ts | 6 + 9 files changed, 26294 insertions(+), 6 deletions(-) create mode 100644 packages/app/src/actions/data/queries/addComputedColumn.ts create mode 100644 packages/app/src/actions/data/queries/updateComputedColumn.ts create mode 100644 packages/common/drizzle/0005_smart_calypso.sql create mode 100644 packages/common/drizzle/meta/0005_snapshot.json diff --git a/packages/app/.gitignore b/packages/app/.gitignore index 6f044995..fe509d03 100644 --- a/packages/app/.gitignore +++ b/packages/app/.gitignore @@ -42,4 +42,6 @@ next-env.d.ts # Sentry Config File .env.sentry-build-plugin -.env.local \ No newline at end of file +.env.local +# clerk configuration (can include secrets) +/.clerk/ diff --git a/packages/app/src/actions/data/queries/addComputedColumn.ts b/packages/app/src/actions/data/queries/addComputedColumn.ts new file mode 100644 index 00000000..2ab53a67 --- /dev/null +++ b/packages/app/src/actions/data/queries/addComputedColumn.ts @@ -0,0 +1,24 @@ +"use server"; + +import { getServerUser } from "@/lib/auth"; +import { getProjectForUser } from "@/lib/dal/projects"; +import { revalidateQueryCache } from "@/lib/dal/queries"; +import { addComputedColumn } from "@/db/crud/query"; +import { ComputedColumn } from "@common/db/schema/query"; + +export async function addComputedColumnAction( + projectId: string, + queryId: string, + column: ComputedColumn, +): Promise { + const user = await getServerUser(); + const userProject = await getProjectForUser(user, projectId); + + if (!userProject) { + throw new Error("Project not found"); + } + + await addComputedColumn(queryId, column); + + revalidateQueryCache(queryId, projectId); +} diff --git a/packages/app/src/actions/data/queries/updateComputedColumn.ts b/packages/app/src/actions/data/queries/updateComputedColumn.ts new file mode 100644 index 00000000..05fdd403 --- /dev/null +++ b/packages/app/src/actions/data/queries/updateComputedColumn.ts @@ -0,0 +1,25 @@ +"use server"; + +import { getServerUser } from "@/lib/auth"; +import { getProjectForUser } from "@/lib/dal/projects"; +import { revalidateQueryCache } from "@/lib/dal/queries"; +import { updateComputedColumn } from "@/db/crud/query"; +import { ComputedColumn } from "@common/db/schema/query"; + +export async function updateComputedColumnAction( + projectId: string, + queryId: string, + columnName: string, + column: ComputedColumn, +): Promise { + const user = await getServerUser(); + const userProject = await getProjectForUser(user, projectId); + + if (!userProject) { + throw new Error("Project not found"); + } + + await updateComputedColumn(queryId, columnName, column); + + revalidateQueryCache(queryId, projectId); +} diff --git a/packages/app/src/components/data/query/query-sidebar.tsx b/packages/app/src/components/data/query/query-sidebar.tsx index 19475a9c..61bb342f 100644 --- a/packages/app/src/components/data/query/query-sidebar.tsx +++ b/packages/app/src/components/data/query/query-sidebar.tsx @@ -9,6 +9,9 @@ import { useDebouncedValue } from "@/hooks/use-debounced-value"; import { basicSetup, EditorView } from "codemirror"; import { autocompletion } from "@codemirror/autocomplete"; import { EditorState } from "@codemirror/state"; +import { addComputedColumnAction } from "@/actions/data/queries/addComputedColumn"; +import { updateComputedColumnAction } from "@/actions/data/queries/updateComputedColumn"; +import { ComputedColumn } from "@common/db/schema/query"; type QuerySidebarProps = { query: Query; @@ -37,6 +40,8 @@ export function QuerySidebar({ error }: QuerySidebarProps) { const [editorCode, setEditorCode] = useState(""); + const [columnName, setColumnName] = useState(""); + const [editingColumn, setEditingColumn] = useState(null); const debouncedEditorCode = useDebouncedValue(editorCode, 500); const editorRef = useRef(null); const viewRef = useRef(null); @@ -193,6 +198,7 @@ export function QuerySidebar({ }, ".cm-editor": { border: "2px solid hsl(var(--input))", + borderColor: "hsl(var(--input))", borderRadius: "6px", backgroundColor: "hsl(var(--background))", }, @@ -217,9 +223,57 @@ export function QuerySidebar({ }; }, []); - const handleSave = () => { - console.log("Saving computed column:", editorCode); - console.log("Computed results:", computedResults); + const handleEditColumn = (column: ComputedColumn) => { + setEditingColumn(column.name); + setColumnName(column.name); + if (viewRef.current) { + const transaction = viewRef.current.state.update({ + changes: { from: 0, to: viewRef.current.state.doc.length, insert: column.functionBody }, + }); + viewRef.current.dispatch(transaction); + } + }; + + const handleCancelEdit = () => { + setEditingColumn(null); + setColumnName(""); + if (viewRef.current) { + const transaction = viewRef.current.state.update({ + changes: { from: 0, to: viewRef.current.state.doc.length, insert: "" }, + }); + viewRef.current.dispatch(transaction); + } + }; + + const handleSave = async () => { + if (!columnName.trim()) { + console.warn("Column name is required"); + return; + } + + if (editingColumn) { + await updateComputedColumnAction(projectId, query.id, editingColumn, { + name: columnName.trim(), + functionBody: editorCode.trim(), + }); + setEditingColumn(null); + } else { + await addComputedColumnAction(projectId, query.id, { + name: columnName.trim(), + functionBody: editorCode.trim(), + }); + } + + console.log(editingColumn ? "Updated" : "Saved", "computed column:", columnName); + + // Clear form after save + setColumnName(""); + if (viewRef.current) { + const transaction = viewRef.current.state.update({ + changes: { from: 0, to: viewRef.current.state.doc.length, insert: "" }, + }); + viewRef.current.dispatch(transaction); + } }; const handleClear = () => { @@ -250,6 +304,43 @@ export function QuerySidebar({
+ {/* Existing Computed Columns */} +
+
+

+ + Existing Computed Columns +

+
+ {Array.isArray(query.computedColumns) && query.computedColumns.length > 0 ? ( +
+ {query.computedColumns.map((col, idx) => ( + + ))} +
+ ) : ( +
No computed columns yet
+ )} +
+
+ + setColumnName(e.target.value)} + placeholder="Enter computed column name" + className="w-full mt-1 px-3 py-2 border border-input rounded-md bg-background text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent" + /> +
+ {editingColumn && ( + + )}
diff --git a/packages/app/src/db/crud/query.ts b/packages/app/src/db/crud/query.ts index 18148ca9..575d5c0a 100644 --- a/packages/app/src/db/crud/query.ts +++ b/packages/app/src/db/crud/query.ts @@ -1,7 +1,7 @@ import { eq, and, isNull } from "drizzle-orm"; import { db } from ".."; -import { query, Query, QueryInsert } from "@common/db/schema/query"; +import { query, Query, QueryInsert, ComputedColumn } from "@common/db/schema/query"; export async function readQueries(projectId: string) { return await db @@ -109,3 +109,49 @@ export async function readQueryForProject( return selectedQuery; } + +export async function addComputedColumn( + queryId: string, + newComputedColumn: ComputedColumn, +): Promise { + const existing = await readQuery(queryId); + if (!existing) { + throw new Error("Query not found"); + } + + const updatedComputedColumns = [ + ...(existing.computedColumns ?? []), + newComputedColumn, + ]; + + const [updated] = await db + .update(query) + .set({ computedColumns: updatedComputedColumns }) + .where(eq(query.id, queryId)) + .returning(); + + return updated; +} + +export async function updateComputedColumn( + queryId: string, + columnName: string, + updatedColumn: ComputedColumn, +): Promise { + const existing = await readQuery(queryId); + if (!existing) { + throw new Error("Query not found"); + } + + const updatedComputedColumns = (existing.computedColumns ?? []).map((col) => + col.name === columnName ? updatedColumn : col + ); + + const [updated] = await db + .update(query) + .set({ computedColumns: updatedComputedColumns }) + .where(eq(query.id, queryId)) + .returning(); + + return updated; +} diff --git a/packages/common/drizzle/0005_smart_calypso.sql b/packages/common/drizzle/0005_smart_calypso.sql new file mode 100644 index 00000000..cf94b25f --- /dev/null +++ b/packages/common/drizzle/0005_smart_calypso.sql @@ -0,0 +1 @@ +ALTER TABLE "custom_table" ADD COLUMN "computed_columns" jsonb DEFAULT '[]'::jsonb NOT NULL; \ No newline at end of file diff --git a/packages/common/drizzle/meta/0005_snapshot.json b/packages/common/drizzle/meta/0005_snapshot.json new file mode 100644 index 00000000..3ecb1a01 --- /dev/null +++ b/packages/common/drizzle/meta/0005_snapshot.json @@ -0,0 +1,26076 @@ +{ + "id": "27f83c0e-82da-46fb-a5ff-33814fbf5564", + "prevId": "0373a55c-0c2f-4667-9b92-c90492468b51", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.abbreviation": { + "name": "abbreviation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "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": "varchar", + "primaryKey": false, + "notNull": true + }, + "color": { + "name": "color", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "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": "varchar(21)", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "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.cross_section": { + "name": "cross_section", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "varchar", + "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 + }, + "centerline": { + "name": "centerline", + "type": "geometry(LineString, 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": { + "cross_section_project_id_project_id_fk": { + "name": "cross_section_project_id_project_id_fk", + "tableFrom": "cross_section", + "tableTo": "project", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.folder": { + "name": "folder", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "parent_folder_id": { + "name": "parent_folder_id", + "type": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "ags_import_id": { + "name": "ags_import_id", + "type": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "excel_import_id": { + "name": "excel_import_id", + "type": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "folder_id": { + "name": "folder_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "source_query_id": { + "name": "source_query_id", + "type": "varchar", + "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_query_id_custom_table_id_fk": { + "name": "plot_source_query_id_custom_table_id_fk", + "tableFrom": "plot", + "tableTo": "custom_table", + "columnsFrom": [ + "source_query_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.project": { + "name": "project", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "varchar", + "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.custom_table": { + "name": "custom_table", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "folder_id": { + "name": "folder_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "definition": { + "name": "definition", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "computed_columns": { + "name": "computed_columns", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "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": { + "query_id": { + "name": "query_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "zone_id": { + "name": "zone_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "custom_table_zone_query_id_custom_table_id_fk": { + "name": "custom_table_zone_query_id_custom_table_id_fk", + "tableFrom": "custom_table_zone", + "tableTo": "custom_table", + "columnsFrom": [ + "query_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.tag": { + "name": "tag", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "owner_id": { + "name": "owner_id", + "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": { + "tag_owner_id_user_id_fk": { + "name": "tag_owner_id_user_id_fk", + "tableFrom": "tag", + "tableTo": "user", + "columnsFrom": [ + "owner_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.template": { + "name": "template", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "owner_id": { + "name": "owner_id", + "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()" + }, + "custom_table_definition": { + "name": "custom_table_definition", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "plot_definition": { + "name": "plot_definition", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "is_plot": { + "name": "is_plot", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "generated": { + "as": "(\n \"template\".\"plot_definition\" IS NOT NULL\n )", + "type": "stored" + } + }, + "scope": { + "name": "scope", + "type": "scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'private'" + } + }, + "indexes": {}, + "foreignKeys": { + "template_owner_id_user_id_fk": { + "name": "template_owner_id_user_id_fk", + "tableFrom": "template", + "tableTo": "user", + "columnsFrom": [ + "owner_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.template_tag": { + "name": "template_tag", + "schema": "", + "columns": { + "template_id": { + "name": "template_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "tag_id": { + "name": "tag_id", + "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": { + "template_tag_template_id_template_id_fk": { + "name": "template_tag_template_id_template_id_fk", + "tableFrom": "template_tag", + "tableTo": "template", + "columnsFrom": [ + "template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "template_tag_tag_id_tag_id_fk": { + "name": "template_tag_tag_id_tag_id_fk", + "tableFrom": "template_tag", + "tableTo": "tag", + "columnsFrom": [ + "tag_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user": { + "name": "user", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "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 + }, + "privacy_policy_accepted_at": { + "name": "privacy_policy_accepted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "terms_of_use_accepted_at": { + "name": "terms_of_use_accepted_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": {}, + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "compaction_mould_type": { + "name": "compaction_mould_type", + "type": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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_tests_consolidation": { + "name": "cyclic_triaxial_tests_consolidation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "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": "varchar", + "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": "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": { + "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": "varchar", + "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": "varchar(21)", + "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": "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 + }, + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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.cyclic_triaxial_test_derived_parameters": { + "name": "cyclic_triaxial_test_derived_parameters", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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.density_tests": { + "name": "density_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_sample": { + "name": "type_of_sample", + "type": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "primaryKey": false, + "notNull": true + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "laboratory_test_matrix": { + "name": "laboratory_test_matrix", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "run_type_initial_or_reanalysis": { + "name": "run_type_initial_or_reanalysis", + "type": "varchar", + "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": "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 + }, + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "basis": { + "name": "basis", + "type": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "primaryKey": false, + "notNull": true + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "laboratory_test_matrix": { + "name": "laboratory_test_matrix", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "run_type_initial_or_reanalysis": { + "name": "run_type_initial_or_reanalysis", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_additional_descriptor": { + "name": "test_additional_descriptor", + "type": "varchar", + "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": "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 + }, + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "basis": { + "name": "basis", + "type": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_configuration": { + "name": "test_configuration", + "type": "varchar", + "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": "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 + }, + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "geology_code": { + "name": "geology_code", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "second_geology_code": { + "name": "second_geology_code", + "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 + }, + "bgs_lexicon_code": { + "name": "bgs_lexicon_code", + "type": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "primaryKey": false, + "notNull": true + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_type": { + "name": "test_type", + "type": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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.initial_consumption_of_lime_tests_data": { + "name": "initial_consumption_of_lime_tests_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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.in_situ_california_bearing_ratio_tests": { + "name": "in_situ_california_bearing_ratio_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "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": "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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.laboratory_fall_cone_test": { + "name": "laboratory_fall_cone_test", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_permeameter": { + "name": "type_of_permeameter", + "type": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "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_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": "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": "varchar", + "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": "varchar(21)", + "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": "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "number_of_points": { + "name": "number_of_points", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "for_fall_cone_method": { + "name": "for_fall_cone_method", + "type": "varchar", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "location_identifier": { + "name": "location_identifier", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_activity": { + "name": "type_of_activity", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "status_of_information_relating_to_this_position": { + "name": "status_of_information_relating_to_this_position", + "type": "varchar", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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_installations_and_instruments": { + "name": "monitoring_installations_and_instruments", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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_installation_pipe_work": { + "name": "monitoring_installation_pipe_work", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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_readings": { + "name": "monitoring_readings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "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 + }, + "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": "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": "varchar", + "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": "varchar(21)", + "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": "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()" + }, + "particle_size_distribution_analysis_general_id": { + "name": "particle_size_distribution_analysis_general_id", + "type": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "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 + }, + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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 + }, + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "method_of_excavation_or_block_production": { + "name": "method_of_excavation_or_block_production", + "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": { + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "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 + }, + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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.tensile_strength_testing": { + "name": "tensile_strength_testing", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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.ten_per_cent_fines": { + "name": "ten_per_cent_fines", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "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": "varchar", + "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.triaxial_tests_effective_stress_data": { + "name": "triaxial_tests_effective_stress_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "material_or_mass_weathering_system": { + "name": "material_or_mass_weathering_system", + "type": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "tool_used": { + "name": "tool_used", + "type": "varchar", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "parameter_recorded_by_tool_wgpg_tool": { + "name": "parameter_recorded_by_tool_wgpg_tool", + "type": "varchar", + "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": "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()" + }, + "wireline_geophysics_general_id": { + "name": "wireline_geophysics_general_id", + "type": "varchar", + "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" + ] + }, + "public.scope": { + "name": "scope", + "schema": "public", + "values": [ + "public", + "private" + ] + } + }, + "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 91898d86..1fcfe040 100644 --- a/packages/common/drizzle/meta/_journal.json +++ b/packages/common/drizzle/meta/_journal.json @@ -36,6 +36,13 @@ "when": 1753179881607, "tag": "0004_jittery_stone_men", "breakpoints": true + }, + { + "idx": 5, + "version": "7", + "when": 1754911726484, + "tag": "0005_smart_calypso", + "breakpoints": true } ] } \ No newline at end of file diff --git a/packages/common/src/db/schema/query.ts b/packages/common/src/db/schema/query.ts index fb258a9e..4a543187 100644 --- a/packages/common/src/db/schema/query.ts +++ b/packages/common/src/db/schema/query.ts @@ -43,6 +43,11 @@ export type QueryDefinition = Partial< > >; +export type ComputedColumn = { + name: string; + functionBody: string; +}; + export const query = pgTable("custom_table", { id: idColumn(), name: varchar("name").notNull(), @@ -53,6 +58,7 @@ export const query = pgTable("custom_table", { onDelete: "set null", }), definition: jsonb("definition").$type(), + computedColumns: jsonb("computed_columns").$type().default([]).notNull(), createdAt: createdAt(), updatedAt: updatedAt(), }); From de1b42f63eb0173cb412b410cbfec027671202fb Mon Sep 17 00:00:00 2001 From: Kushagra Agarwal Date: Tue, 19 Aug 2025 18:31:08 +0530 Subject: [PATCH 03/37] merge fix --- .../common/drizzle/0005_smart_calypso.sql | 1 - .../common/drizzle/meta/0005_snapshot.json | 26076 ---------------- 2 files changed, 26077 deletions(-) delete mode 100644 packages/common/drizzle/0005_smart_calypso.sql delete mode 100644 packages/common/drizzle/meta/0005_snapshot.json diff --git a/packages/common/drizzle/0005_smart_calypso.sql b/packages/common/drizzle/0005_smart_calypso.sql deleted file mode 100644 index cf94b25f..00000000 --- a/packages/common/drizzle/0005_smart_calypso.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "custom_table" ADD COLUMN "computed_columns" jsonb DEFAULT '[]'::jsonb NOT NULL; \ No newline at end of file diff --git a/packages/common/drizzle/meta/0005_snapshot.json b/packages/common/drizzle/meta/0005_snapshot.json deleted file mode 100644 index 3ecb1a01..00000000 --- a/packages/common/drizzle/meta/0005_snapshot.json +++ /dev/null @@ -1,26076 +0,0 @@ -{ - "id": "27f83c0e-82da-46fb-a5ff-33814fbf5564", - "prevId": "0373a55c-0c2f-4667-9b92-c90492468b51", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.abbreviation": { - "name": "abbreviation", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "varchar(21)", - "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": "varchar", - "primaryKey": false, - "notNull": true - }, - "color": { - "name": "color", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "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": "varchar(21)", - "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": "varchar", - "primaryKey": false, - "notNull": false - }, - "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.cross_section": { - "name": "cross_section", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "varchar(21)", - "primaryKey": true, - "notNull": true - }, - "project_id": { - "name": "project_id", - "type": "varchar", - "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 - }, - "centerline": { - "name": "centerline", - "type": "geometry(LineString, 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": { - "cross_section_project_id_project_id_fk": { - "name": "cross_section_project_id_project_id_fk", - "tableFrom": "cross_section", - "tableTo": "project", - "columnsFrom": [ - "project_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.folder": { - "name": "folder", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "varchar(21)", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "project_id": { - "name": "project_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "parent_folder_id": { - "name": "parent_folder_id", - "type": "varchar", - "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": "varchar(21)", - "primaryKey": true, - "notNull": true - }, - "ags_import_id": { - "name": "ags_import_id", - "type": "varchar", - "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": "varchar(21)", - "primaryKey": true, - "notNull": true - }, - "project_id": { - "name": "project_id", - "type": "varchar", - "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": "varchar(21)", - "primaryKey": true, - "notNull": true - }, - "project_id": { - "name": "project_id", - "type": "varchar", - "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": "varchar(21)", - "primaryKey": true, - "notNull": true - }, - "excel_import_id": { - "name": "excel_import_id", - "type": "varchar", - "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": "varchar(21)", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "project_id": { - "name": "project_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "folder_id": { - "name": "folder_id", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "source_query_id": { - "name": "source_query_id", - "type": "varchar", - "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_query_id_custom_table_id_fk": { - "name": "plot_source_query_id_custom_table_id_fk", - "tableFrom": "plot", - "tableTo": "custom_table", - "columnsFrom": [ - "source_query_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.project": { - "name": "project", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "varchar(21)", - "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": "varchar(21)", - "primaryKey": true, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "project_id": { - "name": "project_id", - "type": "varchar", - "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.custom_table": { - "name": "custom_table", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "varchar(21)", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "project_id": { - "name": "project_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "folder_id": { - "name": "folder_id", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "definition": { - "name": "definition", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "computed_columns": { - "name": "computed_columns", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "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": { - "query_id": { - "name": "query_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "custom_table_zone_query_id_custom_table_id_fk": { - "name": "custom_table_zone_query_id_custom_table_id_fk", - "tableFrom": "custom_table_zone", - "tableTo": "custom_table", - "columnsFrom": [ - "query_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.tag": { - "name": "tag", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "varchar(21)", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "owner_id": { - "name": "owner_id", - "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": { - "tag_owner_id_user_id_fk": { - "name": "tag_owner_id_user_id_fk", - "tableFrom": "tag", - "tableTo": "user", - "columnsFrom": [ - "owner_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.template": { - "name": "template", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "varchar(21)", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "owner_id": { - "name": "owner_id", - "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()" - }, - "custom_table_definition": { - "name": "custom_table_definition", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "plot_definition": { - "name": "plot_definition", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "is_plot": { - "name": "is_plot", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "generated": { - "as": "(\n \"template\".\"plot_definition\" IS NOT NULL\n )", - "type": "stored" - } - }, - "scope": { - "name": "scope", - "type": "scope", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'private'" - } - }, - "indexes": {}, - "foreignKeys": { - "template_owner_id_user_id_fk": { - "name": "template_owner_id_user_id_fk", - "tableFrom": "template", - "tableTo": "user", - "columnsFrom": [ - "owner_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.template_tag": { - "name": "template_tag", - "schema": "", - "columns": { - "template_id": { - "name": "template_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "tag_id": { - "name": "tag_id", - "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": { - "template_tag_template_id_template_id_fk": { - "name": "template_tag_template_id_template_id_fk", - "tableFrom": "template_tag", - "tableTo": "template", - "columnsFrom": [ - "template_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "template_tag_tag_id_tag_id_fk": { - "name": "template_tag_tag_id_tag_id_fk", - "tableFrom": "template_tag", - "tableTo": "tag", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user": { - "name": "user", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "varchar(21)", - "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 - }, - "privacy_policy_accepted_at": { - "name": "privacy_policy_accepted_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "terms_of_use_accepted_at": { - "name": "terms_of_use_accepted_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": {}, - "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": "varchar(21)", - "primaryKey": true, - "notNull": true - }, - "project_id": { - "name": "project_id", - "type": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "primaryKey": false, - "notNull": false - }, - "compaction_mould_type": { - "name": "compaction_mould_type", - "type": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "primaryKey": false, - "notNull": false - }, - "sample_condition": { - "name": "sample_condition", - "type": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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_tests_consolidation": { - "name": "cyclic_triaxial_tests_consolidation", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "varchar(21)", - "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": "varchar", - "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": "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": { - "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": "varchar", - "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": "varchar(21)", - "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": "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 - }, - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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.cyclic_triaxial_test_derived_parameters": { - "name": "cyclic_triaxial_test_derived_parameters", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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.density_tests": { - "name": "density_tests", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "varchar(21)", - "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": "varchar", - "primaryKey": false, - "notNull": false - }, - "sample_condition": { - "name": "sample_condition", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "type_of_sample": { - "name": "type_of_sample", - "type": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "primaryKey": false, - "notNull": true - }, - "test_method": { - "name": "test_method", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "laboratory_test_matrix": { - "name": "laboratory_test_matrix", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "run_type_initial_or_reanalysis": { - "name": "run_type_initial_or_reanalysis", - "type": "varchar", - "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": "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 - }, - "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": "varchar", - "primaryKey": false, - "notNull": false - }, - "basis": { - "name": "basis", - "type": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "primaryKey": false, - "notNull": true - }, - "test_method": { - "name": "test_method", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "laboratory_test_matrix": { - "name": "laboratory_test_matrix", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "run_type_initial_or_reanalysis": { - "name": "run_type_initial_or_reanalysis", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "test_additional_descriptor": { - "name": "test_additional_descriptor", - "type": "varchar", - "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": "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 - }, - "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": "varchar", - "primaryKey": false, - "notNull": false - }, - "basis": { - "name": "basis", - "type": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "primaryKey": false, - "notNull": false - }, - "test_configuration": { - "name": "test_configuration", - "type": "varchar", - "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": "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 - }, - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "primaryKey": false, - "notNull": false - }, - "geology_code": { - "name": "geology_code", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "second_geology_code": { - "name": "second_geology_code", - "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 - }, - "bgs_lexicon_code": { - "name": "bgs_lexicon_code", - "type": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "primaryKey": false, - "notNull": true - }, - "test_method": { - "name": "test_method", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "test_type": { - "name": "test_type", - "type": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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.initial_consumption_of_lime_tests_data": { - "name": "initial_consumption_of_lime_tests_data", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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.in_situ_california_bearing_ratio_tests": { - "name": "in_situ_california_bearing_ratio_tests", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "varchar(21)", - "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": "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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.laboratory_fall_cone_test": { - "name": "laboratory_fall_cone_test", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar", - "primaryKey": false, - "notNull": false - }, - "type_of_permeameter": { - "name": "type_of_permeameter", - "type": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "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_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": "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": "varchar", - "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": "varchar(21)", - "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": "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "primaryKey": false, - "notNull": false - }, - "number_of_points": { - "name": "number_of_points", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "for_fall_cone_method": { - "name": "for_fall_cone_method", - "type": "varchar", - "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": "varchar", - "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": "varchar(21)", - "primaryKey": true, - "notNull": true - }, - "location_identifier": { - "name": "location_identifier", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "type_of_activity": { - "name": "type_of_activity", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "status_of_information_relating_to_this_position": { - "name": "status_of_information_relating_to_this_position", - "type": "varchar", - "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": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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_installations_and_instruments": { - "name": "monitoring_installations_and_instruments", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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_installation_pipe_work": { - "name": "monitoring_installation_pipe_work", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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_readings": { - "name": "monitoring_readings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "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 - }, - "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": "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": "varchar", - "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": "varchar(21)", - "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": "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()" - }, - "particle_size_distribution_analysis_general_id": { - "name": "particle_size_distribution_analysis_general_id", - "type": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "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 - }, - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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 - }, - "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": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "primaryKey": false, - "notNull": false - }, - "method_of_excavation_or_block_production": { - "name": "method_of_excavation_or_block_production", - "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": { - "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": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "primaryKey": false, - "notNull": false - }, - "sample_condition": { - "name": "sample_condition", - "type": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "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 - }, - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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.tensile_strength_testing": { - "name": "tensile_strength_testing", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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.ten_per_cent_fines": { - "name": "ten_per_cent_fines", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "varchar(21)", - "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": "varchar", - "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.triaxial_tests_effective_stress_data": { - "name": "triaxial_tests_effective_stress_data", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "primaryKey": false, - "notNull": false - }, - "sample_condition": { - "name": "sample_condition", - "type": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "primaryKey": false, - "notNull": false - }, - "sample_condition": { - "name": "sample_condition", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "primaryKey": false, - "notNull": false - }, - "material_or_mass_weathering_system": { - "name": "material_or_mass_weathering_system", - "type": "varchar", - "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": "varchar", - "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": "varchar(21)", - "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": "varchar", - "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": "varchar(21)", - "primaryKey": true, - "notNull": true - }, - "test_reference": { - "name": "test_reference", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "tool_used": { - "name": "tool_used", - "type": "varchar", - "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": "varchar", - "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": "varchar(21)", - "primaryKey": true, - "notNull": true - }, - "parameter_recorded_by_tool_wgpg_tool": { - "name": "parameter_recorded_by_tool_wgpg_tool", - "type": "varchar", - "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": "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()" - }, - "wireline_geophysics_general_id": { - "name": "wireline_geophysics_general_id", - "type": "varchar", - "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" - ] - }, - "public.scope": { - "name": "scope", - "schema": "public", - "values": [ - "public", - "private" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file From afab8c4e74418f5fe7f3f1785b94292061d768c4 Mon Sep 17 00:00:00 2001 From: Kushagra Agarwal Date: Tue, 19 Aug 2025 18:32:28 +0530 Subject: [PATCH 04/37] merge fix again --- packages/common/drizzle/meta/_journal.json | 7 ------- 1 file changed, 7 deletions(-) diff --git a/packages/common/drizzle/meta/_journal.json b/packages/common/drizzle/meta/_journal.json index 1fcfe040..91898d86 100644 --- a/packages/common/drizzle/meta/_journal.json +++ b/packages/common/drizzle/meta/_journal.json @@ -36,13 +36,6 @@ "when": 1753179881607, "tag": "0004_jittery_stone_men", "breakpoints": true - }, - { - "idx": 5, - "version": "7", - "when": 1754911726484, - "tag": "0005_smart_calypso", - "breakpoints": true } ] } \ No newline at end of file From 6e4eea3fc5f9a3eb871a2d089d5eb0aa43dcc725 Mon Sep 17 00:00:00 2001 From: Kushagra Agarwal Date: Wed, 20 Aug 2025 18:42:25 +0530 Subject: [PATCH 05/37] selection and preview --- .../queries/[queryId]/data/route.ts | 26 ++++++++- .../app/src/components/data/query/helpers.ts | 27 +++++++++- .../data/query/query-definition-explorer.tsx | 54 +++++++++++++++++-- .../data/query/query-definition.tsx | 1 + .../src/components/data/query/query-glide.tsx | 10 ++-- .../data/query/table-column-selector.tsx | 23 ++++---- 6 files changed, 123 insertions(+), 18 deletions(-) diff --git a/packages/app/src/app/api/projects/[projectId]/queries/[queryId]/data/route.ts b/packages/app/src/app/api/projects/[projectId]/queries/[queryId]/data/route.ts index e281740a..86e359b9 100644 --- a/packages/app/src/app/api/projects/[projectId]/queries/[queryId]/data/route.ts +++ b/packages/app/src/app/api/projects/[projectId]/queries/[queryId]/data/route.ts @@ -5,6 +5,7 @@ import { isDefined } from "@/utils/helpers"; import { countDataForQuery, readDataForQuery } from "@/db/crud/data/query"; import { readQuery } from "@/db/crud/query"; import { readQueryZones } from "@/db/crud/zone"; +import { ComputedColumn } from "@common/db/schema/query"; type RequestArgs = { params: { @@ -99,6 +100,29 @@ export async function GET(request: NextRequest, { params }: RequestArgs) { zones.map((zone) => zone.zoneId), ); + // Process computed columns if they exist + let processedRows = rows; + if (query.computedColumns && query.computedColumns.length > 0) { + processedRows = rows.map((row) => { + const newRow = { ...row }; + + for (const computedCol of query.computedColumns) { + try { + // Create a safe evaluation environment for the computed column function + const computeFunction = new Function('row', computedCol.functionBody); + const computedValue = computeFunction(row); + newRow[computedCol.name] = computedValue; + } catch (error) { + // If computation fails, set to null and log error + console.error(`Error computing column ${computedCol.name}:`, error); + newRow[computedCol.name] = null; + } + } + + return newRow; + }); + } + const rowCount = await countDataForQuery( projectId, query.definition, @@ -108,5 +132,5 @@ export async function GET(request: NextRequest, { params }: RequestArgs) { zones.map((zone) => zone.zoneId), ); - return NextResponse.json({ rows, rowCount }); + return NextResponse.json({ rows: processedRows, rowCount }); } diff --git a/packages/app/src/components/data/query/helpers.ts b/packages/app/src/components/data/query/helpers.ts index 2848ad7d..97571206 100644 --- a/packages/app/src/components/data/query/helpers.ts +++ b/packages/app/src/components/data/query/helpers.ts @@ -23,7 +23,7 @@ export async function getQueryColumns( return []; } - return await Promise.all( + const regularColumns = await Promise.all( Object.entries(query.definition).flatMap(([tableName, def]) => def.columns.map(async (col: string) => { const tableConfig = schemaConfig.find( @@ -47,4 +47,29 @@ export async function getQueryColumns( }), ), ); + + // Add computed columns + const computedColumns = (query.computedColumns || []).map((computedCol) => ({ + id: computedCol.name, + label: computedCol.name, + table: "Computed", + columnConfig: { + nameCamelCase: computedCol.name, + label: computedCol.name, + dbName: computedCol.name, + isAbbreviation: false, + isInherited: false, + isRequired: false, + isKey: false, + dataType: "computed", + units: null, + groupDbName: "computed", + groupLabel: "Computed Columns", + mapping: {}, + } as ColumnConfig, + tableDbName: "computed" as TableName, + abbreviations: [], + })); + + return [...regularColumns, ...computedColumns]; } diff --git a/packages/app/src/components/data/query/query-definition-explorer.tsx b/packages/app/src/components/data/query/query-definition-explorer.tsx index fe68d00e..25b8a932 100644 --- a/packages/app/src/components/data/query/query-definition-explorer.tsx +++ b/packages/app/src/components/data/query/query-definition-explorer.tsx @@ -9,6 +9,8 @@ import { canJoinAsSiblings, SiblingJoinConfig, getAncestorTables, + Query, + ComputedColumn, } from "@common/db/schema/query"; import { TableName } from "@common/db/schema/data"; import { TableCounts } from "@/components/data/helpers"; @@ -112,6 +114,7 @@ function transformSchemaToNodes( selectedTables: TableName[], tableCounts: TableCounts, showEmptyTables: boolean, + computedColumns: ComputedColumn[] = [], ): TableColumnNode[] { const parentToChildren = new Map(); const rootGroups = groups.filter((group) => !group.parentTableDbName); @@ -208,9 +211,38 @@ function transformSchemaToNodes( }; } - return rootGroups + const tableNodes = rootGroups .map((group) => buildTableNode(group)) .filter((node): node is TableColumnNode => node !== null); + + // Add computed columns section if there are any + if (computedColumns.length > 0) { + const computedTableNode: TableColumnNode = { + id: "table-computed", + data: { + label: "Computed Columns", + type: "table" as const, + tableId: "computed", + isDisabled: false, + count: computedColumns.length, + }, + children: computedColumns.map((computedCol) => ({ + id: `column-computed-${computedCol.name}`, + data: { + label: computedCol.name, + type: "column" as const, + columnId: `computed.${computedCol.name}`, + tableId: "computed", + isDisabled: false, + isInherited: false, + groupDbName: "computed", + }, + })), + }; + tableNodes.push(computedTableNode); + } + + return tableNodes; } // Helper to find table information by ID @@ -293,6 +325,7 @@ type Props = { initialDefinition?: QueryDefinition | null; onDefinitionChange?: (_definition: QueryDefinition) => void; tableCounts: TableCounts; + query: Query; }; export default function QueryDefinitionExplorer({ @@ -300,6 +333,7 @@ export default function QueryDefinitionExplorer({ initialDefinition, onDefinitionChange, tableCounts, + query, }: Props) { const [definition, setDefinition] = useState( initialDefinition || {}, @@ -316,6 +350,7 @@ export default function QueryDefinitionExplorer({ selectedTables, tableCounts, showEmptyTables, + query.computedColumns || [], ); // Get all potential sibling joins between selected tables @@ -470,6 +505,14 @@ export default function QueryDefinitionExplorer({ const handleColumnSelect = (columnId: string, checked: boolean) => { const [tableId, columnName] = columnId.split("."); const tableName = tableId as TableName; + + // Handle computed columns separately + if (tableName === "computed") { + // For computed columns, we don't modify the definition + // They are always included when they exist + return; + } + const newDefinition = { ...definition }; // Get all tables that need to be updated @@ -539,9 +582,12 @@ export default function QueryDefinitionExplorer({ - def.columns.map((col) => `${table}.${col}`), - )} + selectedColumnIds={[ + ...Object.entries(definition).flatMap(([table, def]) => + def.columns.map((col) => `${table}.${col}`), + ), + ...(query.computedColumns || []).map((col) => `computed.${col.name}`), + ]} onTableSelect={handleTableSelect} onColumnSelect={handleColumnSelect} onToggleColumns={handleToggleColumns} diff --git a/packages/app/src/components/data/query/query-definition.tsx b/packages/app/src/components/data/query/query-definition.tsx index 25ddba04..8df43f18 100644 --- a/packages/app/src/components/data/query/query-definition.tsx +++ b/packages/app/src/components/data/query/query-definition.tsx @@ -57,6 +57,7 @@ export function QueryDefinition({ initialDefinition={definition} onDefinitionChange={handleDefinitionChange} tableCounts={tableCounts} + query={query} />
+ />) ), sortDirection: - query.definition[col.tableDbName]?.sort?.columnNameCamelCase === + col.columnConfig.groupDbName === "computed" + ? null + : query.definition[col.tableDbName]?.sort?.columnNameCamelCase === col.columnConfig.nameCamelCase ? query.definition[col.tableDbName]?.sort?.order : null, @@ -128,6 +131,7 @@ export function QueryGlide({ (columnId: string, direction: "asc" | "desc" | null) => { const column = columns.find((col) => col.id === columnId); if (!column) return; + if (column.columnConfig.groupDbName === "computed") return; const newDefinition = { ...query.definition }; const tableDefinition = newDefinition[column.tableDbName] || { diff --git a/packages/app/src/components/data/query/table-column-selector.tsx b/packages/app/src/components/data/query/table-column-selector.tsx index 7ab96fd2..e50405a6 100644 --- a/packages/app/src/components/data/query/table-column-selector.tsx +++ b/packages/app/src/components/data/query/table-column-selector.tsx @@ -53,33 +53,38 @@ export function TableColumnSelector({ ); } + // Handle computed columns specially + const isComputedColumn = node.data.type === "column" && node.data.tableId === "computed"; + const isSelected = isComputedColumn ? true : ( + node.data.type === "table" + ? selectedTableIds.includes(node.data.tableId!) + : selectedColumnIds.includes(node.data.columnId!) + ); + const isDisabled = isComputedColumn ? true : node.data.isDisabled; + return (
{ if (node.data.type === "table") { onTableSelect(node.data.tableId!, checked as boolean); - } else { + } else if (!isComputedColumn) { onColumnSelect(node.data.columnId!, checked as boolean); } }} - disabled={node.data.isDisabled} + disabled={isDisabled} /> From 46b09dc6f9f0a597fdd42c3bed5dbd5fb79ae34b Mon Sep 17 00:00:00 2001 From: Kushagra Agarwal Date: Thu, 21 Aug 2025 17:12:06 +0530 Subject: [PATCH 06/37] Revert "selection and preview" This reverts commit 6e4eea3fc5f9a3eb871a2d089d5eb0aa43dcc725. --- .../queries/[queryId]/data/route.ts | 26 +-------- .../app/src/components/data/query/helpers.ts | 27 +--------- .../data/query/query-definition-explorer.tsx | 54 ++----------------- .../data/query/query-definition.tsx | 1 - .../src/components/data/query/query-glide.tsx | 10 ++-- .../data/query/table-column-selector.tsx | 23 ++++---- 6 files changed, 18 insertions(+), 123 deletions(-) diff --git a/packages/app/src/app/api/projects/[projectId]/queries/[queryId]/data/route.ts b/packages/app/src/app/api/projects/[projectId]/queries/[queryId]/data/route.ts index 86e359b9..e281740a 100644 --- a/packages/app/src/app/api/projects/[projectId]/queries/[queryId]/data/route.ts +++ b/packages/app/src/app/api/projects/[projectId]/queries/[queryId]/data/route.ts @@ -5,7 +5,6 @@ import { isDefined } from "@/utils/helpers"; import { countDataForQuery, readDataForQuery } from "@/db/crud/data/query"; import { readQuery } from "@/db/crud/query"; import { readQueryZones } from "@/db/crud/zone"; -import { ComputedColumn } from "@common/db/schema/query"; type RequestArgs = { params: { @@ -100,29 +99,6 @@ export async function GET(request: NextRequest, { params }: RequestArgs) { zones.map((zone) => zone.zoneId), ); - // Process computed columns if they exist - let processedRows = rows; - if (query.computedColumns && query.computedColumns.length > 0) { - processedRows = rows.map((row) => { - const newRow = { ...row }; - - for (const computedCol of query.computedColumns) { - try { - // Create a safe evaluation environment for the computed column function - const computeFunction = new Function('row', computedCol.functionBody); - const computedValue = computeFunction(row); - newRow[computedCol.name] = computedValue; - } catch (error) { - // If computation fails, set to null and log error - console.error(`Error computing column ${computedCol.name}:`, error); - newRow[computedCol.name] = null; - } - } - - return newRow; - }); - } - const rowCount = await countDataForQuery( projectId, query.definition, @@ -132,5 +108,5 @@ export async function GET(request: NextRequest, { params }: RequestArgs) { zones.map((zone) => zone.zoneId), ); - return NextResponse.json({ rows: processedRows, rowCount }); + return NextResponse.json({ rows, rowCount }); } diff --git a/packages/app/src/components/data/query/helpers.ts b/packages/app/src/components/data/query/helpers.ts index 97571206..2848ad7d 100644 --- a/packages/app/src/components/data/query/helpers.ts +++ b/packages/app/src/components/data/query/helpers.ts @@ -23,7 +23,7 @@ export async function getQueryColumns( return []; } - const regularColumns = await Promise.all( + return await Promise.all( Object.entries(query.definition).flatMap(([tableName, def]) => def.columns.map(async (col: string) => { const tableConfig = schemaConfig.find( @@ -47,29 +47,4 @@ export async function getQueryColumns( }), ), ); - - // Add computed columns - const computedColumns = (query.computedColumns || []).map((computedCol) => ({ - id: computedCol.name, - label: computedCol.name, - table: "Computed", - columnConfig: { - nameCamelCase: computedCol.name, - label: computedCol.name, - dbName: computedCol.name, - isAbbreviation: false, - isInherited: false, - isRequired: false, - isKey: false, - dataType: "computed", - units: null, - groupDbName: "computed", - groupLabel: "Computed Columns", - mapping: {}, - } as ColumnConfig, - tableDbName: "computed" as TableName, - abbreviations: [], - })); - - return [...regularColumns, ...computedColumns]; } diff --git a/packages/app/src/components/data/query/query-definition-explorer.tsx b/packages/app/src/components/data/query/query-definition-explorer.tsx index 25b8a932..fe68d00e 100644 --- a/packages/app/src/components/data/query/query-definition-explorer.tsx +++ b/packages/app/src/components/data/query/query-definition-explorer.tsx @@ -9,8 +9,6 @@ import { canJoinAsSiblings, SiblingJoinConfig, getAncestorTables, - Query, - ComputedColumn, } from "@common/db/schema/query"; import { TableName } from "@common/db/schema/data"; import { TableCounts } from "@/components/data/helpers"; @@ -114,7 +112,6 @@ function transformSchemaToNodes( selectedTables: TableName[], tableCounts: TableCounts, showEmptyTables: boolean, - computedColumns: ComputedColumn[] = [], ): TableColumnNode[] { const parentToChildren = new Map(); const rootGroups = groups.filter((group) => !group.parentTableDbName); @@ -211,38 +208,9 @@ function transformSchemaToNodes( }; } - const tableNodes = rootGroups + return rootGroups .map((group) => buildTableNode(group)) .filter((node): node is TableColumnNode => node !== null); - - // Add computed columns section if there are any - if (computedColumns.length > 0) { - const computedTableNode: TableColumnNode = { - id: "table-computed", - data: { - label: "Computed Columns", - type: "table" as const, - tableId: "computed", - isDisabled: false, - count: computedColumns.length, - }, - children: computedColumns.map((computedCol) => ({ - id: `column-computed-${computedCol.name}`, - data: { - label: computedCol.name, - type: "column" as const, - columnId: `computed.${computedCol.name}`, - tableId: "computed", - isDisabled: false, - isInherited: false, - groupDbName: "computed", - }, - })), - }; - tableNodes.push(computedTableNode); - } - - return tableNodes; } // Helper to find table information by ID @@ -325,7 +293,6 @@ type Props = { initialDefinition?: QueryDefinition | null; onDefinitionChange?: (_definition: QueryDefinition) => void; tableCounts: TableCounts; - query: Query; }; export default function QueryDefinitionExplorer({ @@ -333,7 +300,6 @@ export default function QueryDefinitionExplorer({ initialDefinition, onDefinitionChange, tableCounts, - query, }: Props) { const [definition, setDefinition] = useState( initialDefinition || {}, @@ -350,7 +316,6 @@ export default function QueryDefinitionExplorer({ selectedTables, tableCounts, showEmptyTables, - query.computedColumns || [], ); // Get all potential sibling joins between selected tables @@ -505,14 +470,6 @@ export default function QueryDefinitionExplorer({ const handleColumnSelect = (columnId: string, checked: boolean) => { const [tableId, columnName] = columnId.split("."); const tableName = tableId as TableName; - - // Handle computed columns separately - if (tableName === "computed") { - // For computed columns, we don't modify the definition - // They are always included when they exist - return; - } - const newDefinition = { ...definition }; // Get all tables that need to be updated @@ -582,12 +539,9 @@ export default function QueryDefinitionExplorer({ - def.columns.map((col) => `${table}.${col}`), - ), - ...(query.computedColumns || []).map((col) => `computed.${col.name}`), - ]} + selectedColumnIds={Object.entries(definition).flatMap(([table, def]) => + def.columns.map((col) => `${table}.${col}`), + )} onTableSelect={handleTableSelect} onColumnSelect={handleColumnSelect} onToggleColumns={handleToggleColumns} diff --git a/packages/app/src/components/data/query/query-definition.tsx b/packages/app/src/components/data/query/query-definition.tsx index 8df43f18..25ddba04 100644 --- a/packages/app/src/components/data/query/query-definition.tsx +++ b/packages/app/src/components/data/query/query-definition.tsx @@ -57,7 +57,6 @@ export function QueryDefinition({ initialDefinition={definition} onDefinitionChange={handleDefinitionChange} tableCounts={tableCounts} - query={query} />
) + /> ), sortDirection: - col.columnConfig.groupDbName === "computed" - ? null - : query.definition[col.tableDbName]?.sort?.columnNameCamelCase === + query.definition[col.tableDbName]?.sort?.columnNameCamelCase === col.columnConfig.nameCamelCase ? query.definition[col.tableDbName]?.sort?.order : null, @@ -131,7 +128,6 @@ export function QueryGlide({ (columnId: string, direction: "asc" | "desc" | null) => { const column = columns.find((col) => col.id === columnId); if (!column) return; - if (column.columnConfig.groupDbName === "computed") return; const newDefinition = { ...query.definition }; const tableDefinition = newDefinition[column.tableDbName] || { diff --git a/packages/app/src/components/data/query/table-column-selector.tsx b/packages/app/src/components/data/query/table-column-selector.tsx index e50405a6..7ab96fd2 100644 --- a/packages/app/src/components/data/query/table-column-selector.tsx +++ b/packages/app/src/components/data/query/table-column-selector.tsx @@ -53,38 +53,33 @@ export function TableColumnSelector({ ); } - // Handle computed columns specially - const isComputedColumn = node.data.type === "column" && node.data.tableId === "computed"; - const isSelected = isComputedColumn ? true : ( - node.data.type === "table" - ? selectedTableIds.includes(node.data.tableId!) - : selectedColumnIds.includes(node.data.columnId!) - ); - const isDisabled = isComputedColumn ? true : node.data.isDisabled; - return (
{ if (node.data.type === "table") { onTableSelect(node.data.tableId!, checked as boolean); - } else if (!isComputedColumn) { + } else { onColumnSelect(node.data.columnId!, checked as boolean); } }} - disabled={isDisabled} + disabled={node.data.isDisabled} /> From 8efa1dc9ceac08082f848953801242ccb8ffe500 Mon Sep 17 00:00:00 2001 From: Kushagra Agarwal Date: Thu, 21 Aug 2025 17:44:50 +0530 Subject: [PATCH 07/37] deletion functionality --- .../data/queries/deleteComputedColumn.ts | 23 +++++++++++++ .../components/data/query/query-sidebar.tsx | 33 +++++++++++++++++++ packages/app/src/db/crud/query.ts | 22 +++++++++++++ 3 files changed, 78 insertions(+) create mode 100644 packages/app/src/actions/data/queries/deleteComputedColumn.ts diff --git a/packages/app/src/actions/data/queries/deleteComputedColumn.ts b/packages/app/src/actions/data/queries/deleteComputedColumn.ts new file mode 100644 index 00000000..5a6bdc2e --- /dev/null +++ b/packages/app/src/actions/data/queries/deleteComputedColumn.ts @@ -0,0 +1,23 @@ +"use server"; + +import { getServerUser } from "@/lib/auth"; +import { getProjectForUser } from "@/lib/dal/projects"; +import { revalidateQueryCache } from "@/lib/dal/queries"; +import { deleteComputedColumn } from "@/db/crud/query"; + +export async function deleteComputedColumnAction( + projectId: string, + queryId: string, + columnName: string, +): Promise { + const user = await getServerUser(); + const userProject = await getProjectForUser(user, projectId); + + if (!userProject) { + throw new Error("Project not found"); + } + + await deleteComputedColumn(queryId, columnName); + + revalidateQueryCache(queryId, projectId); +} diff --git a/packages/app/src/components/data/query/query-sidebar.tsx b/packages/app/src/components/data/query/query-sidebar.tsx index 61bb342f..77a1b02c 100644 --- a/packages/app/src/components/data/query/query-sidebar.tsx +++ b/packages/app/src/components/data/query/query-sidebar.tsx @@ -11,6 +11,7 @@ import { autocompletion } from "@codemirror/autocomplete"; import { EditorState } from "@codemirror/state"; import { addComputedColumnAction } from "@/actions/data/queries/addComputedColumn"; import { updateComputedColumnAction } from "@/actions/data/queries/updateComputedColumn"; +import { deleteComputedColumnAction } from "@/actions/data/queries/deleteComputedColumn"; import { ComputedColumn } from "@common/db/schema/query"; type QuerySidebarProps = { @@ -245,6 +246,27 @@ export function QuerySidebar({ } }; + const handleDeleteColumn = async (columnName: string) => { + if (confirm(`Are you sure you want to delete the computed column "${columnName}"?`)) { + try { + await deleteComputedColumnAction(projectId, query.id, columnName); + console.log("Deleted computed column:", columnName); + + // Clear editor state after successful deletion + setEditingColumn(null); + setColumnName(""); + if (viewRef.current) { + const transaction = viewRef.current.state.update({ + changes: { from: 0, to: viewRef.current.state.doc.length, insert: "" }, + }); + viewRef.current.dispatch(transaction); + } + } catch (error) { + console.error("Failed to delete computed column:", error); + } + } + }; + const handleSave = async () => { if (!columnName.trim()) { console.warn("Column name is required"); @@ -365,6 +387,17 @@ export function QuerySidebar({ Cancel )} + {editingColumn && ( + + )} ); diff --git a/packages/app/src/components/data/query/query-sidebar.tsx b/packages/app/src/components/data/query/query-sidebar.tsx index 77a1b02c..bb06e74c 100644 --- a/packages/app/src/components/data/query/query-sidebar.tsx +++ b/packages/app/src/components/data/query/query-sidebar.tsx @@ -13,6 +13,13 @@ import { addComputedColumnAction } from "@/actions/data/queries/addComputedColum import { updateComputedColumnAction } from "@/actions/data/queries/updateComputedColumn"; import { deleteComputedColumnAction } from "@/actions/data/queries/deleteComputedColumn"; import { ComputedColumn } from "@common/db/schema/query"; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/components/ui/select"; type QuerySidebarProps = { query: Query; @@ -192,21 +199,26 @@ export function QuerySidebar({ "&": { fontSize: "13px", fontFamily: 'ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace', + height: "100%", }, ".cm-content": { padding: "8px", - minHeight: "200px", + height: "100%", }, ".cm-editor": { border: "2px solid hsl(var(--input))", borderColor: "hsl(var(--input))", borderRadius: "6px", backgroundColor: "hsl(var(--background))", + height: "100%", }, ".cm-editor.cm-focused": { borderColor: "hsl(var(--primary))", outline: "none", }, + ".cm-scroller": { + height: "100%", + }, }), ], }); @@ -312,7 +324,7 @@ export function QuerySidebar({ const successCount = computedResults.filter(result => !result.error).length; return ( -
+

Computed Columns

-
+
{/* Existing Computed Columns */}
@@ -335,18 +347,28 @@ export function QuerySidebar({
{Array.isArray(query.computedColumns) && query.computedColumns.length > 0 ? ( -
- {query.computedColumns.map((col, idx) => ( - - ))} -
+ ) : (
No computed columns yet
)} @@ -363,7 +385,7 @@ export function QuerySidebar({ className="w-full mt-1 px-3 py-2 border border-input rounded-md bg-background text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent" />
-
+
-
-
+
+
From 72c5322b81a8a36b599dfd6faa2faea644ede9be Mon Sep 17 00:00:00 2001 From: James Holcombe Date: Tue, 26 Aug 2025 12:14:42 +0100 Subject: [PATCH 09/37] fix calc logic --- .../queries/[queryId]/data/route.ts | 7 +- .../src/components/data/query/query-glide.tsx | 103 +++++++++++--- .../app/src/hooks/queries/use-query-data.tsx | 133 +++++++++++++++++- 3 files changed, 221 insertions(+), 22 deletions(-) diff --git a/packages/app/src/app/api/projects/[projectId]/queries/[queryId]/data/route.ts b/packages/app/src/app/api/projects/[projectId]/queries/[queryId]/data/route.ts index e281740a..2a442d3f 100644 --- a/packages/app/src/app/api/projects/[projectId]/queries/[queryId]/data/route.ts +++ b/packages/app/src/app/api/projects/[projectId]/queries/[queryId]/data/route.ts @@ -108,5 +108,10 @@ export async function GET(request: NextRequest, { params }: RequestArgs) { zones.map((zone) => zone.zoneId), ); - return NextResponse.json({ rows, rowCount }); + // Return data along with computed column definitions for client-side evaluation + return NextResponse.json({ + rows, + rowCount, + computedColumns: query.computedColumns || [], + }); } diff --git a/packages/app/src/components/data/query/query-glide.tsx b/packages/app/src/components/data/query/query-glide.tsx index d9b051b5..2315d56a 100644 --- a/packages/app/src/components/data/query/query-glide.tsx +++ b/packages/app/src/components/data/query/query-glide.tsx @@ -20,6 +20,7 @@ import { DropdownMenuItem } from "@/components/ui/dropdown-menu"; import { MapPin, ExternalLinkIcon } from "lucide-react"; import { Option } from "@/components/ui/multi-select"; import Link from "next/link"; + type Props = { projectId: string; query: Query & { @@ -40,13 +41,23 @@ type Props = { })[]; }; +// Extended type for columns that can include computed columns +type ExtendedColumn = { + id: string; + label: string; + table: string; + columnConfig: ColumnConfig; + tableDbName: TableName | "computed"; + abbreviations: Abbreviation[]; + isComputed?: boolean; +}; + export function QueryGlide({ projectId, query, columns, pageSize, maxRows, - zones, }: Props) { const handleUpdateDefinition = useCallback( @@ -56,6 +67,8 @@ export function QueryGlide({ [query.id, projectId], ); + console.log(columns); + // Define ALL available columns for data fetching that never changes const allDataColumns = useMemo(() => { const columnsWithoutDuplicates = columns.filter( @@ -68,35 +81,82 @@ export function QueryGlide({ ), ); - return columnsWithoutDuplicates.map((col) => ({ + // Create computed columns with proper typing + const computedColumns: ExtendedColumn[] = query.computedColumns.map( + (col) => ({ + id: col.name, + label: col.name, + table: "computed", + columnConfig: { + nameCamelCase: col.name, + nameSnakeCase: col.name, + groupDbName: "computed", + groupLabel: "Computed", + label: col.name, + type: "computed", + dbName: col.name, + isRequired: false, + isKey: false, + isInherited: false, + isAbbreviation: false, + dataType: "string", // Default type for computed columns + units: "", + mapping: { + ags: { + v4_0_3: col.name, + v4_0_4: col.name, + v4_1: col.name, + v4_1_1: col.name, + }, + }, + }, + tableDbName: "computed", + abbreviations: [], + isComputed: true, + }), + ); + + const allColumns: ExtendedColumn[] = [ + ...columnsWithoutDuplicates, + ...computedColumns, + ]; + + return allColumns.map((col) => ({ id: col.id, label: col.label, group: col.columnConfig.groupLabel, - hasMenu: true, + hasMenu: !col.isComputed, // Computed columns don't have menu (no filtering/sorting) menuIcon: "dots", - menuFilterContent: ( + menuFilterContent: col.isComputed ? undefined : ( { + if (col.tableDbName === "computed") return; + const newDefinition = { ...query.definition }; - delete newDefinition[col.tableDbName]?.filters?.[ - col.columnConfig.nameCamelCase - ]; + const tableDef = newDefinition[col.tableDbName as TableName]; + if (tableDef?.filters) { + delete tableDef.filters[col.columnConfig.nameCamelCase]; + } handleUpdateDefinition(newDefinition); }} handleApplyFilter={(filter) => { + if (col.tableDbName === "computed") return; + const newDefinition = { ...query.definition, - [col.tableDbName]: { - ...query.definition[col.tableDbName], + [col.tableDbName as TableName]: { + ...query.definition[col.tableDbName as TableName], filters: { - ...query.definition[col.tableDbName]?.filters, + ...query.definition[col.tableDbName as TableName]?.filters, [col.columnConfig.nameCamelCase]: filter, }, }, @@ -105,13 +165,20 @@ export function QueryGlide({ }} /> ), - sortDirection: - query.definition[col.tableDbName]?.sort?.columnNameCamelCase === - col.columnConfig.nameCamelCase - ? query.definition[col.tableDbName]?.sort?.order + sortDirection: col.isComputed + ? null + : col.tableDbName !== "computed" && + query.definition[col.tableDbName as TableName]?.sort + ?.columnNameCamelCase === col.columnConfig.nameCamelCase + ? query.definition[col.tableDbName as TableName]?.sort?.order : null, })); - }, [columns, query.definition, handleUpdateDefinition]); + }, [ + columns, + query.definition, + query.computedColumns, + handleUpdateDefinition, + ]); const handleUpdateZones = useCallback( async (zones: Option[]) => { diff --git a/packages/app/src/hooks/queries/use-query-data.tsx b/packages/app/src/hooks/queries/use-query-data.tsx index ede039e4..761f73bb 100644 --- a/packages/app/src/hooks/queries/use-query-data.tsx +++ b/packages/app/src/hooks/queries/use-query-data.tsx @@ -1,12 +1,15 @@ "use client"; + import { useQuery } from "@tanstack/react-query"; -import { Query } from "@common/db/schema/query"; +import { Query, ComputedColumn } from "@common/db/schema/query"; +import { useMemo } from "react"; type TableData = Record; type QueryDataResponse = { rows: TableData[]; rowCount: number; + computedColumns: ComputedColumn[]; }; interface QueryDataParams { @@ -33,9 +36,113 @@ export function getQueryDataQueryKey( params.limit, params.zoneIds, params.query.definition, + params.query.computedColumns, // Include computed columns in query key ]; } +/** + * Function to evaluate computed columns on the client side + */ +function evaluateComputedColumns( + rows: TableData[], + computedColumns: ComputedColumn[], +): TableData[] { + if (!computedColumns || computedColumns.length === 0) { + return rows; + } + + return rows.map((row) => { + const newRow = { ...row }; + + computedColumns.forEach((computedCol) => { + try { + // Skip if function body is empty or invalid + if ( + !computedCol.functionBody || + typeof computedCol.functionBody !== "string" + ) { + newRow[computedCol.name] = null; + return; + } + + // Extract column names from the function body that might be referenced + const columnRegex = /\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g; + const detectedColumns = new Set(); + let match; + + while ((match = columnRegex.exec(computedCol.functionBody)) !== null) { + const columnName = match[1]; + // Skip JavaScript keywords and common words + const jsKeywords = [ + "function", + "return", + "if", + "else", + "for", + "while", + "var", + "let", + "const", + "true", + "false", + "null", + "undefined", + "Math", + "parseFloat", + "parseInt", + "Number", + "String", + "Boolean", + ]; + if ( + !jsKeywords.includes(columnName) && + !columnName.startsWith("row.") + ) { + detectedColumns.add(columnName); + } + } + + // Create a processed function body that references row properties + let processedBody = computedCol.functionBody; + const availableColumns = Object.keys(row); + + // Replace column names with row access + detectedColumns.forEach((columnName) => { + if (availableColumns.includes(columnName)) { + const regex = new RegExp(`\\b${columnName}\\b`, "g"); + processedBody = processedBody.replace(regex, `row.${columnName}`); + } + }); + + // Add safety check to ensure row is accessible + if (!processedBody.trim()) { + newRow[computedCol.name] = null; + return; + } + + // Create a safe evaluation environment on the client side + const computeFunction = new Function("row", processedBody); + const result = computeFunction(row); + + // Ensure the result is a valid value + if (result === undefined || result === null) { + newRow[computedCol.name] = null; + } else { + newRow[computedCol.name] = result; + } + } catch (error) { + // If computation fails, set to null and log error + console.error(`Error computing column ${computedCol.name}:`, error); + console.error(`Function body: ${computedCol.functionBody}`); + console.error("Row data:", row); + newRow[computedCol.name] = null; + } + }); + + return newRow; + }); +} + /** * Fetch function that can be extracted for server component use as well */ @@ -45,7 +152,6 @@ export async function fetchQueryData( const controller = new AbortController(); const timeoutId = setTimeout(() => controller.abort(), 30000); // 30 second timeout - try { const response = await fetch( `${process.env.NEXT_PUBLIC_API_URL}/api/projects/${params.projectId}/queries/${params.query.id}/data?limit=${params.limit}&offset=${params.offset}`, @@ -97,7 +203,7 @@ export function useQueryData( zoneIds, }; - return useQuery({ + const queryResult = useQuery({ queryKey: getQueryDataQueryKey(params), queryFn: () => fetchQueryData(params), staleTime: 1000 * 60 * 5, // 5 minutes @@ -108,4 +214,25 @@ export function useQueryData( refetchOnMount: false, refetchOnReconnect: false, }); + + // Process computed columns on the client side + const processedData = useMemo(() => { + if (!queryResult.data) { + return queryResult.data; + } + + const { rows, rowCount, computedColumns } = queryResult.data; + const processedRows = evaluateComputedColumns(rows, computedColumns); + + return { + rows: processedRows, + rowCount, + computedColumns, + }; + }, [queryResult.data]); + + return { + ...queryResult, + data: processedData, + }; } From 618cfa50c53e4d134ad110c0280e1426609d43aa Mon Sep 17 00:00:00 2001 From: James Holcombe Date: Tue, 26 Aug 2025 16:16:18 +0100 Subject: [PATCH 10/37] ui fixes for sidebar --- .../components/data/query/query-sidebar.tsx | 686 ++++++++---------- 1 file changed, 294 insertions(+), 392 deletions(-) diff --git a/packages/app/src/components/data/query/query-sidebar.tsx b/packages/app/src/components/data/query/query-sidebar.tsx index bb06e74c..92a0a747 100644 --- a/packages/app/src/components/data/query/query-sidebar.tsx +++ b/packages/app/src/components/data/query/query-sidebar.tsx @@ -1,18 +1,20 @@ "use client"; import { useState, useEffect, useRef, useMemo } from "react"; +import { useForm } from "react-hook-form"; +import { zodResolver } from "@hookform/resolvers/zod"; +import { z } from "zod"; import { Query } from "@common/db/schema/query"; import { Button } from "@/components/ui/button"; -import { X, Save, Trash2, Database, Calculator } from "lucide-react"; -import { cn } from "@/utils/styles"; -import { useDebouncedValue } from "@/hooks/use-debounced-value"; -import { basicSetup, EditorView } from "codemirror"; -import { autocompletion } from "@codemirror/autocomplete"; -import { EditorState } from "@codemirror/state"; -import { addComputedColumnAction } from "@/actions/data/queries/addComputedColumn"; -import { updateComputedColumnAction } from "@/actions/data/queries/updateComputedColumn"; -import { deleteComputedColumnAction } from "@/actions/data/queries/deleteComputedColumn"; -import { ComputedColumn } from "@common/db/schema/query"; +import { X, Save, Trash2, Database, Plus, Loader2 } from "lucide-react"; +import { + Form, + FormControl, + FormField, + FormItem, + FormLabel, + FormMessage, +} from "@/components/ui/form"; import { Select, SelectContent, @@ -20,6 +22,23 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; +import { Input } from "@/components/ui/input"; + +import { basicSetup, EditorView } from "codemirror"; +import { autocompletion } from "@codemirror/autocomplete"; +import { EditorState } from "@codemirror/state"; +import { addComputedColumnAction } from "@/actions/data/queries/addComputedColumn"; +import { updateComputedColumnAction } from "@/actions/data/queries/updateComputedColumn"; +import { deleteComputedColumnAction } from "@/actions/data/queries/deleteComputedColumn"; +import { ComputedColumn } from "@common/db/schema/query"; + +// Form schema for computed column +const computedColumnSchema = z.object({ + name: z.string().min(1, "Column name is required"), + functionBody: z.string().min(1, "Function body is required"), +}); + +type ComputedColumnFormData = z.infer; type QuerySidebarProps = { query: Query; @@ -33,146 +52,28 @@ type QuerySidebarProps = { error?: Error | null; }; -type ComputedResult = { - value: any; - error?: string; - rowIndex: number; -}; - -export function QuerySidebar({ - query, - projectId, - onClose, - queryData, - isLoading, - error -}: QuerySidebarProps) { - const [editorCode, setEditorCode] = useState(""); - const [columnName, setColumnName] = useState(""); - const [editingColumn, setEditingColumn] = useState(null); - const debouncedEditorCode = useDebouncedValue(editorCode, 500); +// Custom CodeMirror form control component +function CodeMirrorFormField({ + field, + placeholder, +}: { + field: { + value: string; + onChange: (_value: string) => void; + }; + placeholder?: string; +}) { const editorRef = useRef(null); const viewRef = useRef(null); - // Parse column names from the debounced code editor - const parseColumnNames = (code: string): string[] => { - return code - .split("\n") - .map((line) => line.trim()) - .filter((line) => line.length > 0 && !line.startsWith("//")) - .map((line) => { - // Extract column name from various formats - const match = line.match(/['"`]?([a-zA-Z_][a-zA-Z0-9_]*)['"`]?/); - return match ? match[1] : line; - }) - .filter((name, index, arr) => arr.indexOf(name) === index); // Remove duplicates - }; - - const columnNames = parseColumnNames(debouncedEditorCode); - // Generate dynamic completions from query data const completions = useMemo(() => { - if (!queryData?.rows || queryData.rows.length === 0) { - // Fallback to common column names if no data available - return [ - { label: "category", type: "variable", info: "Column name" }, - { label: "status", type: "variable", info: "Column name" }, - { label: "priority", type: "variable", info: "Column name" }, - { label: "user_id", type: "variable", info: "Column name" }, - { label: "created_at", type: "variable", info: "Column name" }, - { label: "updated_at", type: "variable", info: "Column name" }, - { label: "id", type: "variable", info: "Column name" }, - { label: "name", type: "variable", info: "Column name" }, - { label: "description", type: "variable", info: "Column name" }, - ]; - } - - // Extract column names from the first row - const firstRow = queryData.rows[0]; - const availableColumns = Object.keys(firstRow); - - return availableColumns.map(columnName => ({ - label: columnName, - type: "variable" as const, - info: `Column from query data (${queryData.rowCount} rows)`, - })); - }, [queryData]); - - // Process function body and compute results - const computedResults = useMemo(() => { - if (!queryData?.rows || !debouncedEditorCode.trim()) { - return []; - } - - const functionBody = debouncedEditorCode.trim(); - if (!functionBody) return []; - - try { - // Extract column names from the function body - const columnRegex = /\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g; - const detectedColumns = new Set(); - let match; - - while ((match = columnRegex.exec(functionBody)) !== null) { - const columnName = match[1]; - // Skip JavaScript keywords and common words - const jsKeywords = ['function', 'return', 'if', 'else', 'for', 'while', 'var', 'let', 'const', 'true', 'false', 'null', 'undefined']; - if (!jsKeywords.includes(columnName)) { - detectedColumns.add(columnName); - } - } - - // Create the function with column replacement - let processedBody = functionBody; - const availableColumns = Object.keys(queryData.rows[0] || {}); - - // Replace column names with row access - detectedColumns.forEach(columnName => { - if (availableColumns.includes(columnName)) { - const regex = new RegExp(`\\b${columnName}\\b`, 'g'); - processedBody = processedBody.replace(regex, `row.${columnName}`); - } - }); - - // Create the function with proper wrapping - const functionString = `function compute(row) {\n${processedBody}\n}`; - - // Create a safe evaluation environment - const computeFunction = new Function('row', processedBody); - - // Execute for each row - const results: ComputedResult[] = []; - - queryData.rows.forEach((row, index) => { - try { - const result = computeFunction(row); - results.push({ - value: result, - rowIndex: index, - }); - } catch (error) { - results.push({ - value: null, - error: error instanceof Error ? error.message : String(error), - rowIndex: index, - }); - } - }); - - return results; - } catch (error) { - return [{ - value: null, - error: error instanceof Error ? error.message : String(error), - rowIndex: 0, - }]; - } - }, [debouncedEditorCode, queryData]); + // This would need to be passed down from parent or fetched here + return []; + }, []); function myCompletions(context: any) { - let before = context.matchBefore(/\w+/); - // If completion wasn't explicitly started and there - // is no word before the cursor, don't open completions. + const before = context.matchBefore(/\w+/); if (!context.explicit && !before) return null; return { from: before ? before.from : context.pos, @@ -181,24 +82,27 @@ export function QuerySidebar({ }; } - // Initialize CodeMirror useEffect(() => { if (!editorRef.current || viewRef.current) return; const state = EditorState.create({ - doc: "// Enter function body for computed column\n// Examples:\n// Simple: category + '_' + status\n// With logic:\n// if(priority > 3) {\n// return 'High'\n// }\n// return 'Low'\n// With variables:\n// let total = col1 + col2\n// if(total > 100) {\n// return 'Large'\n// }\n// return 'Small'", + doc: + field.value || + placeholder || + "// Enter function body for computed column", extensions: [ basicSetup, autocompletion({ override: [myCompletions] }), EditorView.updateListener.of((update) => { if (update.docChanged) { - setEditorCode(update.state.doc.toString()); + field.onChange(update.state.doc.toString()); } }), EditorView.theme({ "&": { fontSize: "13px", - fontFamily: 'ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace', + fontFamily: + "ui-monospace, SFMono-Regular, 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace", height: "100%", }, ".cm-content": { @@ -236,97 +140,151 @@ export function QuerySidebar({ }; }, []); - const handleEditColumn = (column: ComputedColumn) => { - setEditingColumn(column.name); - setColumnName(column.name); - if (viewRef.current) { + // Update editor content when value changes externally + useEffect(() => { + if ( + viewRef.current && + field.value !== viewRef.current.state.doc.toString() + ) { const transaction = viewRef.current.state.update({ - changes: { from: 0, to: viewRef.current.state.doc.length, insert: column.functionBody }, + changes: { + from: 0, + to: viewRef.current.state.doc.length, + insert: field.value, + }, }); viewRef.current.dispatch(transaction); } + }, [field.value]); + + return
; +} + +export function QuerySidebar({ + query, + projectId, + onClose, + queryData: _queryData, +}: QuerySidebarProps) { + const [selectedColumn, setSelectedColumn] = useState(null); + const [isSubmitting, setIsSubmitting] = useState(false); + const [isCreating, setIsCreating] = useState(false); + + const form = useForm({ + resolver: zodResolver(computedColumnSchema), + defaultValues: { + name: "", + functionBody: + "// Enter function body for computed column\n// Examples:\n// Simple: category + '_' + status\n// With logic:\n// if(priority > 3) {\n// return 'High'\n// }\n// return 'Low'", + }, + }); + + const hasComputedColumns = + Array.isArray(query.computedColumns) && query.computedColumns.length > 0; + + // Set default column on component load + useEffect(() => { + if (hasComputedColumns && !selectedColumn) { + const firstColumn = query.computedColumns[0]; + handleEditColumn(firstColumn); + } + }, [hasComputedColumns, selectedColumn]); + + const handleEditColumn = (column: ComputedColumn) => { + setSelectedColumn(column.name); + form.reset({ + name: column.name, + functionBody: column.functionBody, + }); }; - const handleCancelEdit = () => { - setEditingColumn(null); - setColumnName(""); - if (viewRef.current) { - const transaction = viewRef.current.state.update({ - changes: { from: 0, to: viewRef.current.state.doc.length, insert: "" }, + const handleNewColumn = async () => { + const defaultBody = + "// Enter function body for computed column\n// Examples:\n// Simple: category + '_' + status\n// With logic:\n// if(priority > 3) {\n// return 'High'\n// }\n// return 'Low'"; + + setIsCreating(true); + try { + // Create new column in database + await addComputedColumnAction(projectId, query.id, { + name: "Untitled", + functionBody: defaultBody, }); - viewRef.current.dispatch(transaction); + + // Select the newly created column + const newColumn = { + name: "Untitled", + functionBody: defaultBody, + }; + handleEditColumn(newColumn); + } catch (error) { + console.error("Failed to create new column:", error); + } finally { + setIsCreating(false); } }; + const handleCancelEdit = () => { + setSelectedColumn(null); + form.reset(); + }; + const handleDeleteColumn = async (columnName: string) => { - if (confirm(`Are you sure you want to delete the computed column "${columnName}"?`)) { + if ( + confirm( + `Are you sure you want to delete the computed column "${columnName}"?`, + ) + ) { try { await deleteComputedColumnAction(projectId, query.id, columnName); console.log("Deleted computed column:", columnName); - - // Clear editor state after successful deletion - setEditingColumn(null); - setColumnName(""); - if (viewRef.current) { - const transaction = viewRef.current.state.update({ - changes: { from: 0, to: viewRef.current.state.doc.length, insert: "" }, - }); - viewRef.current.dispatch(transaction); - } + + // Clear form after successful deletion + setSelectedColumn(null); + form.reset(); } catch (error) { console.error("Failed to delete computed column:", error); } } }; - const handleSave = async () => { - if (!columnName.trim()) { - console.warn("Column name is required"); - return; - } - - if (editingColumn) { - await updateComputedColumnAction(projectId, query.id, editingColumn, { - name: columnName.trim(), - functionBody: editorCode.trim(), - }); - setEditingColumn(null); - } else { - await addComputedColumnAction(projectId, query.id, { - name: columnName.trim(), - functionBody: editorCode.trim(), - }); - } - - console.log(editingColumn ? "Updated" : "Saved", "computed column:", columnName); - - // Clear form after save - setColumnName(""); - if (viewRef.current) { - const transaction = viewRef.current.state.update({ - changes: { from: 0, to: viewRef.current.state.doc.length, insert: "" }, - }); - viewRef.current.dispatch(transaction); - } - }; - - const handleClear = () => { - if (viewRef.current) { - const transaction = viewRef.current.state.update({ - changes: { from: 0, to: viewRef.current.state.doc.length, insert: "" }, - }); - viewRef.current.dispatch(transaction); + const onSubmit = async (data: ComputedColumnFormData) => { + setIsSubmitting(true); + try { + if (selectedColumn) { + await updateComputedColumnAction(projectId, query.id, selectedColumn, { + name: data.name.trim(), + functionBody: data.functionBody.trim(), + }); + // After updating, select the updated column + const updatedColumn = query.computedColumns.find( + (col) => col.name === selectedColumn, + ); + if (updatedColumn) { + handleEditColumn(updatedColumn); + } + } else { + await addComputedColumnAction(projectId, query.id, { + name: data.name.trim(), + functionBody: data.functionBody.trim(), + }); + // After adding, select the newly created column + const newColumn = { + name: data.name.trim(), + functionBody: data.functionBody.trim(), + }; + handleEditColumn(newColumn); + } + } catch (error) { + console.error("Failed to save computed column:", error); + } finally { + setIsSubmitting(false); } }; - const lineCount = editorCode.split("\n").length; - const hasErrors = computedResults.some(result => result.error); - const successCount = computedResults.filter(result => !result.error).length; - return ( -
+
-

Computed Columns

+

Computed columns

+
-
- {/* Existing Computed Columns */} -
-
-

- - Existing Computed Columns -

+
+ {/* Column Selection and New Button */} +
+
+ Computed columns
- {Array.isArray(query.computedColumns) && query.computedColumns.length > 0 ? ( - - ) : ( -
No computed columns yet
- )} -
-
- - setColumnName(e.target.value)} - placeholder="Enter computed column name" - className="w-full mt-1 px-3 py-2 border border-input rounded-md bg-background text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent" - /> -
-
-
- - - {lineCount} line{lineCount !== 1 ? "s" : ""} • {computedResults.length} result{computedResults.length !== 1 ? "s" : ""} - -
-
-
-
-
-
- {editingColumn && ( + +
+
+ {hasComputedColumns ? ( + + ) : ( +
+ No computed columns yet +
+ )} +
+ - )} - {editingColumn && ( - - )} - - +
- {/* Computed Results Display */} - {computedResults.length > 0 && ( -
-

- - Computed Results - {hasErrors && ( - - ({successCount}/{computedResults.length} successful) - + {/* Computed Column Form */} +
+ + {/* Column Name Field */} + ( + + Column name + + + + + )} -

- {isLoading && ( -
Loading data...
- )} - {error && ( -
- Error: {error instanceof Error ? error.message : String(error)} -
- )} - {!isLoading && !error && ( -
- {/* Sample Results */} -
-
-
Sample Results
- - {computedResults.length} computed value{computedResults.length !== 1 ? "s" : ""} - -
-
- {computedResults.slice(0, 10).map((result, index) => ( -
-
- - Row {result.rowIndex + 1}: {result.error ? "ERROR" : String(result.value)} - - {result.error && ( - - {result.error} - - )} -
-
- ))} - {computedResults.length > 10 && ( -
- ... and {computedResults.length - 10} more -
- )} -
-
- - {/* Error Summary */} - {hasErrors && ( -
-
Errors Found
-
- {computedResults - .filter(result => result.error) - .slice(0, 3) - .map((result, index) => ( -
- Row {result.rowIndex + 1}: {result.error} -
- ))} - {computedResults.filter(result => result.error).length > 3 && ( -
- ... and {computedResults.filter(result => result.error).length - 3} more errors -
- )} + /> + + {/* Function Body Field */} + ( + + Function body + +
+
-
- )} -
- )} -
- )} + + + + )} + /> + + {/* Action Buttons */} +
+ {selectedColumn && ( + + )} + + {selectedColumn && ( + + )} + + +
+ +
); -} \ No newline at end of file +} From 0efe50a22b4760359647fd7acd22bdaf77d2f88d Mon Sep 17 00:00:00 2001 From: James Holcombe Date: Tue, 26 Aug 2025 16:18:53 +0100 Subject: [PATCH 11/37] merge --- .../data/query/query-layout-client.tsx | 37 ++++++++++--------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/packages/app/src/components/data/query/query-layout-client.tsx b/packages/app/src/components/data/query/query-layout-client.tsx index 810e9444..41aac490 100644 --- a/packages/app/src/components/data/query/query-layout-client.tsx +++ b/packages/app/src/components/data/query/query-layout-client.tsx @@ -8,7 +8,12 @@ import { QuerySidebarToggleButton } from "@/components/data/query/query-sidebar- import { QuerySidebar } from "@/components/data/query/query-sidebar"; import { BreadcrumbSetter } from "@/components/data/breadcrumb-setter"; import { useQueryData } from "@/hooks/queries/use-query-data"; -import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "@/components/ui/resizable"; +import { + ResizableHandle, + ResizablePanel, + ResizablePanelGroup, +} from "@/components/ui/resizable"; +import { Query } from "@common/db/schema/query"; function QueryLayoutClient({ projectId, @@ -16,33 +21,35 @@ function QueryLayoutClient({ query, definitionConfigured, children, - modal, }: { projectId: string; queryId: string; - query: any; + query: Query; definitionConfigured: boolean; children: React.ReactNode; - modal: React.ReactNode; }) { const [sidebarOpen, setSidebarOpen] = useState(false); // Fetch data once for the entire query - const { data: queryData, isLoading: isDataLoading, error: dataError } = useQueryData( + const { + data: queryData, + isLoading: isDataLoading, + error: dataError, + } = useQueryData( projectId, - query as any, + query, 100, // Fetch more rows for sidebar use 0, - [] // Empty zones for now + [], // Empty zones for now ); return (
- @@ -81,15 +88,11 @@ function QueryLayoutClient({
{children} - {modal}
{sidebarOpen && ( - + Date: Tue, 26 Aug 2025 16:21:25 +0100 Subject: [PATCH 12/37] lint --- .../data/query/query-layout-client.tsx | 18 ++++++++++++------ .../data/query/query-sidebar-toggle-button.tsx | 18 +++++++++--------- packages/app/src/db/crud/query.ts | 11 ++++++++--- packages/app/src/hooks/use-debounced-value.ts | 2 +- 4 files changed, 30 insertions(+), 19 deletions(-) diff --git a/packages/app/src/components/data/query/query-layout-client.tsx b/packages/app/src/components/data/query/query-layout-client.tsx index 41aac490..3693f8bf 100644 --- a/packages/app/src/components/data/query/query-layout-client.tsx +++ b/packages/app/src/components/data/query/query-layout-client.tsx @@ -31,18 +31,24 @@ function QueryLayoutClient({ const [sidebarOpen, setSidebarOpen] = useState(false); // Fetch data once for the entire query - const { - data: queryData, - isLoading: isDataLoading, - error: dataError, - } = useQueryData( + const queryResult = useQueryData( projectId, - query, + query.definition + ? { ...query, definition: query.definition } + : { ...query, definition: {} }, 100, // Fetch more rows for sidebar use 0, [], // Empty zones for now ); + const { + data: queryData, + isLoading: isDataLoading, + error: dataError, + } = query.definition + ? queryResult + : { data: undefined, isLoading: false, error: null }; + return (
diff --git a/packages/app/src/components/data/query/query-sidebar-toggle-button.tsx b/packages/app/src/components/data/query/query-sidebar-toggle-button.tsx index 72621cf2..889185d3 100644 --- a/packages/app/src/components/data/query/query-sidebar-toggle-button.tsx +++ b/packages/app/src/components/data/query/query-sidebar-toggle-button.tsx @@ -1,26 +1,28 @@ "use client"; import { Button } from "@/components/ui/button"; -import { PanelRight } from "lucide-react"; + import { usePathname } from "next/navigation"; type QuerySidebarToggleButtonProps = { isOpen: boolean; onToggle: () => void; projectId: string; - queryId: string;}; + queryId: string; +}; export function QuerySidebarToggleButton({ isOpen, onToggle, projectId, - queryId + queryId, }: QuerySidebarToggleButtonProps) { const pathname = usePathname(); - const isDefinitionView = pathname === `/projects/${projectId}/data/queries/${queryId}/definition`; + const isDefinitionView = + pathname === `/projects/${projectId}/data/queries/${queryId}/definition`; - if(!isDefinitionView) { + if (!isDefinitionView) { return null; } @@ -31,9 +33,7 @@ export function QuerySidebarToggleButton({ onClick={onToggle} title={isOpen ? "Hide Computed Columns" : "Show Computed Columns"} > -
- Computed Columns -
+
Computed Columns
); -} \ No newline at end of file +} diff --git a/packages/app/src/db/crud/query.ts b/packages/app/src/db/crud/query.ts index 91ba5bb2..d20803f5 100644 --- a/packages/app/src/db/crud/query.ts +++ b/packages/app/src/db/crud/query.ts @@ -1,7 +1,12 @@ import { eq, and, isNull } from "drizzle-orm"; import { db } from ".."; -import { query, Query, QueryInsert, ComputedColumn } from "@common/db/schema/query"; +import { + query, + Query, + QueryInsert, + ComputedColumn, +} from "@common/db/schema/query"; export async function readQueries(projectId: string) { return await db @@ -144,7 +149,7 @@ export async function updateComputedColumn( } const updatedComputedColumns = (existing.computedColumns ?? []).map((col) => - col.name === columnName ? updatedColumn : col + col.name === columnName ? updatedColumn : col, ); const [updated] = await db @@ -166,7 +171,7 @@ export async function deleteComputedColumn( } const updatedComputedColumns = (existing.computedColumns ?? []).filter( - (col) => col.name !== columnName + (col) => col.name !== columnName, ); const [updated] = await db diff --git a/packages/app/src/hooks/use-debounced-value.ts b/packages/app/src/hooks/use-debounced-value.ts index 420431ab..8d2d042c 100644 --- a/packages/app/src/hooks/use-debounced-value.ts +++ b/packages/app/src/hooks/use-debounced-value.ts @@ -9,4 +9,4 @@ export function useDebouncedValue(value: T, delay: number): T { }, [value, delay]); return debouncedValue; -} \ No newline at end of file +} From c50be77cccbe9112d6961ea1d890556f53290ae5 Mon Sep 17 00:00:00 2001 From: James Holcombe Date: Tue, 26 Aug 2025 21:27:16 +0100 Subject: [PATCH 13/37] add migration file --- .../common/drizzle/0012_great_white_tiger.sql | 1 + .../common/drizzle/meta/0012_snapshot.json | 26241 ++++++++++++++++ packages/common/drizzle/meta/_journal.json | 7 + 3 files changed, 26249 insertions(+) create mode 100644 packages/common/drizzle/0012_great_white_tiger.sql create mode 100644 packages/common/drizzle/meta/0012_snapshot.json diff --git a/packages/common/drizzle/0012_great_white_tiger.sql b/packages/common/drizzle/0012_great_white_tiger.sql new file mode 100644 index 00000000..cf94b25f --- /dev/null +++ b/packages/common/drizzle/0012_great_white_tiger.sql @@ -0,0 +1 @@ +ALTER TABLE "custom_table" ADD COLUMN "computed_columns" jsonb DEFAULT '[]'::jsonb NOT NULL; \ No newline at end of file diff --git a/packages/common/drizzle/meta/0012_snapshot.json b/packages/common/drizzle/meta/0012_snapshot.json new file mode 100644 index 00000000..76cc8103 --- /dev/null +++ b/packages/common/drizzle/meta/0012_snapshot.json @@ -0,0 +1,26241 @@ +{ + "id": "b5fe3590-29cf-484b-8faf-83c102d5b1f9", + "prevId": "38f70cb1-e710-4e09-9a1c-4e262f7cb948", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.abbreviation": { + "name": "abbreviation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "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": "varchar", + "primaryKey": false, + "notNull": true + }, + "color": { + "name": "color", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "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": "cascade", + "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": "varchar(21)", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "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": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "unique_abbr_collection": { + "name": "unique_abbr_collection", + "nullsNotDistinct": false, + "columns": [ + "project_id", + "column", + "table" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.cross_section": { + "name": "cross_section", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "varchar", + "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 + }, + "centerline": { + "name": "centerline", + "type": "geometry(LineString, 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": { + "cross_section_project_id_project_id_fk": { + "name": "cross_section_project_id_project_id_fk", + "tableFrom": "cross_section", + "tableTo": "project", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.folder": { + "name": "folder", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "parent_folder_id": { + "name": "parent_folder_id", + "type": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "ags_import_id": { + "name": "ags_import_id", + "type": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "varchar", + "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 + }, + "notes": { + "name": "notes", + "type": "varchar(1000)", + "primaryKey": false, + "notNull": false + }, + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "varchar", + "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 + }, + "notes": { + "name": "notes", + "type": "varchar(1000)", + "primaryKey": false, + "notNull": false + }, + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "excel_import_id": { + "name": "excel_import_id", + "type": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "folder_id": { + "name": "folder_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "source_query_id": { + "name": "source_query_id", + "type": "varchar", + "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_query_id_custom_table_id_fk": { + "name": "plot_source_query_id_custom_table_id_fk", + "tableFrom": "plot", + "tableTo": "custom_table", + "columnsFrom": [ + "source_query_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.project": { + "name": "project", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "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.project_invitation": { + "name": "project_invitation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "invited_by_user_id": { + "name": "invited_by_user_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "invited_user_email": { + "name": "invited_user_email", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "invited_user_id": { + "name": "invited_user_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "role": { + "name": "role", + "type": "project_role", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'VIEWER'" + }, + "status": { + "name": "status", + "type": "invitation_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'PENDING'" + }, + "message": { + "name": "message", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "accepted_at": { + "name": "accepted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "declined_at": { + "name": "declined_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": { + "project_invitation_project_id_project_id_fk": { + "name": "project_invitation_project_id_project_id_fk", + "tableFrom": "project_invitation", + "tableTo": "project", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "project_invitation_invited_by_user_id_user_id_fk": { + "name": "project_invitation_invited_by_user_id_user_id_fk", + "tableFrom": "project_invitation", + "tableTo": "user", + "columnsFrom": [ + "invited_by_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "project_invitation_invited_user_id_user_id_fk": { + "name": "project_invitation_invited_user_id_user_id_fk", + "tableFrom": "project_invitation", + "tableTo": "user", + "columnsFrom": [ + "invited_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user_project": { + "name": "user_project", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "varchar", + "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.custom_table": { + "name": "custom_table", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "folder_id": { + "name": "folder_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "definition": { + "name": "definition", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "computed_columns": { + "name": "computed_columns", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "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": { + "query_id": { + "name": "query_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "zone_id": { + "name": "zone_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "custom_table_zone_query_id_custom_table_id_fk": { + "name": "custom_table_zone_query_id_custom_table_id_fk", + "tableFrom": "custom_table_zone", + "tableTo": "custom_table", + "columnsFrom": [ + "query_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.tag": { + "name": "tag", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "owner_id": { + "name": "owner_id", + "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": { + "tag_owner_id_user_id_fk": { + "name": "tag_owner_id_user_id_fk", + "tableFrom": "tag", + "tableTo": "user", + "columnsFrom": [ + "owner_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.template": { + "name": "template", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "owner_id": { + "name": "owner_id", + "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()" + }, + "custom_table_definition": { + "name": "custom_table_definition", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "plot_definition": { + "name": "plot_definition", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "is_plot": { + "name": "is_plot", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "generated": { + "as": "(\n \"template\".\"plot_definition\" IS NOT NULL\n )", + "type": "stored" + } + }, + "scope": { + "name": "scope", + "type": "scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'private'" + } + }, + "indexes": {}, + "foreignKeys": { + "template_owner_id_user_id_fk": { + "name": "template_owner_id_user_id_fk", + "tableFrom": "template", + "tableTo": "user", + "columnsFrom": [ + "owner_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.template_tag": { + "name": "template_tag", + "schema": "", + "columns": { + "template_id": { + "name": "template_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "tag_id": { + "name": "tag_id", + "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": { + "template_tag_template_id_template_id_fk": { + "name": "template_tag_template_id_template_id_fk", + "tableFrom": "template_tag", + "tableTo": "template", + "columnsFrom": [ + "template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "template_tag_tag_id_tag_id_fk": { + "name": "template_tag_tag_id_tag_id_fk", + "tableFrom": "template_tag", + "tableTo": "tag", + "columnsFrom": [ + "tag_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user": { + "name": "user", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "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 + }, + "privacy_policy_accepted_at": { + "name": "privacy_policy_accepted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "terms_of_use_accepted_at": { + "name": "terms_of_use_accepted_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": {}, + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "varchar", + "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": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aggregate_abrasion_tests": { + "name": "aggregate_abrasion_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(21)", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "micro_deval_coefficient_for_test_specimen_one": { + "name": "micro_deval_coefficient_for_test_specimen_one", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "micro_deval_coefficient_for_test_specimen_two": { + "name": "micro_deval_coefficient_for_test_specimen_two", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "aggregate_impact_value_test_2": { + "name": "aggregate_impact_value_test_2", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "mean_aggregate_impact_value": { + "name": "mean_aggregate_impact_value", + "type": "double precision", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "depth_of_casing": { + "name": "depth_of_casing", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cbr_at_top": { + "name": "cbr_at_top", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "cbr_at_bottom": { + "name": "cbr_at_bottom", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "varchar", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_of_base_of_casing_recorded_in_cdia_diam": { + "name": "depth_of_base_of_casing_recorded_in_cdia_diam", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_at_start_of_chiselling": { + "name": "depth_at_start_of_chiselling", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "depth_at_end_of_chiselling": { + "name": "depth_at_end_of_chiselling", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "compaction_mould_type": { + "name": "compaction_mould_type", + "type": "varchar", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content_at_maximum_dry_density_optimum": { + "name": "water_moisture_content_at_maximum_dry_density_optimum", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "amount_of_stabiliser_added": { + "name": "amount_of_stabiliser_added", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "reported_coefficient_of_volume_compressibility_over_stress_increment": { + "name": "reported_coefficient_of_volume_compressibility_over_stress_increment", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "coefficient_of_secondary_compression_over_stress_increment": { + "name": "coefficient_of_secondary_compression_over_stress_increment", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "coefficient_of_consolidation_determined_by_the_root_time_method": { + "name": "coefficient_of_consolidation_determined_by_the_root_time_method", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "coefficient_of_consolidation_determined_by_the_log_time_method": { + "name": "coefficient_of_consolidation_determined_by_the_log_time_method", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "average_temperature_over_stress_increment": { + "name": "average_temperature_over_stress_increment", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_specimen_diameter": { + "name": "test_specimen_diameter", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "test_specimen_height": { + "name": "test_specimen_height", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "height_change_of_specimen_on_saturation": { + "name": "height_change_of_specimen_on_saturation", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "initial_voids_ratio": { + "name": "initial_voids_ratio", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_core_run": { + "name": "depth_to_top_of_core_run", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_core_run": { + "name": "depth_to_base_of_core_run", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "minimum_excess_porewater_pressure": { + "name": "minimum_excess_porewater_pressure", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "maximum_shear_stress": { + "name": "maximum_shear_stress", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "minimum_shear_stress": { + "name": "minimum_shear_stress", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "mean_shear_stress": { + "name": "mean_shear_stress", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "cyclic_shear_stress_max_min_2": { + "name": "cyclic_shear_stress_max_min_2", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "average_cyclic_axial_stress": { + "name": "average_cyclic_axial_stress", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "axial_strain_at_failure": { + "name": "axial_strain_at_failure", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "porewater_pressure_at_failure": { + "name": "porewater_pressure_at_failure", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "maximum_deviatoric_stress": { + "name": "maximum_deviatoric_stress", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "minimum_deviatoric_stress": { + "name": "minimum_deviatoric_stress", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "mean_effective_stress_at_end_of_ctrd_cyc": { + "name": "mean_effective_stress_at_end_of_ctrd_cyc", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "maximum_axial_strain": { + "name": "maximum_axial_strain", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "minimum_axial_strain": { + "name": "minimum_axial_strain", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "final_voids_ratio": { + "name": "final_voids_ratio", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "deviatoric_stress_at_maximum_axial_strain": { + "name": "deviatoric_stress_at_maximum_axial_strain", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "deviatoric_stress_at_minimum_axial_strain": { + "name": "deviatoric_stress_at_minimum_axial_strain", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "secant_modulus": { + "name": "secant_modulus", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "damping_ratio": { + "name": "damping_ratio", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "type_of_test": { + "name": "type_of_test", + "type": "varchar", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "initial_specimen_diameter": { + "name": "initial_specimen_diameter", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "initial_height_of_specimen": { + "name": "initial_height_of_specimen", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "total_mass_of_installed_specimen": { + "name": "total_mass_of_installed_specimen", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "minimum_density_of_sand": { + "name": "minimum_density_of_sand", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "initial_bulk_density": { + "name": "initial_bulk_density", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "initial_voids_ratio": { + "name": "initial_voids_ratio", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "method_of_saturation": { + "name": "method_of_saturation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_duration": { + "name": "test_duration", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "base_porewater_pressure": { + "name": "base_porewater_pressure", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "mid_height_porewater_pressure": { + "name": "mid_height_porewater_pressure", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "mid_height_b_value": { + "name": "mid_height_b_value", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "base_b_value": { + "name": "base_b_value", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "type_of_consolidation": { + "name": "type_of_consolidation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "final_back_pressure": { + "name": "final_back_pressure", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter_at_end_of_stage": { + "name": "specimen_diameter_at_end_of_stage", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "dry_density_at_end_of_stage": { + "name": "dry_density_at_end_of_stage", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "relative_density_index_of_sand_at_end_of_stage": { + "name": "relative_density_index_of_sand_at_end_of_stage", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "voids_ratio_at_end_of_stage": { + "name": "voids_ratio_at_end_of_stage", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "effective_axial_stress_at_end_of_stage": { + "name": "effective_axial_stress_at_end_of_stage", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "effective_radial_stress_at_end_of_stage": { + "name": "effective_radial_stress_at_end_of_stage", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "shear_stress_at_end_of_stage": { + "name": "shear_stress_at_end_of_stage", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "deviatoric_stress_at_end_of_stage": { + "name": "deviatoric_stress_at_end_of_stage", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "mean_effective_stress_at_end_of_stage": { + "name": "mean_effective_stress_at_end_of_stage", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "external_axial_strain_at_end_of_stage": { + "name": "external_axial_strain_at_end_of_stage", + "type": "double precision", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "b_value": { + "name": "b_value", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "measured_arrival_time_of_propagated_wave": { + "name": "measured_arrival_time_of_propagated_wave", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "specimen_height": { + "name": "specimen_height", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "cell_pressure": { + "name": "cell_pressure", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "base_porewater_pressure": { + "name": "base_porewater_pressure", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "mid_plane_porewater_pressure": { + "name": "mid_plane_porewater_pressure", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "external_axial_strain": { + "name": "external_axial_strain", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "local_axial_strain_1": { + "name": "local_axial_strain_1", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "local_axial_strain_2": { + "name": "local_axial_strain_2", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "volumetric_strain": { + "name": "volumetric_strain", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "radial_strain": { + "name": "radial_strain", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "shear_strain": { + "name": "shear_strain", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "shear_stress": { + "name": "shear_stress", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "deviatoric_stress": { + "name": "deviatoric_stress", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "principal_stress_difference": { + "name": "principal_stress_difference", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "mean_effective_stress": { + "name": "mean_effective_stress", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "secant_young_s_modulus_local": { + "name": "secant_young_s_modulus_local", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "tangent_young_s_modulus": { + "name": "tangent_young_s_modulus", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "loading_frequency": { + "name": "loading_frequency", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "cyclic_amplitude": { + "name": "cyclic_amplitude", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "double_amplitude_axial_strain": { + "name": "double_amplitude_axial_strain", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "compression_extension_stress_ratio": { + "name": "compression_extension_stress_ratio", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "excess_mid_plane_pore_pressure_ratio": { + "name": "excess_mid_plane_pore_pressure_ratio", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "excess_base_pore_pressure_ratio": { + "name": "excess_base_pore_pressure_ratio", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "saturation_base_porewater_pressure": { + "name": "saturation_base_porewater_pressure", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "saturation_mid_height_porewater_pressure": { + "name": "saturation_mid_height_porewater_pressure", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "saturation_mid_height_b_value": { + "name": "saturation_mid_height_b_value", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "saturation_base_b_value": { + "name": "saturation_base_b_value", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "saturation_method": { + "name": "saturation_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "final_saturation": { + "name": "final_saturation", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_sample": { + "name": "type_of_sample", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content": { + "name": "water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "bulk_density": { + "name": "bulk_density", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "dry_density": { + "name": "dry_density", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_section": { + "name": "depth_to_top_of_section", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_section": { + "name": "depth_to_base_of_section", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "type_of_depth_related_information": { + "name": "type_of_depth_related_information", + "type": "varchar", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "trial_pit_trial_trench_or_logged_traverse_width": { + "name": "trial_pit_trial_trench_or_logged_traverse_width", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_of_remark_drem_rem": { + "name": "depth_of_remark_drem_rem", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "base_depth": { + "name": "base_depth", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_in_hole": { + "name": "depth_to_top_in_hole", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_in_hole": { + "name": "depth_to_base_in_hole", + "type": "double precision", + "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": "varchar", + "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": "double precision", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "persistence_measurement": { + "name": "persistence_measurement", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_drillers_stratum_description": { + "name": "depth_to_top_of_drillers_stratum_description", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_drillers_stratum_description": { + "name": "depth_to_base_of_drillers_stratum_description", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_reported_section": { + "name": "depth_to_top_of_reported_section", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_reported_section": { + "name": "depth_to_base_of_reported_section", + "type": "double precision", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "pressure_of_restraining_holdback_system": { + "name": "pressure_of_restraining_holdback_system", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "torque_pressure": { + "name": "torque_pressure", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "torque_applied_to_top_of_drill_rods": { + "name": "torque_applied_to_top_of_drill_rods", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "downward_thrust_on_bit": { + "name": "downward_thrust_on_bit", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "restraining_holdback_force": { + "name": "restraining_holdback_force", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "supply_pressure_to_downhole_hammer": { + "name": "supply_pressure_to_downhole_hammer", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "specific_energy": { + "name": "specific_energy", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "flushing_medium_circulation_rate_input_over_flush_zone": { + "name": "flushing_medium_circulation_rate_input_over_flush_zone", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "flushing_medium_recovery_rate_over_flush_zone": { + "name": "flushing_medium_recovery_rate_over_flush_zone", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_flush_zone": { + "name": "depth_to_top_of_flush_zone", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "depth_to_bottom_of_flush_zone": { + "name": "depth_to_bottom_of_flush_zone", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "type_of_flush": { + "name": "type_of_flush", + "type": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_to_start_of_dynamic_probe_increment": { + "name": "depth_to_start_of_dynamic_probe_increment", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hammer_mass": { + "name": "hammer_mass", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "standard_drop": { + "name": "standard_drop", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cone_base_diameter": { + "name": "cone_base_diameter", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "cone_angle": { + "name": "cone_angle", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "rod_mass": { + "name": "rod_mass", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "voids_ratio_at_end_of_stress_increment": { + "name": "voids_ratio_at_end_of_stress_increment", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "volume_change_measured_during_consolidation_stage": { + "name": "volume_change_measured_during_consolidation_stage", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "reported_coefficient_of_volume_compressibility_over_stress_increment": { + "name": "reported_coefficient_of_volume_compressibility_over_stress_increment", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "reported_coefficient_of_consolidation_over_stress_increment": { + "name": "reported_coefficient_of_consolidation_over_stress_increment", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "coefficient_of_secondary_compression_over_stress_increment": { + "name": "coefficient_of_secondary_compression_over_stress_increment", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "varchar", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_specimen_diameter": { + "name": "test_specimen_diameter", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "test_specimen_height": { + "name": "test_specimen_height", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "final_bulk_density": { + "name": "final_bulk_density", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "double precision", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "volume_of_water_taken_in_during_saturation": { + "name": "volume_of_water_taken_in_during_saturation", + "type": "double precision", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "compression_index_over_stress_increment": { + "name": "compression_index_over_stress_increment", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "swelling_index_over_stress_increment": { + "name": "swelling_index_over_stress_increment", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "chemical_code": { + "name": "chemical_code", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "laboratory_test_matrix": { + "name": "laboratory_test_matrix", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "run_type_initial_or_reanalysis": { + "name": "run_type_initial_or_reanalysis", + "type": "varchar", + "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": "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 + }, + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "basis": { + "name": "basis", + "type": "varchar", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "determinand_code": { + "name": "determinand_code", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "laboratory_test_matrix": { + "name": "laboratory_test_matrix", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "run_type_initial_or_reanalysis": { + "name": "run_type_initial_or_reanalysis", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_additional_descriptor": { + "name": "test_additional_descriptor", + "type": "varchar", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "laboratory_sample_id": { + "name": "laboratory_sample_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "result_type": { + "name": "result_type", + "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 + }, + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "basis": { + "name": "basis", + "type": "varchar", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_section": { + "name": "depth_to_top_of_section", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_section": { + "name": "depth_to_base_of_section", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "backfill_description": { + "name": "backfill_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "backfill_legend_abbreviation": { + "name": "backfill_legend_abbreviation", + "type": "varchar", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_exploratory_hole_section": { + "name": "depth_to_top_of_exploratory_hole_section", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_exploratory_hole_section": { + "name": "depth_to_base_of_exploratory_hole_section", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_test_zone": { + "name": "depth_to_top_of_test_zone", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_test_zone": { + "name": "depth_to_base_of_test_zone", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "depth_of_casing_during_test_excluding_tests_in_installations": { + "name": "depth_of_casing_during_test_excluding_tests_in_installations", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "shape_factor_for_test_zone": { + "name": "shape_factor_for_test_zone", + "type": "double precision", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_configuration": { + "name": "test_configuration", + "type": "varchar", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "average_flow_rate_during_test": { + "name": "average_flow_rate_during_test", + "type": "double precision", + "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": "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 + }, + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "average_flow_rate_during_test_stage": { + "name": "average_flow_rate_during_test_stage", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_to_the_top_of_stratum": { + "name": "depth_to_the_top_of_stratum", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "depth_to_the_base_of_description": { + "name": "depth_to_the_base_of_description", + "type": "double precision", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "geology_code": { + "name": "geology_code", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "second_geology_code": { + "name": "second_geology_code", + "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 + }, + "bgs_lexicon_code": { + "name": "bgs_lexicon_code", + "type": "varchar", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_in_hole": { + "name": "depth_to_top_in_hole", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_in_hole": { + "name": "depth_to_base_in_hole", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "dry_density_of_specimens_after_preparation": { + "name": "dry_density_of_specimens_after_preparation", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "mean_heave_of_3_specimens": { + "name": "mean_heave_of_3_specimens", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "amount_of_stabiliser_added": { + "name": "amount_of_stabiliser_added", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "determinand": { + "name": "determinand", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "test_method": { + "name": "test_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_type": { + "name": "test_type", + "type": "varchar", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_cbr_test": { + "name": "depth_to_top_of_cbr_test", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cbr_value": { + "name": "cbr_value", + "type": "double precision", + "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": "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_of_in_situ_density_test": { + "name": "depth_of_in_situ_density_test", + "type": "double precision", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "in_situ_bulk_density_after_any_calibration_corrections_applied": { + "name": "in_situ_bulk_density_after_any_calibration_corrections_applied", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_of_test": { + "name": "depth_of_test", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_test_zone": { + "name": "depth_to_top_of_test_zone", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "depth_to_water_at_start_of_test": { + "name": "depth_to_water_at_start_of_test", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "diameter_of_test_zone": { + "name": "diameter_of_test_zone", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "diameter_of_test_installation_e_g_standpipe_or_casing": { + "name": "diameter_of_test_installation_e_g_standpipe_or_casing", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "depth_to_assumed_standing_water_level": { + "name": "depth_to_assumed_standing_water_level", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_of_redox_test": { + "name": "depth_of_redox_test", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_to_which_in_situ_resistivity_test_relates": { + "name": "depth_to_which_in_situ_resistivity_test_relates", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "type_of_resistivity_test": { + "name": "type_of_resistivity_test", + "type": "varchar", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_of_vane_test": { + "name": "depth_of_vane_test", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "vane_type": { + "name": "vane_type", + "type": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "ph_of_lime_soil_suspension": { + "name": "ph_of_lime_soil_suspension", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "ph_value_used_for_interpretation_of_lstg_icl": { + "name": "ph_value_used_for_interpretation_of_lstg_icl", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "percentage_passing_0_425mm_sieve": { + "name": "percentage_passing_0_425mm_sieve", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "varchar", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "specimen_length": { + "name": "specimen_length", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "diameter_of_drain_for_radial_permeability_in_hydraulic_cell": { + "name": "diameter_of_drain_for_radial_permeability_in_hydraulic_cell", + "type": "double precision", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_permeameter": { + "name": "type_of_permeameter", + "type": "varchar", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "average_laboratory_temperature_at_which_the_test_was_performed": { + "name": "average_laboratory_temperature_at_which_the_test_was_performed", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "dry_density": { + "name": "dry_density", + "type": "double precision", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "bulk_density": { + "name": "bulk_density", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "dry_density": { + "name": "dry_density", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "water_moisture_content": { + "name": "water_moisture_content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thermal_conductivity": { + "name": "thermal_conductivity", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "thermal_resistivity": { + "name": "thermal_resistivity", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "specimen_length": { + "name": "specimen_length", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "mean_rate_of_compression": { + "name": "mean_rate_of_compression", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "mode_of_failure": { + "name": "mode_of_failure", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "length_of_vane": { + "name": "length_of_vane", + "type": "double precision", + "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": "double precision", + "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": "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "number_of_points": { + "name": "number_of_points", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "for_fall_cone_method": { + "name": "for_fall_cone_method", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mean_of_test_readings": { + "name": "mean_of_test_readings", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "correlation_factor_if_one_point_test": { + "name": "correlation_factor_if_one_point_test", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "location_identifier": { + "name": "location_identifier", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type_of_activity": { + "name": "type_of_activity", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "status_of_information_relating_to_this_position": { + "name": "status_of_information_relating_to_this_position", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "national_grid_easting_of_location_or_start_of_traverse": { + "name": "national_grid_easting_of_location_or_start_of_traverse", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "national_grid_northing_of_location_or_start_of_traverse": { + "name": "national_grid_northing_of_location_or_start_of_traverse", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "national_grid_referencing_system_used": { + "name": "national_grid_referencing_system_used", + "type": "varchar", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "general_remarks": { + "name": "general_remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "final_depth": { + "name": "final_depth", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "local_grid_y_co_ordinate_or_start_of_traverse": { + "name": "local_grid_y_co_ordinate_or_start_of_traverse", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "level_or_start_of_traverse_to_local_datum": { + "name": "level_or_start_of_traverse_to_local_datum", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "national_grid_northing_of_end_of_traverse": { + "name": "national_grid_northing_of_end_of_traverse", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "ground_level_relative_to_datum_of_end_of_traverse": { + "name": "ground_level_relative_to_datum_of_end_of_traverse", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "local_grid_easting_of_end_of_traverse": { + "name": "local_grid_easting_of_end_of_traverse", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "local_grid_northing_of_end_of_traverse": { + "name": "local_grid_northing_of_end_of_traverse", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "local_elevation_of_end_of_traverse": { + "name": "local_elevation_of_end_of_traverse", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "cascade", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "after_test_bulk_density_for_mcvt_tesn": { + "name": "after_test_bulk_density_for_mcvt_tesn", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "base_of_construction_zone": { + "name": "base_of_construction_zone", + "type": "double precision", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "varchar", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_of_headspace_test_sample": { + "name": "depth_of_headspace_test_sample", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_of_headspace_test_sample": { + "name": "depth_of_headspace_test_sample", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "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": "double precision", + "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": "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "sieve_or_particle_size": { + "name": "sieve_or_particle_size", + "type": "double precision", + "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": "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()" + }, + "particle_size_distribution_analysis_general_id": { + "name": "particle_size_distribution_analysis_general_id", + "type": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "percentage_of_material_tested_greater_than_63mm_cobbles": { + "name": "percentage_of_material_tested_greater_than_63mm_cobbles", + "type": "double precision", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "percentage_of_material_tested_less_than_2um_clay": { + "name": "percentage_of_material_tested_less_than_2um_clay", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "percentage_less_than_63um": { + "name": "percentage_less_than_63um", + "type": "double precision", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "load_stage": { + "name": "load_stage", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stage_elapsed_time": { + "name": "stage_elapsed_time", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "applied_load": { + "name": "applied_load", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "settlement_gauge_1": { + "name": "settlement_gauge_1", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "settlement_gauge_2": { + "name": "settlement_gauge_2", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "settlement_gauge_3": { + "name": "settlement_gauge_3", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "settlement_gauge_4": { + "name": "settlement_gauge_4", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "test_depth": { + "name": "test_depth", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "factor_a0": { + "name": "factor_a0", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "factor_a1": { + "name": "factor_a1", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "factor_a2": { + "name": "factor_a2", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "strain_modulus": { + "name": "strain_modulus", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "elastic_modulus_for_second_loading_cycle": { + "name": "elastic_modulus_for_second_loading_cycle", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "modulus_of_subgrade_reaction": { + "name": "modulus_of_subgrade_reaction", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "elastic_modulus": { + "name": "elastic_modulus", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "size_corrected_point_load_index_is_50": { + "name": "size_corrected_point_load_index_is_50", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "point_load_test_type": { + "name": "point_load_test_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "water_content_of_point_load_test_specimen": { + "name": "water_content_of_point_load_test_specimen", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "sequence_number": { + "name": "sequence_number", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "axis_1_displacement": { + "name": "axis_1_displacement", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "axis_2_displacement": { + "name": "axis_2_displacement", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "axis_3_displacement": { + "name": "axis_3_displacement", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "total_pressure": { + "name": "total_pressure", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "pore_pressure_cell_a": { + "name": "pore_pressure_cell_a", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "pore_pressure_cell_b": { + "name": "pore_pressure_cell_b", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "volume_change_in_test_cell": { + "name": "volume_change_in_test_cell", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "arm_2_displacement": { + "name": "arm_2_displacement", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "arm_3_displacement": { + "name": "arm_3_displacement", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "arm_4_displacement": { + "name": "arm_4_displacement", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "arm_5_displacement": { + "name": "arm_5_displacement", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "arm_6_displacement": { + "name": "arm_6_displacement", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "mean_arm_displacement": { + "name": "mean_arm_displacement", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_of_test": { + "name": "depth_of_test", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "uninflated_diameter_of_pressuremeter": { + "name": "uninflated_diameter_of_pressuremeter", + "type": "double precision", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "linearity_exponent_from_bolton_and_whittle": { + "name": "linearity_exponent_from_bolton_and_whittle", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "pumping_rate_from_hole": { + "name": "pumping_rate_from_hole", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "test_stage_number": { + "name": "test_stage_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "specimen_height": { + "name": "specimen_height", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "type_of_consolidation": { + "name": "type_of_consolidation", + "type": "varchar", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter_at_end_of_test_stage": { + "name": "specimen_diameter_at_end_of_test_stage", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "relative_density_at_end_of_test_stage": { + "name": "relative_density_at_end_of_test_stage", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "voids_ratio_at_end_of_test_stage": { + "name": "voids_ratio_at_end_of_test_stage", + "type": "double precision", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "deviatoric_stress_at_end_of_test_stage": { + "name": "deviatoric_stress_at_end_of_test_stage", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "shear_stress_at_end_of_test_stage": { + "name": "shear_stress_at_end_of_test_stage", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "mean_effective_stress_at_end_of_test_stage": { + "name": "mean_effective_stress_at_end_of_test_stage", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "axial_strain_at_end_of_test_stage": { + "name": "axial_strain_at_end_of_test_stage", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "radial_strain_from_measured_volume_change": { + "name": "radial_strain_from_measured_volume_change", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "measured_arrival_time_of_propagated_wave": { + "name": "measured_arrival_time_of_propagated_wave", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "specimen_height": { + "name": "specimen_height", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "cell_pressure": { + "name": "cell_pressure", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "back_pressure": { + "name": "back_pressure", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "axial_stress": { + "name": "axial_stress", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "base_pore_water_pressure": { + "name": "base_pore_water_pressure", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "mid_height_pore_water_pressure": { + "name": "mid_height_pore_water_pressure", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "pore_pressure_ratio": { + "name": "pore_pressure_ratio", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "maximum_excess_pore_water_pressure": { + "name": "maximum_excess_pore_water_pressure", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "external_axial_strain": { + "name": "external_axial_strain", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "volumetric_strain": { + "name": "volumetric_strain", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "principal_stress_difference": { + "name": "principal_stress_difference", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "mean_effective_stress": { + "name": "mean_effective_stress", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "minor_principal_stress_sigma_3": { + "name": "minor_principal_stress_sigma_3", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "major_principal_stress_sigma_1": { + "name": "major_principal_stress_sigma_1", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "average_shear_strain": { + "name": "average_shear_strain", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "shear_modulus": { + "name": "shear_modulus", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "damping": { + "name": "damping", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "isotropic_anisotropic_consolidation_back_pressure": { + "name": "isotropic_anisotropic_consolidation_back_pressure", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "effective_radial_stress_during_consolidation": { + "name": "effective_radial_stress_during_consolidation", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "effective_axial_stress_during_consolidation": { + "name": "effective_axial_stress_during_consolidation", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "deviator_stress_at_end_of_isotropic_anisotropic_consolidation": { + "name": "deviator_stress_at_end_of_isotropic_anisotropic_consolidation", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "change_to_volumetric_strain_during_isotropic_anisotropic_consolidation": { + "name": "change_to_volumetric_strain_during_isotropic_anisotropic_consolidation", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "axial_strain_after_isotropic_anisotropic_consolidation": { + "name": "axial_strain_after_isotropic_anisotropic_consolidation", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "shear_modulus_g0": { + "name": "shear_modulus_g0", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "damping_ratio": { + "name": "damping_ratio", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "normalised_shear_modulus_by_maximum_shear_modulus": { + "name": "normalised_shear_modulus_by_maximum_shear_modulus", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "slippage_ratio": { + "name": "slippage_ratio", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "varchar", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_specimen_diameter": { + "name": "initial_specimen_diameter", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "initial_specimen_height": { + "name": "initial_specimen_height", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "minimum_dry_density_for_sand": { + "name": "minimum_dry_density_for_sand", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "maximum_dry_density_for_sand": { + "name": "maximum_dry_density_for_sand", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "initial_relative_density_index": { + "name": "initial_relative_density_index", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "initial_void_ratio": { + "name": "initial_void_ratio", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "test_stage_number": { + "name": "test_stage_number", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "pressure_increment": { + "name": "pressure_increment", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "differential_pressure_used": { + "name": "differential_pressure_used", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "final_cell_pressure": { + "name": "final_cell_pressure", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "final_base_porewater_pressure": { + "name": "final_base_porewater_pressure", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "final_axial_strain": { + "name": "final_axial_strain", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "final_dry_density": { + "name": "final_dry_density", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "final_voids_ratio": { + "name": "final_voids_ratio", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "equivalent_cai_value_at_standard_stylus_hardness_hrc_55": { + "name": "equivalent_cai_value_at_standard_stylus_hardness_hrc_55", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "cai_standard_deviation": { + "name": "cai_standard_deviation", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_specimen": { + "name": "depth_to_base_of_specimen", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "specimen_length": { + "name": "specimen_length", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "water_content_of_specimen_tested": { + "name": "water_content_of_specimen_tested", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "uniaxial_compressive_strength": { + "name": "uniaxial_compressive_strength", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "mode_of_failure": { + "name": "mode_of_failure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "youngs_modulus": { + "name": "youngs_modulus", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "poisson_s_ratio": { + "name": "poisson_s_ratio", + "type": "double precision", + "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": "varchar", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "youngs_modulus_average": { + "name": "youngs_modulus_average", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "poissons_ratio_tangent": { + "name": "poissons_ratio_tangent", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "poissons_ratio_average": { + "name": "poissons_ratio_average", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_sample": { + "name": "depth_to_top_of_sample", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "sample_reference": { + "name": "sample_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_type": { + "name": "sample_type", + "type": "varchar", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "gas_flow_rate": { + "name": "gas_flow_rate", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "method_of_excavation_or_block_production": { + "name": "method_of_excavation_or_block_production", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "specimen_length": { + "name": "specimen_length", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "water_content_of_specimen": { + "name": "water_content_of_specimen", + "type": "double precision", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "displacement_rate_for_residual_stress_stage": { + "name": "displacement_rate_for_residual_stress_stage", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "residual_shear_stress": { + "name": "residual_shear_stress", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "horizontal_displacement_at_peak_shear_stress": { + "name": "horizontal_displacement_at_peak_shear_stress", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "horizontal_displacement_at_residual_shear_stress": { + "name": "horizontal_displacement_at_residual_shear_stress", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "vertical_displacement_at_peak_shear_stress": { + "name": "vertical_displacement_at_peak_shear_stress", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "vertical_displacement_at_residual_shear_stress": { + "name": "vertical_displacement_at_residual_shear_stress", + "type": "double precision", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter_perpendicular_to_shear_rock_joints": { + "name": "specimen_diameter_perpendicular_to_shear_rock_joints", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "specimen_height": { + "name": "specimen_height", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "varchar", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "peak_angle_of_friction": { + "name": "peak_angle_of_friction", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "residual_cohesion_intercept": { + "name": "residual_cohesion_intercept", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "residual_angle_of_friction": { + "name": "residual_angle_of_friction", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "shrinkage_ratio": { + "name": "shrinkage_ratio", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "initial_density": { + "name": "initial_density", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "second_cycle_slake_durability_index": { + "name": "second_cycle_slake_durability_index", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "elapsed_time": { + "name": "elapsed_time", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "depth_to_water": { + "name": "depth_to_water", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "soakaway_pit_length": { + "name": "soakaway_pit_length", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "soakaway_pit_diameter": { + "name": "soakaway_pit_diameter", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "soakaway_pit_depth_at_start_of_test": { + "name": "soakaway_pit_depth_at_start_of_test", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "soakaway_pit_depth_at_end_of_test": { + "name": "soakaway_pit_depth_at_end_of_test", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_test": { + "name": "depth_to_top_of_test", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "seconds_elapsed_since_start_of_test": { + "name": "seconds_elapsed_since_start_of_test", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "cone_resistance": { + "name": "cone_resistance", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "face_porewater_pressure_u1": { + "name": "face_porewater_pressure_u1", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "shoulder_porewater_pressure_u2": { + "name": "shoulder_porewater_pressure_u2", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "top_of_sleeve_porewater_pressure_u3": { + "name": "top_of_sleeve_porewater_pressure_u3", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_of_dissipation_test": { + "name": "depth_of_dissipation_test", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "measured_or_assumed_initial_pore_water_pressure": { + "name": "measured_or_assumed_initial_pore_water_pressure", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "measured_or_assumed_equilibrium_pore_water_pressure": { + "name": "measured_or_assumed_equilibrium_pore_water_pressure", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_of_result": { + "name": "depth_of_result", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "cone_resistance_qc": { + "name": "cone_resistance_qc", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "local_unit_side_friction_resistance_fs": { + "name": "local_unit_side_friction_resistance_fs", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "face_porewater_pressure_u1": { + "name": "face_porewater_pressure_u1", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "shoulder_porewater_pressure_u2": { + "name": "shoulder_porewater_pressure_u2", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "top_of_sleeve_porewater_pressure_u3": { + "name": "top_of_sleeve_porewater_pressure_u3", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "conductivity": { + "name": "conductivity", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "temperature": { + "name": "temperature", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "ph_reading": { + "name": "ph_reading", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "slope_indicator_no_1": { + "name": "slope_indicator_no_1", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "slope_indicator_no_2": { + "name": "slope_indicator_no_2", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "redox_potential_reading": { + "name": "redox_potential_reading", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "magnetic_flux_total_calculated": { + "name": "magnetic_flux_total_calculated", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "magnetic_flux_x": { + "name": "magnetic_flux_x", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "magnetic_flux_y": { + "name": "magnetic_flux_y", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "magnetic_flux_z": { + "name": "magnetic_flux_z", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "soil_moisture": { + "name": "soil_moisture", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "natural_gamma_radiation": { + "name": "natural_gamma_radiation", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "remarks": { + "name": "remarks", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "friction_ratio_rf": { + "name": "friction_ratio_rf", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "corrected_cone_resistance_qt_piezocone_only": { + "name": "corrected_cone_resistance_qt_piezocone_only", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "corrected_sleeve_resistance_ft_piezocone_only": { + "name": "corrected_sleeve_resistance_ft_piezocone_only", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "effective_cone_resistance_qe_piezocone_only": { + "name": "effective_cone_resistance_qe_piezocone_only", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "bulk_density_of_material_measured_or_assumed": { + "name": "bulk_density_of_material_measured_or_assumed", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "total_vertical_stress_based_on_scpt_bden": { + "name": "total_vertical_stress_based_on_scpt_bden", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "net_cone_resistance_qn": { + "name": "net_cone_resistance_qn", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "corrected_friction_ratio_rf_piezocone_only": { + "name": "corrected_friction_ratio_rf_piezocone_only", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "excess_pore_pressure_u_uo_piezocone_only": { + "name": "excess_pore_pressure_u_uo_piezocone_only", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "pore_pressure_ratio_bq_piezocone_only": { + "name": "pore_pressure_ratio_bq_piezocone_only", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "normalised_cone_resistance_qt": { + "name": "normalised_cone_resistance_qt", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "normalised_friction_ratio_fr": { + "name": "normalised_friction_ratio_fr", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_layer": { + "name": "depth_to_top_of_layer", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_layer": { + "name": "depth_to_base_of_layer", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "relative_density_dr_coarse_soils_only": { + "name": "relative_density_dr_coarse_soils_only", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "internal_friction_angle_coarse_soils_only": { + "name": "internal_friction_angle_coarse_soils_only", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "soil_behaviour_type_index_ic": { + "name": "soil_behaviour_type_index_ic", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "varchar", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "sleeve_area_ratio_used_to_calculate_ft": { + "name": "sleeve_area_ratio_used_to_calculate_ft", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_detail_description": { + "name": "depth_to_top_of_detail_description", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_detail_description": { + "name": "depth_to_base_of_detail_description", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "specimen_length": { + "name": "specimen_length", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "initial_bulk_density": { + "name": "initial_bulk_density", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "initial_water_moisture_content": { + "name": "initial_water_moisture_content", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "initial_water_content_of_test_specimen": { + "name": "initial_water_content_of_test_specimen", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "specimen_diameter": { + "name": "specimen_diameter", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "specimen_thickness": { + "name": "specimen_thickness", + "type": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "specimen_thickness": { + "name": "specimen_thickness", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "water_content_of_test_specimen": { + "name": "water_content_of_test_specimen", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "mode_of_failure": { + "name": "mode_of_failure", + "type": "varchar", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "specimen_length": { + "name": "specimen_length", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "axial_strain_at_failure": { + "name": "axial_strain_at_failure", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "mode_of_failure": { + "name": "mode_of_failure", + "type": "varchar", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "volumetric_strain_at_end_of_consolidation": { + "name": "volumetric_strain_at_end_of_consolidation", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "rate_of_volumetric_strain_immediately_prior_to_shearing": { + "name": "rate_of_volumetric_strain_immediately_prior_to_shearing", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "final_b_value_prior_to_shearing": { + "name": "final_b_value_prior_to_shearing", + "type": "double precision", + "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": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "secant_modulus_at_50_peak_deviator_stress": { + "name": "secant_modulus_at_50_peak_deviator_stress", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "type": "varchar", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "specimen_length": { + "name": "specimen_length", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "initial_dry_density": { + "name": "initial_dry_density", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "axial_strain_at_failure": { + "name": "axial_strain_at_failure", + "type": "double precision", + "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": "varchar", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "varchar", + "primaryKey": false, + "notNull": false + }, + "sample_condition": { + "name": "sample_condition", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_reported_section": { + "name": "depth_to_top_of_reported_section", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_reported_section": { + "name": "depth_to_base_of_reported_section", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "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": "double precision", + "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": "double precision", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_to_water_strike": { + "name": "depth_to_water_strike", + "type": "double precision", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "casing_depth_at_time_of_water_strike": { + "name": "casing_depth_at_time_of_water_strike", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "depth_to_top_of_weathering_subdivision": { + "name": "depth_to_top_of_weathering_subdivision", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "depth_to_base_of_weathering_subdivision": { + "name": "depth_to_base_of_weathering_subdivision", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "weathering_scheme": { + "name": "weathering_scheme", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "material_or_mass_weathering_system": { + "name": "material_or_mass_weathering_system", + "type": "varchar", + "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": "varchar", + "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": "varchar(21)", + "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": "double precision", + "primaryKey": false, + "notNull": false + }, + "base_of_sampling_run": { + "name": "base_of_sampling_run", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "test_reference": { + "name": "test_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "tool_used": { + "name": "tool_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "test_date": { + "name": "test_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "test_start_depth": { + "name": "test_start_depth", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "test_stop_depth": { + "name": "test_stop_depth", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "depth_of_borehole": { + "name": "depth_of_borehole", + "type": "double precision", + "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": "varchar", + "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": "varchar(21)", + "primaryKey": true, + "notNull": true + }, + "parameter_recorded_by_tool_wgpg_tool": { + "name": "parameter_recorded_by_tool_wgpg_tool", + "type": "varchar", + "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": "double precision", + "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": "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()" + }, + "wireline_geophysics_general_id": { + "name": "wireline_geophysics_general_id", + "type": "varchar", + "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.invitation_status": { + "name": "invitation_status", + "schema": "public", + "values": [ + "PENDING", + "ACCEPTED", + "DECLINED", + "EXPIRED" + ] + }, + "public.project_role": { + "name": "project_role", + "schema": "public", + "values": [ + "OWNER", + "CONTRIBUTOR", + "VIEWER" + ] + }, + "public.scope": { + "name": "scope", + "schema": "public", + "values": [ + "public", + "private" + ] + } + }, + "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 9a9fd00e..d1771f52 100644 --- a/packages/common/drizzle/meta/_journal.json +++ b/packages/common/drizzle/meta/_journal.json @@ -85,6 +85,13 @@ "when": 1755186301694, "tag": "0011_colossal_doorman", "breakpoints": true + }, + { + "idx": 12, + "version": "7", + "when": 1756239983420, + "tag": "0012_great_white_tiger", + "breakpoints": true } ] } \ No newline at end of file From 96dd278ef1e9ff30895a001e32b988bd23e8ca00 Mon Sep 17 00:00:00 2001 From: James Holcombe Date: Wed, 27 Aug 2025 16:45:04 +0100 Subject: [PATCH 14/37] update form --- .../actions/data/queries/addComputedColumn.ts | 30 ++-- .../data/queries/updateComputedColumn.ts | 33 +++-- .../data/query/query-layout-client.tsx | 2 +- .../components/data/query/query-sidebar.tsx | 140 ++++++++++-------- packages/app/src/db/crud/query.ts | 41 +++-- packages/common/src/db/schema/common.ts | 11 +- packages/common/src/db/schema/query.ts | 14 +- 7 files changed, 168 insertions(+), 103 deletions(-) diff --git a/packages/app/src/actions/data/queries/addComputedColumn.ts b/packages/app/src/actions/data/queries/addComputedColumn.ts index 2ab53a67..b0196452 100644 --- a/packages/app/src/actions/data/queries/addComputedColumn.ts +++ b/packages/app/src/actions/data/queries/addComputedColumn.ts @@ -6,19 +6,31 @@ import { revalidateQueryCache } from "@/lib/dal/queries"; import { addComputedColumn } from "@/db/crud/query"; import { ComputedColumn } from "@common/db/schema/query"; +import { + actionError, + actionResult, + runActionServer, +} from "@/lib/actions/utils"; + export async function addComputedColumnAction( projectId: string, queryId: string, - column: ComputedColumn, -): Promise { - const user = await getServerUser(); - const userProject = await getProjectForUser(user, projectId); + column: Omit, +) { + return runActionServer(async () => { + const user = await getServerUser(); + const userProject = await getProjectForUser(user, projectId); + + if (!userProject) { + return actionError("Project not found"); + } - if (!userProject) { - throw new Error("Project not found"); - } + const newComputedColumn = await addComputedColumn(queryId, { + ...column, + }); - await addComputedColumn(queryId, column); + revalidateQueryCache(queryId, projectId); - revalidateQueryCache(queryId, projectId); + return actionResult(newComputedColumn); + }); } diff --git a/packages/app/src/actions/data/queries/updateComputedColumn.ts b/packages/app/src/actions/data/queries/updateComputedColumn.ts index 05fdd403..1a04aeff 100644 --- a/packages/app/src/actions/data/queries/updateComputedColumn.ts +++ b/packages/app/src/actions/data/queries/updateComputedColumn.ts @@ -5,21 +5,34 @@ import { getProjectForUser } from "@/lib/dal/projects"; import { revalidateQueryCache } from "@/lib/dal/queries"; import { updateComputedColumn } from "@/db/crud/query"; import { ComputedColumn } from "@common/db/schema/query"; +import { + runActionServer, + actionError, + actionResult, +} from "@/lib/actions/utils"; export async function updateComputedColumnAction( projectId: string, queryId: string, - columnName: string, - column: ComputedColumn, -): Promise { - const user = await getServerUser(); - const userProject = await getProjectForUser(user, projectId); + columnId: string, + column: Omit, +) { + return runActionServer(async () => { + const user = await getServerUser(); + const userProject = await getProjectForUser(user, projectId); - if (!userProject) { - throw new Error("Project not found"); - } + if (!userProject) { + return actionError("Project not found"); + } - await updateComputedColumn(queryId, columnName, column); + const updatedComputedColumn = await updateComputedColumn( + queryId, + columnId, + column, + ); - revalidateQueryCache(queryId, projectId); + revalidateQueryCache(queryId, projectId); + + return actionResult(updatedComputedColumn); + }); } diff --git a/packages/app/src/components/data/query/query-layout-client.tsx b/packages/app/src/components/data/query/query-layout-client.tsx index 3693f8bf..ad0e2d97 100644 --- a/packages/app/src/components/data/query/query-layout-client.tsx +++ b/packages/app/src/components/data/query/query-layout-client.tsx @@ -59,7 +59,7 @@ function QueryLayoutClient({ minSize={50} maxSize={95} > -
+
{/* Header with name input, breadcrumbs, and toggle button */}
diff --git a/packages/app/src/components/data/query/query-sidebar.tsx b/packages/app/src/components/data/query/query-sidebar.tsx index 92a0a747..3dd02875 100644 --- a/packages/app/src/components/data/query/query-sidebar.tsx +++ b/packages/app/src/components/data/query/query-sidebar.tsx @@ -40,6 +40,17 @@ const computedColumnSchema = z.object({ type ComputedColumnFormData = z.infer; +const defaultFunctionBody = ` +// Enter function body for computed column +// Examples: +// Simple: category + '_' + status +// With logic: +// if(priority > 3) { +// return 'High' +// } +// return 'Low' +`; + type QuerySidebarProps = { query: Query; projectId: string; @@ -166,7 +177,7 @@ export function QuerySidebar({ onClose, queryData: _queryData, }: QuerySidebarProps) { - const [selectedColumn, setSelectedColumn] = useState(null); + const [selectedColumnId, setSelectedColumnId] = useState(null); const [isSubmitting, setIsSubmitting] = useState(false); const [isCreating, setIsCreating] = useState(false); @@ -174,8 +185,7 @@ export function QuerySidebar({ resolver: zodResolver(computedColumnSchema), defaultValues: { name: "", - functionBody: - "// Enter function body for computed column\n// Examples:\n// Simple: category + '_' + status\n// With logic:\n// if(priority > 3) {\n// return 'High'\n// }\n// return 'Low'", + functionBody: defaultFunctionBody, }, }); @@ -184,14 +194,14 @@ export function QuerySidebar({ // Set default column on component load useEffect(() => { - if (hasComputedColumns && !selectedColumn) { + if (hasComputedColumns && !selectedColumnId) { const firstColumn = query.computedColumns[0]; handleEditColumn(firstColumn); } - }, [hasComputedColumns, selectedColumn]); + }, [hasComputedColumns, selectedColumnId]); const handleEditColumn = (column: ComputedColumn) => { - setSelectedColumn(column.name); + setSelectedColumnId(column.id); form.reset({ name: column.name, functionBody: column.functionBody, @@ -199,47 +209,45 @@ export function QuerySidebar({ }; const handleNewColumn = async () => { - const defaultBody = - "// Enter function body for computed column\n// Examples:\n// Simple: category + '_' + status\n// With logic:\n// if(priority > 3) {\n// return 'High'\n// }\n// return 'Low'"; - setIsCreating(true); - try { - // Create new column in database - await addComputedColumnAction(projectId, query.id, { - name: "Untitled", - functionBody: defaultBody, - }); - // Select the newly created column - const newColumn = { - name: "Untitled", - functionBody: defaultBody, - }; + // Create new column in database + const result = await addComputedColumnAction(projectId, query.id, { + name: "Untitled", + functionBody: defaultFunctionBody, + }); + + if (!result.success) { + console.error("Failed to create new column:", result.error); + return; + } else { + const newColumn = result.data; handleEditColumn(newColumn); - } catch (error) { - console.error("Failed to create new column:", error); - } finally { - setIsCreating(false); } + + setIsCreating(false); }; const handleCancelEdit = () => { - setSelectedColumn(null); + setSelectedColumnId(null); form.reset(); }; - const handleDeleteColumn = async (columnName: string) => { + const handleDeleteColumn = async (columnId: string) => { + const column = query.computedColumns.find((col) => col.id === columnId); + if (!column) return; + if ( confirm( - `Are you sure you want to delete the computed column "${columnName}"?`, + `Are you sure you want to delete the computed column "${column.name}"?`, ) ) { try { - await deleteComputedColumnAction(projectId, query.id, columnName); - console.log("Deleted computed column:", columnName); + await deleteComputedColumnAction(projectId, query.id, columnId); + console.log("Deleted computed column:", column.name); // Clear form after successful deletion - setSelectedColumn(null); + setSelectedColumnId(null); form.reset(); } catch (error) { console.error("Failed to delete computed column:", error); @@ -249,36 +257,39 @@ export function QuerySidebar({ const onSubmit = async (data: ComputedColumnFormData) => { setIsSubmitting(true); - try { - if (selectedColumn) { - await updateComputedColumnAction(projectId, query.id, selectedColumn, { + + if (selectedColumnId) { + const result = await updateComputedColumnAction( + projectId, + query.id, + selectedColumnId, + { name: data.name.trim(), functionBody: data.functionBody.trim(), - }); - // After updating, select the updated column - const updatedColumn = query.computedColumns.find( - (col) => col.name === selectedColumn, - ); - if (updatedColumn) { - handleEditColumn(updatedColumn); - } + }, + ); + + if (!result.success) { + console.error("Failed to update computed column:", result.error); + return; } else { - await addComputedColumnAction(projectId, query.id, { - name: data.name.trim(), - functionBody: data.functionBody.trim(), - }); - // After adding, select the newly created column - const newColumn = { - name: data.name.trim(), - functionBody: data.functionBody.trim(), - }; - handleEditColumn(newColumn); + handleEditColumn(result.data); + } + } else { + const result = await addComputedColumnAction(projectId, query.id, { + name: data.name.trim(), + functionBody: data.functionBody.trim(), + }); + + if (!result.success) { + console.error("Failed to add computed column:", result.error); + return; + } else { + handleEditColumn(result.data); } - } catch (error) { - console.error("Failed to save computed column:", error); - } finally { - setIsSubmitting(false); } + + setIsSubmitting(false); }; return ( @@ -309,18 +320,18 @@ export function QuerySidebar({
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 bad195fa..91cd436f 100644 --- a/packages/app/src/components/data/plot/form/axis-form.tsx +++ b/packages/app/src/components/data/plot/form/axis-form.tsx @@ -18,6 +18,7 @@ type AxisFormProps = { label: string; availableColumns: Array<{ id: string; name: string; table: string }>; type: "x" | "y"; + axisType: "number" | "category"; }; export function AxisForm({ @@ -25,6 +26,7 @@ export function AxisForm({ label, availableColumns, type, + axisType, }: AxisFormProps) { const { register, setValue, watch } = useFormContext(); const currentValue = watch(`${name}`); @@ -50,8 +52,11 @@ export function AxisForm({ - {availableColumns.map((col) => ( - + {availableColumns.map((col, index) => ( + {col.table} - {col.name} ))} @@ -69,150 +74,138 @@ export function AxisForm({ />
-
- - Axis type - - -
- -
- - Reverse axis - -
- - setValue(`${name}.reversed`, checked) - } - /> - - Display values in reverse order - -
-
-
- - Axis scale - -
- -
-
- -
-
- - {type === "x" ? "Domain" : "Range"} + {axisType === "number" && ( +
+ + Reverse axis -
+
{ - setValue( - `${name}.domainTickOptions`, - checked - ? { min: 0, max: undefined, interval: undefined } - : null, - ); - }} + checked={currentValue?.reversed} + onCheckedChange={(checked) => + setValue(`${name}.reversed`, checked) + } /> - Use custom values + Display values in reverse order
+ )} + {axisType === "number" && ( +
+ + Axis scale + +
+ +
+
+ )} - {hasCustomDomain && ( -
-
- - Minimum - - { - if (value === "" || !isDefined(value)) return null; - return Number(value); - }, - })} - /> -
-
- - Maximum - - { - if (value === "" || !isDefined(value)) return null; - return Number(value); - }, - })} - /> -
-
- - Tick interval - - { - if ( - value === "" || - !isDefined(value) || - Number(value) <= 0 - ) - return null; - return Number(value); - }, - })} + {axisType === "number" && ( +
+
+ + {type === "x" ? "Domain" : "Range"} + +
+ { + setValue( + `${name}.domainTickOptions`, + checked + ? { min: 0, max: undefined, interval: undefined } + : null, + ); + }} /> + + Use custom values +
- )} -
+ + {hasCustomDomain && ( +
+
+ + Minimum + + { + if (value === "" || !isDefined(value)) return null; + return Number(value); + }, + })} + /> +
+
+ + Maximum + + { + if (value === "" || !isDefined(value)) return null; + return Number(value); + }, + })} + /> +
+
+ + Tick interval + + { + if ( + value === "" || + !isDefined(value) || + Number(value) <= 0 + ) + return null; + return Number(value); + }, + })} + /> +
+
+ )} +
+ )}
); diff --git a/packages/app/src/components/data/plot/plot-view.tsx b/packages/app/src/components/data/plot/plot-view.tsx index 7428e9f2..e664f78f 100644 --- a/packages/app/src/components/data/plot/plot-view.tsx +++ b/packages/app/src/components/data/plot/plot-view.tsx @@ -11,6 +11,7 @@ import { HistogramPlot } from "./plots/visx-histogram-plot"; import { BarPlot } from "./plots/visx-bar-plot"; import { cn } from "@/lib/utils"; import { CommonPlotProps } from "./plots/common"; +import { BoxPlot } from "@/components/data/plot/plots/visx-box-plot"; export function PlotView({ plot, @@ -88,6 +89,20 @@ export function PlotView({ width={width} /> ); + + case "box": + return ( + ; + } + } + data={data} + height={height} + width={width} + /> + ); default: return null; } diff --git a/packages/app/src/components/data/plot/plots/common.tsx b/packages/app/src/components/data/plot/plots/common.tsx index 44863d3f..645a9f47 100644 --- a/packages/app/src/components/data/plot/plots/common.tsx +++ b/packages/app/src/components/data/plot/plots/common.tsx @@ -74,158 +74,6 @@ function generateTicksWithInterval( return ticks; } -export function getPlotOptions( - plot: DbPlot & { definition: PlotDefinition }, -): PlotOptions { - const definition = plot.definition as Extract< - PlotDefinition, - { type: "scatter" | "line" | "histogram" | "bar" } - >; - const xAxis = definition.xAxis; - const yAxis = definition.type === "histogram" ? undefined : definition.yAxis; - const colorGrouping = definition.grouping?.color; - - const MARGIN = 50; - - const options: PlotOptions = { - className: "text-sm", - - 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) - ? [xAxis.domainTickOptions.min, xAxis.domainTickOptions.max] - : undefined, - reverse: xAxis.reversed, - grid: true, - nice: !isDefined(xAxis.domainTickOptions), - ticks: xAxis.domainTickOptions?.interval - ? generateTicksWithInterval( - [xAxis.domainTickOptions.min, xAxis.domainTickOptions.max], - xAxis.domainTickOptions.interval, - ) - : undefined, - }, - color: colorGrouping - ? { - scheme: - colorGrouping.schemeType === "categorical" - ? "observable10" - : "viridis", - type: - colorGrouping.schemeType === "continuous" ? "linear" : "ordinal", - } - : undefined, - }; - - if (yAxis) { - options.y = { - label: yAxis.label ?? yAxis.column, - labelArrow: false, - type: "linear", - labelAnchor: "center", - domain: yAxis.domainTickOptions - ? [yAxis.domainTickOptions.min, yAxis.domainTickOptions.max] - : undefined, - reverse: yAxis.reversed, - grid: true, - nice: !isDefined(yAxis.domainTickOptions), - ticks: yAxis.domainTickOptions?.interval - ? generateTicksWithInterval( - [yAxis.domainTickOptions.min, yAxis.domainTickOptions.max], - yAxis.domainTickOptions.interval, - ) - : undefined, - }; - } - - return options; -} - -export function getTextLabelMarks( - plot: DbPlot & { definition: PlotDefinition }, -) { - if (plot.definition.type !== "scatter") return []; - if (!plot.definition.textLabels?.length) return []; - - return plot.definition.textLabels.map((label) => - Plot.text([label], { - x: (d) => d.x, - y: (d) => d.y, - text: (d) => d.text, - fill: (d) => d.color ?? "#000000", - fontSize: (d) => d.fontSize ?? 12, - rotate: (d) => d.rotation ?? 0, - dx: 5, // Small offset to prevent text from overlapping with points - dy: -5, - }), - ); -} - -export function getCommonMarks( - plot: DbPlot & { definition: PlotDefinition }, - additionalMarks: Plot.Markish[] = [], -) { - const definition = plot.definition as Extract< - PlotDefinition, - { type: "scatter" | "line" | "histogram" | "bar" } - >; - const xAxis = definition.xAxis; - const yAxis = definition.type === "histogram" ? undefined : definition.yAxis; - - const marks: Plot.Markish[] = [ - Plot.frame(), - Plot.gridX(), - Plot.gridY(), - ...additionalMarks, - ]; - - // Add rules based on plot type - if (definition.type === "histogram") { - // For histogram, only add ruleY with x-axis domain - marks.push( - Plot.ruleY( - xAxis.domainTickOptions - ? [xAxis.domainTickOptions.min, xAxis.domainTickOptions.max] - : [0], - ), - ); - } else { - // For other plots, add both rules with their respective domains - marks.push( - Plot.ruleX( - xAxis.domainTickOptions - ? [xAxis.domainTickOptions.min, xAxis.domainTickOptions.max] - : [0], - ), - Plot.ruleY( - yAxis?.domainTickOptions - ? [yAxis.domainTickOptions.min, yAxis.domainTickOptions.max] - : [0], - ), - ); - } - - return marks; -} - -export interface CommonLegendProps { - colorDomain?: (string | undefined)[] | undefined; - colorLabel?: string; - symbolDomain?: (string | undefined)[] | undefined; - symbolLabel?: string; - colorSchemeType?: "categorical" | "continuous"; -} - export const PLOT_CONTAINER_CLASSES = "flex w-full flex-col items-center gap-4"; export const PLOT_CLASSES = "mx-auto flex-grow text-sm"; @@ -265,12 +113,20 @@ export function transformData( return data .map((row): DataPoint | null => { - const x = - xAxisType === "number" ? Number(row[xColumn]) : String(row[xColumn]); + // Handle abbreviation objects for x-axis + let xValue: string | number; + if (typeof row[xColumn] === "object") { + const xObject = row[xColumn] as { code: string; description?: string }; + xValue = xAxisType === "number" ? Number(xObject.code) : xObject.code; + } else { + xValue = + xAxisType === "number" ? Number(row[xColumn]) : String(row[xColumn]); + } + const y = yColumn ? Number(row[yColumn]) : undefined; // Skip invalid points - if (xAxisType === "number" && isNaN(x as number)) return null; + if (xAxisType === "number" && isNaN(xValue as number)) return null; if (yColumn && isNaN(y as number)) return null; // Handle abbreviation objects for color @@ -312,7 +168,7 @@ export function transformData( } return { - x, + x: xValue, y, color: colorValue, symbol: symbolValue, diff --git a/packages/app/src/components/data/plot/plots/tooltip/plot-tooltip.tsx b/packages/app/src/components/data/plot/plots/tooltip/plot-tooltip.tsx new file mode 100644 index 00000000..fcc7aff4 --- /dev/null +++ b/packages/app/src/components/data/plot/plots/tooltip/plot-tooltip.tsx @@ -0,0 +1,84 @@ +import { Plot, PlotDefinition } from "@common/db/schema/plot"; + +export interface TooltipRowProps { + label: string; + value: string | number; +} + +export interface TooltipProps { + rows: TooltipRowProps[]; +} + +export function PlotTooltip({ rows }: TooltipProps) { + return ( + <> + {rows.map((row, i) => ( +
+ {row.label}: {row.value} +
+ ))} + + ); +} + +export type TooltipData = { + x?: string | number; + y?: string | number; + color?: string; + [key: string]: string | number | undefined; +}; + +export function createTooltipContent( + data: TooltipData, + plot: Plot & { + definition: Extract< + PlotDefinition, + { type: "scatter" | "line" | "bar" | "histogram" | "box" } + >; + }, +): TooltipProps { + const rows: TooltipRowProps[] = []; + + // Add x value if present + if (data.x !== undefined && "xAxis" in plot.definition) { + rows.push({ + label: plot.definition.xAxis.label || plot.definition.xAxis.column, + value: data.x, + }); + } + + // Add y value if present + if (data.y !== undefined && "yAxis" in plot.definition) { + rows.push({ + label: plot.definition.yAxis.label || plot.definition.yAxis.column, + value: data.y, + }); + } + + // Add color/group value if present + if ( + data.color !== undefined && + "grouping" in plot.definition && + plot.definition.grouping?.color + ) { + rows.push({ + label: + plot.definition.grouping.color.label || + plot.definition.grouping.color.column || + "Group", + value: data.color, + }); + } + + // Add any additional data + Object.entries(data).forEach(([key, value]) => { + if (!["x", "y", "color"].includes(key) && value !== undefined) { + rows.push({ + label: key, + value, + }); + } + }); + + return { rows }; +} diff --git a/packages/app/src/components/data/plot/plots/tooltip/tooltip-helpers.tsx b/packages/app/src/components/data/plot/plots/tooltip/tooltip-helpers.tsx new file mode 100644 index 00000000..5c393bf0 --- /dev/null +++ b/packages/app/src/components/data/plot/plots/tooltip/tooltip-helpers.tsx @@ -0,0 +1,36 @@ +import { Plot, PlotDefinition } from "@common/db/schema/plot"; +import { DataPoint } from "../common"; +import { MARGIN } from "../visx-common"; +import { TooltipData, createTooltipContent, PlotTooltip } from "./plot-tooltip"; + +type PlotWithDefinition = Plot & { + definition: Extract< + PlotDefinition, + { type: "scatter" | "line" | "bar" | "histogram" | "box" } + >; +}; + +interface Coordinates { + x: number; + y: number; +} + +export function getTooltipCoordinates(coords: Coordinates) { + return { + tooltipLeft: coords.x + MARGIN.left, + tooltipTop: coords.y + MARGIN.top, + }; +} + +export function createTooltipProps( + data: TooltipData, + plot: PlotWithDefinition, + coords: Coordinates, +) { + return { + ...getTooltipCoordinates(coords), + tooltipData: { + content: , + }, + }; +} diff --git a/packages/app/src/components/data/plot/plots/visx-base-plot.tsx b/packages/app/src/components/data/plot/plots/visx-base-plot.tsx index 5b382527..c0bcb444 100644 --- a/packages/app/src/components/data/plot/plots/visx-base-plot.tsx +++ b/packages/app/src/components/data/plot/plots/visx-base-plot.tsx @@ -3,11 +3,12 @@ import { Grid } from "@visx/grid"; import { Axis } from "@visx/axis"; import { MARGIN } from "./visx-common"; import { AxisScale } from "@visx/axis/lib/types"; +import { ScaleBand } from "d3-scale"; export interface BaseCartesianPlotProps { width: number; height: number; - xScale: AxisScale; + xScale: AxisScale | ScaleBand; yScale: AxisScale; xLabel?: string; yLabel?: string; @@ -23,13 +24,17 @@ export function BaseCartesianPlot({ yLabel, children, }: BaseCartesianPlotProps) { + // Calculate the actual plot dimensions (excluding margins) + const plotWidth = width - MARGIN.left - MARGIN.right; + const plotHeight = height - MARGIN.top - MARGIN.bottom; + return ( }; +} + +interface BoxPlotStats { + min: number; + q1: number; + median: number; + q3: number; + max: number; + outliers: number[]; + color?: string; +} + +function calculateBoxPlotStats(data: number[]): BoxPlotStats { + const sortedData = [...data].sort((a, b) => a - b); + + // Handle empty data + if (sortedData.length === 0) { + return { + min: 0, + q1: 0, + median: 0, + q3: 0, + max: 0, + outliers: [], + }; + } + + const q1 = quantile(sortedData, 0.25) ?? 0; + const median = quantile(sortedData, 0.5) ?? 0; + const q3 = quantile(sortedData, 0.75) ?? 0; + const iqr = q3 - q1; + const lowerFence = q1 - 1.5 * iqr; + const upperFence = q3 + 1.5 * iqr; + + const outliers = sortedData.filter((d) => d < lowerFence || d > upperFence); + const nonOutliers = sortedData.filter( + (d) => d >= lowerFence && d <= upperFence, + ); + + // Handle case where all points are outliers + if (nonOutliers.length === 0) { + return { + min: Math.min(...sortedData), + q1: q1, + median: median, + q3: q3, + max: Math.max(...sortedData), + outliers: [], + }; + } + + return { + min: nonOutliers[0], + q1, + median, + q3, + max: nonOutliers[nonOutliers.length - 1], + outliers, + }; +} + +function BaseBoxPlot({ + width, + height, + data, + plot, + showTooltip, + hideTooltip, +}: { + width: number; + height: number; + data: DataPoint[]; + plot: Props["plot"]; + showTooltip: (args: { + tooltipLeft: number; + tooltipTop: number; + tooltipData: any; + }) => void; + hideTooltip: () => void; +}) { + const { xAxis, yAxis, grouping } = plot.definition; + const colorScale = getColorScale(data); + + // Debug data + console.log("Box plot data:", { + data, + xAxis, + yAxis, + grouping, + }); + + // Group data by x-axis values + const groupedData = new Map(); + data.forEach((point) => { + const x = point.x; + const y = Number(point.y); + if (x !== undefined && !isNaN(y)) { + const group = groupedData.get(x) || []; + group.push(y); + groupedData.set(x, group); + } + }); + + // Debug grouped data + console.log("Grouped data:", Array.from(groupedData.entries())); + + // Calculate box plot statistics for each group + const boxPlots = new Map(); + groupedData.forEach((values, x) => { + boxPlots.set(x, calculateBoxPlotStats(values)); + }); + + // Debug box plot stats + console.log("Box plot stats:", Array.from(boxPlots.entries())); + + // Calculate the actual plot dimensions (excluding margins) + const plotWidth = width - MARGIN.left - MARGIN.right; + const plotHeight = height - MARGIN.top - MARGIN.bottom; + + // Create scales + const xDomain = Array.from(boxPlots.keys()); + const xScale = scaleBand({ + range: [0, plotWidth], + domain: xDomain, + padding: 0.4, + }); + + // Calculate y domain from all values including outliers + const allValues: number[] = []; + boxPlots.forEach((stats) => { + allValues.push(stats.min, stats.max, ...stats.outliers); + }); + const yDomain = extent(allValues) as [number, number]; + const yRange = yDomain[1] - yDomain[0]; + const yPadding = yRange * 0.05; + const paddedYDomain: [number, number] = [ + yDomain[0] - yPadding, + yDomain[1] + yPadding, + ]; + + const yScale = scaleLinear({ + domain: paddedYDomain, + range: [plotHeight, 0], + }); + + // Debug scales + console.log("Scales:", { + xDomain, + yDomain, + paddedYDomain, + xRange: xScale.range(), + yRange: yScale.range(), + plotWidth, + plotHeight, + }); + + // Box plot dimensions + const boxWidth = Math.min(40, xScale.bandwidth()); + + return ( + <> + + {Array.from(boxPlots.entries()).map(([x, stats]) => { + const xPos = xScale(x) ?? 0; + const boxCenter = xPos + xScale.bandwidth() / 2; + const color = colorScale(String(x)); + + // Debug each box plot + console.log("Rendering box plot:", { + x, + xPos, + boxCenter, + stats, + color, + }); + + return ( + + {/* Box */} + { + const coords = localPoint( + event.target as SVGRectElement, + event, + ); + if (coords) { + const tooltipData = getBoxPlotTooltipData({ + category: String(x), + median: stats.median, + q1: stats.q1, + q3: stats.q3, + min: stats.min, + max: stats.max, + }); + showTooltip(createTooltipProps(tooltipData, plot, coords)); + } + }} + onMouseLeave={hideTooltip} + style={{ cursor: "pointer" }} + /> + + {/* Median line */} + + + {/* Whiskers */} + + + + + + + {/* Outliers */} + {stats.outliers.map((outlier, i) => ( + { + const coords = localPoint( + event.target as SVGCircleElement, + event, + ); + if (coords) { + const tooltipData = getBoxPlotTooltipData({ + category: String(x), + y: outlier, + }); + showTooltip( + createTooltipProps(tooltipData, plot, coords), + ); + } + }} + onMouseLeave={hideTooltip} + style={{ cursor: "pointer" }} + /> + ))} + + ); + })} + + + ); +} + +export function BoxPlot(props: Props) { + return ( + ( + + )} + /> + ); +} diff --git a/packages/app/src/components/data/plot/plots/visx-common.tsx b/packages/app/src/components/data/plot/plots/visx-common.tsx index 5275810d..0c1e7374 100644 --- a/packages/app/src/components/data/plot/plots/visx-common.tsx +++ b/packages/app/src/components/data/plot/plots/visx-common.tsx @@ -1,6 +1,10 @@ import { scaleLinear, scaleOrdinal } from "@visx/scale"; import { extent } from "@visx/vendor/d3-array"; -import { PlotDefinition } from "@common/db/schema/plot"; +import { + ColorGroupingValue, + GroupingValue, + PlotDefinition, +} from "@common/db/schema/plot"; import { DataPoint, PLOT_CONTAINER_CLASSES, @@ -26,7 +30,7 @@ export interface TooltipData { } export function getScaleConfig( - definition: Extract, + definition: Extract, data: DataPoint[], width: number, height: number, @@ -72,12 +76,7 @@ export function getScaleConfig( return { xScale, yScale }; } -export function getColorScale( - data: DataPoint[], - grouping?: PlotDefinition["grouping"], -) { - if (!grouping?.color) return () => OBSERVABLE_COLORS[0]; - +export function getColorScale(data: DataPoint[]) { const uniqueColors = Array.from( new Set(data.map((d) => d.originalColor).filter(Boolean)), ); @@ -88,82 +87,6 @@ export function getColorScale( }); } -export function useTooltip() { - const [tooltipData, setTooltipData] = useState(null); - - const showTooltip = useCallback( - ( - event: React.MouseEvent, - content: React.ReactNode, - svgRef: SVGSVGElement | null, - ) => { - console.log("showTooltip called", { - event: { - type: event.type, - clientX: event.clientX, - clientY: event.clientY, - }, - svgRef: svgRef ? "present" : "null", - }); - - if (!svgRef) { - console.warn("No SVG ref provided to showTooltip"); - return; - } - - const point = localPoint(svgRef, event); - console.log("localPoint result:", point); - - if (!point) { - console.warn("Could not get local point from event"); - return; - } - - const svgBounds = svgRef.getBoundingClientRect(); - console.log("SVG bounds:", svgBounds); - - // Calculate tooltip position - const tooltipWidth = 200; - const tooltipHeight = 100; - const x = point.x; - const y = point.y; - - const adjustedX = Math.min( - Math.max(x, tooltipWidth / 2), - svgBounds.width - tooltipWidth / 2, - ); - const adjustedY = Math.min( - Math.max(y - tooltipHeight - 10, 0), - svgBounds.height - tooltipHeight, - ); - - console.log("Setting tooltip data:", { - x: adjustedX, - y: adjustedY, - content: content ? "present" : "null", - }); - - setTooltipData({ - x: adjustedX, - y: adjustedY, - content, - }); - }, - [], - ); - - const hideTooltip = useCallback(() => { - console.log("hideTooltip called"); - setTooltipData(null); - }, []); - - return { - tooltipData, - showTooltip, - hideTooltip, - }; -} - export function PlotContainer({ children, width, diff --git a/packages/app/src/components/data/plot/plots/visx-histogram-plot.tsx b/packages/app/src/components/data/plot/plots/visx-histogram-plot.tsx index 70f75adf..7476069a 100644 --- a/packages/app/src/components/data/plot/plots/visx-histogram-plot.tsx +++ b/packages/app/src/components/data/plot/plots/visx-histogram-plot.tsx @@ -1,15 +1,46 @@ import { Bar } from "@visx/shape"; -import { useTooltip, useTooltipInPortal } from "@visx/tooltip"; import { Plot, PlotDefinition } from "@common/db/schema/plot"; import { DataPoint } from "./common"; -import { getColorScale } from "./visx-common"; +import { getColorScale, MARGIN } from "./visx-common"; import { CommonPlotProps } from "./common"; import { BaseCartesianPlot } from "./visx-base-plot"; import { PlotWrapper } from "./visx-plot-wrapper"; import { bin, extent } from "d3-array"; import { scaleLinear } from "@visx/scale"; -import { useRef } from "react"; import { localPoint } from "@visx/event"; +import { createTooltipProps } from "./tooltip/tooltip-helpers"; +import { TooltipData } from "./tooltip/plot-tooltip"; + +export interface HistogramTooltipData extends TooltipData { + binStart: number; + binEnd: number; + count: number; + groupCount?: number; + groupColor?: string; +} + +export function getHistogramTooltipData(data: { + binStart: number; + binEnd: number; + count: number; + groupCount?: number; + groupColor?: string; +}): TooltipData { + const tooltipData: TooltipData = { + "Bin Range": `${data.binStart.toFixed(2)} - ${data.binEnd.toFixed(2)}`, + Count: data.count, + }; + + if (data.groupCount !== undefined) { + tooltipData["Group Count"] = data.groupCount; + } + + if (data.groupColor !== undefined) { + tooltipData.color = data.groupColor; + } + + return tooltipData; +} interface Props extends CommonPlotProps { plot: Plot & { definition: Extract }; @@ -33,33 +64,22 @@ function BaseHistogramPlot({ height, data, plot, + showTooltip, + hideTooltip, }: { width: number; height: number; data: DataPoint[]; plot: Props["plot"]; + showTooltip: (args: { + tooltipLeft: number; + tooltipTop: number; + tooltipData: any; + }) => void; + hideTooltip: () => void; }) { - const { - showTooltip, - hideTooltip, - tooltipOpen, - tooltipData, - tooltipLeft = 0, - tooltipTop = 0, - } = useTooltip<{ - range: [number, number]; - count: number; - total: number; - color: string; - }>(); - - const { containerRef, TooltipInPortal } = useTooltipInPortal({ - scroll: true, - detectBounds: true, - }); - const { xAxis, grouping } = plot.definition; - const colorScale = getColorScale(data, grouping); + const colorScale = getColorScale(data); // Create base scales const xValues = data.map((d) => Number(d.x)).filter((x) => !isNaN(x)); @@ -127,9 +147,9 @@ function BaseHistogramPlot({ }; }); - // Calculate plot dimensions - const plotWidth = width; - const plotHeight = height; + // Calculate plot dimensions accounting for margins + const plotWidth = width - MARGIN.left - MARGIN.right; + const plotHeight = height - MARGIN.top - MARGIN.bottom; // Create scales for the plot area const xScale = scaleLinear({ @@ -145,82 +165,55 @@ function BaseHistogramPlot({ }); return ( -
- - - {stackedBins.map((bin, i) => { - const barWidth = Math.max(0, xScale(bin.x1) - xScale(bin.x0) - 1); - let yOffset = 0; - - return bin.groups.map((group) => { - const barHeight = yScale(0) - yScale(group.count); - const bar = ( - { - const coords = localPoint( - event.target as SVGRectElement, - event, - ); - if (coords) { - showTooltip({ - tooltipLeft: coords.x, - tooltipTop: coords.y, - tooltipData: { - range: [bin.x0, bin.x1], - count: group.count, - total: bin.total, - color: group.color, - }, - }); - } - }} - onMouseLeave={hideTooltip} - style={{ cursor: "pointer" }} - /> - ); - yOffset += group.count; - return bar; - }); - })} - - - - {tooltipOpen && tooltipData && ( - -
- Range: {tooltipData.range[0].toFixed(2)} -{" "} - {tooltipData.range[1].toFixed(2)} -
-
Count: {tooltipData.count}
- {tooltipData.total > tooltipData.count && ( -
Total in bin: {tooltipData.total}
- )} - {grouping?.color && ( -
- {String(grouping.color.label || "Group")}: {tooltipData.color} -
- )} -
- )} -
+ + + {stackedBins.map((bin, i) => { + const barWidth = Math.max(0, xScale(bin.x1) - xScale(bin.x0) - 1); + let yOffset = 0; + + return bin.groups.map((group) => { + const barHeight = yScale(0) - yScale(group.count); + const bar = ( + { + const coords = localPoint( + event.target as SVGRectElement, + event, + ); + if (coords) { + const tooltipData = getHistogramTooltipData({ + binStart: bin.x0, + binEnd: bin.x1, + count: bin.total, + groupCount: group.count, + groupColor: group.color, + }); + showTooltip(createTooltipProps(tooltipData, plot, coords)); + } + }} + onMouseLeave={hideTooltip} + style={{ cursor: "pointer" }} + /> + ); + yOffset += group.count; + return bar; + }); + })} + + ); } @@ -228,12 +221,20 @@ export function HistogramPlot(props: Props) { return ( ( + renderContent={({ + processedData, + width, + height, + showTooltip, + hideTooltip, + }) => ( )} /> diff --git a/packages/app/src/components/data/plot/plots/visx-line-plot.tsx b/packages/app/src/components/data/plot/plots/visx-line-plot.tsx index 4221f96e..4b8fdb21 100644 --- a/packages/app/src/components/data/plot/plots/visx-line-plot.tsx +++ b/packages/app/src/components/data/plot/plots/visx-line-plot.tsx @@ -1,12 +1,14 @@ import { LinePath } from "@visx/shape"; -import { Tooltip } from "@visx/tooltip"; import { Plot, PlotDefinition } from "@common/db/schema/plot"; import { DataPoint } from "./common"; -import { getScaleConfig, getColorScale, useTooltip } from "./visx-common"; +import { getScaleConfig, getColorScale } from "./visx-common"; import { CommonPlotProps } from "./common"; import { BaseCartesianPlot } from "./visx-base-plot"; import { PlotWrapper } from "./visx-plot-wrapper"; import { curveNatural } from "@visx/curve"; +import { localPoint } from "@visx/event"; +import { createTooltipProps } from "./tooltip/tooltip-helpers"; +import { TooltipData } from "./tooltip/plot-tooltip"; interface Props extends CommonPlotProps { plot: Plot & { definition: Extract }; @@ -17,18 +19,33 @@ interface LineGroup { points: DataPoint[]; } +export function getLineTooltipData(point: DataPoint): TooltipData { + return { + x: point.x, + y: point.y, + color: point.originalColor as string | undefined, + }; +} + function BaseLinePlot({ width, height, data, plot, + showTooltip, + hideTooltip, }: { width: number; height: number; data: DataPoint[]; plot: Props["plot"]; + showTooltip: (args: { + tooltipLeft: number; + tooltipTop: number; + tooltipData: any; + }) => void; + hideTooltip: () => void; }) { - const { tooltipData, showTooltip, hideTooltip } = useTooltip(); const { xAxis, yAxis, grouping } = plot.definition; const { xScale, yScale } = getScaleConfig( plot.definition, @@ -36,7 +53,7 @@ function BaseLinePlot({ width, height, ); - const colorScale = getColorScale(data, grouping); + const colorScale = getColorScale(data); // Group data by color if color grouping is enabled const dataByColor: LineGroup[] = grouping?.color?.column @@ -73,15 +90,15 @@ function BaseLinePlot({ plot.definition.curve === "natural" ? curveNatural : undefined } onMouseMove={(event) => { - showTooltip( - event, - ( -
-
Group: {color}
-
Points: {points.length}
-
- ) as React.ReactNode, - ); + const coords = localPoint(event.target as SVGPathElement, event); + if (coords) { + const tooltipData = getLineTooltipData({ + x: xScale.invert(coords.x), + y: yScale.invert(coords.y), + originalColor: color, + }); + showTooltip(createTooltipProps(tooltipData, plot, coords)); + } }} onMouseLeave={hideTooltip} /> @@ -96,15 +113,21 @@ function BaseLinePlot({ cy={yScale(Number(point.y))} r={3} fill={colorScale(String(point.originalColor || "black"))} + onMouseOver={(event) => { + const coords = localPoint( + event.target as SVGCircleElement, + event, + ); + if (coords) { + const tooltipData = getLineTooltipData(point); + showTooltip(createTooltipProps(tooltipData, plot, coords)); + } + }} + onMouseLeave={hideTooltip} + style={{ cursor: "pointer" }} /> ))} - - {tooltipData && ( - - {tooltipData.content} - - )} ); } @@ -113,12 +136,20 @@ export function LinePlot(props: Props) { return ( ( + renderContent={({ + processedData, + width, + height, + showTooltip, + hideTooltip, + }) => ( )} /> diff --git a/packages/app/src/components/data/plot/plots/visx-plot-wrapper.tsx b/packages/app/src/components/data/plot/plots/visx-plot-wrapper.tsx index e6ba4fa8..62933dd9 100644 --- a/packages/app/src/components/data/plot/plots/visx-plot-wrapper.tsx +++ b/packages/app/src/components/data/plot/plots/visx-plot-wrapper.tsx @@ -2,6 +2,7 @@ import { Group } from "@visx/group"; import { ParentSize } from "@visx/responsive"; import { Plot, PlotDefinition } from "@common/db/schema/plot"; import { toCamelCase } from "drizzle-orm/casing"; +import { useTooltip } from "@visx/tooltip"; import { CommonPlotProps, transformData, @@ -18,13 +19,19 @@ export interface PlotWrapperProps extends CommonPlotProps { plot: Plot & { definition: Extract< PlotDefinition, - { type: "scatter" | "line" | "bar" | "histogram" } + { type: "scatter" | "line" | "bar" | "histogram" | "box" } >; }; renderContent: (_props: { processedData: DataPoint[]; width: number; height: number; + showTooltip: (args: { + tooltipLeft: number; + tooltipTop: number; + tooltipData: any; + }) => void; + hideTooltip: () => void; }) => React.ReactNode; } @@ -58,12 +65,47 @@ export function PlotWrapper({ throw new Error("yAxis column is not defined"); } + // Debug raw data structure + console.log("Raw data:", { + length: rawData.length, + firstItem: rawData[0], + columns: Object.keys(rawData[0] || {}), + xColumn, + yColumn, + xColumnCamel, + yColumnCamel, + }); + + // Determine x-axis type based on plot type + let xAxisType: "number" | "category"; + if (plot.definition.type === "histogram") { + xAxisType = "number"; // Histograms always need numeric x-axis + } else if (plot.definition.type === "bar" || plot.definition.type === "box") { + xAxisType = "category"; // Bar and box plots always use categorical x-axis + } else { + xAxisType = xAxis.type || "number"; // Scatter and line plots use configured type + } + // Transform data const points = transformData(rawData as Record[], { xColumn: xColumnCamel, yColumn: yColumnCamel, colorColumn: colorColumnCamel, symbolColumn: symbolColumnCamel, + xAxisType, + }); + + // Debug transformed points + console.log("Transformed points:", { + length: points.length, + firstPoint: points[0], + transformConfig: { + xColumn: xColumnCamel, + yColumn: yColumnCamel, + colorColumn: colorColumnCamel, + symbolColumn: symbolColumnCamel, + xAxisType, + }, }); // Assign colors and symbols @@ -73,6 +115,16 @@ export function PlotWrapper({ grouping?.symbol?.column, ); + // Debug processed points + console.log("Processed points:", { + length: processedPoints.length, + firstPoint: processedPoints[0], + grouping: { + colorColumn: grouping?.color?.column, + symbolColumn: grouping?.symbol?.column, + }, + }); + // Get unique values for legends const uniqueColors = colorColumn ? getUniqueValues(processedPoints, "color") @@ -95,6 +147,15 @@ export function PlotWrapper({ Boolean(grouping?.symbol?.label || grouping?.symbol?.column), ); + const { + showTooltip, + hideTooltip, + tooltipOpen, + tooltipData, + tooltipLeft = 0, + tooltipTop = 0, + } = useTooltip<{ content: React.ReactNode }>(); + return ( @@ -102,40 +163,61 @@ export function PlotWrapper({ {({ width: containerWidth, height: containerHeight }) => { const plotHeight = containerHeight - legendHeight; return ( - - - {/* Main plot */} - {renderContent({ - processedData: processedPoints, - width: containerWidth, - height: plotHeight, - })} - - {/* Legend */} - - + <> + + + {/* Main plot */} + {renderContent({ + processedData: processedPoints, + width: containerWidth, + height: plotHeight, + showTooltip, + hideTooltip, + })} + + {/* Legend */} + + + - - + + {tooltipOpen && tooltipData && ( +
+ {tooltipData.content} +
+ )} + ); }} diff --git a/packages/app/src/components/data/plot/plots/visx-scatter-plot.tsx b/packages/app/src/components/data/plot/plots/visx-scatter-plot.tsx index c7828b84..f271cd77 100644 --- a/packages/app/src/components/data/plot/plots/visx-scatter-plot.tsx +++ b/packages/app/src/components/data/plot/plots/visx-scatter-plot.tsx @@ -1,5 +1,4 @@ import { Circle } from "@visx/shape"; -import { useTooltip, useTooltipInPortal } from "@visx/tooltip"; import { Plot, PlotDefinition } from "@common/db/schema/plot"; import { DataPoint } from "./common"; import { getColorScale, getScaleConfig } from "./visx-common"; @@ -7,42 +6,41 @@ import { CommonPlotProps } from "./common"; import { BaseCartesianPlot } from "./visx-base-plot"; import { PlotWrapper } from "./visx-plot-wrapper"; import { PlotAnnotations } from "./visx-plot-annotations"; -import { useRef } from "react"; import { localPoint } from "@visx/event"; +import { createTooltipProps } from "./tooltip/tooltip-helpers"; +import { TooltipData } from "./tooltip/plot-tooltip"; interface Props extends CommonPlotProps { plot: Plot & { definition: Extract }; } +export function getScatterTooltipData(point: DataPoint): TooltipData { + return { + x: point.x, + y: point.y, + color: point.originalColor as string | undefined, + }; +} + function BaseScatterPlot({ width, height, data, plot, + showTooltip, + hideTooltip, }: { width: number; height: number; data: DataPoint[]; plot: Props["plot"]; + showTooltip: (args: { + tooltipLeft: number; + tooltipTop: number; + tooltipData: any; + }) => void; + hideTooltip: () => void; }) { - const { - showTooltip, - hideTooltip, - tooltipOpen, - tooltipData, - tooltipLeft = 0, - tooltipTop = 0, - } = useTooltip<{ - x: number; - y: number; - color?: string; - }>(); - - const { containerRef, TooltipInPortal } = useTooltipInPortal({ - scroll: true, - detectBounds: true, - }); - const { xAxis, yAxis, grouping, referenceLines, textLabels } = plot.definition; const { xScale, yScale } = getScaleConfig( @@ -51,102 +49,76 @@ function BaseScatterPlot({ width, height, ); - const colorScale = getColorScale(data, grouping); + const colorScale = getColorScale(data); return ( - <> - + {/* Reference Lines and Text Labels */} + - {/* Reference Lines and Text Labels */} - - - {/* Data Points */} - {data.map((point, i) => { - const cx = xScale(Number(point.x)); - const cy = yScale(Number(point.y)); + /> - return ( - { - const coords = localPoint( - event.target as SVGCircleElement, - event, - ); - if (coords) { - showTooltip({ - tooltipLeft: coords.x, - tooltipTop: coords.y, - tooltipData: { - x: Number(point.x), - y: Number(point.y), - color: point.originalColor as string, - }, - }); - } - }} - onMouseLeave={hideTooltip} - style={{ cursor: "pointer" }} - /> - ); - })} - + {/* Data Points */} + {data.map((point, i) => { + const cx = xScale(Number(point.x)); + const cy = yScale(Number(point.y)); - {tooltipOpen && tooltipData && ( - -
- {xAxis.label || xAxis.column}: {tooltipData.x} -
-
- {yAxis.label || yAxis.column}: {tooltipData.y} -
- {tooltipData.color && ( -
- {String(grouping?.color?.label || "Group")}: {tooltipData.color} -
- )} -
- )} - + return ( + { + const coords = localPoint( + event.target as SVGCircleElement, + event, + ); + if (coords) { + const tooltipData = getScatterTooltipData(point); + showTooltip(createTooltipProps(tooltipData, plot, coords)); + } + }} + onMouseLeave={hideTooltip} + style={{ cursor: "pointer" }} + /> + ); + })} + ); } export function ScatterPlot(props: Props) { - const tooltipPortalRef = useRef(null); - return ( -
- ( - - )} - /> -
+ ( + + )} + /> ); } diff --git a/packages/common/src/db/schema/plot.ts b/packages/common/src/db/schema/plot.ts index c53e5c23..4dd80db5 100644 --- a/packages/common/src/db/schema/plot.ts +++ b/packages/common/src/db/schema/plot.ts @@ -28,8 +28,15 @@ export const axisSchema = z.object({ column: z.string(), label: z.string().optional().nullable(), unit: z.string().optional().nullable(), +}); + +export const axisSchemaCategory = axisSchema.extend({ + type: z.literal("category"), +}); + +export const axisSchemaNumeric = axisSchema.extend({ reversed: z.boolean().optional().default(false), - type: z.enum(["number", "category"]).optional().default("number"), + type: z.literal("number"), domainTickOptions: z .object({ min: z.number(), @@ -59,11 +66,20 @@ export const referenceTextSchema = z.object({ rotation: z.number().optional().nullable(), }); -const axisSchemaWithColumnStrict = axisSchema.extend({ +const axisSchemaNumericStrict = axisSchemaNumeric.extend({ column: z.string().min(1), }); -export type AxisConfig = z.infer; +const axisSchemaCategoryStrict = axisSchemaCategory.extend({ + column: z.string().min(1), +}); + +type AxisCategoryConfig = z.infer; + +type AxisNumericConfig = z.infer; +export type AxisConfig = z.infer< + typeof axisSchemaNumeric | typeof axisSchemaCategory +>; const groupingValueSchema = z.object({ column: z.string(), @@ -94,10 +110,13 @@ export const appearanceSchema = z.object({ export type AppearanceSettings = z.infer; +const plotTypeSchema = z.enum(["scatter", "line", "histogram", "bar", "box"]); +export type PlotType = z.infer; + // Plot-specific schemas const cartesianPlotSchema = z.object({ - xAxis: axisSchema, - yAxis: axisSchema, + xAxis: axisSchemaNumeric, + yAxis: axisSchemaNumeric, grouping: groupingSchema.optional().nullable(), appearance: appearanceSchema.optional(), }); @@ -128,31 +147,44 @@ const lineStyleSchema = z.object({ const linePlotSchema = cartesianPlotSchema .extend({ type: z.literal("line"), - dataSource: dataSourceSchema, }) .merge(lineStyleSchema); const histogramPlotSchema = z.object({ type: z.literal("histogram"), - xAxis: axisSchema, + xAxis: axisSchemaNumeric, numBins: z.number().default(10), grouping: groupingSchema.optional().nullable(), appearance: appearanceSchema.optional(), dataSource: dataSourceSchema, }); -const barPlotSchema = cartesianPlotSchema.extend({ +const barPlotSchema = z.object({ type: z.literal("bar"), dataSource: dataSourceSchema, + xAxis: axisSchemaCategory, + yAxis: axisSchemaNumeric, + appearance: appearanceSchema.optional(), + grouping: groupingSchema.optional().nullable(), orientation: z.enum(["vertical", "horizontal"]).default("vertical"), }); +const boxPlotSchema = z.object({ + type: z.literal("box"), + dataSource: dataSourceSchema, + xAxis: axisSchemaCategory, + yAxis: axisSchemaNumeric, + appearance: appearanceSchema.optional(), + grouping: groupingSchema.optional().nullable(), +}); + export const plotDefinitionSchema = z.discriminatedUnion("type", [ scatterPlotSchema, linePlotSchema, histogramPlotSchema, barPlotSchema, + boxPlotSchema, ]); export type PlotDefinition = z.infer; @@ -167,12 +199,20 @@ export function validateAxes(definition: PlotDefinition | null): boolean { if (!definition) return false; if (definition.type === "histogram") { - return axisSchemaWithColumnStrict.safeParse(definition.xAxis).success; + return axisSchemaNumericStrict.safeParse(definition.xAxis).success; + } + + if (definition.type === "bar" || definition.type === "box") { + return ( + axisSchemaCategoryStrict.safeParse(definition.xAxis).success && + axisSchemaNumericStrict.safeParse(definition.yAxis).success + ); } + // For scatter and line plots return ( - axisSchemaWithColumnStrict.safeParse(definition.xAxis).success && - axisSchemaWithColumnStrict.safeParse(definition.yAxis).success + axisSchemaNumericStrict.safeParse(definition.xAxis).success && + axisSchemaNumericStrict.safeParse(definition.yAxis).success ); } @@ -192,14 +232,14 @@ export function validateGrouping(definition: PlotDefinition | null): boolean { } export function validateDistribution( - definition: PlotDefinition | null, + definition: PlotDefinition | null ): boolean { if (!definition || definition.type !== "histogram") return true; return z.number().safeParse(definition.numBins).success; } export function validateReferenceLines( - definition: PlotDefinition | null, + definition: PlotDefinition | null ): boolean { if (!definition) return true; if (definition.type !== "scatter") return true; @@ -209,7 +249,7 @@ export function validateReferenceLines( } export function getSectionValidationStatus( - definition: PlotDefinition | null, + definition: PlotDefinition | null ): Record { return { general: validateGeneral(definition), @@ -224,9 +264,10 @@ export function getSectionValidationStatus( } export function getTotalValidationErrors( - definition: PlotDefinition | null, + definition: PlotDefinition | null ): number { const status = getSectionValidationStatus(definition); + console.log("status", status); // Count invalid sections (where isValid is false) return Object.values(status).filter((isValid) => !isValid).length; } @@ -242,7 +283,7 @@ export const plot = pgTable("plot", { }), sourceQueryId: idReference("source_query_id").references( (): AnyPgColumn => query.id, - { onDelete: "cascade" }, + { onDelete: "cascade" } ), definition: jsonb("definition").$type(), createdAt: createdAt(), @@ -252,7 +293,7 @@ export const plot = pgTable("plot", { export type Plot = typeof plot.$inferSelect; export type PlotInsert = typeof plot.$inferInsert; -export const defaultAxis: AxisConfig = { +export const defaultAxis: AxisNumericConfig = { column: "", label: null, unit: null, @@ -262,6 +303,13 @@ export const defaultAxis: AxisConfig = { scale: "linear", }; +export const defaultAxisCategory: AxisCategoryConfig = { + column: "", + label: null, + unit: null, + type: "category", +}; + export const defaultPlotDefinitions: Record< PlotDefinition["type"], PlotDefinition @@ -302,7 +350,7 @@ export const defaultPlotDefinitions: Record< }, bar: { type: "bar", - xAxis: { ...defaultAxis }, + xAxis: { ...defaultAxisCategory }, yAxis: { ...defaultAxis }, grouping: null, orientation: "vertical", @@ -311,4 +359,14 @@ export const defaultPlotDefinitions: Record< tableName: "", }, }, + box: { + type: "box", + xAxis: { ...defaultAxisCategory }, + yAxis: { ...defaultAxis }, + grouping: null, + dataSource: { + isQuery: false, + tableName: "", + }, + }, }; From d215738026e555e12278255445e14afe90385ecb Mon Sep 17 00:00:00 2001 From: James Holcombe Date: Thu, 4 Sep 2025 20:04:36 +0100 Subject: [PATCH 24/37] cleanup --- .../plot/definition/sections/axes-section.tsx | 1 - .../definition/sections/general-section.tsx | 2 +- .../data/plot/plots/visx-box-plot.tsx | 30 ----------------- .../data/plot/plots/visx-common.tsx | 4 --- .../data/plot/plots/visx-plot-wrapper.tsx | 32 ------------------- 5 files changed, 1 insertion(+), 68 deletions(-) diff --git a/packages/app/src/components/data/plot/definition/sections/axes-section.tsx b/packages/app/src/components/data/plot/definition/sections/axes-section.tsx index 4f9dd22c..dac14a62 100644 --- a/packages/app/src/components/data/plot/definition/sections/axes-section.tsx +++ b/packages/app/src/components/data/plot/definition/sections/axes-section.tsx @@ -37,7 +37,6 @@ export function AxesSection({ plot, columns }: AxesSectionProps) { }); const handleDefinitionChange = async (definition: PlotDefinition) => { - console.log("definition", definition); try { await updatePlotDefinitionAction(plot.id, definition, plot.projectId); } catch (error) { diff --git a/packages/app/src/components/data/plot/definition/sections/general-section.tsx b/packages/app/src/components/data/plot/definition/sections/general-section.tsx index 349b4417..a4bbe3e1 100644 --- a/packages/app/src/components/data/plot/definition/sections/general-section.tsx +++ b/packages/app/src/components/data/plot/definition/sections/general-section.tsx @@ -161,7 +161,7 @@ export function GeneralSection({ plot, queries, tables }: GeneralSectionProps) { Scatter Plot Line Plot Histogram - Bar Chart + {/* Bar Chart */} Box Plot diff --git a/packages/app/src/components/data/plot/plots/visx-box-plot.tsx b/packages/app/src/components/data/plot/plots/visx-box-plot.tsx index 7f869a81..4d1194a4 100644 --- a/packages/app/src/components/data/plot/plots/visx-box-plot.tsx +++ b/packages/app/src/components/data/plot/plots/visx-box-plot.tsx @@ -145,14 +145,6 @@ function BaseBoxPlot({ const { xAxis, yAxis, grouping } = plot.definition; const colorScale = getColorScale(data); - // Debug data - console.log("Box plot data:", { - data, - xAxis, - yAxis, - grouping, - }); - // Group data by x-axis values const groupedData = new Map(); data.forEach((point) => { @@ -165,18 +157,12 @@ function BaseBoxPlot({ } }); - // Debug grouped data - console.log("Grouped data:", Array.from(groupedData.entries())); - // Calculate box plot statistics for each group const boxPlots = new Map(); groupedData.forEach((values, x) => { boxPlots.set(x, calculateBoxPlotStats(values)); }); - // Debug box plot stats - console.log("Box plot stats:", Array.from(boxPlots.entries())); - // Calculate the actual plot dimensions (excluding margins) const plotWidth = width - MARGIN.left - MARGIN.right; const plotHeight = height - MARGIN.top - MARGIN.bottom; @@ -208,15 +194,6 @@ function BaseBoxPlot({ }); // Debug scales - console.log("Scales:", { - xDomain, - yDomain, - paddedYDomain, - xRange: xScale.range(), - yRange: yScale.range(), - plotWidth, - plotHeight, - }); // Box plot dimensions const boxWidth = Math.min(40, xScale.bandwidth()); @@ -237,13 +214,6 @@ function BaseBoxPlot({ const color = colorScale(String(x)); // Debug each box plot - console.log("Rendering box plot:", { - x, - xPos, - boxCenter, - stats, - color, - }); return ( diff --git a/packages/app/src/components/data/plot/plots/visx-common.tsx b/packages/app/src/components/data/plot/plots/visx-common.tsx index 0c1e7374..14ffcbfc 100644 --- a/packages/app/src/components/data/plot/plots/visx-common.tsx +++ b/packages/app/src/components/data/plot/plots/visx-common.tsx @@ -35,10 +35,8 @@ export function getScaleConfig( width: number, height: number, ) { - console.log("Scale config input data:", data); const xValues = data.map((d) => Number(d.x)).filter((x) => !isNaN(x)); const yValues = data.map((d) => Number(d.y)).filter((y) => !isNaN(y)); - console.log("Numeric values:", { xValues, yValues }); const xDomain = definition.xAxis.domainTickOptions ? [ @@ -54,8 +52,6 @@ export function getScaleConfig( ] : (extent(yValues) as [number, number]) || [0, 1]; - console.log("Computed domains:", { xDomain, yDomain }); - // Add padding to the domains for better visualization const xRange = xDomain[1] - xDomain[0]; const yRange = yDomain[1] - yDomain[0]; diff --git a/packages/app/src/components/data/plot/plots/visx-plot-wrapper.tsx b/packages/app/src/components/data/plot/plots/visx-plot-wrapper.tsx index 62933dd9..3405275b 100644 --- a/packages/app/src/components/data/plot/plots/visx-plot-wrapper.tsx +++ b/packages/app/src/components/data/plot/plots/visx-plot-wrapper.tsx @@ -66,15 +66,6 @@ export function PlotWrapper({ } // Debug raw data structure - console.log("Raw data:", { - length: rawData.length, - firstItem: rawData[0], - columns: Object.keys(rawData[0] || {}), - xColumn, - yColumn, - xColumnCamel, - yColumnCamel, - }); // Determine x-axis type based on plot type let xAxisType: "number" | "category"; @@ -95,19 +86,6 @@ export function PlotWrapper({ xAxisType, }); - // Debug transformed points - console.log("Transformed points:", { - length: points.length, - firstPoint: points[0], - transformConfig: { - xColumn: xColumnCamel, - yColumn: yColumnCamel, - colorColumn: colorColumnCamel, - symbolColumn: symbolColumnCamel, - xAxisType, - }, - }); - // Assign colors and symbols const processedPoints = assignAbbreviationColorsAndSymbols( points as DataPoint[], @@ -115,16 +93,6 @@ export function PlotWrapper({ grouping?.symbol?.column, ); - // Debug processed points - console.log("Processed points:", { - length: processedPoints.length, - firstPoint: processedPoints[0], - grouping: { - colorColumn: grouping?.color?.column, - symbolColumn: grouping?.symbol?.column, - }, - }); - // Get unique values for legends const uniqueColors = colorColumn ? getUniqueValues(processedPoints, "color") From cafd75d90c00f037c84cd468891a209982a58f66 Mon Sep 17 00:00:00 2001 From: James Holcombe Date: Thu, 4 Sep 2025 20:05:21 +0100 Subject: [PATCH 25/37] cleanup and tooltips --- .../src/components/data/plot/plot-view.tsx | 15 +- .../data/plot/plots/visx-bar-plot.tsx | 135 ------------------ 2 files changed, 1 insertion(+), 149 deletions(-) delete mode 100644 packages/app/src/components/data/plot/plots/visx-bar-plot.tsx diff --git a/packages/app/src/components/data/plot/plot-view.tsx b/packages/app/src/components/data/plot/plot-view.tsx index e664f78f..ade65d8a 100644 --- a/packages/app/src/components/data/plot/plot-view.tsx +++ b/packages/app/src/components/data/plot/plot-view.tsx @@ -8,7 +8,7 @@ import { import { ScatterPlot } from "./plots/visx-scatter-plot"; import { LinePlot } from "./plots/visx-line-plot"; import { HistogramPlot } from "./plots/visx-histogram-plot"; -import { BarPlot } from "./plots/visx-bar-plot"; + import { cn } from "@/lib/utils"; import { CommonPlotProps } from "./plots/common"; import { BoxPlot } from "@/components/data/plot/plots/visx-box-plot"; @@ -76,19 +76,6 @@ export function PlotView({ width={width} /> ); - case "bar": - return ( - ; - } - } - data={data} - height={height} - width={width} - /> - ); case "box": return ( diff --git a/packages/app/src/components/data/plot/plots/visx-bar-plot.tsx b/packages/app/src/components/data/plot/plots/visx-bar-plot.tsx deleted file mode 100644 index 109b7900..00000000 --- a/packages/app/src/components/data/plot/plots/visx-bar-plot.tsx +++ /dev/null @@ -1,135 +0,0 @@ -import { Bar } from "@visx/shape"; -import { useTooltip, useTooltipInPortal } from "@visx/tooltip"; -import { Plot, PlotDefinition } from "@common/db/schema/plot"; -import { DataPoint } from "./common"; -import { getColorScale, getScaleConfig } from "./visx-common"; -import { CommonPlotProps } from "./common"; -import { BaseCartesianPlot } from "./visx-base-plot"; -import { PlotWrapper } from "./visx-plot-wrapper"; -import { useRef } from "react"; -import { localPoint } from "@visx/event"; - -interface Props extends CommonPlotProps { - plot: Plot & { definition: Extract }; -} - -function BaseBarPlot({ - width, - height, - data, - plot, -}: { - width: number; - height: number; - data: DataPoint[]; - plot: Props["plot"]; -}) { - const { - showTooltip, - hideTooltip, - tooltipOpen, - tooltipData, - tooltipLeft = 0, - tooltipTop = 0, - } = useTooltip<{ - x: number; - y: number; - color?: string; - }>(); - - const { containerRef, TooltipInPortal } = useTooltipInPortal({ - scroll: true, - detectBounds: true, - }); - - const { xAxis, yAxis, grouping } = plot.definition; - const { xScale, yScale } = getScaleConfig( - plot.definition, - data, - width, - height, - ); - const colorScale = getColorScale(data, grouping); - - return ( -
- - - {data.map((point, i) => ( - { - const coords = localPoint( - event.target as SVGRectElement, - event, - ); - if (coords) { - showTooltip({ - tooltipLeft: coords.x, - tooltipTop: coords.y, - tooltipData: { - x: Number(point.x), - y: Number(point.y), - color: point.originalColor as string, - }, - }); - } - }} - onMouseLeave={hideTooltip} - style={{ cursor: "pointer" }} - /> - ))} - - - - {tooltipOpen && tooltipData && ( - -
- {xAxis.label || xAxis.column}: {tooltipData.x} -
-
- {yAxis.label || yAxis.column}: {tooltipData.y} -
- {tooltipData.color && ( -
- {String(grouping?.color?.label || "Group")}: {tooltipData.color} -
- )} -
- )} -
- ); -} - -export function BarPlot(props: Props) { - return ( - ( - - )} - /> - ); -} \ No newline at end of file From 8820672185fc30adecefab5a17469731ecc2ce5e Mon Sep 17 00:00:00 2001 From: James Holcombe Date: Thu, 4 Sep 2025 20:15:53 +0100 Subject: [PATCH 26/37] plots cleanup --- .../plot/definition/plot-sections-config.ts | 4 -- .../data/plot/definition/plot-sidebar.tsx | 56 ++++--------------- .../data/plot/plots/visx-box-plot.tsx | 2 +- .../data/plot/plots/visx-common.tsx | 8 +-- .../data/plot/plots/visx-line-plot.tsx | 2 +- .../data/plot/plots/visx-plot-wrapper.tsx | 2 +- .../data/plot/plots/visx-scatter-plot.tsx | 5 +- 7 files changed, 18 insertions(+), 61 deletions(-) diff --git a/packages/app/src/components/data/plot/definition/plot-sections-config.ts b/packages/app/src/components/data/plot/definition/plot-sections-config.ts index 47d0e05a..db266344 100644 --- a/packages/app/src/components/data/plot/definition/plot-sections-config.ts +++ b/packages/app/src/components/data/plot/definition/plot-sections-config.ts @@ -12,7 +12,6 @@ export type SectionConfig = { label: string; shortLabel?: string; // For mobile view component: React.ComponentType; - showInSecondRow?: boolean; }; export const PLOT_SECTIONS: Record = { @@ -42,21 +41,18 @@ export const PLOT_SECTIONS: Record = { label: "Distribution", shortLabel: "Dist", component: DistributionSection, - showInSecondRow: true, }, "reference-lines": { id: "reference-lines", label: "Reference Lines", shortLabel: "Ref Lines", component: ReferenceLinesSection, - showInSecondRow: true, }, "text-labels": { id: "text-labels", label: "Text Labels", shortLabel: "Labels", component: TextLabelsSection, - showInSecondRow: true, }, }; diff --git a/packages/app/src/components/data/plot/definition/plot-sidebar.tsx b/packages/app/src/components/data/plot/definition/plot-sidebar.tsx index ae9e2b46..941d6ff0 100644 --- a/packages/app/src/components/data/plot/definition/plot-sidebar.tsx +++ b/packages/app/src/components/data/plot/definition/plot-sidebar.tsx @@ -36,10 +36,6 @@ export function PlotSidebar({ (sectionId) => PLOT_SECTIONS[sectionId], ); - // Split sections into two rows based on showInSecondRow property - const firstRowSections = availableSections.filter((s) => !s.showInSecondRow); - const secondRowSections = availableSections.filter((s) => s.showInSecondRow); - return (
+
+ ); +} diff --git a/packages/app/src/components/data/query/query-definition-tabs.tsx b/packages/app/src/components/data/query/query-definition-tabs.tsx new file mode 100644 index 00000000..339148c2 --- /dev/null +++ b/packages/app/src/components/data/query/query-definition-tabs.tsx @@ -0,0 +1,68 @@ +"use client"; + +import { useState } from "react"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; +import { QueryDefinition } from "@common/db/schema/query"; +import { GroupConfig } from "@common/db/schema/common"; +import { TableCounts } from "@/components/data/helpers"; +import QueryDefinitionExplorer from "./query-definition-explorer"; +import { QueryDefinitionSummary } from "./query-definition-summary"; +import { ComputedColumnsTab } from "./computed-columns-tab"; +import { Query } from "@common/db/schema/query"; + +type Props = { + schemaConfig: GroupConfig[]; + query: Query; + tableCounts: TableCounts; + projectId: string; + definition: QueryDefinition; + onDefinitionChange: (definition: QueryDefinition) => void; + completions: string[]; +}; + +export function QueryDefinitionTabs({ + schemaConfig, + query, + tableCounts, + projectId, + definition, + onDefinitionChange, + completions, +}: Props) { + const [activeTab, setActiveTab] = useState("columns"); + + return ( + + + Columns + Computed columns + Summary + + + + + + + + + + + + + + + ); +} diff --git a/packages/app/src/components/data/query/query-definition.tsx b/packages/app/src/components/data/query/query-definition.tsx index 25ddba04..4ef5c1b2 100644 --- a/packages/app/src/components/data/query/query-definition.tsx +++ b/packages/app/src/components/data/query/query-definition.tsx @@ -1,23 +1,40 @@ "use client"; import { GroupConfig } from "@common/db/schema/common"; -import QueryDefinitionExplorer from "./query-definition-explorer"; import { Query, QueryDefinition as QueryDefinitionType, } from "@common/db/schema/query"; import { updateQueryDefinitionAction } from "@/actions/data/queries/updateQueryDefinition"; import { toast } from "sonner"; -import { QueryDefinitionSummary } from "./query-definition-summary"; import { TableCounts } from "@/components/data/helpers"; - +import { QueryDefinitionTabs } from "./query-definition-tabs"; +import { QueryData } from "./query-data"; import { useState } from "react"; +import { ColumnConfig } from "@common/db/schema/common"; +import { TableName } from "@common/db/schema/data"; +import { Abbreviation } from "@common/db/schema/abbreviation"; +import { Zone } from "@common/db/schema/zone"; type Props = { schemaConfig: GroupConfig[]; query: Query; tableCounts: TableCounts; projectId: string; + completions: string[]; + columns: { + id: string; + label: string; + table: string; + columnConfig: ColumnConfig; + tableDbName: TableName; + abbreviations: Abbreviation[]; + }[]; + zones: (Zone & { + isSelected: boolean; + })[]; + totalRowCount: number; + maxRows?: number; }; export function QueryDefinition({ @@ -25,6 +42,11 @@ export function QueryDefinition({ query, tableCounts, projectId, + completions, + columns, + zones, + totalRowCount, + maxRows, }: Props) { const [definition, setDefinition] = useState( query.definition || {}, @@ -41,27 +63,42 @@ export function QueryDefinition({ }; return ( -
+
+ {/* Preview Table at the top */} +
+

Preview

- Select the data you want to query, by selecting the tables and columns - you want to include. + Preview of your query results

+
+ +
-
-
- -
- +

Query definition

+

+ Configure your query by selecting tables, columns, and computed + columns +

+ +
From 55e415c79077bfa55694f8e05fd69e73ce6f9e04 Mon Sep 17 00:00:00 2001 From: James Holcombe Date: Fri, 5 Sep 2025 21:34:32 +0100 Subject: [PATCH 33/37] new ui implemented and working --- .../data/queries/[queryId]/layout.tsx | 23 - .../data/data-sidebar/recently-visited.tsx | 6 +- .../components/data/data-wrapper-client.tsx | 47 ++ .../app/src/components/data/data-wrapper.tsx | 36 +- .../data/query/computed-columns-tab.tsx | 501 +++++++++--------- .../data/query/query-definition-explorer.tsx | 155 +----- .../data/query/query-definition-summary.tsx | 2 +- .../data/query/query-definition-tabs.tsx | 55 +- .../data/query/query-definition.tsx | 63 ++- .../data/query/query-layout-client.tsx | 31 +- .../data/query/query-preview-placeholder.tsx | 24 + .../query/query-sidebar-toggle-button.tsx | 44 -- packages/app/src/components/ui/tabs.tsx | 6 +- 13 files changed, 404 insertions(+), 589 deletions(-) create mode 100644 packages/app/src/components/data/data-wrapper-client.tsx create mode 100644 packages/app/src/components/data/query/query-preview-placeholder.tsx delete mode 100644 packages/app/src/components/data/query/query-sidebar-toggle-button.tsx diff --git a/packages/app/src/app/(app)/projects/[projectId]/data/queries/[queryId]/layout.tsx b/packages/app/src/app/(app)/projects/[projectId]/data/queries/[queryId]/layout.tsx index 89b98f40..02604642 100644 --- a/packages/app/src/app/(app)/projects/[projectId]/data/queries/[queryId]/layout.tsx +++ b/packages/app/src/app/(app)/projects/[projectId]/data/queries/[queryId]/layout.tsx @@ -7,32 +7,12 @@ import { QueryLayoutClient } from "@/components/data/query/query-layout-client"; import { isDefinitionConfigured } from "@/components/data/query/helpers"; import { getQueryForProject } from "@/lib/dal/queries"; -import { Query } from "@common/db/schema/query"; -import { schemaConfig } from "@common/db/schema/common"; type Props = { params: { projectId: string; queryId: string }; children: React.ReactNode; }; -function getCompletions(query: Query) { - const columns = Object.entries(query.definition ?? {}).flatMap( - ([table, columns]) => { - const tableConfig = schemaConfig.find( - (config) => config.dbName === table, - ); - return columns.columns.map((column) => { - const columnConfig = tableConfig?.columns.find( - (c) => c.dbName === column, - ); - return columnConfig?.nameCamelCase ?? column; - }); - }, - ); - - return columns; -} - export default async function Layout({ params, children }: Props) { const projectId = parseStringParam(params.projectId); const user = await getServerUser(); @@ -43,8 +23,6 @@ export default async function Layout({ params, children }: Props) { notFound(); } - const completions = getCompletions(query); - const definitionConfigured = isDefinitionConfigured(query); return ( @@ -53,7 +31,6 @@ export default async function Layout({ params, children }: Props) { queryId={queryId} query={query} definitionConfigured={definitionConfigured} - completions={completions} > {children} diff --git a/packages/app/src/components/data/data-sidebar/recently-visited.tsx b/packages/app/src/components/data/data-sidebar/recently-visited.tsx index 27966319..dd262178 100644 --- a/packages/app/src/components/data/data-sidebar/recently-visited.tsx +++ b/packages/app/src/components/data/data-sidebar/recently-visited.tsx @@ -1,10 +1,12 @@ "use client"; import { useContext } from "react"; -import { PreviousPathnamesContext } from "../data-wrapper"; +import { + PreviousPathnamesContext, + getDataPathnameId, +} from "../data-wrapper-client"; import Link from "next/link"; import { SearchItem } from "../data-sidebar/table-search"; -import { getDataPathnameId } from "../data-wrapper"; import { History, TableColumnsSplit } from "lucide-react"; import { ChartLine } from "lucide-react"; import { Table } from "lucide-react"; diff --git a/packages/app/src/components/data/data-wrapper-client.tsx b/packages/app/src/components/data/data-wrapper-client.tsx new file mode 100644 index 00000000..cd109d89 --- /dev/null +++ b/packages/app/src/components/data/data-wrapper-client.tsx @@ -0,0 +1,47 @@ +"use client"; + +import { useEffect, createContext } from "react"; +import { usePathname } from "next/navigation"; +import { useLocalStorage } from "@uidotdev/usehooks"; + +export const PreviousPathnamesContext = createContext([]); + +interface DataWrapperClientProps { + projectId: string; + children: React.ReactNode; +} + +export function getDataPathnameId(pathname: string) { + return pathname.split("/").slice(0, 6).join("/"); +} + +export function DataWrapperClient({ + projectId, + children, +}: DataWrapperClientProps) { + const pathname = usePathname(); + const [recentPathnames, setRecentPathnames] = useLocalStorage( + `recent-pathnames-${projectId}`, + [], + ); + + useEffect(() => { + const currentPathname = getDataPathnameId(pathname); + + if (recentPathnames.includes(currentPathname)) { + return; + } + + const updatedPathnames = [...recentPathnames, currentPathname]; + if (updatedPathnames.length > 5) { + updatedPathnames.shift(); + } + setRecentPathnames(updatedPathnames); + }, [pathname, recentPathnames, setRecentPathnames]); + + return ( + + {children} + + ); +} diff --git a/packages/app/src/components/data/data-wrapper.tsx b/packages/app/src/components/data/data-wrapper.tsx index 326d7707..e950adab 100644 --- a/packages/app/src/components/data/data-wrapper.tsx +++ b/packages/app/src/components/data/data-wrapper.tsx @@ -1,8 +1,7 @@ -"use client"; - import { DataSidebar } from "@/components/data/data-sidebar"; import { DataPageFrame } from "@/components/data/data-page-frame"; import { BreadcrumbProvider } from "@/contexts/breadcrumb-context"; +import { DataWrapperClient } from "@/components/data/data-wrapper-client"; import { ResizablePanelGroup, @@ -14,9 +13,6 @@ import { Plot } from "@common/db/schema/plot"; import { Query } from "@common/db/schema/query"; import { Folder } from "@common/db/schema/folder"; import { TableCounts } from "./helpers"; -import { usePathname } from "next/navigation"; -import { useEffect, createContext } from "react"; -import { useLocalStorage } from "@uidotdev/usehooks"; interface DataWrapperProps { projectId: string; @@ -30,8 +26,6 @@ interface DataWrapperProps { children: React.ReactNode; } -export const PreviousPathnamesContext = createContext([]); - export function DataWrapper({ projectId, projectName, @@ -43,29 +37,9 @@ export function DataWrapper({ plotFolders, children, }: DataWrapperProps) { - const pathname = usePathname(); - const [recentPathnames, setRecentPathnames] = useLocalStorage( - `recent-pathnames-${projectId}`, - [], - ); - - useEffect(() => { - const currentPathname = getDataPathnameId(pathname); - - if (recentPathnames.includes(currentPathname)) { - return; - } - - const updatedPathnames = [...recentPathnames, currentPathname]; - if (updatedPathnames.length > 5) { - updatedPathnames.shift(); - } - setRecentPathnames(updatedPathnames); - }, [pathname, recentPathnames, setRecentPathnames]); - return ( - + {children} - + ); } - -export function getDataPathnameId(pathname: string) { - return pathname.split("/").slice(0, 6).join("/"); -} diff --git a/packages/app/src/components/data/query/computed-columns-tab.tsx b/packages/app/src/components/data/query/computed-columns-tab.tsx index 63567ee2..865513f5 100644 --- a/packages/app/src/components/data/query/computed-columns-tab.tsx +++ b/packages/app/src/components/data/query/computed-columns-tab.tsx @@ -4,15 +4,9 @@ import { useState, useEffect, useRef } from "react"; import { useForm } from "react-hook-form"; import { zodResolver } from "@hookform/resolvers/zod"; import { z } from "zod"; +import { Query } from "@common/db/schema/query"; import { Button } from "@/components/ui/button"; -import { - Dialog, - DialogContent, - DialogDescription, - DialogFooter, - DialogHeader, - DialogTitle, -} from "@/components/ui/dialog"; +import { Save, Trash2, Database, Plus, Loader2 } from "lucide-react"; import { Form, FormControl, @@ -21,7 +15,6 @@ import { FormLabel, FormMessage, } from "@/components/ui/form"; -import { Input } from "@/components/ui/input"; import { Select, SelectContent, @@ -29,23 +22,30 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; -import { Query } from "@common/db/schema/query"; -import { ComputedColumn } from "@common/db/schema/query"; -import { ComputedColumnHelp } from "./computed-column-help"; +import { Input } from "@/components/ui/input"; +import { + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, +} from "@/components/ui/dialog"; -import { addComputedColumnAction } from "@/actions/data/queries/addComputedColumn"; -import { updateComputedColumnAction } from "@/actions/data/queries/updateComputedColumn"; -import { deleteComputedColumnAction } from "@/actions/data/queries/deleteComputedColumn"; -import { toast } from "sonner"; -import { Database, Loader2, Plus, Save, Trash2 } from "lucide-react"; -import { CompletionContext, autocompletion } from "@codemirror/autocomplete"; +import { basicSetup, EditorView } from "codemirror"; +import { autocompletion, CompletionContext } from "@codemirror/autocomplete"; +import { EditorState } from "@codemirror/state"; import { javascript } from "@codemirror/lang-javascript"; import { syntaxHighlighting, defaultHighlightStyle, } from "@codemirror/language"; -import { EditorState } from "@codemirror/state"; -import { EditorView, basicSetup } from "codemirror"; +import { addComputedColumnAction } from "@/actions/data/queries/addComputedColumn"; +import { updateComputedColumnAction } from "@/actions/data/queries/updateComputedColumn"; +import { deleteComputedColumnAction } from "@/actions/data/queries/deleteComputedColumn"; +import { ComputedColumn } from "@common/db/schema/query"; +import { ComputedColumnHelp } from "./computed-column-help"; +import { Separator } from "@/components/ui/separator"; // Form schema for computed column const computedColumnSchema = z.object({ @@ -55,6 +55,24 @@ const computedColumnSchema = z.object({ type ComputedColumnFormData = z.infer; +const defaultFunctionBody = ` +// Enter function body for computed column +// Examples: +// Simple: category + '_' + status +// With logic: +// if(priority > 3) { +// return 'High' +// } +// return 'Low' +`; + +type QuerySidebarProps = { + query: Query; + projectId: string; + + completions: string[]; +}; + // Custom CodeMirror form control component function CodeMirrorFormField({ field, @@ -205,28 +223,15 @@ function CodeMirrorFormField({ ); } -// Default function body for new computed columns -const defaultFunctionBody = `// Enter function body for computed column -// Available variables: -// - row: current row data -// - rows: all rows data -// - index: current row index -// -// Example: -// return row.someField * 2; +export function ComputedColumnsTab({ + query, + projectId, -return row;`; - -type Props = { - query: Query; - projectId: string; - completions: string[]; -}; - -export function ComputedColumnsTab({ query, projectId, completions }: Props) { + completions, +}: QuerySidebarProps) { const [selectedColumnId, setSelectedColumnId] = useState(null); - const [isCreating, setIsCreating] = useState(false); const [isSubmitting, setIsSubmitting] = useState(false); + const [isCreating, setIsCreating] = useState(false); const [isDeleteDialogOpen, setIsDeleteDialogOpen] = useState(false); const [columnToDelete, setColumnToDelete] = useState( null, @@ -243,13 +248,11 @@ export function ComputedColumnsTab({ query, projectId, completions }: Props) { const hasComputedColumns = Array.isArray(query.computedColumns) && query.computedColumns.length > 0; - // Auto-select first column if available and none selected + // Set default column on component load useEffect(() => { if (hasComputedColumns && !selectedColumnId) { const firstColumn = query.computedColumns[0]; - if (firstColumn) { - handleEditColumn(firstColumn); - } + handleEditColumn(firstColumn); } }, [hasComputedColumns, selectedColumnId]); @@ -261,109 +264,92 @@ export function ComputedColumnsTab({ query, projectId, completions }: Props) { }); }; - const handleNewColumn = () => { - setSelectedColumnId(null); - form.reset({ - name: "", + const handleNewColumn = async () => { + setIsCreating(true); + + // Create new column in database + const result = await addComputedColumnAction(projectId, query.id, { + name: "Untitled", functionBody: defaultFunctionBody, }); - }; - const handleCancelEdit = () => { - if (hasComputedColumns && query.computedColumns.length > 0) { - const firstColumn = query.computedColumns[0]; - if (firstColumn) { - handleEditColumn(firstColumn); - } + if (!result.success) { + console.error("Failed to create new column:", result.error); + return; } else { - setSelectedColumnId(null); - form.reset({ - name: "", - functionBody: defaultFunctionBody, - }); + const newColumn = result.data; + handleEditColumn(newColumn); } + + setIsCreating(false); }; - const handleDeleteColumn = (columnId: string) => { + const handleCancelEdit = () => { + setSelectedColumnId(null); + form.reset(); + }; + + const handleDeleteColumn = async (columnId: string) => { const column = query.computedColumns.find((col) => col.id === columnId); - if (column) { - setColumnToDelete(column); - setIsDeleteDialogOpen(true); - } + if (!column) return; + setColumnToDelete(column); + setIsDeleteDialogOpen(true); }; const confirmDelete = async () => { if (!columnToDelete) return; - try { - setIsSubmitting(true); - const result = await deleteComputedColumnAction( - projectId, - query.id, - columnToDelete.id, - ); + await deleteComputedColumnAction(projectId, query.id, columnToDelete.id); - if (result.success) { - toast.success("Computed column deleted successfully"); - setColumnToDelete(null); - setIsDeleteDialogOpen(false); - handleCancelEdit(); - } else { - console.error("Failed to delete computed column:", result.error); - toast.error("Failed to delete computed column"); - } + // Clear form after successful deletion + setSelectedColumnId(null); + form.reset(); + setIsDeleteDialogOpen(false); + setColumnToDelete(null); } catch (error) { console.error("Failed to delete computed column:", error); - toast.error("Failed to delete computed column"); - } finally { - setIsSubmitting(false); } }; const onSubmit = async (data: ComputedColumnFormData) => { - try { - setIsSubmitting(true); - - if (selectedColumnId) { - // Update existing column - const result = await updateComputedColumnAction( - projectId, - query.id, - selectedColumnId, - data, - ); - - if (result.success) { - toast.success("Computed column updated successfully"); - } else { - console.error("Failed to update computed column:", result.error); - toast.error("Failed to update computed column"); - } + setIsSubmitting(true); + + if (selectedColumnId) { + const result = await updateComputedColumnAction( + projectId, + query.id, + selectedColumnId, + { + name: data.name.trim(), + functionBody: data.functionBody.trim(), + }, + ); + + if (!result.success) { + console.error("Failed to update computed column:", result.error); + return; } else { - // Create new column - const result = await addComputedColumnAction(projectId, query.id, { - name: data.name, - functionBody: data.functionBody, - }); - - if (result.success) { - toast.success("Computed column created successfully"); - handleCancelEdit(); - } else { - console.error("Failed to add computed column:", result.error); - toast.error("Failed to add computed column"); - } + handleEditColumn(result.data); + } + } else { + const result = await addComputedColumnAction(projectId, query.id, { + name: data.name.trim(), + functionBody: data.functionBody.trim(), + }); + + if (!result.success) { + console.error("Failed to add computed column:", result.error); + return; + } else { + handleEditColumn(result.data); } - } catch (error) { - console.error("Failed to save computed column:", error); - toast.error("Failed to save computed column"); - } finally { - setIsSubmitting(false); } + + setIsSubmitting(false); }; return ( -
+
@@ -387,153 +373,156 @@ export function ComputedColumnsTab({ query, projectId, completions }: Props) { -
- {/* Column Selection and New Button */} -
-
- Computed columns -
- -
-
- {hasComputedColumns ? ( - - ) : ( -
- No computed columns yet -
- )} +
+
+ {/* Column Selection and New Button */} +
+
+ Computed columns
- +
+
+ {hasComputedColumns ? ( + + ) : ( +
+ No computed columns yet +
+ )} +
+ + +
-
+ - {/* Computed Column Form */} -
- - {/* Column Name Field */} - ( - - Column name - - - - - - )} - /> - - {/* Function Body Field */} - ( - -
- Function body - -
- -
- + + {/* Column Name Field */} + ( + + Column name + + + + + + )} + /> + + {/* Function Body Field */} + ( + +
+ Function body +
- - -
- )} - /> - - {/* Action Buttons */} -
- {selectedColumnId && ( - - )} + +
+ +
+
+ + + )} + /> + + {/* Action Buttons */} +
+ {selectedColumnId && ( + + )} + + {selectedColumnId && ( + + )} - {selectedColumnId && ( - )} - - -
- - +
+ + +
); diff --git a/packages/app/src/components/data/query/query-definition-explorer.tsx b/packages/app/src/components/data/query/query-definition-explorer.tsx index fe68d00e..cf096749 100644 --- a/packages/app/src/components/data/query/query-definition-explorer.tsx +++ b/packages/app/src/components/data/query/query-definition-explorer.tsx @@ -6,17 +6,12 @@ import { GroupConfig } from "@common/db/schema/common"; import { QueryDefinition, canAddTable, - canJoinAsSiblings, - SiblingJoinConfig, getAncestorTables, } from "@common/db/schema/query"; import { TableName } from "@common/db/schema/data"; import { TableCounts } from "@/components/data/helpers"; import { Checkbox } from "@/components/ui/checkbox"; import { Label } from "@/components/ui/label"; -import { Button } from "@/components/ui/button"; -import { PlusCircle } from "lucide-react"; -import { toast } from "sonner"; // Get all descendant tables of a given table function getDescendantTables( @@ -213,81 +208,6 @@ function transformSchemaToNodes( .filter((node): node is TableColumnNode => node !== null); } -// Helper to find table information by ID -function findTableInfoById( - schemaConfig: GroupConfig[], - tableId: string, -): GroupConfig | undefined { - return schemaConfig.find((group) => group.dbName === tableId); -} - -// Helper to get all join fields between two tables -function getJoinFields( - // eslint-disable-next-line @typescript-eslint/no-unused-vars - _source: GroupConfig, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - _target: GroupConfig, -): { sourceField: string; targetField: string }[] { - // In this simplified case, we'll join using sampleInformationId - // which is available in all test tables - return [ - { - sourceField: "sampleInformationId", - targetField: "sampleInformationId", - }, - ]; -} - -type SiblingJoinOptionProps = { - sourceTable: TableName; - targetTable: TableName; - schemaConfig: GroupConfig[]; - onAdd: (_join: SiblingJoinConfig) => void; -}; - -function SiblingJoinOption({ - sourceTable, - targetTable, - schemaConfig, - onAdd, -}: SiblingJoinOptionProps) { - const sourceTableInfo = findTableInfoById(schemaConfig, sourceTable); - const targetTableInfo = findTableInfoById(schemaConfig, targetTable); - - if (!sourceTableInfo || !targetTableInfo) return null; - - const joinFields = getJoinFields(sourceTableInfo, targetTableInfo); - - const handleAddJoin = () => { - const joinConfig: SiblingJoinConfig = { - sourceTable, - targetTable, - joinFields, - }; - onAdd(joinConfig); - }; - - return ( -
-
-
- {sourceTableInfo.label} → {targetTableInfo.label} -
-
- Join on:{" "} - {joinFields - .map((f) => `${f.sourceField} = ${f.targetField}`) - .join(", ")} -
-
- -
- ); -} - type Props = { schemaConfig: GroupConfig[]; initialDefinition?: QueryDefinition | null; @@ -318,53 +238,6 @@ export default function QueryDefinitionExplorer({ showEmptyTables, ); - // Get all potential sibling joins between selected tables - const getPotentialSiblingJoins = () => { - const joins: { source: TableName; target: TableName }[] = []; - - // Find base table (root table with highest hierarchy depth) - const baseTable = selectedTables.length > 0 ? selectedTables[0] : null; - if (!baseTable) return joins; - - // Check each selected table against the base table for potential sibling joins - for (let i = 1; i < selectedTables.length; i++) { - const otherTable = selectedTables[i]; - - if (canJoinAsSiblings(baseTable, otherTable)) { - joins.push({ source: baseTable, target: otherTable }); - } - } - - return joins; - }; - - // Add a sibling join to the definition - const addSiblingJoin = (join: SiblingJoinConfig) => { - const newDefinition = { ...definition }; - - if (!newDefinition[join.sourceTable]) { - // Table doesn't exist in definition, create it with empty columns - newDefinition[join.sourceTable] = { - columns: [], - siblingJoins: [join], - }; - } else { - // Table exists, ensure siblingJoins array exists and add the join - const existingConfig = newDefinition[join.sourceTable]!; - const existingJoins = existingConfig.siblingJoins || []; - - newDefinition[join.sourceTable] = { - ...existingConfig, - siblingJoins: [...existingJoins, join], - }; - } - - setDefinition(newDefinition); - onDefinitionChange?.(newDefinition); - - toast.success(`Joined ${join.sourceTable} with ${join.targetTable}`); - }; - // Helper to find a table config in the schema const findTableConfig = (tableId: string): GroupConfig | undefined => { return schemaConfig.find((group) => group.dbName === tableId); @@ -522,17 +395,15 @@ export default function QueryDefinitionExplorer({ setExpandedTables(newExpandedTables); }; - const potentialJoins = getPotentialSiblingJoins(); - return ( -
+
setShowEmptyTables(checked as boolean)} /> -
@@ -546,28 +417,6 @@ export default function QueryDefinitionExplorer({ onColumnSelect={handleColumnSelect} onToggleColumns={handleToggleColumns} /> - - {/* Show available table joins section directly in the UI */} - {potentialJoins.length > 0 && ( -
-

Available Table Joins

-

- These tables can be joined together to show related data. Each join - creates a relationship between tables with related samples. -

-
- {potentialJoins.map((join, index) => ( - - ))} -
-
- )}
); } diff --git a/packages/app/src/components/data/query/query-definition-summary.tsx b/packages/app/src/components/data/query/query-definition-summary.tsx index 0d8c119c..061b364a 100644 --- a/packages/app/src/components/data/query/query-definition-summary.tsx +++ b/packages/app/src/components/data/query/query-definition-summary.tsx @@ -20,7 +20,7 @@ export function QueryDefinitionSummary({ definition, schemaConfig }: Props) { }; return ( -
+

Definition Summary

diff --git a/packages/app/src/components/data/query/query-definition-tabs.tsx b/packages/app/src/components/data/query/query-definition-tabs.tsx index 339148c2..4e99b32c 100644 --- a/packages/app/src/components/data/query/query-definition-tabs.tsx +++ b/packages/app/src/components/data/query/query-definition-tabs.tsx @@ -9,6 +9,7 @@ import QueryDefinitionExplorer from "./query-definition-explorer"; import { QueryDefinitionSummary } from "./query-definition-summary"; import { ComputedColumnsTab } from "./computed-columns-tab"; import { Query } from "@common/db/schema/query"; +import { Card } from "@/components/ui/card"; type Props = { schemaConfig: GroupConfig[]; @@ -16,7 +17,7 @@ type Props = { tableCounts: TableCounts; projectId: string; definition: QueryDefinition; - onDefinitionChange: (definition: QueryDefinition) => void; + onDefinitionChange: (_definition: QueryDefinition) => void; completions: string[]; }; @@ -32,36 +33,46 @@ export function QueryDefinitionTabs({ const [activeTab, setActiveTab] = useState("columns"); return ( - - + + Columns Computed columns Summary - - + + + + - - + + + + - - + + + + ); diff --git a/packages/app/src/components/data/query/query-definition.tsx b/packages/app/src/components/data/query/query-definition.tsx index 4ef5c1b2..a5baa95a 100644 --- a/packages/app/src/components/data/query/query-definition.tsx +++ b/packages/app/src/components/data/query/query-definition.tsx @@ -10,6 +10,7 @@ import { toast } from "sonner"; import { TableCounts } from "@/components/data/helpers"; import { QueryDefinitionTabs } from "./query-definition-tabs"; import { QueryData } from "./query-data"; +import { QueryPreviewPlaceholder } from "./query-preview-placeholder"; import { useState } from "react"; import { ColumnConfig } from "@common/db/schema/common"; import { TableName } from "@common/db/schema/data"; @@ -62,34 +63,50 @@ export function QueryDefinition({ } }; + // Check if any columns are selected + const hasSelectedColumns = + Object.keys(definition).length > 0 && + Object.values(definition).some((tableDef) => tableDef.columns.length > 0); + return ( -
+
{/* Preview Table at the top */} - -
-

Preview

-

- Preview of your query results -

-
-
- +
+
+
+

Preview

+

+ Live preview of your query results +

+
+
+
+ {hasSelectedColumns ? ( + + ) : ( + + )} +
{/* Tabs section below */} -
-

Query definition

-

- Configure your query by selecting tables, columns, and computed - columns -

+
+
+

+ Query definition +

+

+ Configure your query by selecting tables, columns, and computed + columns +

+
@@ -61,12 +51,6 @@ function QueryLayoutClient({ />
- setSidebarOpen(!sidebarOpen)} - projectId={projectId} - queryId={queryId} - /> - - {sidebarOpen && ( - - setSidebarOpen(false)} - completions={completions} - /> - - )}
); diff --git a/packages/app/src/components/data/query/query-preview-placeholder.tsx b/packages/app/src/components/data/query/query-preview-placeholder.tsx new file mode 100644 index 00000000..97de3179 --- /dev/null +++ b/packages/app/src/components/data/query/query-preview-placeholder.tsx @@ -0,0 +1,24 @@ +import { Database, Table } from "lucide-react"; + +export function QueryPreviewPlaceholder() { + return ( +
+
+ +
+
+

+ No columns selected +

+

+ Select tables and columns from the definition tabs below to see a + preview of your query results here. +

+
+
+ + Preview will appear here + + + ); +} diff --git a/packages/app/src/components/data/query/query-sidebar-toggle-button.tsx b/packages/app/src/components/data/query/query-sidebar-toggle-button.tsx deleted file mode 100644 index c2d4fb0e..00000000 --- a/packages/app/src/components/data/query/query-sidebar-toggle-button.tsx +++ /dev/null @@ -1,44 +0,0 @@ -"use client"; - -import { Button } from "@/components/ui/button"; -import { Calculator } from "lucide-react"; - -import { usePathname } from "next/navigation"; - -type QuerySidebarToggleButtonProps = { - isOpen: boolean; - onToggle: () => void; - projectId: string; - queryId: string; -}; - -export function QuerySidebarToggleButton({ - isOpen, - onToggle, - projectId, - queryId, -}: QuerySidebarToggleButtonProps) { - const pathname = usePathname(); - - const isDefinitionView = - pathname === `/projects/${projectId}/data/queries/${queryId}/definition`; - - if (!isDefinitionView) { - return null; - } - - return ( - !isOpen && ( - - ) - ); -} diff --git a/packages/app/src/components/ui/tabs.tsx b/packages/app/src/components/ui/tabs.tsx index 885f4047..e7d8a4a0 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: Mon, 8 Sep 2025 15:44:35 +0100 Subject: [PATCH 34/37] update theme --- .../data/plot/definition/layout.tsx | 29 ++++++++++++------- .../sections/distribution-section.tsx | 6 ++-- .../components/data/plot/plots/base-plot.tsx | 26 +++++++++++------ .../components/data/plot/plots/box-plot.tsx | 15 +++++++--- .../src/components/data/plot/plots/common.tsx | 5 +++- .../data/plot/plots/histogram-plot.tsx | 10 +++++-- .../components/data/plot/plots/line-plot.tsx | 14 +++++++-- .../data/plot/plots/plot-annotations.tsx | 6 ++-- .../data/plot/plots/scatter-plot.tsx | 6 +++- .../data/plot/plots/tooltip/plot-tooltip.tsx | 8 ++--- packages/app/src/hooks/use-plot-theme.ts | 28 ++++++++++++++++++ 11 files changed, 114 insertions(+), 39 deletions(-) create mode 100644 packages/app/src/hooks/use-plot-theme.ts diff --git a/packages/app/src/components/data/plot/definition/layout.tsx b/packages/app/src/components/data/plot/definition/layout.tsx index c7e123fc..508b055d 100644 --- a/packages/app/src/components/data/plot/definition/layout.tsx +++ b/packages/app/src/components/data/plot/definition/layout.tsx @@ -9,12 +9,13 @@ import { import { Plot, PlotDefinition } from "@common/db/schema/plot"; import { PlotView } from "../plot-view"; import { Button } from "@/components/ui/button"; +import { toast } from "sonner"; import { DownloadIcon, PanelRight } from "lucide-react"; import { cn } from "@/utils/styles"; import { useMediaQuery } from "@/hooks/use-media-query"; import { PlotSidebar } from "./plot-sidebar"; -import { PlotExportDialog } from "../plot-export-dialog"; +import { exportPlotAsImage } from "../plot-export"; import { PlotSaveButton } from "@/components/data/plot/save-plot-button"; import { PlotSizeControls, type PlotSizePreset } from "../plot-size-controls"; import { calculatePlotDimensions } from "../plots/dimensions"; @@ -41,7 +42,6 @@ export function PlotLayout({ }: PlotDefinitionLayoutProps) { const containerRef = useRef(null); const [sidebarOpen, setSidebarOpen] = useState(false); - const [exportDialogOpen, setExportDialogOpen] = useState(false); const [dimensions, setDimensions] = useState({ totalWidth: 0, totalHeight: 0, @@ -134,8 +134,22 @@ export function PlotLayout({ currentPreset={sizePreset} onPresetChange={setSizePreset} /> - {!sidebarOpen && ( @@ -182,13 +196,6 @@ export function PlotLayout({ setSidebarOpen={setSidebarOpen} /> - - ); } diff --git a/packages/app/src/components/data/plot/definition/sections/distribution-section.tsx b/packages/app/src/components/data/plot/definition/sections/distribution-section.tsx index 95fd40c8..df3afb97 100644 --- a/packages/app/src/components/data/plot/definition/sections/distribution-section.tsx +++ b/packages/app/src/components/data/plot/definition/sections/distribution-section.tsx @@ -3,7 +3,7 @@ import { SectionWrapper } from "./section-wrapper"; import { type Plot, type PlotDefinition } from "@common/db/schema/plot"; import { FormProvider, useForm } from "react-hook-form"; - +import { useDebounce } from "@/hooks/use-debounce"; import { updatePlotDefinitionAction } from "@/actions/data/plots/updatePlotDefinition"; import { toast } from "sonner"; @@ -37,13 +37,15 @@ export function DistributionSection({ plot }: DistributionSectionProps) { } }; + const debouncedStyleChange = useDebounce(handleStyleChange, 500); + return ( -
+
diff --git a/packages/app/src/components/data/plot/plots/base-plot.tsx b/packages/app/src/components/data/plot/plots/base-plot.tsx index 6ceb8930..504ff129 100644 --- a/packages/app/src/components/data/plot/plots/base-plot.tsx +++ b/packages/app/src/components/data/plot/plots/base-plot.tsx @@ -4,6 +4,7 @@ import { Axis } from "@visx/axis"; import { MARGIN } from "./common"; import { AxisScale } from "@visx/axis/lib/types"; import { ScaleBand } from "d3-scale"; +import { usePlotTheme } from "@/hooks/use-plot-theme"; export interface AxisConfig { scale: AxisScale | ScaleBand; @@ -60,6 +61,7 @@ export function BaseCartesianPlot({ yAxis, children, }: BaseCartesianPlotProps) { + const theme = usePlotTheme(); // Calculate the actual plot dimensions (excluding margins) const plotWidth = width - MARGIN.left - MARGIN.right; const plotHeight = height - MARGIN.top - MARGIN.bottom; @@ -93,7 +95,7 @@ export function BaseCartesianPlot({ height={plotHeight} numTicksRows={yTicks?.length ?? 10} numTicksColumns={xTicks?.length ?? 10} - stroke="#e0e0e0" + stroke={theme.grid} left={MARGIN.left} top={MARGIN.top} /> @@ -112,16 +114,19 @@ export function BaseCartesianPlot({ top={height - MARGIN.bottom} left={MARGIN.left} label={xAxis.label} - labelClassName="text-sm" - stroke="#000000" - tickStroke="#000000" + labelClassName="text-sm font-medium text-background" + labelProps={{ + fill: theme.text, + }} + stroke={theme.axis} + tickStroke={theme.axis} tickValues={xTicks} numTicks={xTicks ? undefined : 10} tickLabelProps={() => ({ dy: 8, textAnchor: "middle", fontSize: 12, - fill: "#000000", + fill: theme.text, })} tickFormat={(value) => `${value}`} /> @@ -132,9 +137,12 @@ export function BaseCartesianPlot({ left={MARGIN.left} top={MARGIN.top} label={yAxis.label} - labelClassName="text-sm" - stroke="#000000" - tickStroke="#000000" + labelClassName="text-sm font-medium text-background" + labelProps={{ + fill: theme.text, + }} + stroke={theme.axis} + tickStroke={theme.axis} labelOffset={40} tickValues={yTicks} numTicks={yTicks ? undefined : 10} @@ -143,7 +151,7 @@ export function BaseCartesianPlot({ dy: 4, textAnchor: "end", fontSize: 12, - fill: "#000000", + fill: theme.text, })} tickFormat={(value) => `${value}`} /> diff --git a/packages/app/src/components/data/plot/plots/box-plot.tsx b/packages/app/src/components/data/plot/plots/box-plot.tsx index 70d4dd3f..43227f8d 100644 --- a/packages/app/src/components/data/plot/plots/box-plot.tsx +++ b/packages/app/src/components/data/plot/plots/box-plot.tsx @@ -2,6 +2,7 @@ import { Line, Bar } from "@visx/shape"; import { Group } from "@visx/group"; import { Plot, PlotDefinition } from "@common/db/schema/plot"; import { DataPoint } from "./common"; +import { usePlotTheme } from "@/hooks/use-plot-theme"; import { getColorScale, MARGIN } from "./common"; import { CommonPlotProps } from "./common"; import { BaseCartesianPlot } from "./base-plot"; @@ -142,6 +143,7 @@ function BaseBoxPlot({ }) => void; hideTooltip: () => void; }) { + const theme = usePlotTheme(); const { xAxis, yAxis } = plot.definition; const colorScale = getColorScale(data); @@ -219,7 +221,12 @@ function BaseBoxPlot({ {Array.from(boxPlots.entries()).map(([x, stats]) => { const xPos = xBandScale(x) ?? 0; const boxCenter = xPos + xBandScale.bandwidth() / 2; - const color = colorScale(String(x)); + // Get the first point's color for this group + const groupPoints = data.filter((point) => point.x === x); + const firstPoint = groupPoints[0]; + const color = firstPoint?.originalColor + ? colorScale(String(firstPoint.originalColor)) + : theme.primary; // Debug each box plot @@ -264,7 +271,7 @@ function BaseBoxPlot({ x: boxCenter + boxWidth / 2, y: yLinearScale(stats.median), }} - stroke="white" + stroke={theme.background} strokeWidth={2} /> @@ -307,8 +314,8 @@ function BaseBoxPlot({ key={i} cx={boxCenter} cy={yLinearScale(outlier)} - r={2} - fill={color} + r={4} + fill={theme.warning} opacity={0.6} onMouseMove={(event) => { const coords = localPoint( diff --git a/packages/app/src/components/data/plot/plots/common.tsx b/packages/app/src/components/data/plot/plots/common.tsx index 62cfd9d4..9bd65f0f 100644 --- a/packages/app/src/components/data/plot/plots/common.tsx +++ b/packages/app/src/components/data/plot/plots/common.tsx @@ -5,6 +5,7 @@ import { import { scaleLinear, scaleOrdinal } from "@visx/scale"; import { extent } from "@visx/vendor/d3-array"; +import { usePlotTheme } from "@/hooks/use-plot-theme"; import { GlyphCircle, GlyphCross, @@ -318,6 +319,7 @@ export function getColorMapping( } export function PlotTitle({ title }: { title: string }) { + const theme = usePlotTheme(); return (
@@ -325,7 +327,8 @@ export function PlotTitle({ title }: { title: string }) { x="50%" y="20" textAnchor="middle" - className="fill-current text-base font-semibold" + fill={theme.text} + className="text-base font-semibold" > {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 8265da48..43270c6f 100644 --- a/packages/app/src/components/data/plot/plots/histogram-plot.tsx +++ b/packages/app/src/components/data/plot/plots/histogram-plot.tsx @@ -1,6 +1,7 @@ import { Bar } from "@visx/shape"; import { Plot, PlotDefinition } from "@common/db/schema/plot"; import { DataPoint } from "./common"; +import { usePlotTheme } from "@/hooks/use-plot-theme"; import { getColorScale, MARGIN } from "./common"; import { CommonPlotProps } from "./common"; import { BaseCartesianPlot } from "./base-plot"; @@ -78,6 +79,7 @@ function BaseHistogramPlot({ }) => void; hideTooltip: () => void; }) { + const theme = usePlotTheme(); const { xAxis, grouping } = plot.definition; const colorScale = getColorScale(data); @@ -118,7 +120,7 @@ function BaseHistogramPlot({ }); } else { // If no grouping, use a single group - colorGroups.set("default", data); + colorGroups.set(theme.primary, data); } // Create stacked bins @@ -195,7 +197,11 @@ function BaseHistogramPlot({ y={yScale(bin.total - yOffset)} width={barWidth} height={barHeight} - fill={colorScale(group.color)} + fill={ + group.color === theme.primary + ? theme.primary + : colorScale(group.color) + } onMouseEnter={(event) => { const coords = localPoint( event.target as SVGRectElement, 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 05263171..8b881265 100644 --- a/packages/app/src/components/data/plot/plots/line-plot.tsx +++ b/packages/app/src/components/data/plot/plots/line-plot.tsx @@ -1,6 +1,7 @@ import { LinePath } from "@visx/shape"; import { Plot, PlotDefinition } from "@common/db/schema/plot"; import { DataPoint } from "./common"; +import { usePlotTheme } from "@/hooks/use-plot-theme"; import { getScaleConfig, getColorScale } from "./common"; import { CommonPlotProps } from "./common"; import { BaseCartesianPlot } from "./base-plot"; @@ -46,6 +47,7 @@ function BaseLinePlot({ }) => void; hideTooltip: () => void; }) { + const theme = usePlotTheme(); const { grouping } = plot.definition; const scaleConfig = getScaleConfig(plot.definition, data, width, height); const { xAxis, yAxis } = scaleConfig; @@ -55,14 +57,16 @@ function BaseLinePlot({ const dataByColor: LineGroup[] = grouping?.color?.column ? Array.from( data.reduce((groups, point) => { - const color = String(point.originalColor || "black"); + const color = point.originalColor + ? String(point.originalColor) + : theme.primary; const group = groups.get(color) || []; group.push(point); groups.set(color, group); return groups; }, new Map()), ).map(([color, points]) => ({ color, points })) - : [{ color: "black", points: data }]; + : [{ color: theme.primary, points: data }]; return ( <> @@ -106,7 +110,11 @@ function BaseLinePlot({ cx={xAxis.scale(Number(point.x))} cy={yAxis.scale(Number(point.y))} r={3} - fill={colorScale(String(point.originalColor || "black"))} + fill={ + point.originalColor + ? colorScale(String(point.originalColor)) + : theme.primary + } onMouseOver={(event) => { const coords = localPoint( event.target as SVGCircleElement, diff --git a/packages/app/src/components/data/plot/plots/plot-annotations.tsx b/packages/app/src/components/data/plot/plots/plot-annotations.tsx index b2fce237..68926cfb 100644 --- a/packages/app/src/components/data/plot/plots/plot-annotations.tsx +++ b/packages/app/src/components/data/plot/plots/plot-annotations.tsx @@ -2,6 +2,7 @@ import { Text } from "@visx/text"; import { Line } from "@visx/shape"; import { Group } from "@visx/group"; import { AxisScale } from "@visx/axis/lib/types"; +import { usePlotTheme } from "@/hooks/use-plot-theme"; interface ReferenceLine { xStart: number; @@ -34,6 +35,7 @@ export function PlotAnnotations({ xScale, yScale, }: PlotAnnotationsProps) { + const theme = usePlotTheme(); return ( {/* Reference Lines */} @@ -45,7 +47,7 @@ export function PlotAnnotations({ y: Number(yScale(line.yStart)), }} to={{ x: Number(xScale(line.xEnd)), y: Number(yScale(line.yEnd)) }} - stroke={line.color || "#000000"} + stroke={line.color || theme.text} strokeWidth={1} strokeDasharray={line.dashed ? "4,4" : undefined} /> @@ -57,7 +59,7 @@ export function PlotAnnotations({ key={`text-label-${i}`} x={Number(xScale(label.x))} y={Number(yScale(label.y))} - fill={label.color || "#000000"} + fill={label.color || theme.text} fontSize={label.fontSize || 12} angle={label.rotation || 0} textAnchor="middle" 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 b0452459..a1042eec 100644 --- a/packages/app/src/components/data/plot/plots/scatter-plot.tsx +++ b/packages/app/src/components/data/plot/plots/scatter-plot.tsx @@ -1,5 +1,6 @@ import { Plot, PlotDefinition } from "@common/db/schema/plot"; import { DataPoint } from "./common"; +import { usePlotTheme } from "@/hooks/use-plot-theme"; import { getColorScale, getScaleConfig, @@ -55,6 +56,7 @@ function BaseScatterPlot({ }) => void; hideTooltip: () => void; }) { + const theme = usePlotTheme(); const { referenceLines, textLabels } = plot.definition; const scaleConfig = getScaleConfig(plot.definition, data, width, height); const { xAxis, yAxis } = scaleConfig; @@ -80,7 +82,9 @@ function BaseScatterPlot({ {data.map((point, i) => { const x = xAxis.scale(Number(point.x)); const y = yAxis.scale(Number(point.y)); - const color = colorScale(String(point.originalColor || "")); + const color = point.originalColor + ? colorScale(String(point.originalColor)) + : theme.primary; const symbolType = (symbolScale(String(point.originalSymbol || "")) || "circle") as SymbolType; const Glyph = VISX_SYMBOLS[symbolType]; diff --git a/packages/app/src/components/data/plot/plots/tooltip/plot-tooltip.tsx b/packages/app/src/components/data/plot/plots/tooltip/plot-tooltip.tsx index fcc7aff4..e87f9f21 100644 --- a/packages/app/src/components/data/plot/plots/tooltip/plot-tooltip.tsx +++ b/packages/app/src/components/data/plot/plots/tooltip/plot-tooltip.tsx @@ -11,13 +11,13 @@ export interface TooltipProps { export function PlotTooltip({ rows }: TooltipProps) { return ( - <> +
{rows.map((row, i) => ( -
- {row.label}: {row.value} +
+ {row.label}: {row.value}
))} - +
); } diff --git a/packages/app/src/hooks/use-plot-theme.ts b/packages/app/src/hooks/use-plot-theme.ts new file mode 100644 index 00000000..264ec26c --- /dev/null +++ b/packages/app/src/hooks/use-plot-theme.ts @@ -0,0 +1,28 @@ +import { useTheme } from "next-themes"; + +export interface PlotTheme { + text: string; + grid: string; + axis: string; + background: string; + primary: string; + warning: string; + tooltipBackground: string; + tooltipText: string; +} + +export function usePlotTheme() { + const { theme } = useTheme(); + const isDark = theme === "dark"; + + return { + text: isDark ? "hsl(0 0% 98%)" : "hsl(215 25% 15%)", // --foreground + grid: isDark ? "hsl(220 16% 32%)" : "hsl(215 20% 75%)", // --border + axis: isDark ? "hsl(0 0% 85%)" : "hsl(215 25% 30%)", // --muted-foreground + background: isDark ? "hsl(220 16% 18%)" : "hsl(210 20% 98%)", // --background + primary: "hsl(142 75% 35%)", // --primary + warning: isDark ? "hsl(39 90% 45%)" : "hsl(36 97% 50%)", // --warning + tooltipBackground: isDark ? "hsl(220 16% 22%)" : "hsl(0 0% 100%)", // --card + tooltipText: isDark ? "hsl(0 0% 98%)" : "hsl(215 25% 15%)", // --card-foreground + }; +} From e66c9a749b769db6ea3e3c2b053fabdce82d358f Mon Sep 17 00:00:00 2001 From: James Holcombe Date: Mon, 8 Sep 2025 16:15:13 +0100 Subject: [PATCH 35/37] lint --- packages/app/src/components/data/plot/definition/layout.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/app/src/components/data/plot/definition/layout.tsx b/packages/app/src/components/data/plot/definition/layout.tsx index 508b055d..0dd30dd6 100644 --- a/packages/app/src/components/data/plot/definition/layout.tsx +++ b/packages/app/src/components/data/plot/definition/layout.tsx @@ -139,12 +139,12 @@ export function PlotLayout({ onClick={async () => { try { const plotElement = - document.querySelector('[data-plot="true"]')?.parentElement; + document.querySelector("[data-plot='true']")?.parentElement; if (!plotElement) { throw new Error("Plot element not found"); } await exportPlotAsImage(plotElement as HTMLElement, plot); - } catch (_error) { + } catch { toast.error("Failed to export plot"); } }} From aebd6da51c02e8b6e96a991769abf775b0dab930 Mon Sep 17 00:00:00 2001 From: James Holcombe Date: Tue, 9 Sep 2025 12:04:30 +0100 Subject: [PATCH 36/37] plot styling --- .../data/plot/definition/layout.tsx | 74 +++++-- .../src/components/data/plot/plot-export.ts | 108 ---------- .../components/data/plot/plot-export/index.ts | 41 ++++ .../components/data/plot/plot-export/types.ts | 7 + .../components/data/plot/plot-export/utils.ts | 92 ++++++++ .../src/components/data/plot/plots/common.tsx | 4 +- .../data/plot/plots/plot-wrapper.tsx | 201 +++++++++++++----- .../components/data/plot/plots/svg-legend.tsx | 14 +- packages/app/src/hooks/use-plot-theme.ts | 1 + 9 files changed, 351 insertions(+), 191 deletions(-) delete mode 100644 packages/app/src/components/data/plot/plot-export.ts create mode 100644 packages/app/src/components/data/plot/plot-export/index.ts create mode 100644 packages/app/src/components/data/plot/plot-export/types.ts create mode 100644 packages/app/src/components/data/plot/plot-export/utils.ts diff --git a/packages/app/src/components/data/plot/definition/layout.tsx b/packages/app/src/components/data/plot/definition/layout.tsx index 0dd30dd6..647a7d7f 100644 --- a/packages/app/src/components/data/plot/definition/layout.tsx +++ b/packages/app/src/components/data/plot/definition/layout.tsx @@ -9,13 +9,19 @@ import { import { Plot, PlotDefinition } from "@common/db/schema/plot"; import { PlotView } from "../plot-view"; import { Button } from "@/components/ui/button"; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from "@/components/ui/dropdown-menu"; import { toast } from "sonner"; -import { DownloadIcon, PanelRight } from "lucide-react"; +import { DownloadIcon, FileIcon, ImageIcon, PanelRight } from "lucide-react"; import { cn } from "@/utils/styles"; import { useMediaQuery } from "@/hooks/use-media-query"; import { PlotSidebar } from "./plot-sidebar"; -import { exportPlotAsImage } from "../plot-export"; +import { exportPlot } from "../plot-export"; import { PlotSaveButton } from "@/components/data/plot/save-plot-button"; import { PlotSizeControls, type PlotSizePreset } from "../plot-size-controls"; import { calculatePlotDimensions } from "../plots/dimensions"; @@ -134,23 +140,53 @@ export function PlotLayout({ currentPreset={sizePreset} onPresetChange={setSizePreset} /> - + + + + + + { + try { + const plotElement = + document.querySelector(".plot-container"); + if (!plotElement) { + throw new Error("Plot element not found"); + } + await exportPlot(plotElement as HTMLElement, plot, { + format: "svg", + }); + } catch { + toast.error("Failed to export plot as SVG"); + } + }} + > + Export as SVG + + { + try { + const plotElement = + document.querySelector(".plot-container"); + if (!plotElement) { + throw new Error("Plot element not found"); + } + await exportPlot(plotElement as HTMLElement, plot, { + format: "png", + scale: 2, + backgroundColor: "white", + }); + } catch { + toast.error("Failed to export plot as PNG"); + } + }} + > + Export as PNG + + + {!sidebarOpen && (
); }} diff --git a/packages/app/src/components/data/plot/plots/svg-legend.tsx b/packages/app/src/components/data/plot/plots/svg-legend.tsx index ed2a51f2..f97f242a 100644 --- a/packages/app/src/components/data/plot/plots/svg-legend.tsx +++ b/packages/app/src/components/data/plot/plots/svg-legend.tsx @@ -2,6 +2,7 @@ import { Group } from "@visx/group"; import { Text } from "@visx/text"; import { OBSERVABLE_COLORS } from "./common"; import { VISX_SYMBOLS, type SymbolType } from "./common"; +import { usePlotTheme } from "@/hooks/use-plot-theme"; interface LegendProps { colorDomain?: string[]; @@ -22,11 +23,11 @@ export function SVGLegend({ symbolMapping, width, }: LegendProps) { + const theme = usePlotTheme(); if (!colorDomain.length && !symbolDomain.length) return null; - const LEGEND_ITEM_HEIGHT = 24; const LEGEND_ITEM_WIDTH = 140; - const LEGEND_PADDING = 8; + const LEGEND_PADDING = 16; const SECTION_GAP = 16; const ITEMS_PER_ROW = Math.floor((width - 20) / LEGEND_ITEM_WIDTH); @@ -37,7 +38,7 @@ export function SVGLegend({ : 0; return ( - + {/* Color Legend */} {colorDomain.length > 0 && ( @@ -47,12 +48,13 @@ export function SVGLegend({ y={LEGEND_PADDING} fontSize={12} textAnchor="middle" + fill={theme.text} dy=".33em" > {colorLabel} )} - + {colorDomain.map((value, i) => { const row = Math.floor(i / ITEMS_PER_ROW); const col = i % ITEMS_PER_ROW; @@ -66,7 +68,7 @@ export function SVGLegend({ return ( - + {value} @@ -90,7 +92,7 @@ export function SVGLegend({ {symbolLabel} )} - + {symbolDomain.map((value, i) => { const row = Math.floor(i / ITEMS_PER_ROW); const col = i % ITEMS_PER_ROW; diff --git a/packages/app/src/hooks/use-plot-theme.ts b/packages/app/src/hooks/use-plot-theme.ts index 264ec26c..7c0d77a4 100644 --- a/packages/app/src/hooks/use-plot-theme.ts +++ b/packages/app/src/hooks/use-plot-theme.ts @@ -24,5 +24,6 @@ export function usePlotTheme() { warning: isDark ? "hsl(39 90% 45%)" : "hsl(36 97% 50%)", // --warning tooltipBackground: isDark ? "hsl(220 16% 22%)" : "hsl(0 0% 100%)", // --card tooltipText: isDark ? "hsl(0 0% 98%)" : "hsl(215 25% 15%)", // --card-foreground + containerBorder: isDark ? "#ffffff" : "#000000", // --border }; } From 03bd7b36eb1931ca30009c2be20c6c9d232d5673 Mon Sep 17 00:00:00 2001 From: James Holcombe Date: Tue, 9 Sep 2025 12:25:59 +0100 Subject: [PATCH 37/37] final plot tweaks --- .../data/plot/definition/layout.tsx | 4 +- .../plot/definition/plot-sections-config.ts | 1 + .../definition/sections/general-section.tsx | 10 +- .../data/plot/plot-export-dialog.tsx | 315 ------------------ .../src/components/data/plot/plot-view.tsx | 15 + .../data/plot/plots/plot-wrapper.tsx | 25 +- .../data/plot/plots/violin-plot.tsx | 218 ++++++++++++ packages/common/src/db/schema/plot.ts | 35 +- 8 files changed, 289 insertions(+), 334 deletions(-) delete mode 100644 packages/app/src/components/data/plot/plot-export-dialog.tsx create mode 100644 packages/app/src/components/data/plot/plots/violin-plot.tsx diff --git a/packages/app/src/components/data/plot/definition/layout.tsx b/packages/app/src/components/data/plot/definition/layout.tsx index 647a7d7f..8aaab28f 100644 --- a/packages/app/src/components/data/plot/definition/layout.tsx +++ b/packages/app/src/components/data/plot/definition/layout.tsx @@ -6,7 +6,7 @@ import { evaluateComputedColumns, type TableData, } from "@/hooks/queries/use-query-data"; -import { Plot, PlotDefinition } from "@common/db/schema/plot"; +import { Plot, PlotDefinition, PlotType } from "@common/db/schema/plot"; import { PlotView } from "../plot-view"; import { Button } from "@/components/ui/button"; import { @@ -27,7 +27,7 @@ import { PlotSizeControls, type PlotSizePreset } from "../plot-size-controls"; import { calculatePlotDimensions } from "../plots/dimensions"; interface PlotDefinitionLayoutProps { - plotType: "scatter" | "line" | "histogram" | "bar" | "box"; + plotType: PlotType; projectId: string; plot: Plot; queries: Query[]; diff --git a/packages/app/src/components/data/plot/definition/plot-sections-config.ts b/packages/app/src/components/data/plot/definition/plot-sections-config.ts index d5664abb..27c7f292 100644 --- a/packages/app/src/components/data/plot/definition/plot-sections-config.ts +++ b/packages/app/src/components/data/plot/definition/plot-sections-config.ts @@ -62,4 +62,5 @@ export const PLOT_TYPE_SECTIONS: Record = { histogram: ["general", "axes", "grouping", "distribution"], bar: ["general", "axes", "grouping"], box: ["general", "axes"], + violin: ["general", "axes"], }; diff --git a/packages/app/src/components/data/plot/definition/sections/general-section.tsx b/packages/app/src/components/data/plot/definition/sections/general-section.tsx index a4bbe3e1..d6d9ea9e 100644 --- a/packages/app/src/components/data/plot/definition/sections/general-section.tsx +++ b/packages/app/src/components/data/plot/definition/sections/general-section.tsx @@ -69,7 +69,8 @@ export function GeneralSection({ plot, queries, tables }: GeneralSectionProps) { type === "scatter" || type === "line" || type === "bar" || - type === "box" + type === "box" || + type === "violin" ) { // When switching from histogram, we need to ensure we have a valid yAxis const yAxis = @@ -158,11 +159,12 @@ export function GeneralSection({ plot, queries, tables }: GeneralSectionProps) { - Scatter Plot - Line Plot + Scatter + Line Histogram {/* Bar Chart */} - Box Plot + Box + Violin
diff --git a/packages/app/src/components/data/plot/plot-export-dialog.tsx b/packages/app/src/components/data/plot/plot-export-dialog.tsx deleted file mode 100644 index 6dce8510..00000000 --- a/packages/app/src/components/data/plot/plot-export-dialog.tsx +++ /dev/null @@ -1,315 +0,0 @@ -"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) => { - // - // eslint-disable-next-line prettier/prettier, quotes - 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/data/plot/plot-view.tsx b/packages/app/src/components/data/plot/plot-view.tsx index 0707e1d4..98240496 100644 --- a/packages/app/src/components/data/plot/plot-view.tsx +++ b/packages/app/src/components/data/plot/plot-view.tsx @@ -12,6 +12,7 @@ import { HistogramPlot } from "./plots/histogram-plot"; import { cn } from "@/lib/utils"; import { CommonPlotProps } from "./plots/common"; import { BoxPlot } from "@/components/data/plot/plots/box-plot"; +import { ViolinPlot } from "@/components/data/plot/plots/violin-plot"; export function PlotView({ plot, @@ -90,6 +91,20 @@ export function PlotView({ width={width} /> ); + + case "violin": + return ( + ; + } + } + data={data} + height={height} + width={width} + /> + ); default: return null; } diff --git a/packages/app/src/components/data/plot/plots/plot-wrapper.tsx b/packages/app/src/components/data/plot/plots/plot-wrapper.tsx index ee8f2a80..035b82b2 100644 --- a/packages/app/src/components/data/plot/plots/plot-wrapper.tsx +++ b/packages/app/src/components/data/plot/plots/plot-wrapper.tsx @@ -19,7 +19,7 @@ export interface PlotWrapperProps extends CommonPlotProps { plot: Plot & { definition: Extract< PlotDefinition, - { type: "scatter" | "line" | "bar" | "histogram" | "box" } + { type: "scatter" | "line" | "bar" | "histogram" | "box" | "violin" } >; }; renderContent: (_props: { @@ -226,16 +226,19 @@ export function PlotWrapper({ stroke={theme.containerBorder} strokeWidth={1} /> - {/* Border around legend area */} - + {/* Border around legend area - only if legend exists */} + {(uniqueColors.length > 0 || + uniqueSymbols.length > 0) && ( + + )} )} {/* Main plot */} diff --git a/packages/app/src/components/data/plot/plots/violin-plot.tsx b/packages/app/src/components/data/plot/plots/violin-plot.tsx new file mode 100644 index 00000000..164421ae --- /dev/null +++ b/packages/app/src/components/data/plot/plots/violin-plot.tsx @@ -0,0 +1,218 @@ +import { Group } from "@visx/group"; +import { scaleBand, scaleLinear } from "@visx/scale"; +import { ViolinPlot as VisxViolin } from "@visx/stats"; +import { extent, bin } from "d3-array"; +import { PlotWrapper } from "./plot-wrapper"; +import { CommonPlotProps } from "./common"; +import { Plot } from "@common/db/schema/plot"; +import { usePlotTheme } from "@/hooks/use-plot-theme"; +import { AxisBottom, AxisLeft } from "@visx/axis"; +import { GridRows } from "@visx/grid"; + +import { localPoint } from "@visx/event"; +import { PatternLines } from "@visx/pattern"; + +interface ViolinPlotProps extends CommonPlotProps { + plot: Plot & { + definition: Extract; + }; +} + +export function ViolinPlot({ + plot, + data, + className, + height, + width, +}: ViolinPlotProps) { + const theme = usePlotTheme(); + + return ( + { + // Early return if no data + if (!processedData?.length) return null; + + // Dimensions + const margin = { top: 40, right: 40, bottom: 50, left: 60 }; + const innerWidth = width - margin.left - margin.right; + const innerHeight = height - margin.top - margin.bottom; + + // Get unique categories for x-axis + const categories = Array.from( + new Set(processedData.map((d) => d.x as string)), + ).sort(); + + // Scales + // Set up scales + const xScale = scaleBand({ + range: [0, innerWidth], + domain: categories, + padding: 0.2, + }); + + // Handle y-axis domain + let yDomain: [number, number]; + if (plot.definition.yAxis.domainTickOptions) { + // Use custom domain if specified + const { min, max } = plot.definition.yAxis.domainTickOptions; + yDomain = [min, max]; + } else { + // Calculate domain from data with padding + const allValues = processedData.map((d) => d.y as number); + const [minY, maxY] = extent(allValues) as [number, number]; + const yPadding = (maxY - minY) * 0.1; + yDomain = [minY - yPadding, maxY + yPadding]; + } + + const yScale = scaleLinear({ + range: [innerHeight, 0], + domain: yDomain, + nice: true, + }); + + // Group data by category and create bin data for violin plots + const dataByCategory = categories.map((category) => { + const values = processedData + .filter((d) => d.x === category) + .map((d) => d.y as number); + + // Create bins for the violin plot + // Use the same domain for binning as for the scale + const binGenerator = bin().domain(yDomain).thresholds(40); + const bins = binGenerator(values); + + // Convert bins to violin plot format + const binData = bins.map((bin) => ({ + value: bin.x0 || 0, // bin start value + count: bin.length, // count in this bin + })); + + return { + category, + values, + binData, + }; + }); + + return ( + + + + + {dataByCategory.map( + (d: { + category: string; + values: number[]; + binData: Array<{ value: number; count: number }>; + }) => { + const xPos = xScale(d.category); + const bandWidth = xScale.bandwidth(); + + return ( + d.value} + count={(d) => d.count} + left={xPos} + width={bandWidth} + valueScale={yScale} + fill="url(#violin-lines)" + stroke={theme.primary} + strokeWidth={1} + opacity={0.8} + onMouseMove={(event: React.MouseEvent) => { + const point = localPoint(event); + if (!point) return; + + showTooltip({ + tooltipLeft: point.x, + tooltipTop: point.y, + tooltipData: { + content: ( +
+
{d.category}
+
Count: {d.values.length}
+
+ Range: {Math.min(...d.values).toFixed(2)} -{" "} + {Math.max(...d.values).toFixed(2)} +
+
+ Mean:{" "} + {( + d.values.reduce((a, b) => a + b, 0) / + d.values.length + ).toFixed(2)} +
+
+ Median:{" "} + {d.values + .sort((a, b) => a - b) + [ + Math.floor(d.values.length / 2) + ].toFixed(2)} +
+
+ ), + }, + }); + }} + onMouseLeave={() => hideTooltip()} + /> + ); + }, + )} +
+ + +
+ ); + }} + /> + ); +} diff --git a/packages/common/src/db/schema/plot.ts b/packages/common/src/db/schema/plot.ts index 4dd80db5..116cb139 100644 --- a/packages/common/src/db/schema/plot.ts +++ b/packages/common/src/db/schema/plot.ts @@ -110,7 +110,14 @@ export const appearanceSchema = z.object({ export type AppearanceSettings = z.infer; -const plotTypeSchema = z.enum(["scatter", "line", "histogram", "bar", "box"]); +const plotTypeSchema = z.enum([ + "scatter", + "line", + "histogram", + "bar", + "box", + "violin", +]); export type PlotType = z.infer; // Plot-specific schemas @@ -179,12 +186,22 @@ const boxPlotSchema = z.object({ grouping: groupingSchema.optional().nullable(), }); +const violinPlotSchema = z.object({ + type: z.literal("violin"), + dataSource: dataSourceSchema, + xAxis: axisSchemaCategory, + yAxis: axisSchemaNumeric, + appearance: appearanceSchema.optional(), + grouping: groupingSchema.optional().nullable(), +}); + export const plotDefinitionSchema = z.discriminatedUnion("type", [ scatterPlotSchema, linePlotSchema, histogramPlotSchema, barPlotSchema, boxPlotSchema, + violinPlotSchema, ]); export type PlotDefinition = z.infer; @@ -202,7 +219,11 @@ export function validateAxes(definition: PlotDefinition | null): boolean { return axisSchemaNumericStrict.safeParse(definition.xAxis).success; } - if (definition.type === "bar" || definition.type === "box") { + if ( + definition.type === "bar" || + definition.type === "box" || + definition.type === "violin" + ) { return ( axisSchemaCategoryStrict.safeParse(definition.xAxis).success && axisSchemaNumericStrict.safeParse(definition.yAxis).success @@ -314,6 +335,16 @@ export const defaultPlotDefinitions: Record< PlotDefinition["type"], PlotDefinition > = { + violin: { + type: "violin", + xAxis: { ...defaultAxisCategory }, + yAxis: { ...defaultAxis }, + grouping: null, + dataSource: { + isQuery: false, + tableName: "", + }, + }, scatter: { type: "scatter", xAxis: { ...defaultAxis },