diff --git a/package-lock.json b/package-lock.json index c0010452..6aa5e85c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,15 @@ "packages/*" ], "dependencies": { + "@visx/axis": "^3.12.0", + "@visx/group": "^3.12.0", + "@visx/legend": "^3.12.0", + "@visx/responsive": "^3.12.0", + "@visx/scale": "^3.12.0", + "@visx/shape": "^3.12.0", + "@visx/stats": "^3.12.0", + "@visx/tooltip": "^3.12.0", + "@visx/visx": "^3.12.0", "drizzle-kit": "^0.30.0", "drizzle-orm": "^0.40.0", "wkx": "^0.5.0" @@ -1525,6 +1534,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", @@ -1537,6 +1663,21 @@ "@lezer/common": "^1.1.0" } }, + "node_modules/@codemirror/lang-javascript": { + "version": "6.2.4", + "resolved": "https://registry.npmjs.org/@codemirror/lang-javascript/-/lang-javascript-6.2.4.tgz", + "integrity": "sha512-0WVmhp1QOqZ4Rt6GlVGwKJN3KW7Xh4H2q8ZZNGZaP6lRdxXJzmjm4FqvmOojVj6khWJHIb9sp7U/72W7xQgqAA==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/language": "^6.6.0", + "@codemirror/lint": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.17.0", + "@lezer/common": "^1.0.0", + "@lezer/javascript": "^1.0.0" + } + }, "node_modules/@codemirror/language": { "version": "6.11.2", "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.11.2.tgz", @@ -3782,6 +3923,17 @@ "@lezer/common": "^1.0.0" } }, + "node_modules/@lezer/javascript": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.5.1.tgz", + "integrity": "sha512-ATOImjeVJuvgm3JQ/bpo2Tmv55HSScE2MTPnKRMRIPx2cLhHGyX2VnqpHhtIV1tVzIjZDbcWQm+NCTF40ggZVw==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.1.3", + "@lezer/lr": "^1.3.0" + } + }, "node_modules/@lezer/lr": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.2.tgz", @@ -6653,6 +6805,84 @@ "react": "^18.0 || ^19.0 || ^19.0.0-rc" } }, + "node_modules/@react-spring/animated": { + "version": "9.7.5", + "resolved": "https://registry.npmjs.org/@react-spring/animated/-/animated-9.7.5.tgz", + "integrity": "sha512-Tqrwz7pIlsSDITzxoLS3n/v/YCUHQdOIKtOJf4yL6kYVSDTSmVK1LI1Q3M/uu2Sx4X3pIWF3xLUhlsA6SPNTNg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@react-spring/shared": "~9.7.5", + "@react-spring/types": "~9.7.5" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/@react-spring/core": { + "version": "9.7.5", + "resolved": "https://registry.npmjs.org/@react-spring/core/-/core-9.7.5.tgz", + "integrity": "sha512-rmEqcxRcu7dWh7MnCcMXLvrf6/SDlSokLaLTxiPlAYi11nN3B5oiCUAblO72o+9z/87j2uzxa2Inm8UbLjXA+w==", + "license": "MIT", + "peer": true, + "dependencies": { + "@react-spring/animated": "~9.7.5", + "@react-spring/shared": "~9.7.5", + "@react-spring/types": "~9.7.5" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/react-spring/donate" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/@react-spring/rafz": { + "version": "9.7.5", + "resolved": "https://registry.npmjs.org/@react-spring/rafz/-/rafz-9.7.5.tgz", + "integrity": "sha512-5ZenDQMC48wjUzPAm1EtwQ5Ot3bLIAwwqP2w2owG5KoNdNHpEJV263nGhCeKKmuA3vG2zLLOdu3or6kuDjA6Aw==", + "license": "MIT", + "peer": true + }, + "node_modules/@react-spring/shared": { + "version": "9.7.5", + "resolved": "https://registry.npmjs.org/@react-spring/shared/-/shared-9.7.5.tgz", + "integrity": "sha512-wdtoJrhUeeyD/PP/zo+np2s1Z820Ohr/BbuVYv+3dVLW7WctoiN7std8rISoYoHpUXtbkpesSKuPIw/6U1w1Pw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@react-spring/rafz": "~9.7.5", + "@react-spring/types": "~9.7.5" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/@react-spring/types": { + "version": "9.7.5", + "resolved": "https://registry.npmjs.org/@react-spring/types/-/types-9.7.5.tgz", + "integrity": "sha512-HVj7LrZ4ReHWBimBvu2SKND3cDVUPWKLqRTmWe/fNY6o1owGOX0cAHbdPDTMelgBlVbrTKrre6lFkhqGZErK/g==", + "license": "MIT", + "peer": true + }, + "node_modules/@react-spring/web": { + "version": "9.7.5", + "resolved": "https://registry.npmjs.org/@react-spring/web/-/web-9.7.5.tgz", + "integrity": "sha512-lmvqGwpe+CSttsWNZVr+Dg62adtKhauGwLyGE/RRyZ8AAMLgb9x3NDMA5RMElXo+IMyTkPp7nxTB8ZQlmhb6JQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@react-spring/animated": "~9.7.5", + "@react-spring/core": "~9.7.5", + "@react-spring/shared": "~9.7.5", + "@react-spring/types": "~9.7.5" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/@react-stately/flags": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@react-stately/flags/-/flags-3.1.2.tgz", @@ -10440,6 +10670,21 @@ "integrity": "sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg==", "license": "MIT" }, + "node_modules/@types/d3-cloud": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@types/d3-cloud/-/d3-cloud-1.2.5.tgz", + "integrity": "sha512-vEIER9DsEBUOdpRiwCh3n1qE+cV6h4e1LhxhY2sLt+m8LPNAIkOOhTlqk0JDiBwD+ZPM8ynFAOU3AuPuVYBFBA==", + "license": "MIT", + "dependencies": { + "@types/d3": "^3" + } + }, + "node_modules/@types/d3-cloud/node_modules/@types/d3": { + "version": "3.5.53", + "resolved": "https://registry.npmjs.org/@types/d3/-/d3-3.5.53.tgz", + "integrity": "sha512-8yKQA9cAS6+wGsJpBysmnhlaaxlN42Qizqkw+h2nILSlS+MAG2z4JdO6p+PJrJ+ACvimkmLJL281h157e52psQ==", + "license": "MIT" + }, "node_modules/@types/d3-color": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.3.tgz", @@ -10558,6 +10803,30 @@ "integrity": "sha512-Imagg1vJ3y76Y2ea0871wpabqp613+8/r0mCLEBfdtqC7xMSfj9idOnmBYyMoULfHePJyxMAw3nWhJxzc+LFwQ==", "license": "MIT" }, + "node_modules/@types/d3-sankey": { + "version": "0.12.4", + "resolved": "https://registry.npmjs.org/@types/d3-sankey/-/d3-sankey-0.12.4.tgz", + "integrity": "sha512-YTicQNwioitIlvuvlfW2GfO6sKxpohzg2cSQttlXAPjFwoBuN+XpGLhUN3kLutG/dI3GCLC+DUorqiJt7Naetw==", + "license": "MIT", + "dependencies": { + "@types/d3-shape": "^1" + } + }, + "node_modules/@types/d3-sankey/node_modules/@types/d3-path": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-1.0.11.tgz", + "integrity": "sha512-4pQMp8ldf7UaB/gR8Fvvy69psNHkTpD/pVw3vmEi8iZAB9EPMBruB1JvHO4BIq9QkUUd2lV1F5YXpMNj7JPBpw==", + "license": "MIT" + }, + "node_modules/@types/d3-sankey/node_modules/@types/d3-shape": { + "version": "1.3.12", + "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-1.3.12.tgz", + "integrity": "sha512-8oMzcd4+poSLGgV0R1Q1rOlx/xdmozS4Xab7np0eamFFUYq71AU9pOCJEFnkXW2aI/oXdVYJzw6pssbSut7Z9Q==", + "license": "MIT", + "dependencies": { + "@types/d3-path": "^1" + } + }, "node_modules/@types/d3-scale": { "version": "4.0.9", "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.9.tgz", @@ -10705,6 +10974,12 @@ "integrity": "sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ==", "license": "MIT" }, + "node_modules/@types/lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-H3MHACvFUEiujabxhaI/ImO6gUrd8oOurg7LQtS7mbwIXA/cUqWrvBsaeJ23aZEPk1TAYkurjfMbSELfoCXlGA==", + "license": "MIT" + }, "node_modules/@types/mapbox__mapbox-gl-draw": { "version": "1.4.9", "resolved": "https://registry.npmjs.org/@types/mapbox__mapbox-gl-draw/-/mapbox__mapbox-gl-draw-1.4.9.tgz", @@ -10822,7 +11097,6 @@ "version": "18.3.7", "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.7.tgz", "integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==", - "devOptional": true, "license": "MIT", "peerDependencies": { "@types/react": "^18.0.0" @@ -11539,6 +11813,24 @@ "win32" ] }, + "node_modules/@use-gesture/core": { + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/@use-gesture/core/-/core-10.3.1.tgz", + "integrity": "sha512-WcINiDt8WjqBdUXye25anHiNxPc0VOrlT8F6LLkU6cycrOGUDyY/yyFmsg3k8i5OLvv25llc0QC45GhR/C8llw==", + "license": "MIT" + }, + "node_modules/@use-gesture/react": { + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/@use-gesture/react/-/react-10.3.1.tgz", + "integrity": "sha512-Yy19y6O2GJq8f7CHf7L0nxL8bf4PZCPaVOCgJrusOeFHY1LvHgYXnmnXg6N5iwAnbgbZCDjo60SiM6IPJi9C5g==", + "license": "MIT", + "dependencies": { + "@use-gesture/core": "10.3.1" + }, + "peerDependencies": { + "react": ">= 16.8.0" + } + }, "node_modules/@vaadin/a11y-base": { "version": "24.7.9", "resolved": "https://registry.npmjs.org/@vaadin/a11y-base/-/a11y-base-24.7.9.tgz", @@ -11788,192 +12080,1078 @@ "node": ">=16.14" } }, - "node_modules/@vercel/postgres": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@vercel/postgres/-/postgres-0.9.0.tgz", - "integrity": "sha512-WiI2g3+ce2g1u1gP41MoDj2DsMuQQ+us7vHobysRixKECGaLHpfTI7DuVZmHU087ozRAGr3GocSyqmWLLo+fig==", - "license": "Apache-2.0", + "node_modules/@vercel/postgres": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@vercel/postgres/-/postgres-0.9.0.tgz", + "integrity": "sha512-WiI2g3+ce2g1u1gP41MoDj2DsMuQQ+us7vHobysRixKECGaLHpfTI7DuVZmHU087ozRAGr3GocSyqmWLLo+fig==", + "license": "Apache-2.0", + "dependencies": { + "@neondatabase/serverless": "^0.9.3", + "bufferutil": "^4.0.8", + "utf-8-validate": "^6.0.4", + "ws": "^8.17.1" + }, + "engines": { + "node": ">=14.6" + } + }, + "node_modules/@vercel/postgres/node_modules/@neondatabase/serverless": { + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/@neondatabase/serverless/-/serverless-0.9.5.tgz", + "integrity": "sha512-siFas6gItqv6wD/pZnvdu34wEqgG3nSE6zWZdq5j2DEsa+VvX8i/5HXJOo06qrw5axPXn+lGCxeR+NLaSPIXug==", + "license": "MIT", + "dependencies": { + "@types/pg": "8.11.6" + } + }, + "node_modules/@vercel/postgres/node_modules/@types/pg": { + "version": "8.11.6", + "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.11.6.tgz", + "integrity": "sha512-/2WmmBXHLsfRqzfHW7BNZ8SbYzE8OSk7i3WjFYvfgRHj7S1xj+16Je5fUKv3lVdVzk/zn9TXOqf+avFCFIE0yQ==", + "license": "MIT", + "dependencies": { + "@types/node": "*", + "pg-protocol": "*", + "pg-types": "^4.0.1" + } + }, + "node_modules/@vercel/postgres/node_modules/pg-types": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-4.0.2.tgz", + "integrity": "sha512-cRL3JpS3lKMGsKaWndugWQoLOCoP+Cic8oseVcbr0qhPzYD5DWXK+RZ9LY9wxRf7RQia4SCwQlXk0q6FCPrVng==", + "license": "MIT", + "dependencies": { + "pg-int8": "1.0.1", + "pg-numeric": "1.0.2", + "postgres-array": "~3.0.1", + "postgres-bytea": "~3.0.0", + "postgres-date": "~2.1.0", + "postgres-interval": "^3.0.0", + "postgres-range": "^1.1.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@vercel/postgres/node_modules/postgres-array": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-3.0.4.tgz", + "integrity": "sha512-nAUSGfSDGOaOAEGwqsRY27GPOea7CNipJPOA7lPbdEpx5Kg3qzdP0AaWC5MlhTWV9s4hFX39nomVZ+C4tnGOJQ==", + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/@vercel/postgres/node_modules/postgres-bytea": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-3.0.0.tgz", + "integrity": "sha512-CNd4jim9RFPkObHSjVHlVrxoVQXz7quwNFpz7RY1okNNme49+sVyiTvTRobiLV548Hx/hb1BG+iE7h9493WzFw==", + "license": "MIT", + "dependencies": { + "obuf": "~1.1.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@vercel/postgres/node_modules/postgres-date": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-2.1.0.tgz", + "integrity": "sha512-K7Juri8gtgXVcDfZttFKVmhglp7epKb1K4pgrkLxehjqkrgPhfG6OO8LHLkfaqkbpjNRnra018XwAr1yQFWGcA==", + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/@vercel/postgres/node_modules/postgres-interval": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-3.0.0.tgz", + "integrity": "sha512-BSNDnbyZCXSxgA+1f5UU2GmwhoI0aU5yMxRGO8CdFEcY2BQF9xm/7MqKnYoM1nJDk8nONNWDk9WeSmePFhQdlw==", + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/@vercel/speed-insights": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@vercel/speed-insights/-/speed-insights-1.2.0.tgz", + "integrity": "sha512-y9GVzrUJ2xmgtQlzFP2KhVRoCglwfRQgjyfY607aU0hh0Un6d0OUyrJkjuAlsV18qR4zfoFPs/BiIj9YDS6Wzw==", + "hasInstallScript": true, + "license": "Apache-2.0", + "peerDependencies": { + "@sveltejs/kit": "^1 || ^2", + "next": ">= 13", + "react": "^18 || ^19 || ^19.0.0-rc", + "svelte": ">= 4", + "vue": "^3", + "vue-router": "^4" + }, + "peerDependenciesMeta": { + "@sveltejs/kit": { + "optional": true + }, + "next": { + "optional": true + }, + "react": { + "optional": true + }, + "svelte": { + "optional": true + }, + "vue": { + "optional": true + }, + "vue-router": { + "optional": true + } + } + }, + "node_modules/@vis.gl/react-mapbox": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/@vis.gl/react-mapbox/-/react-mapbox-8.0.4.tgz", + "integrity": "sha512-NFk0vsWcNzSs0YCsVdt2100Zli9QWR+pje8DacpLkkGEAXFaJsFtI1oKD0Hatiate4/iAIW39SQHhgfhbeEPfQ==", + "license": "MIT", + "peerDependencies": { + "mapbox-gl": ">=3.5.0", + "react": ">=16.3.0", + "react-dom": ">=16.3.0" + }, + "peerDependenciesMeta": { + "mapbox-gl": { + "optional": true + } + } + }, + "node_modules/@vis.gl/react-maplibre": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/@vis.gl/react-maplibre/-/react-maplibre-8.0.4.tgz", + "integrity": "sha512-HwZyfLjEu+y1mUFvwDAkVxinGm8fEegaWN+O8np/WZ2Sqe5Lv6OXFpV6GWz9LOEvBYMbGuGk1FQdejo+4HCJ5w==", + "license": "MIT", + "dependencies": { + "@maplibre/maplibre-gl-style-spec": "^19.2.1" + }, + "peerDependencies": { + "maplibre-gl": ">=4.0.0", + "react": ">=16.3.0", + "react-dom": ">=16.3.0" + }, + "peerDependenciesMeta": { + "maplibre-gl": { + "optional": true + } + } + }, + "node_modules/@vis.gl/react-maplibre/node_modules/@maplibre/maplibre-gl-style-spec": { + "version": "19.3.3", + "resolved": "https://registry.npmjs.org/@maplibre/maplibre-gl-style-spec/-/maplibre-gl-style-spec-19.3.3.tgz", + "integrity": "sha512-cOZZOVhDSulgK0meTsTkmNXb1ahVvmTmWmfx9gRBwc6hq98wS9JP35ESIoNq3xqEan+UN+gn8187Z6E4NKhLsw==", + "license": "ISC", + "dependencies": { + "@mapbox/jsonlint-lines-primitives": "~2.0.2", + "@mapbox/unitbezier": "^0.0.1", + "json-stringify-pretty-compact": "^3.0.0", + "minimist": "^1.2.8", + "rw": "^1.3.3", + "sort-object": "^3.0.3" + }, + "bin": { + "gl-style-format": "dist/gl-style-format.mjs", + "gl-style-migrate": "dist/gl-style-migrate.mjs", + "gl-style-validate": "dist/gl-style-validate.mjs" + } + }, + "node_modules/@vis.gl/react-maplibre/node_modules/json-stringify-pretty-compact": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-stringify-pretty-compact/-/json-stringify-pretty-compact-3.0.0.tgz", + "integrity": "sha512-Rc2suX5meI0S3bfdZuA7JMFBGkJ875ApfVyq2WHELjBiiG22My/l7/8zPpH/CfFVQHuVLd8NLR0nv6vi0BYYKA==", + "license": "MIT" + }, + "node_modules/@visx/annotation": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/annotation/-/annotation-3.12.0.tgz", + "integrity": "sha512-ZH6Y4jfrb47iEUV9O2itU9TATE5IPzhs5qvP6J7vmv26qkqwDcuE7xN3S3l9R70WjyEKGbpO8js4EijA3FJWkA==", + "license": "MIT", + "dependencies": { + "@types/react": "*", + "@visx/drag": "3.12.0", + "@visx/group": "3.12.0", + "@visx/text": "3.12.0", + "classnames": "^2.3.1", + "prop-types": "^15.5.10", + "react-use-measure": "^2.0.4" + }, + "peerDependencies": { + "react": "^16.0.0-0 || ^17.0.0-0 || ^18.0.0-0" + } + }, + "node_modules/@visx/axis": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/axis/-/axis-3.12.0.tgz", + "integrity": "sha512-8MoWpfuaJkhm2Yg+HwyytK8nk+zDugCqTT/tRmQX7gW4LYrHYLXFUXOzbDyyBakCVaUbUaAhVFxpMASJiQKf7A==", + "license": "MIT", + "dependencies": { + "@types/react": "*", + "@visx/group": "3.12.0", + "@visx/point": "3.12.0", + "@visx/scale": "3.12.0", + "@visx/shape": "3.12.0", + "@visx/text": "3.12.0", + "classnames": "^2.3.1", + "prop-types": "^15.6.0" + }, + "peerDependencies": { + "react": "^16.3.0-0 || ^17.0.0-0 || ^18.0.0-0" + } + }, + "node_modules/@visx/bounds": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/bounds/-/bounds-3.12.0.tgz", + "integrity": "sha512-peAlNCUbYaaZ0IO6c1lDdEAnZv2iGPDiLIM8a6gu7CaMhtXZJkqrTh+AjidNcIqITktrICpGxJE/Qo9D099dvQ==", + "license": "MIT", + "dependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "prop-types": "^15.5.10" + }, + "peerDependencies": { + "react": "^16.0.0-0 || ^17.0.0-0 || ^18.0.0-0", + "react-dom": "^16.0.0-0 || ^17.0.0-0 || ^18.0.0-0" + } + }, + "node_modules/@visx/brush": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/brush/-/brush-3.12.0.tgz", + "integrity": "sha512-ceqQe/IlIi9X9FT/DuiO6b3l5YAGnux/aQMX8M1gvLdz4T8pXIW8nDv1OhqbZ7lmbQEUEEM9IexOkR9ix7pL+Q==", + "license": "MIT", + "dependencies": { + "@visx/drag": "3.12.0", + "@visx/event": "3.12.0", + "@visx/group": "3.12.0", + "@visx/scale": "3.12.0", + "@visx/shape": "3.12.0", + "classnames": "^2.3.1", + "prop-types": "^15.6.1" + }, + "peerDependencies": { + "react": "^16.0.0-0 || ^17.0.0-0 || ^18.0.0-0" + } + }, + "node_modules/@visx/clip-path": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/clip-path/-/clip-path-3.12.0.tgz", + "integrity": "sha512-pjpjyoQ15lhOrgpDhxfWKAxC4IswzREHGOHhrdWtxQbPoGzVZvFH8HHvwRi4afL11uYDO10z235MDnaDwP8GnQ==", + "license": "MIT", + "dependencies": { + "@types/react": "*", + "prop-types": "^15.5.10" + }, + "peerDependencies": { + "react": "^16.0.0-0 || ^17.0.0-0 || ^18.0.0-0" + } + }, + "node_modules/@visx/curve": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/curve/-/curve-3.12.0.tgz", + "integrity": "sha512-Ng1mefXIzoIoAivw7dJ+ZZYYUbfuwXgZCgQynShr6ZIVw7P4q4HeQfJP3W24ON+1uCSrzoycHSXRelhR9SBPcw==", + "license": "MIT", + "dependencies": { + "@types/d3-shape": "^1.3.1", + "d3-shape": "^1.0.6" + } + }, + "node_modules/@visx/curve/node_modules/@types/d3-path": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-1.0.11.tgz", + "integrity": "sha512-4pQMp8ldf7UaB/gR8Fvvy69psNHkTpD/pVw3vmEi8iZAB9EPMBruB1JvHO4BIq9QkUUd2lV1F5YXpMNj7JPBpw==", + "license": "MIT" + }, + "node_modules/@visx/curve/node_modules/@types/d3-shape": { + "version": "1.3.12", + "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-1.3.12.tgz", + "integrity": "sha512-8oMzcd4+poSLGgV0R1Q1rOlx/xdmozS4Xab7np0eamFFUYq71AU9pOCJEFnkXW2aI/oXdVYJzw6pssbSut7Z9Q==", + "license": "MIT", + "dependencies": { + "@types/d3-path": "^1" + } + }, + "node_modules/@visx/curve/node_modules/d3-path": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz", + "integrity": "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==", + "license": "BSD-3-Clause" + }, + "node_modules/@visx/curve/node_modules/d3-shape": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz", + "integrity": "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==", + "license": "BSD-3-Clause", + "dependencies": { + "d3-path": "1" + } + }, + "node_modules/@visx/delaunay": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/delaunay/-/delaunay-3.12.0.tgz", + "integrity": "sha512-bc8UCJ3l5G6lGnQt5AUo8GIZTm16vKpJycb/6IWHTDeBv4hJL0uahG5QKhy1d08T0cFtYQ3qv/xp5LQkwFxfsw==", + "license": "MIT", + "dependencies": { + "@types/react": "*", + "@visx/vendor": "3.12.0", + "classnames": "^2.3.1", + "prop-types": "^15.6.1" + }, + "peerDependencies": { + "react": "^16.3.0-0 || ^17.0.0-0 || ^18.0.0-0" + } + }, + "node_modules/@visx/drag": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/drag/-/drag-3.12.0.tgz", + "integrity": "sha512-LXOoPVw//YPjpYhDJYBsCYDuv1QimsXjDV98duH0aCy4V94ediXMQpe2wHq4pnlDobLEB71FjOZMFrbFmqtERg==", + "license": "MIT", + "dependencies": { + "@types/react": "*", + "@visx/event": "3.12.0", + "@visx/point": "3.12.0", + "prop-types": "^15.5.10" + }, + "peerDependencies": { + "react": "^16.8.0-0 || ^17.0.0-0 || ^18.0.0-0" + } + }, + "node_modules/@visx/event": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/event/-/event-3.12.0.tgz", + "integrity": "sha512-9Lvw6qJ0Fi+y1vsC1WspfdIKCxHTb7oy59Uql1uBdPGT8zChP0vuxW0jQNQRDbKgoefj4pCXAFi8+MF1mEtVTw==", + "license": "MIT", + "dependencies": { + "@types/react": "*", + "@visx/point": "3.12.0" + } + }, + "node_modules/@visx/geo": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/geo/-/geo-3.12.0.tgz", + "integrity": "sha512-/74NMEqGrAGXOKIdvuLsarUNs5liTjUs3XrgLb4UbSDMoo2itgQN6tCZuIxFKMdEBahfJl+s6pEVPLur5bH4vg==", + "license": "MIT", + "dependencies": { + "@types/geojson": "*", + "@types/react": "*", + "@visx/group": "3.12.0", + "@visx/vendor": "3.12.0", + "classnames": "^2.3.1", + "prop-types": "^15.5.10" + }, + "peerDependencies": { + "react": "^16.3.0-0 || ^17.0.0-0 || ^18.0.0-0" + } + }, + "node_modules/@visx/glyph": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/glyph/-/glyph-3.12.0.tgz", + "integrity": "sha512-E9ST9MoPNyXQzjZxYYAGXT4CbBpnB90Qhx8UvUUM2/n/SZUNeH+m6UiB/CzT0jGK2b0lPHF91mlOiQ8JXBRhYg==", + "license": "MIT", + "dependencies": { + "@types/d3-shape": "^1.3.1", + "@types/react": "*", + "@visx/group": "3.12.0", + "classnames": "^2.3.1", + "d3-shape": "^1.2.0", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": "^16.3.0-0 || ^17.0.0-0 || ^18.0.0-0" + } + }, + "node_modules/@visx/glyph/node_modules/@types/d3-path": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-1.0.11.tgz", + "integrity": "sha512-4pQMp8ldf7UaB/gR8Fvvy69psNHkTpD/pVw3vmEi8iZAB9EPMBruB1JvHO4BIq9QkUUd2lV1F5YXpMNj7JPBpw==", + "license": "MIT" + }, + "node_modules/@visx/glyph/node_modules/@types/d3-shape": { + "version": "1.3.12", + "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-1.3.12.tgz", + "integrity": "sha512-8oMzcd4+poSLGgV0R1Q1rOlx/xdmozS4Xab7np0eamFFUYq71AU9pOCJEFnkXW2aI/oXdVYJzw6pssbSut7Z9Q==", + "license": "MIT", + "dependencies": { + "@types/d3-path": "^1" + } + }, + "node_modules/@visx/glyph/node_modules/d3-path": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz", + "integrity": "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==", + "license": "BSD-3-Clause" + }, + "node_modules/@visx/glyph/node_modules/d3-shape": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz", + "integrity": "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==", + "license": "BSD-3-Clause", + "dependencies": { + "d3-path": "1" + } + }, + "node_modules/@visx/gradient": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/gradient/-/gradient-3.12.0.tgz", + "integrity": "sha512-QRatjjdUEPbcp4pqRca1JlChpAnmmIAO3r3ZscLK7D1xEIANlIjzjl3uNgrmseYmBAYyPCcJH8Zru07R97ovOg==", + "license": "MIT", + "dependencies": { + "@types/react": "*", + "prop-types": "^15.5.7" + }, + "peerDependencies": { + "react": "^16.0.0-0 || ^17.0.0-0 || ^18.0.0-0" + } + }, + "node_modules/@visx/grid": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/grid/-/grid-3.12.0.tgz", + "integrity": "sha512-L4ex2ooSYhwNIxJ3XFIKRhoSvEGjPc2Y3YCrtNB4TV5Ofdj4q0UMOsxfrH23Pr8HSHuQhb6VGMgYoK0LuWqDmQ==", + "license": "MIT", + "dependencies": { + "@types/react": "*", + "@visx/curve": "3.12.0", + "@visx/group": "3.12.0", + "@visx/point": "3.12.0", + "@visx/scale": "3.12.0", + "@visx/shape": "3.12.0", + "classnames": "^2.3.1", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": "^16.0.0-0 || ^17.0.0-0 || ^18.0.0-0" + } + }, + "node_modules/@visx/group": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/group/-/group-3.12.0.tgz", + "integrity": "sha512-Dye8iS1alVXPv7nj/7M37gJe6sSKqJLH7x6sEWAsRQ9clI0kFvjbKcKgF+U3aAVQr0NCohheFV+DtR8trfK/Ag==", + "license": "MIT", + "dependencies": { + "@types/react": "*", + "classnames": "^2.3.1", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": "^16.0.0-0 || ^17.0.0-0 || ^18.0.0-0" + } + }, + "node_modules/@visx/heatmap": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/heatmap/-/heatmap-3.12.0.tgz", + "integrity": "sha512-+YhXHfMvwQOMf9xMd15FUOoiKqf84o1UF0zsmnNsCC75MqFMpjvzc3DeoC37fi69iBIKchU8DjhVubvCE9N4jA==", + "license": "MIT", + "dependencies": { + "@types/react": "*", + "@visx/group": "3.12.0", + "classnames": "^2.3.1", + "prop-types": "^15.6.1" + }, + "peerDependencies": { + "react": "^16.3.0-0 || ^17.0.0-0 || ^18.0.0-0" + } + }, + "node_modules/@visx/hierarchy": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/hierarchy/-/hierarchy-3.12.0.tgz", + "integrity": "sha512-+X1HOeLEOODxjAD7ixrWJ4KCVei4wFe8ra3dYU0uZ14RdPPgUeiuyBfdeXWZuAHM6Ix9qrryneatQjkC3h4mvA==", + "license": "MIT", + "dependencies": { + "@types/d3-hierarchy": "^1.1.6", + "@types/react": "*", + "@visx/group": "3.12.0", + "classnames": "^2.3.1", + "d3-hierarchy": "^1.1.4", + "prop-types": "^15.6.1" + }, + "peerDependencies": { + "react": "^16.3.0-0 || ^17.0.0-0 || ^18.0.0-0" + } + }, + "node_modules/@visx/hierarchy/node_modules/@types/d3-hierarchy": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/@types/d3-hierarchy/-/d3-hierarchy-1.1.11.tgz", + "integrity": "sha512-lnQiU7jV+Gyk9oQYk0GGYccuexmQPTp08E0+4BidgFdiJivjEvf+esPSdZqCZ2C7UwTWejWpqetVaU8A+eX3FA==", + "license": "MIT" + }, + "node_modules/@visx/hierarchy/node_modules/d3-hierarchy": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-1.1.9.tgz", + "integrity": "sha512-j8tPxlqh1srJHAtxfvOUwKNYJkQuBFdM1+JAUfq6xqH5eAqf93L7oG1NVqDa4CpFZNvnNKtCYEUC8KY9yEn9lQ==", + "license": "BSD-3-Clause" + }, + "node_modules/@visx/legend": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/legend/-/legend-3.12.0.tgz", + "integrity": "sha512-Tr6hdauEDXRXVNeNgIQ9JtCCrxn8Fbr8UCVlO9XsSxenk2hBC/2PIY5QPzpnKFEEEuH/C8vhj8T0JfFZV+D9zQ==", + "license": "MIT", + "dependencies": { + "@types/react": "*", + "@visx/group": "3.12.0", + "@visx/scale": "3.12.0", + "classnames": "^2.3.1", + "prop-types": "^15.5.10" + }, + "peerDependencies": { + "react": "^16.3.0-0 || ^17.0.0-0 || ^18.0.0-0" + } + }, + "node_modules/@visx/marker": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/marker/-/marker-3.12.0.tgz", + "integrity": "sha512-11aCWC13+PqbAatNgMVcm33J8PRNdyGiDbfMfwUXt5/FS2XLs2e1fjfhIwAxmCCLZ13FYlabrc1qnjnhwXbTVQ==", + "license": "MIT", + "dependencies": { + "@types/react": "*", + "@visx/group": "3.12.0", + "@visx/shape": "3.12.0", + "classnames": "^2.3.1", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": "^16.0.0-0 || ^17.0.0-0 || ^18.0.0-0" + } + }, + "node_modules/@visx/mock-data": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/mock-data/-/mock-data-3.12.0.tgz", + "integrity": "sha512-HI8LKdO3sU2tIBv16ZYRTc2JYsu0Ai/hQc7YUOBqbjhXUW993iCBe98pAgEdHDrSWqK2yvXY4En5ceBTAP34Jw==", + "license": "MIT", + "dependencies": { + "@types/d3-random": "^2.2.0", + "d3-random": "^2.2.2" + } + }, + "node_modules/@visx/mock-data/node_modules/@types/d3-random": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@types/d3-random/-/d3-random-2.2.3.tgz", + "integrity": "sha512-Ghs4R3CcgJ3o6svszRzIH4b8PPYex/COo+rhhZjDAs+bVducXwjmVSi27WcDOaLLCBV2t3tfVH9bYXAL76IvQA==", + "license": "MIT" + }, + "node_modules/@visx/mock-data/node_modules/d3-random": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/d3-random/-/d3-random-2.2.2.tgz", + "integrity": "sha512-0D9P8TRj6qDAtHhRQn6EfdOtHMfsUWanl3yb/84C4DqpZ+VsgfI5iTVRNRbELCfNvRfpMr8OrqqUTQ6ANGCijw==", + "license": "BSD-3-Clause" + }, + "node_modules/@visx/network": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/network/-/network-3.12.0.tgz", + "integrity": "sha512-mVWF9TQVpe6Qz95IJ+Pm+FB6xhdjzFGRKK7/qQFhjRloIJqVZkChAiBIua04Ux8BeyCt37wdFgQKFl6C2u3DXA==", + "license": "MIT", + "dependencies": { + "@types/react": "*", + "@visx/group": "3.12.0", + "classnames": "^2.3.1", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": "^16.3.0-0 || ^17.0.0-0 || ^18.0.0-0" + } + }, + "node_modules/@visx/pattern": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/pattern/-/pattern-3.12.0.tgz", + "integrity": "sha512-ZkNA/2TkULNiiY4cw2IkuQcQRp9zI3SQ0/JoZMQ+UmUvY5RNBcsdTmic7649egHq0FRYCbY0DDQVJicccW5JUg==", + "license": "MIT", + "dependencies": { + "@types/react": "*", + "classnames": "^2.3.1", + "prop-types": "^15.5.10" + }, + "peerDependencies": { + "react": "^16.0.0-0 || ^17.0.0-0 || ^18.0.0-0" + } + }, + "node_modules/@visx/point": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/point/-/point-3.12.0.tgz", + "integrity": "sha512-I6UrHoJAEVbx3RORQNupgTiX5EzjuZpiwLPxn8L2mI5nfERotPKi1Yus12Cq2WtXqEBR/WgqTnoImlqOXBykcA==", + "license": "MIT" + }, + "node_modules/@visx/react-spring": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/react-spring/-/react-spring-3.12.0.tgz", + "integrity": "sha512-ehtmjFrUQx3g0mZ684M4LgI9UfQ84ZWD/m9tKfvXhEm1Vl8D4AjaZ4af1tTOg9S7vk2VlpxvVOVN7+t5pu0nSA==", + "license": "MIT", + "dependencies": { + "@types/react": "*", + "@visx/axis": "3.12.0", + "@visx/grid": "3.12.0", + "@visx/scale": "3.12.0", + "@visx/text": "3.12.0", + "classnames": "^2.3.1", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "@react-spring/web": "^9.4.5", + "react": "^16.3.0-0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/@visx/responsive": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/responsive/-/responsive-3.12.0.tgz", + "integrity": "sha512-GV1BTYwAGlk/K5c9vH8lS2syPnTuIqEacI7L6LRPbsuaLscXMNi+i9fZyzo0BWvAdtRV8v6Urzglo++lvAXT1Q==", + "license": "MIT", + "dependencies": { + "@types/lodash": "^4.14.172", + "@types/react": "*", + "lodash": "^4.17.21", + "prop-types": "^15.6.1" + }, + "peerDependencies": { + "react": "^16.0.0-0 || ^17.0.0-0 || ^18.0.0-0" + } + }, + "node_modules/@visx/sankey": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/sankey/-/sankey-3.12.0.tgz", + "integrity": "sha512-B3zIUejzv8ySGmcgJhqiy616llauT0CwvL7wWyTh2z3eCBkFOlPVF85NBrQq823w/0DkwoX8+LmLpKyelh6Vpw==", + "license": "MIT", + "dependencies": { + "@types/d3-sankey": "^0.12.4", + "@types/react": "*", + "@visx/group": "3.12.0", + "classnames": "^2.3.1", + "d3-sankey": "^0.12.3", + "d3-shape": "1.3.7" + }, + "peerDependencies": { + "react": "^16.3.0-0 || ^17.0.0-0 || ^18.0.0-0" + } + }, + "node_modules/@visx/sankey/node_modules/d3-path": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz", + "integrity": "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==", + "license": "BSD-3-Clause" + }, + "node_modules/@visx/sankey/node_modules/d3-shape": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz", + "integrity": "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==", + "license": "BSD-3-Clause", + "dependencies": { + "d3-path": "1" + } + }, + "node_modules/@visx/scale": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/scale/-/scale-3.12.0.tgz", + "integrity": "sha512-+ubijrZ2AwWCsNey0HGLJ0YKNeC/XImEFsr9rM+Uef1CM3PNM43NDdNTrdBejSlzRq0lcfQPWYMYQFSlkLcPOg==", + "license": "MIT", + "dependencies": { + "@visx/vendor": "3.12.0" + } + }, + "node_modules/@visx/shape": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/shape/-/shape-3.12.0.tgz", + "integrity": "sha512-/1l0lrpX9tPic6SJEalryBKWjP/ilDRnQA+BGJTI1tj7i23mJ/J0t4nJHyA1GrL4QA/bM/qTJ35eyz5dEhJc4g==", + "license": "MIT", + "dependencies": { + "@types/d3-path": "^1.0.8", + "@types/d3-shape": "^1.3.1", + "@types/lodash": "^4.14.172", + "@types/react": "*", + "@visx/curve": "3.12.0", + "@visx/group": "3.12.0", + "@visx/scale": "3.12.0", + "classnames": "^2.3.1", + "d3-path": "^1.0.5", + "d3-shape": "^1.2.0", + "lodash": "^4.17.21", + "prop-types": "^15.5.10" + }, + "peerDependencies": { + "react": "^16.3.0-0 || ^17.0.0-0 || ^18.0.0-0" + } + }, + "node_modules/@visx/shape/node_modules/@types/d3-path": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-1.0.11.tgz", + "integrity": "sha512-4pQMp8ldf7UaB/gR8Fvvy69psNHkTpD/pVw3vmEi8iZAB9EPMBruB1JvHO4BIq9QkUUd2lV1F5YXpMNj7JPBpw==", + "license": "MIT" + }, + "node_modules/@visx/shape/node_modules/@types/d3-shape": { + "version": "1.3.12", + "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-1.3.12.tgz", + "integrity": "sha512-8oMzcd4+poSLGgV0R1Q1rOlx/xdmozS4Xab7np0eamFFUYq71AU9pOCJEFnkXW2aI/oXdVYJzw6pssbSut7Z9Q==", + "license": "MIT", + "dependencies": { + "@types/d3-path": "^1" + } + }, + "node_modules/@visx/shape/node_modules/d3-path": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz", + "integrity": "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==", + "license": "BSD-3-Clause" + }, + "node_modules/@visx/shape/node_modules/d3-shape": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz", + "integrity": "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==", + "license": "BSD-3-Clause", + "dependencies": { + "d3-path": "1" + } + }, + "node_modules/@visx/stats": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/stats/-/stats-3.12.0.tgz", + "integrity": "sha512-gPc8hF/JC4M7+OFU92vZvN8jI9z774tAN2vVF1T4MnDJos0w4jV/LnP+pXJH3pOffFRzquDG7YCwKvq2tsxAKw==", + "license": "MIT", + "dependencies": { + "@types/d3-shape": "^1.3.2", + "@types/react": "*", + "@visx/group": "3.12.0", + "@visx/scale": "3.12.0", + "classnames": "^2.3.1", + "d3-shape": "^1.2.0", + "prop-types": "^15.5.10" + }, + "peerDependencies": { + "react": "^16.3.0-0 || ^17.0.0-0 || ^18.0.0-0" + } + }, + "node_modules/@visx/stats/node_modules/@types/d3-path": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-1.0.11.tgz", + "integrity": "sha512-4pQMp8ldf7UaB/gR8Fvvy69psNHkTpD/pVw3vmEi8iZAB9EPMBruB1JvHO4BIq9QkUUd2lV1F5YXpMNj7JPBpw==", + "license": "MIT" + }, + "node_modules/@visx/stats/node_modules/@types/d3-shape": { + "version": "1.3.12", + "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-1.3.12.tgz", + "integrity": "sha512-8oMzcd4+poSLGgV0R1Q1rOlx/xdmozS4Xab7np0eamFFUYq71AU9pOCJEFnkXW2aI/oXdVYJzw6pssbSut7Z9Q==", + "license": "MIT", + "dependencies": { + "@types/d3-path": "^1" + } + }, + "node_modules/@visx/stats/node_modules/d3-path": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz", + "integrity": "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==", + "license": "BSD-3-Clause" + }, + "node_modules/@visx/stats/node_modules/d3-shape": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz", + "integrity": "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==", + "license": "BSD-3-Clause", "dependencies": { - "@neondatabase/serverless": "^0.9.3", - "bufferutil": "^4.0.8", - "utf-8-validate": "^6.0.4", - "ws": "^8.17.1" - }, - "engines": { - "node": ">=14.6" + "d3-path": "1" } }, - "node_modules/@vercel/postgres/node_modules/@neondatabase/serverless": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@neondatabase/serverless/-/serverless-0.9.5.tgz", - "integrity": "sha512-siFas6gItqv6wD/pZnvdu34wEqgG3nSE6zWZdq5j2DEsa+VvX8i/5HXJOo06qrw5axPXn+lGCxeR+NLaSPIXug==", + "node_modules/@visx/text": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/text/-/text-3.12.0.tgz", + "integrity": "sha512-0rbDYQlbuKPhBqXkkGYKFec1gQo05YxV45DORzr6hCyaizdJk1G+n9VkuKSHKBy1vVQhBA0W3u/WXd7tiODQPA==", "license": "MIT", "dependencies": { - "@types/pg": "8.11.6" + "@types/lodash": "^4.14.172", + "@types/react": "*", + "classnames": "^2.3.1", + "lodash": "^4.17.21", + "prop-types": "^15.7.2", + "reduce-css-calc": "^1.3.0" + }, + "peerDependencies": { + "react": "^16.3.0-0 || ^17.0.0-0 || ^18.0.0-0" } }, - "node_modules/@vercel/postgres/node_modules/@types/pg": { - "version": "8.11.6", - "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.11.6.tgz", - "integrity": "sha512-/2WmmBXHLsfRqzfHW7BNZ8SbYzE8OSk7i3WjFYvfgRHj7S1xj+16Je5fUKv3lVdVzk/zn9TXOqf+avFCFIE0yQ==", + "node_modules/@visx/threshold": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/threshold/-/threshold-3.12.0.tgz", + "integrity": "sha512-HpbJbFBKaFOM7FiMiOQwZhQAoDtd5+xSUZRlZ3U7N7TF3S2oVKIBRNlMakhcu0eick7UNvmCl7ZTW2lI65IX4g==", "license": "MIT", "dependencies": { - "@types/node": "*", - "pg-protocol": "*", - "pg-types": "^4.0.1" + "@types/react": "*", + "@visx/clip-path": "3.12.0", + "@visx/shape": "3.12.0", + "classnames": "^2.3.1", + "prop-types": "^15.5.10" + }, + "peerDependencies": { + "react": "^16.0.0-0 || ^17.0.0-0 || ^18.0.0-0" } }, - "node_modules/@vercel/postgres/node_modules/pg-types": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-4.0.2.tgz", - "integrity": "sha512-cRL3JpS3lKMGsKaWndugWQoLOCoP+Cic8oseVcbr0qhPzYD5DWXK+RZ9LY9wxRf7RQia4SCwQlXk0q6FCPrVng==", + "node_modules/@visx/tooltip": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/tooltip/-/tooltip-3.12.0.tgz", + "integrity": "sha512-pWhsYhgl0Shbeqf80qy4QCB6zpq6tQtMQQxKlh3UiKxzkkfl+Metaf9p0/S0HexNi4vewOPOo89xWx93hBeh3A==", "license": "MIT", "dependencies": { - "pg-int8": "1.0.1", - "pg-numeric": "1.0.2", - "postgres-array": "~3.0.1", - "postgres-bytea": "~3.0.0", - "postgres-date": "~2.1.0", - "postgres-interval": "^3.0.0", - "postgres-range": "^1.1.1" + "@types/react": "*", + "@visx/bounds": "3.12.0", + "classnames": "^2.3.1", + "prop-types": "^15.5.10", + "react-use-measure": "^2.0.4" }, - "engines": { - "node": ">=10" + "peerDependencies": { + "react": "^16.8.0-0 || ^17.0.0-0 || ^18.0.0-0", + "react-dom": "^16.8.0-0 || ^17.0.0-0 || ^18.0.0-0" + } + }, + "node_modules/@visx/vendor": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/vendor/-/vendor-3.12.0.tgz", + "integrity": "sha512-SVO+G0xtnL9dsNpGDcjCgoiCnlB3iLSM9KLz1sLbSrV7RaVXwY3/BTm2X9OWN1jH2a9M+eHt6DJ6sE6CXm4cUg==", + "license": "MIT and ISC", + "dependencies": { + "@types/d3-array": "3.0.3", + "@types/d3-color": "3.1.0", + "@types/d3-delaunay": "6.0.1", + "@types/d3-format": "3.0.1", + "@types/d3-geo": "3.1.0", + "@types/d3-interpolate": "3.0.1", + "@types/d3-scale": "4.0.2", + "@types/d3-time": "3.0.0", + "@types/d3-time-format": "2.1.0", + "d3-array": "3.2.1", + "d3-color": "3.1.0", + "d3-delaunay": "6.0.2", + "d3-format": "3.1.0", + "d3-geo": "3.1.0", + "d3-interpolate": "3.0.1", + "d3-scale": "4.0.2", + "d3-time": "3.1.0", + "d3-time-format": "4.1.0", + "internmap": "2.0.3" + } + }, + "node_modules/@visx/vendor/node_modules/@types/d3-array": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.0.3.tgz", + "integrity": "sha512-Reoy+pKnvsksN0lQUlcH6dOGjRZ/3WRwXR//m+/8lt1BXeI4xyaUZoqULNjyXXRuh0Mj4LNpkCvhUpQlY3X5xQ==", + "license": "MIT" + }, + "node_modules/@visx/vendor/node_modules/@types/d3-color": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.0.tgz", + "integrity": "sha512-HKuicPHJuvPgCD+np6Se9MQvS6OCbJmOjGvylzMJRlDwUXjKTTXs6Pwgk79O09Vj/ho3u1ofXnhFOaEWWPrlwA==", + "license": "MIT" + }, + "node_modules/@visx/vendor/node_modules/@types/d3-delaunay": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-delaunay/-/d3-delaunay-6.0.1.tgz", + "integrity": "sha512-tLxQ2sfT0p6sxdG75c6f/ekqxjyYR0+LwPrsO1mbC9YDBzPJhs2HbJJRrn8Ez1DBoHRo2yx7YEATI+8V1nGMnQ==", + "license": "MIT" + }, + "node_modules/@visx/vendor/node_modules/@types/d3-format": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-format/-/d3-format-3.0.1.tgz", + "integrity": "sha512-5KY70ifCCzorkLuIkDe0Z9YTf9RR2CjBX1iaJG+rgM/cPP+sO+q9YdQ9WdhQcgPj1EQiJ2/0+yUkkziTG6Lubg==", + "license": "MIT" + }, + "node_modules/@visx/vendor/node_modules/@types/d3-interpolate": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.1.tgz", + "integrity": "sha512-jx5leotSeac3jr0RePOH1KdR9rISG91QIE4Q2PYTu4OymLTZfA3SrnURSLzKH48HmXVUru50b8nje4E79oQSQw==", + "license": "MIT", + "dependencies": { + "@types/d3-color": "*" } }, - "node_modules/@vercel/postgres/node_modules/postgres-array": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-3.0.4.tgz", - "integrity": "sha512-nAUSGfSDGOaOAEGwqsRY27GPOea7CNipJPOA7lPbdEpx5Kg3qzdP0AaWC5MlhTWV9s4hFX39nomVZ+C4tnGOJQ==", + "node_modules/@visx/vendor/node_modules/@types/d3-scale": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.2.tgz", + "integrity": "sha512-Yk4htunhPAwN0XGlIwArRomOjdoBFXC3+kCxK2Ubg7I9shQlVSJy/pG/Ht5ASN+gdMIalpk8TJ5xV74jFsetLA==", "license": "MIT", - "engines": { - "node": ">=12" + "dependencies": { + "@types/d3-time": "*" } }, - "node_modules/@vercel/postgres/node_modules/postgres-bytea": { + "node_modules/@visx/vendor/node_modules/@types/d3-time": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-3.0.0.tgz", - "integrity": "sha512-CNd4jim9RFPkObHSjVHlVrxoVQXz7quwNFpz7RY1okNNme49+sVyiTvTRobiLV548Hx/hb1BG+iE7h9493WzFw==", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.0.tgz", + "integrity": "sha512-sZLCdHvBUcNby1cB6Fd3ZBrABbjz3v1Vm90nysCQ6Vt7vd6e/h9Lt7SiJUoEX0l4Dzc7P5llKyhqSi1ycSf1Hg==", + "license": "MIT" + }, + "node_modules/@visx/vendor/node_modules/@types/d3-time-format": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@types/d3-time-format/-/d3-time-format-2.1.0.tgz", + "integrity": "sha512-/myT3I7EwlukNOX2xVdMzb8FRgNzRMpsZddwst9Ld/VFe6LyJyRp0s32l/V9XoUzk+Gqu56F/oGk6507+8BxrA==", + "license": "MIT" + }, + "node_modules/@visx/vendor/node_modules/d3-array": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.1.tgz", + "integrity": "sha512-gUY/qeHq/yNqqoCKNq4vtpFLdoCdvyNpWoC/KNjhGbhDuQpAM9sIQQKkXSNpXa9h5KySs/gzm7R88WkUutgwWQ==", + "license": "ISC", "dependencies": { - "obuf": "~1.1.2" + "internmap": "1 - 2" }, "engines": { - "node": ">= 6" + "node": ">=12" } }, - "node_modules/@vercel/postgres/node_modules/postgres-date": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-2.1.0.tgz", - "integrity": "sha512-K7Juri8gtgXVcDfZttFKVmhglp7epKb1K4pgrkLxehjqkrgPhfG6OO8LHLkfaqkbpjNRnra018XwAr1yQFWGcA==", - "license": "MIT", + "node_modules/@visx/vendor/node_modules/d3-delaunay": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-6.0.2.tgz", + "integrity": "sha512-IMLNldruDQScrcfT+MWnazhHbDJhcRJyOEBAJfwQnHle1RPh6WDuLvxNArUju2VSMSUuKlY5BGHRJ2cYyoFLQQ==", + "license": "ISC", + "dependencies": { + "delaunator": "5" + }, "engines": { "node": ">=12" } }, - "node_modules/@vercel/postgres/node_modules/postgres-interval": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-3.0.0.tgz", - "integrity": "sha512-BSNDnbyZCXSxgA+1f5UU2GmwhoI0aU5yMxRGO8CdFEcY2BQF9xm/7MqKnYoM1nJDk8nONNWDk9WeSmePFhQdlw==", - "license": "MIT", + "node_modules/@visx/vendor/node_modules/d3-geo": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-3.1.0.tgz", + "integrity": "sha512-JEo5HxXDdDYXCaWdwLRt79y7giK8SbhZJbFWXqbRTolCHFI5jRqteLzCsq51NKbUoX0PjBVSohxrx+NoOUujYA==", + "license": "ISC", + "dependencies": { + "d3-array": "2.5.0 - 3" + }, "engines": { "node": ">=12" } }, - "node_modules/@vercel/speed-insights": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@vercel/speed-insights/-/speed-insights-1.2.0.tgz", - "integrity": "sha512-y9GVzrUJ2xmgtQlzFP2KhVRoCglwfRQgjyfY607aU0hh0Un6d0OUyrJkjuAlsV18qR4zfoFPs/BiIj9YDS6Wzw==", - "hasInstallScript": true, - "license": "Apache-2.0", - "peerDependencies": { - "@sveltejs/kit": "^1 || ^2", - "next": ">= 13", - "react": "^18 || ^19 || ^19.0.0-rc", - "svelte": ">= 4", - "vue": "^3", - "vue-router": "^4" + "node_modules/@visx/visx": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/visx/-/visx-3.12.0.tgz", + "integrity": "sha512-Lx8XKFUz8eyaR07jdUWcMcPYRp+sfrd3OsGw8uFIuZeAJ0hF6Ni7f7TVvyW1W5chlvCrL4/MGQTCjN/A8o3UZQ==", + "license": "MIT", + "dependencies": { + "@visx/annotation": "3.12.0", + "@visx/axis": "3.12.0", + "@visx/bounds": "3.12.0", + "@visx/brush": "3.12.0", + "@visx/clip-path": "3.12.0", + "@visx/curve": "3.12.0", + "@visx/delaunay": "3.12.0", + "@visx/drag": "3.12.0", + "@visx/event": "3.12.0", + "@visx/geo": "3.12.0", + "@visx/glyph": "3.12.0", + "@visx/gradient": "3.12.0", + "@visx/grid": "3.12.0", + "@visx/group": "3.12.0", + "@visx/heatmap": "3.12.0", + "@visx/hierarchy": "3.12.0", + "@visx/legend": "3.12.0", + "@visx/marker": "3.12.0", + "@visx/mock-data": "3.12.0", + "@visx/network": "3.12.0", + "@visx/pattern": "3.12.0", + "@visx/point": "3.12.0", + "@visx/responsive": "3.12.0", + "@visx/sankey": "3.12.0", + "@visx/scale": "3.12.0", + "@visx/shape": "3.12.0", + "@visx/text": "3.12.0", + "@visx/threshold": "3.12.0", + "@visx/tooltip": "3.12.0", + "@visx/voronoi": "3.12.0", + "@visx/wordcloud": "3.12.0", + "@visx/xychart": "3.12.0", + "@visx/zoom": "3.12.0" }, - "peerDependenciesMeta": { - "@sveltejs/kit": { - "optional": true - }, - "next": { - "optional": true - }, - "react": { - "optional": true - }, - "svelte": { - "optional": true - }, - "vue": { - "optional": true - }, - "vue-router": { - "optional": true - } + "peerDependencies": { + "react": "^16.3.0-0 || ^17.0.0-0 || ^18.0.0-0" } }, - "node_modules/@vis.gl/react-mapbox": { - "version": "8.0.4", - "resolved": "https://registry.npmjs.org/@vis.gl/react-mapbox/-/react-mapbox-8.0.4.tgz", - "integrity": "sha512-NFk0vsWcNzSs0YCsVdt2100Zli9QWR+pje8DacpLkkGEAXFaJsFtI1oKD0Hatiate4/iAIW39SQHhgfhbeEPfQ==", + "node_modules/@visx/voronoi": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/voronoi/-/voronoi-3.12.0.tgz", + "integrity": "sha512-U3HWu6g5UjQchFDq8k/A4U9WrlN+80rAFPdGOUvIGOueQw9RmlZlNaeg8IJcQr2yk1s4O/VSpt3nR82zdINWMw==", "license": "MIT", - "peerDependencies": { - "mapbox-gl": ">=3.5.0", - "react": ">=16.3.0", - "react-dom": ">=16.3.0" + "dependencies": { + "@types/d3-voronoi": "^1.1.9", + "@types/react": "*", + "classnames": "^2.3.1", + "d3-voronoi": "^1.1.2", + "prop-types": "^15.6.1" }, - "peerDependenciesMeta": { - "mapbox-gl": { - "optional": true - } + "peerDependencies": { + "react": "^16.3.0-0 || ^17.0.0-0 || ^18.0.0-0" } }, - "node_modules/@vis.gl/react-maplibre": { - "version": "8.0.4", - "resolved": "https://registry.npmjs.org/@vis.gl/react-maplibre/-/react-maplibre-8.0.4.tgz", - "integrity": "sha512-HwZyfLjEu+y1mUFvwDAkVxinGm8fEegaWN+O8np/WZ2Sqe5Lv6OXFpV6GWz9LOEvBYMbGuGk1FQdejo+4HCJ5w==", + "node_modules/@visx/wordcloud": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/wordcloud/-/wordcloud-3.12.0.tgz", + "integrity": "sha512-TAo9w1Z65ddRM1OPmrELXNvDSOYf4MRO0+VAIX5FNFAc8v4FNmTJriSWc+A/FIZL+1svDOKnDP9SwF86NX4Alg==", "license": "MIT", "dependencies": { - "@maplibre/maplibre-gl-style-spec": "^19.2.1" + "@types/d3-cloud": "1.2.5", + "@visx/group": "3.12.0", + "d3-cloud": "^1.2.5" }, "peerDependencies": { - "maplibre-gl": ">=4.0.0", - "react": ">=16.3.0", - "react-dom": ">=16.3.0" - }, - "peerDependenciesMeta": { - "maplibre-gl": { - "optional": true - } + "react": "^16.8.0-0 || ^17.0.0-0 || ^18.0.0-0" } }, - "node_modules/@vis.gl/react-maplibre/node_modules/@maplibre/maplibre-gl-style-spec": { - "version": "19.3.3", - "resolved": "https://registry.npmjs.org/@maplibre/maplibre-gl-style-spec/-/maplibre-gl-style-spec-19.3.3.tgz", - "integrity": "sha512-cOZZOVhDSulgK0meTsTkmNXb1ahVvmTmWmfx9gRBwc6hq98wS9JP35ESIoNq3xqEan+UN+gn8187Z6E4NKhLsw==", - "license": "ISC", + "node_modules/@visx/xychart": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/xychart/-/xychart-3.12.0.tgz", + "integrity": "sha512-itJ7qvj/STpVmHesVyo2vPOataBM1mgSaf9R6/s4Bpe340wZldfCJ+IqRcNgdtbBagz1Hlr/sRnla4tWE2yw9A==", + "license": "MIT", "dependencies": { - "@mapbox/jsonlint-lines-primitives": "~2.0.2", - "@mapbox/unitbezier": "^0.0.1", - "json-stringify-pretty-compact": "^3.0.0", - "minimist": "^1.2.8", - "rw": "^1.3.3", - "sort-object": "^3.0.3" + "@types/lodash": "^4.14.172", + "@types/react": "*", + "@visx/annotation": "3.12.0", + "@visx/axis": "3.12.0", + "@visx/event": "3.12.0", + "@visx/glyph": "3.12.0", + "@visx/grid": "3.12.0", + "@visx/react-spring": "3.12.0", + "@visx/responsive": "3.12.0", + "@visx/scale": "3.12.0", + "@visx/shape": "3.12.0", + "@visx/text": "3.12.0", + "@visx/tooltip": "3.12.0", + "@visx/vendor": "3.12.0", + "@visx/voronoi": "3.12.0", + "classnames": "^2.3.1", + "d3-interpolate-path": "2.2.1", + "d3-shape": "^2.0.0", + "lodash": "^4.17.21", + "mitt": "^2.1.0", + "prop-types": "^15.6.2" }, - "bin": { - "gl-style-format": "dist/gl-style-format.mjs", - "gl-style-migrate": "dist/gl-style-migrate.mjs", - "gl-style-validate": "dist/gl-style-validate.mjs" + "peerDependencies": { + "@react-spring/web": "^9.4.5", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, - "node_modules/@vis.gl/react-maplibre/node_modules/json-stringify-pretty-compact": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-stringify-pretty-compact/-/json-stringify-pretty-compact-3.0.0.tgz", - "integrity": "sha512-Rc2suX5meI0S3bfdZuA7JMFBGkJ875ApfVyq2WHELjBiiG22My/l7/8zPpH/CfFVQHuVLd8NLR0nv6vi0BYYKA==", - "license": "MIT" + "node_modules/@visx/xychart/node_modules/d3-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-2.0.0.tgz", + "integrity": "sha512-ZwZQxKhBnv9yHaiWd6ZU4x5BtCQ7pXszEV9CU6kRgwIQVQGLMv1oiL4M+MK/n79sYzsj+gcgpPQSctJUsLN7fA==", + "license": "BSD-3-Clause" + }, + "node_modules/@visx/xychart/node_modules/d3-shape": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-2.1.0.tgz", + "integrity": "sha512-PnjUqfM2PpskbSLTJvAzp2Wv4CZsnAgTfcVRTwW03QR3MkXF8Uo7B1y/lWkAsmbKwuecto++4NlsYcvYpXpTHA==", + "license": "BSD-3-Clause", + "dependencies": { + "d3-path": "1 - 2" + } + }, + "node_modules/@visx/zoom": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@visx/zoom/-/zoom-3.12.0.tgz", + "integrity": "sha512-JmxkOROPkjnMEdFGnnSKLo5BkFHgOkLe/N5KkWR02cA5bE+bmEkfAh7DJfrtVsPkqSPvwGH1TrMWWthJwoivPA==", + "license": "MIT", + "dependencies": { + "@types/react": "*", + "@use-gesture/react": "^10.0.0-beta.22", + "@visx/event": "3.12.0", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": "^16.0.0-0 || ^17.0.0-0 || ^18.0.0-0" + } }, "node_modules/@webcomponents/shadycss": { "version": "1.11.2", @@ -13048,8 +14226,7 @@ "version": "2.5.1", "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/cli-cursor": { "version": "5.0.0", @@ -13601,6 +14778,21 @@ "node": ">=12" } }, + "node_modules/d3-cloud": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/d3-cloud/-/d3-cloud-1.2.7.tgz", + "integrity": "sha512-8TrgcgwRIpoZYQp7s3fGB7tATWfhckRb8KcVd1bOgqkNdkJRDGWfdSf4HkHHzZxSczwQJdSxvfPudwir5IAJ3w==", + "license": "BSD-3-Clause", + "dependencies": { + "d3-dispatch": "^1.0.3" + } + }, + "node_modules/d3-cloud/node_modules/d3-dispatch": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-1.0.6.tgz", + "integrity": "sha512-fVjoElzjhCEy+Hbn8KygnmMS7Or0a9sI2UzGwoB7cCtvI1XpVN9GpoYlnb3xt2YV66oXYb1fLJ8GMvP4hdU1RA==", + "license": "BSD-3-Clause" + }, "node_modules/d3-color": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", @@ -13764,6 +14956,12 @@ "node": ">=12" } }, + "node_modules/d3-interpolate-path": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/d3-interpolate-path/-/d3-interpolate-path-2.2.1.tgz", + "integrity": "sha512-6qLLh/KJVzls0XtMsMpcxhqMhgVEN7VIbR/6YGZe2qlS8KDgyyVB20XcmGnDyB051HcefQXM/Tppa9vcANEA4Q==", + "license": "BSD-3-Clause" + }, "node_modules/d3-path": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz", @@ -18474,8 +19672,7 @@ "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/lodash-es": { "version": "4.17.21", @@ -18785,6 +19982,12 @@ "devOptional": true, "license": "ISC" }, + "node_modules/math-expression-evaluator": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/math-expression-evaluator/-/math-expression-evaluator-1.4.0.tgz", + "integrity": "sha512-4vRUvPyxdO8cWULGTh9dZWL2tZK6LDBvj+OGHBER7poH9Qdt7kXEoj20wiz4lQUbUXQZFjPbe5mVDo9nutizCw==", + "license": "MIT" + }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", @@ -20110,6 +21313,12 @@ "node": ">= 18" } }, + "node_modules/mitt": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-2.1.0.tgz", + "integrity": "sha512-ILj2TpLiysu2wkBbWjAmww7TkZb65aiQO+DkVdUTBpBXq+MHYiETENkKFMtsJZX1Lf4pe4QOrTSjIfUwN5lRdg==", + "license": "MIT" + }, "node_modules/mj-context-menu": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/mj-context-menu/-/mj-context-menu-0.6.1.tgz", @@ -22810,6 +24019,21 @@ } } }, + "node_modules/react-use-measure": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/react-use-measure/-/react-use-measure-2.1.7.tgz", + "integrity": "sha512-KrvcAo13I/60HpwGO5jpW7E9DfusKyLPLvuHlUyP5zqnmAPhNc6qTRjUQrdTADl0lpPpDVU2/Gg51UlOGHXbdg==", + "license": "MIT", + "peerDependencies": { + "react": ">=16.13", + "react-dom": ">=16.13" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + } + } + }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -22916,6 +24140,32 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/reduce-css-calc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz", + "integrity": "sha512-0dVfwYVOlf/LBA2ec4OwQ6p3X9mYxn/wOl2xTcLwjnPYrkgEfPx3VI4eGCH3rQLlPISG5v9I9bkZosKsNRTRKA==", + "license": "MIT", + "dependencies": { + "balanced-match": "^0.4.2", + "math-expression-evaluator": "^1.2.14", + "reduce-function-call": "^1.0.1" + } + }, + "node_modules/reduce-css-calc/node_modules/balanced-match": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha512-STw03mQKnGUYtoNjmowo4F2cRmIIxYEGiMsjjwla/u5P1lxadj/05WkNaFjNiKTgJkj8KiXbgAiRTmcQRwQNtg==", + "license": "MIT" + }, + "node_modules/reduce-function-call": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/reduce-function-call/-/reduce-function-call-1.0.3.tgz", + "integrity": "sha512-Hl/tuV2VDgWgCSEeWMLwxLZqX7OK59eU1guxXsRKTAyeYimivsKdtcV4fu3r710tpG5GmDKDhQ0HSZLExnNmyQ==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, "node_modules/redux": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", @@ -26486,7 +27736,15 @@ "@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/lang-javascript": "^6.2.4", + "@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", @@ -26534,7 +27792,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/package.json b/package.json index 91aa8af3..9e32ef4b 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,15 @@ "rename:query-to-query": "node scripts/rename-query-to-query.js" }, "dependencies": { + "@visx/axis": "^3.12.0", + "@visx/group": "^3.12.0", + "@visx/legend": "^3.12.0", + "@visx/responsive": "^3.12.0", + "@visx/scale": "^3.12.0", + "@visx/shape": "^3.12.0", + "@visx/stats": "^3.12.0", + "@visx/tooltip": "^3.12.0", + "@visx/visx": "^3.12.0", "drizzle-kit": "^0.30.0", "drizzle-orm": "^0.40.0", "wkx": "^0.5.0" 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/package.json b/packages/app/package.json index 55025007..e989af72 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -13,7 +13,15 @@ "@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/lang-javascript": "^6.2.4", + "@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", @@ -61,7 +69,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/actions/data/queries/addComputedColumn.ts b/packages/app/src/actions/data/queries/addComputedColumn.ts new file mode 100644 index 00000000..b0196452 --- /dev/null +++ b/packages/app/src/actions/data/queries/addComputedColumn.ts @@ -0,0 +1,36 @@ +"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"; + +import { + actionError, + actionResult, + runActionServer, +} from "@/lib/actions/utils"; + +export async function addComputedColumnAction( + projectId: string, + queryId: string, + column: Omit, +) { + return runActionServer(async () => { + const user = await getServerUser(); + const userProject = await getProjectForUser(user, projectId); + + if (!userProject) { + return actionError("Project not found"); + } + + const newComputedColumn = await addComputedColumn(queryId, { + ...column, + }); + + revalidateQueryCache(queryId, projectId); + + return actionResult(newComputedColumn); + }); +} 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/actions/data/queries/updateComputedColumn.ts b/packages/app/src/actions/data/queries/updateComputedColumn.ts new file mode 100644 index 00000000..1a04aeff --- /dev/null +++ b/packages/app/src/actions/data/queries/updateComputedColumn.ts @@ -0,0 +1,38 @@ +"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"; +import { + runActionServer, + actionError, + actionResult, +} from "@/lib/actions/utils"; + +export async function updateComputedColumnAction( + projectId: string, + queryId: string, + columnId: string, + column: Omit, +) { + return runActionServer(async () => { + const user = await getServerUser(); + const userProject = await getProjectForUser(user, projectId); + + if (!userProject) { + return actionError("Project not found"); + } + + const updatedComputedColumn = await updateComputedColumn( + queryId, + columnId, + column, + ); + + revalidateQueryCache(queryId, projectId); + + return actionResult(updatedComputedColumn); + }); +} diff --git a/packages/app/src/actions/data/templates/applyTemplate.ts b/packages/app/src/actions/data/templates/applyTemplate.ts index 555464db..3b2e72e4 100644 --- a/packages/app/src/actions/data/templates/applyTemplate.ts +++ b/packages/app/src/actions/data/templates/applyTemplate.ts @@ -16,6 +16,7 @@ import { actionResult, runActionServer, } from "@/lib/actions/utils"; +import { ComputedColumn } from "@common/db/schema/query"; type ApplyTemplateParams = { projectId: string; @@ -24,6 +25,7 @@ type ApplyTemplateParams = { plotName?: string; plotDefinition?: PlotDefinitionWithoutSource; folderId?: string | null; + queryCustomColumns?: ComputedColumn[]; }; export async function applyTemplateAction({ @@ -33,6 +35,7 @@ export async function applyTemplateAction({ plotName, plotDefinition, folderId, + queryCustomColumns, }: ApplyTemplateParams) { return runActionServer(async () => { const user = await getServerUser(); @@ -56,6 +59,7 @@ export async function applyTemplateAction({ }, ]), ), + computedColumns: queryCustomColumns || [], }); revalidateQueryCache(newQuery.id, projectId); diff --git a/packages/app/src/actions/data/templates/createTemplate.ts b/packages/app/src/actions/data/templates/createTemplate.ts index ba4ae274..f84c4179 100644 --- a/packages/app/src/actions/data/templates/createTemplate.ts +++ b/packages/app/src/actions/data/templates/createTemplate.ts @@ -11,6 +11,7 @@ import { QueryWithoutFilters, PlotDefinitionWithoutSource, } from "@common/db/schema/template"; +import { ComputedColumn } from "@common/db/schema/query"; import { runActionServer, actionError, @@ -45,6 +46,7 @@ export async function createTemplateAction({ let queryDefinition: QueryWithoutFilters | null = null; let plotDefinition: PlotDefinitionWithoutSource | null = null; + let computedColumns: ComputedColumn[] = []; // Get query definition if provided if (queryId) { @@ -53,7 +55,10 @@ export async function createTemplateAction({ return actionError("Query not found or has no definition"); } + computedColumns = query.computedColumns || []; + // Remove filters from the definition for the template + // Create a partial record without filters queryDefinition = Object.fromEntries( Object.entries(query.definition).map(([tableName, tableDef]) => [ tableName, @@ -62,7 +67,7 @@ export async function createTemplateAction({ filters: undefined, // Remove filters }, ]), - ) as Record; + ) as Partial> as QueryWithoutFilters; } // Get plot definition if provided @@ -89,7 +94,7 @@ export async function createTemplateAction({ filters: undefined, // Remove filters }, ]), - ) as Record; + ) as Partial> as QueryWithoutFilters; } // If we still don't have a query definition, try to get it from the plot's definition.dataSource @@ -143,7 +148,10 @@ export async function createTemplateAction({ const newTemplate = await createTemplate({ name, ownerId: user.id, - queryDefinition: queryDefinition || ({} as QueryWithoutFilters), + queryDefinition: + queryDefinition || + ({} as Partial> as QueryWithoutFilters), + queryCustomColumns: computedColumns, plotDefinition: plotDefinition || null, scope, }); diff --git a/packages/app/src/app/(app)/projects/[projectId]/data/queries/[queryId]/definition/page.tsx b/packages/app/src/app/(app)/projects/[projectId]/data/queries/[queryId]/definition/page.tsx index 9d93e846..e8cf42aa 100644 --- a/packages/app/src/app/(app)/projects/[projectId]/data/queries/[queryId]/definition/page.tsx +++ b/packages/app/src/app/(app)/projects/[projectId]/data/queries/[queryId]/definition/page.tsx @@ -2,8 +2,7 @@ import { getServerUser } from "@/lib/auth"; import { getProjectForUser } from "@/lib/dal/projects"; import { parseStringParam } from "@/lib/routing"; import { notFound } from "next/navigation"; -import { QueryData } from "@/components/data/query/query-data"; -import { schemaConfig } from "@common/db/schema/common"; + import { Button } from "@/components/ui/button"; import { QueryDefinition } from "@/components/data/query/query-definition"; import Link from "next/link"; @@ -15,6 +14,27 @@ import { } from "@/lib/dal/queries"; import { getProjectTableCounts } from "@/lib/dal/data"; import { readZones, readQueryZones } from "@/db/crud/zone"; +import { schemaConfig } from "@common/db/schema/common"; +import { Query } from "@common/db/schema/query"; + +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; +} + type Props = { params: { projectId: string; queryId: string }; }; @@ -46,39 +66,28 @@ export default async function Page({ params }: Props) { readQueryZones(queryId), ]); - const zonesWithIsSelected = zones.map((zone) => ({ + const completions = getCompletions(query); + + const zonesWithIsSelected = zones.map((zone: any) => ({ ...zone, - isSelected: queryZones.some((z) => z.zoneId === zone.id), + isSelected: queryZones.some((z: any) => z.zoneId === zone.id), })); return ( -
+
- {definitionConfigured && ( -
-
-

Data preview

-
-
- -
-
- )} - -
+
+ + + + + + + { + 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 && (
@@ -164,13 +232,6 @@ export function PlotLayout({ setSidebarOpen={setSidebarOpen} />
- -
); } 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 new file mode 100644 index 00000000..27c7f292 --- /dev/null +++ b/packages/app/src/components/data/plot/definition/plot-sections-config.ts @@ -0,0 +1,66 @@ +import { SectionType } from "@common/db/schema/plot"; +import { AxesSection } from "./sections/axes-section"; +import { DistributionSection } from "./sections/distribution-section"; +import { GeneralSection } from "./sections/general-section"; +import { GroupingSection } from "./sections/grouping-section"; +import { LineStyleSection } from "./sections/line-style-section"; +import { ReferenceLinesSection } from "./sections/reference-lines-section"; +import { TextLabelsSection } from "./sections/text-labels-section"; + +export type SectionConfig = { + id: SectionType; + label: string; + shortLabel?: string; // For mobile view + component: React.ComponentType; +}; + +export const PLOT_SECTIONS: Record = { + general: { + id: "general", + label: "General", + component: GeneralSection, + }, + axes: { + id: "axes", + label: "Axes", + component: AxesSection, + }, + grouping: { + id: "grouping", + label: "Grouping", + component: GroupingSection, + }, + "line-style": { + id: "line-style", + label: "Line style", + shortLabel: "Line", + component: LineStyleSection, + }, + distribution: { + id: "distribution", + label: "Distribution", + shortLabel: "Dist", + component: DistributionSection, + }, + "reference-lines": { + id: "reference-lines", + label: "Reference lines", + shortLabel: "Ref Lines", + component: ReferenceLinesSection, + }, + "text-labels": { + id: "text-labels", + label: "Text labels", + shortLabel: "Labels", + component: TextLabelsSection, + }, +}; + +export const PLOT_TYPE_SECTIONS: Record = { + scatter: ["general", "axes", "grouping", "reference-lines", "text-labels"], + line: ["general", "axes", "grouping", "line-style"], + 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/plot-sidebar.tsx b/packages/app/src/components/data/plot/definition/plot-sidebar.tsx index cd186a61..0220f686 100644 --- a/packages/app/src/components/data/plot/definition/plot-sidebar.tsx +++ b/packages/app/src/components/data/plot/definition/plot-sidebar.tsx @@ -1,26 +1,28 @@ "use client"; -import { AxesSection } from "@/components/data/plot/definition/sections/axes-section"; -import { DistributionSection } from "@/components/data/plot/definition/sections/distribution-section"; -import { GeneralSection } from "@/components/data/plot/definition/sections/general-section"; -import { GroupingSection } from "@/components/data/plot/definition/sections/grouping-section"; -import { LineStyleSection } from "@/components/data/plot/definition/sections/line-style-section"; -import { ReferenceLinesSection } from "@/components/data/plot/definition/sections/reference-lines-section"; -import { TextLabelsSection } from "@/components/data/plot/definition/sections/text-labels-section"; import { Button } from "@/components/ui/button"; import { TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { Tabs } from "@/components/ui/tabs"; import { Query } from "@common/db/schema/query"; +import { + getSectionValidationStatus, + Plot, + PlotType, +} from "@common/db/schema/plot"; +import { useState } from "react"; +import { AlertCircle, X } from "lucide-react"; -import { Plot, PlotDefinition } from "@common/db/schema/plot"; +import { PLOT_SECTIONS, PLOT_TYPE_SECTIONS } from "./plot-sections-config"; +import { SectionRenderer } from "./section-renderer"; -import { useState } from "react"; -import { X } from "lucide-react"; +// We're ignoring the serialization warning for setSidebarOpen because this component +// is only used as a client component and the function is passed from a parent client component type Props = { plot: Plot; queries: Query[]; - plotType: "scatter" | "line" | "histogram" | "bar"; - columns: { id: string; name: string; table: string }[]; + plotType: PlotType; + + columns: { id: string; name: string; table: string; label: string }[]; tables: { tableName: string; label: string }[]; setSidebarOpen: (_open: boolean) => void; }; @@ -33,12 +35,14 @@ export function PlotSidebar({ tables, setSidebarOpen, }: Props) { - // State to control the active tab, synced with URL const [activeTab, setActiveTab] = useState("general"); - const updateTab = (tab: string) => { - setActiveTab(tab); - }; + const sectionStatus = getSectionValidationStatus(plot.definition); + + // Get available sections for this plot type + const availableSections = PLOT_TYPE_SECTIONS[plotType].map( + (sectionId) => PLOT_SECTIONS[sectionId], + ); return (
-
- - - General - - - Axes - - - Grouping + + {availableSections.map((section) => ( + +
+ {!sectionStatus[section.id] && ( + + )} + {section.label} +
- {plotType === "line" && ( - - Line Style - Line - - )} -
- - {plotType === "histogram" && ( - - Distribution - Dist - - )} - {plotType === "scatter" && ( - - Reference Lines - Ref Lines - - )} - {plotType === "scatter" && ( - - Text Labels - Labels - - )} - -
+ ))} + +
- - - - - - - - - - {plotType === "line" && ( - - ; - } - } - /> - - )} - {plotType === "histogram" && ( - - ; - } - } - /> - - )} - {plotType === "scatter" && ( - - ; - } - } - /> - - )} - {plotType === "scatter" && ( + {availableSections.map((section) => ( - ; - } - } + - )} + ))}
diff --git a/packages/app/src/components/data/plot/definition/section-renderer.tsx b/packages/app/src/components/data/plot/definition/section-renderer.tsx new file mode 100644 index 00000000..ab73837b --- /dev/null +++ b/packages/app/src/components/data/plot/definition/section-renderer.tsx @@ -0,0 +1,60 @@ +"use client"; + +import { Plot, PlotDefinition } from "@common/db/schema/plot"; +import { Query } from "@common/db/schema/query"; +import { SectionConfig } from "./plot-sections-config"; + +type SectionRendererProps = { + section: SectionConfig; + plot: Plot; + queries?: Query[]; + columns?: { id: string; name: string; table: string }[]; + tables?: { tableName: string; label: string }[]; +}; + +export function SectionRenderer({ + section, + plot, + queries, + columns, + tables, +}: SectionRendererProps) { + const Component = section.component; + + // Pass appropriate props based on section type + const getComponentProps = () => { + const baseProps = { plot }; + + switch (section.id) { + case "general": + return { ...baseProps, queries, tables }; + case "axes": + return { ...baseProps, columns }; + case "grouping": + return { + ...baseProps, + columns, + showSymbol: plot.definition?.type === "scatter", + showLine: plot.definition?.type === "line", + }; + case "line-style": + case "distribution": + case "reference-lines": + case "text-labels": { + const plotType = plot.definition?.type; + if (!plotType) return baseProps; + + return { + ...baseProps, + plot: plot as Plot & { + definition: Extract; + }, + }; + } + default: + return baseProps; + } + }; + + return ; +} 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 d2da7717..557144a2 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 @@ -3,6 +3,7 @@ import { SectionWrapper } from "./section-wrapper"; import { plotDefinitionSchema, + PlotType, type Plot, type PlotDefinition, } from "@common/db/schema/plot"; @@ -21,6 +22,7 @@ interface AxesSectionProps { id: string; name: string; table: string; + label: string; }[]; } @@ -46,6 +48,12 @@ export function AxesSection({ plot, columns }: AxesSectionProps) { const debouncedOnSubmit = useDebouncedCallback(handleDefinitionChange, 1000); + const plotType = plot.definition?.type as PlotType; + + const xAxisType = ["scatter", "line", "histogram"].includes(plotType) + ? "number" + : "category"; + return ( {plot.definition?.type !== "histogram" && ( @@ -69,6 +78,7 @@ export function AxesSection({ plot, columns }: AxesSectionProps) { label="Y Axis" availableColumns={columns} type="y" + axisType={"number"} /> )} 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/definition/sections/general-section.tsx b/packages/app/src/components/data/plot/definition/sections/general-section.tsx index 661363b4..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 @@ -54,34 +54,47 @@ export function GeneralSection({ plot, queries, tables }: GeneralSectionProps) { const newDefinition = { ...defaultDefinition, dataSource: plot.definition?.dataSource ?? defaultDefinition.dataSource, - grouping: plot.definition?.grouping ?? defaultDefinition.grouping, - xAxis: plot.definition?.xAxis ?? defaultDefinition.xAxis, + grouping: + type === "box" + ? null + : (plot.definition?.grouping ?? defaultDefinition.grouping), + xAxis: + (plot.definition?.xAxis.type === defaultDefinition.xAxis.type + ? plot.definition.xAxis + : undefined) ?? defaultDefinition.xAxis, } as PlotDefinition; - // Add yAxis only for scatter, line, and bar plots - if (type === "scatter" || type === "line" || type === "bar") { + // Add yAxis only for scatter, line, bar, and box plots + if ( + type === "scatter" || + type === "line" || + type === "bar" || + type === "box" || + type === "violin" + ) { // When switching from histogram, we need to ensure we have a valid yAxis const yAxis = plot.definition?.type === "histogram" ? ( defaultDefinition as Extract< PlotDefinition, - { type: "scatter" | "line" | "bar" } + { type: "scatter" | "line" | "bar" | "box" } > ).yAxis : plot.definition?.type === "scatter" || plot.definition?.type === "line" || - plot.definition?.type === "bar" + plot.definition?.type === "bar" || + plot.definition?.type === "box" ? ( plot.definition as Extract< PlotDefinition, - { type: "scatter" | "line" | "bar" } + { type: "scatter" | "line" | "bar" | "box" } > ).yAxis : ( defaultDefinition as Extract< PlotDefinition, - { type: "scatter" | "line" | "bar" } + { type: "scatter" | "line" | "bar" | "box" } > ).yAxis; @@ -146,10 +159,12 @@ export function GeneralSection({ plot, queries, tables }: GeneralSectionProps) { - Scatter Plot - Line Plot + Scatter + Line Histogram {/* Bar Chart */} + Box + Violin
diff --git a/packages/app/src/components/data/plot/definition/sections/grouping-section.tsx b/packages/app/src/components/data/plot/definition/sections/grouping-section.tsx index 5fcdd4e8..7d5249f7 100644 --- a/packages/app/src/components/data/plot/definition/sections/grouping-section.tsx +++ b/packages/app/src/components/data/plot/definition/sections/grouping-section.tsx @@ -23,6 +23,7 @@ interface GroupingSectionProps { id: string; name: string; table: string; + label: string; }[]; } 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..17ce25f2 100644 --- a/packages/app/src/components/data/plot/form/axis-form.tsx +++ b/packages/app/src/components/data/plot/form/axis-form.tsx @@ -16,8 +16,14 @@ import { isDefined } from "@/utils/helpers"; type AxisFormProps = { name: string; label: string; - availableColumns: Array<{ id: string; name: string; table: string }>; + availableColumns: Array<{ + id: string; + name: string; + table: string; + label: string; + }>; type: "x" | "y"; + axisType: "number" | "category"; }; export function AxisForm({ @@ -25,11 +31,20 @@ export function AxisForm({ label, availableColumns, type, + axisType, }: AxisFormProps) { const { register, setValue, watch } = useFormContext(); const currentValue = watch(`${name}`); const hasCustomDomain = watch(`${name}.domainTickOptions`) !== null; + function handleColumnChange(value: string | null) { + const column = availableColumns.find((col) => col.name === value); + if (column) { + setValue(`${name}.column`, column.name); + setValue(`${name}.label`, column.label); + } + } + return (
{label} @@ -44,15 +59,18 @@ export function AxisForm({ setValue(`${name}.type`, value)} - > - - - - - Number - Category - - -
- -
- - 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/form/grouping-form.tsx b/packages/app/src/components/data/plot/form/grouping-form.tsx index c62117b6..9fee4cc4 100644 --- a/packages/app/src/components/data/plot/form/grouping-form.tsx +++ b/packages/app/src/components/data/plot/form/grouping-form.tsx @@ -18,7 +18,12 @@ import { Switch } from "@/components/ui/switch"; interface GroupingFormProps { name: "color" | "symbol" | "line"; label: string; - availableColumns: Array<{ id: string; name: string; table: string }>; + availableColumns: Array<{ + id: string; + name: string; + table: string; + label: string; + }>; onSubmit: (_data: PlotDefinition) => void; } @@ -33,8 +38,8 @@ export function GroupingForm({ const currentValue = watch(`grouping.${name}`) as GroupingValue | null; const columnOptions = availableColumns.map((column) => ({ - value: column.id, - label: `${column.table} - ${column.name}`, + value: column.name, + label: column.label, })); const handleColumnChange = async (value: string | null) => { @@ -50,6 +55,7 @@ export function GroupingForm({ shouldDirty: true, shouldTouch: true, }); + handleSubmit(onSubmit)(); }; 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-export.ts b/packages/app/src/components/data/plot/plot-export.ts deleted file mode 100644 index 0e4310b9..00000000 --- a/packages/app/src/components/data/plot/plot-export.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { Plot } from "@common/db/schema/plot"; - -export async function exportPlotAsImage(plotElement: HTMLElement, plot: Plot) { - try { - // Find all SVG elements - const titleSvg = plotElement.querySelector( - // eslint-disable-next-line quotes - '[data-plot-title="true"]', - ) as SVGElement; - const plotSvg = plotElement.querySelector( - // eslint-disable-next-line quotes - '[data-plot="true"]', - ) as SVGElement; - const legendSvg = plotElement.querySelector( - // eslint-disable-next-line quotes - '[data-legend="true"]', - ) as SVGElement; - - if (!plotSvg) { - throw new Error("Plot SVG not found"); - } - - // Create a new SVG that will contain all elements - const combinedSvg = document.createElementNS( - "http://www.w3.org/2000/svg", - "svg", - ); - - // Get dimensions - const titleBox = titleSvg?.getBoundingClientRect(); - const plotBox = plotSvg.getBoundingClientRect(); - const legendBox = legendSvg?.getBoundingClientRect(); - - // Set the combined SVG dimensions - const totalWidth = Math.max( - plotBox.width, - legendBox?.width || 0, - titleBox?.width || 0, - ); - const totalHeight = - (titleBox?.height || 0) + plotBox.height + (legendBox?.height || 0); - - combinedSvg.setAttribute("width", String(totalWidth)); - combinedSvg.setAttribute("height", String(totalHeight)); - combinedSvg.setAttribute("viewBox", `0 0 ${totalWidth} ${totalHeight}`); - - // Add title if it exists - if (titleSvg) { - const titleClone = titleSvg.cloneNode(true) as SVGElement; - const titleGroup = document.createElementNS( - "http://www.w3.org/2000/svg", - "g", - ); - titleGroup.appendChild(titleClone); - combinedSvg.appendChild(titleGroup); - } - - // Add plot - const plotClone = plotSvg.cloneNode(true) as SVGElement; - const plotGroup = document.createElementNS( - "http://www.w3.org/2000/svg", - "g", - ); - plotGroup.setAttribute( - "transform", - `translate(0, ${titleBox?.height || 0})`, - ); - plotGroup.appendChild(plotClone); - combinedSvg.appendChild(plotGroup); - - // Add legend if it exists - if (legendSvg) { - const legendClone = legendSvg.cloneNode(true) as SVGElement; - const legendGroup = document.createElementNS( - "http://www.w3.org/2000/svg", - "g", - ); - - // Center the legend - const legendX = (totalWidth - legendBox.width) / 2; - legendGroup.setAttribute( - "transform", - `translate(${legendX}, ${(titleBox?.height || 0) + plotBox.height})`, - ); - - legendGroup.appendChild(legendClone); - combinedSvg.appendChild(legendGroup); - } - - // Convert to SVG string - const serializer = new XMLSerializer(); - const svgString = serializer.serializeToString(combinedSvg); - - // Create blob and download - const blob = new Blob([svgString], { type: "image/svg+xml" }); - const url = URL.createObjectURL(blob); - const link = document.createElement("a"); - link.href = url; - link.download = `${plot.name.toLowerCase().replace(/\s+/g, "-")}.svg`; - document.body.appendChild(link); - link.click(); - document.body.removeChild(link); - URL.revokeObjectURL(url); - } catch (error) { - console.error("Failed to export plot:", error); - throw error; - } -} diff --git a/packages/app/src/components/data/plot/plot-export/index.ts b/packages/app/src/components/data/plot/plot-export/index.ts new file mode 100644 index 00000000..6df49355 --- /dev/null +++ b/packages/app/src/components/data/plot/plot-export/index.ts @@ -0,0 +1,41 @@ +import { Plot } from "@common/db/schema/plot"; +import { ExportOptions } from "./types"; +import { + downloadDataURL, + getPlotSVG, + svgToDataURL, + svgToPngDataURL, +} from "./utils"; + +export async function exportPlot( + container: HTMLElement, + plot: Plot, + options: ExportOptions, +): Promise { + try { + // Get the complete SVG with plot and legend + const svg = getPlotSVG(container); + + // Generate filename + const filename = `${plot.name.toLowerCase().replace(/\s+/g, "-")}`; + + // Export based on format + if (options.format === "svg") { + const svgURL = svgToDataURL(svg); + downloadDataURL(svgURL, `${filename}.svg`); + } else if (options.format === "png") { + const pngURL = await svgToPngDataURL( + svg, + options.scale, + options.backgroundColor, + ); + downloadDataURL(pngURL, `${filename}.png`); + } + } catch (error) { + console.error("Failed to export plot:", error); + throw error; + } +} + +// Re-export types +export * from "./types"; diff --git a/packages/app/src/components/data/plot/plot-export/types.ts b/packages/app/src/components/data/plot/plot-export/types.ts new file mode 100644 index 00000000..612f8c0d --- /dev/null +++ b/packages/app/src/components/data/plot/plot-export/types.ts @@ -0,0 +1,7 @@ +export type ExportFormat = "svg" | "png"; + +export interface ExportOptions { + format: ExportFormat; + scale?: number; + backgroundColor?: string; +} diff --git a/packages/app/src/components/data/plot/plot-export/utils.ts b/packages/app/src/components/data/plot/plot-export/utils.ts new file mode 100644 index 00000000..b6c7b51a --- /dev/null +++ b/packages/app/src/components/data/plot/plot-export/utils.ts @@ -0,0 +1,92 @@ +export function getPlotSVG(container: HTMLElement): SVGElement { + // Get the main plot SVG that contains everything + const svg = container.querySelector( + "svg[data-plot='true']", + ) as SVGElement | null; + + if (!svg) { + throw new Error("Plot SVG not found"); + } + + // Clone the SVG to avoid modifying the original + const clonedSvg = svg.cloneNode(true) as SVGElement; + + // Get the original dimensions + const box = svg.getBoundingClientRect(); + + // Set the dimensions explicitly + clonedSvg.setAttribute("width", String(box.width)); + clonedSvg.setAttribute("height", String(box.height)); + clonedSvg.setAttribute("viewBox", `0 0 ${box.width} ${box.height}`); + + return clonedSvg; +} + +export function svgToDataURL(svg: SVGElement): string { + const serializer = new XMLSerializer(); + const svgString = serializer.serializeToString(svg); + const svgBlob = new Blob([svgString], { + type: "image/svg+xml;charset=utf-8", + }); + return URL.createObjectURL(svgBlob); +} + +export async function svgToPngDataURL( + svg: SVGElement, + scale = 2, + backgroundColor = "white", +): Promise { + return new Promise((resolve, reject) => { + const svgURL = svgToDataURL(svg); + const img = new Image(); + const width = parseFloat(svg.getAttribute("width") || "0"); + const height = parseFloat(svg.getAttribute("height") || "0"); + + img.onload = () => { + try { + const canvas = document.createElement("canvas"); + canvas.width = width * scale; + canvas.height = height * scale; + const ctx = canvas.getContext("2d"); + + if (!ctx) { + throw new Error("Failed to get canvas context"); + } + + // Fill background if specified + if (backgroundColor) { + ctx.fillStyle = backgroundColor; + ctx.fillRect(0, 0, canvas.width, canvas.height); + } + + // Draw scaled image + ctx.scale(scale, scale); + ctx.drawImage(img, 0, 0); + + // Convert to data URL + const dataURL = canvas.toDataURL("image/png"); + URL.revokeObjectURL(svgURL); + resolve(dataURL); + } catch (error) { + reject(error); + } + }; + + img.onerror = () => { + URL.revokeObjectURL(svgURL); + reject(new Error("Failed to load SVG image")); + }; + + img.src = svgURL; + }); +} + +export function downloadDataURL(dataURL: string, filename: string) { + const link = document.createElement("a"); + link.href = dataURL; + link.download = filename; + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + URL.revokeObjectURL(dataURL); +} diff --git a/packages/app/src/components/data/plot/plot-size-controls.tsx b/packages/app/src/components/data/plot/plot-size-controls.tsx new file mode 100644 index 00000000..077ae8fc --- /dev/null +++ b/packages/app/src/components/data/plot/plot-size-controls.tsx @@ -0,0 +1,43 @@ +import { Button } from "@/components/ui/button"; +import { cn } from "@/lib/utils"; + +type PlotSizePreset = "square" | "fit"; + +interface PlotSizeControlsProps { + currentPreset: PlotSizePreset; + onPresetChange: (_preset: PlotSizePreset) => void; +} + +export function PlotSizeControls({ + currentPreset, + onPresetChange, +}: PlotSizeControlsProps) { + return ( +
+ + +
+ ); +} + +export type { PlotSizePreset }; diff --git a/packages/app/src/components/data/plot/plot-skeleton.tsx b/packages/app/src/components/data/plot/plot-skeleton.tsx deleted file mode 100644 index 8d40d156..00000000 --- a/packages/app/src/components/data/plot/plot-skeleton.tsx +++ /dev/null @@ -1,66 +0,0 @@ -import { Skeleton } from "@/components/ui/skeleton"; - -export function PlotSkeleton() { - return ( -
- {/* Header skeleton */} -
- - -
- - {/* Plot configuration skeleton */} -
-
- - -
-
- - -
-
- - -
-
- - {/* Plot visualization skeleton */} -
-
-
-
- -
-
-
-
- - {/* Data preview skeleton */} -
- -
- {/* Table header */} -
-
- - - -
-
- - {/* Table rows */} - {Array.from({ length: 3 }).map((_, index) => ( -
-
- - - -
-
- ))} -
-
-
- ); -} diff --git a/packages/app/src/components/data/plot/plot-view.tsx b/packages/app/src/components/data/plot/plot-view.tsx index 0a134fc2..98240496 100644 --- a/packages/app/src/components/data/plot/plot-view.tsx +++ b/packages/app/src/components/data/plot/plot-view.tsx @@ -8,9 +8,11 @@ import { import { ScatterPlot } from "./plots/scatter-plot"; import { LinePlot } from "./plots/line-plot"; import { HistogramPlot } from "./plots/histogram-plot"; -import { BarPlot } from "./plots/bar-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, @@ -23,7 +25,7 @@ export function PlotView({ return (
@@ -75,12 +77,27 @@ export function PlotView({ width={width} /> ); - case "bar": + + case "box": + return ( + ; + } + } + data={data} + height={height} + width={width} + /> + ); + + case "violin": return ( - ; + definition: Extract; } } data={data} diff --git a/packages/app/src/components/data/plot/plots/bar-plot.tsx b/packages/app/src/components/data/plot/plots/bar-plot.tsx deleted file mode 100644 index b827a34f..00000000 --- a/packages/app/src/components/data/plot/plots/bar-plot.tsx +++ /dev/null @@ -1,167 +0,0 @@ -import { - type Plot as PlotType, - type PlotDefinition, -} from "@common/db/schema/plot"; -import * as Plot from "@observablehq/plot"; -import { toCamelCase } from "drizzle-orm/casing"; -import { cn } from "@/lib/utils"; -import { - CommonPlotProps, - getPlotOptions, - PLOT_CONTAINER_CLASSES, - PLOT_CLASSES, - getCommonMarks, - PlotTitle, - transformData, - assignAbbreviationColorsAndSymbols, - getUniqueValues, - getColorMapping, -} from "./common"; -import { useRef, useEffect, useState } from "react"; -import { PlotLegend } from "./legend"; - -interface Props extends CommonPlotProps { - plot: PlotType & { definition: Extract }; -} - -export function BarPlot({ - plot, - data, - className, - height = 400, - width = "100%", -}: Props) { - const containerRef = useRef(null); - const { xAxis, yAxis, grouping } = plot.definition; - const [filteredColors, setFilteredColors] = useState>(new Set()); - - const xColumn = xAxis.column; - const yColumn = yAxis.column; - const colorColumn = grouping?.color?.column; - - const xColumnCamel = xColumn ? toCamelCase(xColumn) : undefined; - const yColumnCamel = yColumn ? toCamelCase(yColumn) : undefined; - const colorColumnCamel = colorColumn ? toCamelCase(colorColumn) : undefined; - - if (!xColumnCamel || !yColumnCamel) { - throw new Error("xAxis or yAxis column is not defined"); - } - - // Transform data into points with proper values - const points = transformData(data, { - xColumn: xColumnCamel, - yColumn: yColumnCamel, - colorColumn: colorColumnCamel, - xAxisType: xAxis.type === "number" ? "number" : "category", - }); - - // Assign consistent colors using abbreviation colors when available - const pointsWithColors = assignAbbreviationColorsAndSymbols( - points, - colorColumn, - ); - - // Get unique values for legends - const uniqueColors = colorColumn - ? getUniqueValues(pointsWithColors, "color") - : []; - - // Get color mapping for legend - const colorMapping = colorColumn - ? getColorMapping(pointsWithColors) - : undefined; - - const handleColorClick = (color: string) => { - setFilteredColors((prev) => { - const next = new Set(prev); - if (next.has(color)) { - next.delete(color); - } else { - next.add(color); - } - return next; - }); - }; - - // Filter points based on selected colors - const filteredPoints = pointsWithColors.filter( - (point) => !point.originalColor || !filteredColors.has(point.originalColor), - ); - - useEffect(() => { - if (!containerRef.current || !filteredPoints.length) return; - - // Clear previous content - containerRef.current.innerHTML = ""; - - const plotOptions = getPlotOptions(plot); - - // Create bar marks - const barMarks = [ - Plot.barY(filteredPoints, { - x: "x", - y: "y", - fill: colorColumn ? "color" : undefined, - title: (d: any) => - `x: ${d.x}, y: ${d.y}${d.originalColor ? `, ${grouping?.color?.column}: ${d.originalColor}` : ""}`, - }), - ]; - - // Create the main chart - const chart = Plot.plot({ - ...plotOptions, - x: { - type: xAxis.type === "category" ? "band" : "linear", - }, - color: colorColumn - ? { - scheme: "spectral", - } - : undefined, - marks: getCommonMarks(plot, barMarks), - width: - typeof width === "number" ? width : containerRef.current.clientWidth, - height: - typeof height === "number" ? height : containerRef.current.clientHeight, - }); - - // Add data-plot attribute to the SVG - chart.setAttribute("data-plot", "true"); - - containerRef.current.append(chart); - - return () => { - chart.remove(); - }; - }, [ - filteredPoints, - width, - height, - plot, - xAxis.domainTickOptions, - yAxis.domainTickOptions, - colorColumn, - ]); - - 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 new file mode 100644 index 00000000..504ff129 --- /dev/null +++ b/packages/app/src/components/data/plot/plots/base-plot.tsx @@ -0,0 +1,161 @@ +import { Group } from "@visx/group"; +import { Grid } from "@visx/grid"; +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; + label?: string; + tickInterval?: number; + domainTickOptions?: { + min: number; + max: number; + interval?: number | null; + } | null; +} + +export interface BaseCartesianPlotProps { + width: number; + height: number; + xAxis: AxisConfig; + yAxis: AxisConfig; + children?: React.ReactNode; +} + +function generateTicks(config: AxisConfig): number[] | undefined { + if (!config.domainTickOptions?.interval) return undefined; + + const domain = [config.domainTickOptions.min, config.domainTickOptions.max]; + const interval = config.domainTickOptions.interval; + + // Handle reversed domains + const [minDomain, maxDomain] = + domain[0] < domain[1] ? [domain[0], domain[1]] : [domain[1], domain[0]]; + + // Calculate start and end, including domain boundaries if they align with interval + const start = Math.floor(minDomain / interval) * interval; + const end = Math.ceil(maxDomain / interval) * interval; + const ticks: number[] = []; + + // Use a small epsilon for floating point comparison + const epsilon = 1e-10; + + for (let tick = start; tick <= end + epsilon; tick += interval) { + // Only include ticks within or exactly on the domain boundaries + if (tick >= minDomain - epsilon && tick <= maxDomain + epsilon) { + // Round to avoid floating point precision issues + ticks.push(Number(tick.toFixed(10))); + } + } + + return ticks; +} + +export function BaseCartesianPlot({ + width, + height, + xAxis, + 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; + + // Generate custom ticks if interval is specified + const xTicks = generateTicks(xAxis); + const yTicks = generateTicks(yAxis); + + // Create a unique ID for the clip path + const clipId = `plot-area-${Math.random().toString(36).substr(2, 9)}`; + + return ( + + {/* Define clip path */} + + + + + + + + + + {/* Plot content */} + + {children} + + + + {/* Axes are rendered outside the clipping area */} + + ({ + dy: 8, + textAnchor: "middle", + fontSize: 12, + fill: theme.text, + })} + tickFormat={(value) => `${value}`} + /> + + ({ + dx: -10, + dy: 4, + textAnchor: "end", + fontSize: 12, + 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 new file mode 100644 index 00000000..43227f8d --- /dev/null +++ b/packages/app/src/components/data/plot/plots/box-plot.tsx @@ -0,0 +1,369 @@ +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"; +import { PlotWrapper } from "./plot-wrapper"; +import { localPoint } from "@visx/event"; +import { quantile, extent } from "d3-array"; +import { scaleBand, scaleLinear } from "@visx/scale"; +import { createTooltipProps } from "./tooltip/tooltip-helpers"; +import { TooltipData } from "./tooltip/plot-tooltip"; + +export interface BoxPlotTooltipData extends TooltipData { + median?: number; + q1?: number; + q3?: number; + min?: number; + max?: number; + + category?: string; +} + +export function getBoxPlotTooltipData(data: BoxPlotTooltipData): TooltipData { + const tooltipData: TooltipData = {}; + + if (data.category !== undefined) { + tooltipData.x = data.category; + } + + if (data.median !== undefined) { + tooltipData.median = data.median; + } + + if (data.q1 !== undefined) { + tooltipData["1st Quartile"] = data.q1; + } + + if (data.q3 !== undefined) { + tooltipData["3rd Quartile"] = data.q3; + } + + if (data.min !== undefined) { + tooltipData.min = data.min; + } + + if (data.max !== undefined) { + tooltipData.max = data.max; + } + + if (data.y !== undefined) { + tooltipData.y = data.y; + } + + if (data.color !== undefined) { + tooltipData.color = data.color; + } + + return tooltipData; +} + +interface Props extends CommonPlotProps { + plot: Plot & { definition: Extract }; +} + +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 theme = usePlotTheme(); + const { xAxis, yAxis } = plot.definition; + const colorScale = getColorScale(data); + + // 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); + } + }); + + // Calculate box plot statistics for each group + const boxPlots = new Map(); + groupedData.forEach((values, x) => { + boxPlots.set(x, calculateBoxPlotStats(values)); + }); + + // 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 xBandScale = 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 = yAxis.domainTickOptions + ? [yAxis.domainTickOptions.min, yAxis.domainTickOptions.max] + : (extent(allValues) as [number, number]); + + // Only add padding if no custom domain is set + const yRange = yDomain[1] - yDomain[0]; + const yPadding = yAxis.domainTickOptions ? 0 : yRange * 0.05; + const paddedYDomain: [number, number] = [ + yDomain[0] - yPadding, + yDomain[1] + yPadding, + ]; + + const yLinearScale = scaleLinear({ + domain: paddedYDomain, + range: [plotHeight, 0], + reverse: yAxis.reversed, + }); + + // Box plot dimensions + const boxWidth = Math.min(40, xBandScale.bandwidth()); + + return ( + <> + + {Array.from(boxPlots.entries()).map(([x, stats]) => { + const xPos = xBandScale(x) ?? 0; + const boxCenter = xPos + xBandScale.bandwidth() / 2; + // 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 + + 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/common.tsx b/packages/app/src/components/data/plot/plots/common.tsx index f27dd652..c6ad2994 100644 --- a/packages/app/src/components/data/plot/plots/common.tsx +++ b/packages/app/src/components/data/plot/plots/common.tsx @@ -1,13 +1,24 @@ -import { isDefined } from "@/utils/helpers"; import { type Plot as DbPlot, type PlotDefinition, } from "@common/db/schema/plot"; -import type { SymbolType } from "@observablehq/plot"; -import type { PlotOptions } from "@observablehq/plot"; +import { scaleLinear, scaleOrdinal } from "@visx/scale"; +import { extent } from "@visx/vendor/d3-array"; +import { usePlotTheme } from "@/hooks/use-plot-theme"; +import { + GlyphCircle, + GlyphCross, + GlyphDiamond, + GlyphSquare, + GlyphStar, + GlyphTriangle, + GlyphWye, +} from "@visx/glyph"; + +import { cn } from "@/lib/utils"; + import { useState } from "react"; -import * as Plot from "@observablehq/plot"; // Observable's default categorical color scheme export const OBSERVABLE_COLORS = [ @@ -29,6 +40,9 @@ export interface CommonPlotProps { className?: string; height?: number; width?: number | string; + axisHeight?: number; + axisWidth?: number; + showBorder?: boolean; } // Available symbol types in Observable Plot @@ -42,219 +56,11 @@ export const AVAILABLE_SYMBOLS: SymbolType[] = [ "wye", ]; -// Helper function to generate ticks with a specific interval -function generateTicksWithInterval( - domain: [number, number], - interval: number, -): number[] { - if (interval <= 0) return []; - - // Handle reversed domains - const [minDomain, maxDomain] = - domain[0] < domain[1] ? [domain[0], domain[1]] : [domain[1], domain[0]]; - - // Calculate start and end, including domain boundaries if they align with interval - const start = Math.floor(minDomain / interval) * interval; - const end = Math.ceil(maxDomain / interval) * interval; - const ticks: number[] = []; - - // Use a small epsilon for floating point comparison - const epsilon = 1e-10; - - for (let tick = start; tick <= end + epsilon; tick += interval) { - // Only include ticks within or exactly on the domain boundaries - if (tick >= minDomain - epsilon && tick <= maxDomain + epsilon) { - // Round to avoid floating point precision issues - ticks.push(Number(tick.toFixed(10))); - } - } - - 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 function getReferenceLineMarks( - plot: DbPlot & { definition: PlotDefinition }, -) { - const definition = plot.definition as Extract< - PlotDefinition, - { type: "scatter" } - >; - - return ( - definition.referenceLines?.map((line) => - Plot.line( - [ - { x: line.xStart, y: line.yStart }, - { x: line.xEnd, y: line.yEnd }, - ], - { - x: "x", - y: "y", - stroke: line.color ?? "gray", - strokeWidth: 2, - strokeDasharray: line.dashed ? "4,4" : undefined, - }, - ), - ) ?? [] - ); -} - -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_CONTAINER_CLASSES = + "plot-container flex w-full flex-col items-center gap-4"; export const PLOT_CLASSES = "mx-auto flex-grow text-sm"; -export interface DataPoint { +export interface DataPoint extends Record { x: number | string; y?: number | string; color?: string; @@ -290,12 +96,24 @@ 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" && row[xColumn] !== null) { + const xObject = row[xColumn] as { code: string; description?: string }; + if (xObject && xObject.code) { + xValue = xAxisType === "number" ? Number(xObject.code) : xObject.code; + } else { + xValue = xAxisType === "number" ? 0 : ""; + } + } 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 @@ -304,13 +122,15 @@ export function transformData( | { code: string; description?: string; color?: string } | undefined; if (colorColumn && row[colorColumn]) { - if (typeof row[colorColumn] === "object") { + if (typeof row[colorColumn] === "object" && row[colorColumn] !== null) { colorObject = row[colorColumn] as { code: string; description?: string; color?: string; }; - colorValue = colorObject.code; + if (colorObject && colorObject.code) { + colorValue = colorObject.code; + } } else { colorValue = String(row[colorColumn]); } @@ -319,8 +139,14 @@ export function transformData( // Handle abbreviation objects for symbol let symbolValue: string | undefined; if (symbolColumn && row[symbolColumn]) { - if (typeof row[symbolColumn] === "object") { - symbolValue = (row[symbolColumn] as { code: string }).code; + if ( + typeof row[symbolColumn] === "object" && + row[symbolColumn] !== null + ) { + const symbolObject = row[symbolColumn] as { code: string }; + if (symbolObject && symbolObject.code) { + symbolValue = symbolObject.code; + } } else { symbolValue = String(row[symbolColumn]); } @@ -329,15 +155,18 @@ export function transformData( // Handle abbreviation objects for line let lineValue: string | undefined; if (lineColumn && row[lineColumn]) { - if (typeof row[lineColumn] === "object") { - lineValue = (row[lineColumn] as { code: string }).code; + if (typeof row[lineColumn] === "object" && row[lineColumn] !== null) { + const lineObject = row[lineColumn] as { code: string }; + if (lineObject && lineObject.code) { + lineValue = lineObject.code; + } } else { lineValue = String(row[lineColumn]); } } return { - x, + x: xValue, y, color: colorValue, symbol: symbolValue, @@ -407,62 +236,6 @@ export function useFilteredData(points: T[]) { }; } -export function assignColorsAndSymbols( - points: T[], - colorColumn?: string, - symbolColumn?: string, - lineColumn?: string, -): T[] { - if (!colorColumn && !symbolColumn && !lineColumn) return points; - - // Get unique values for color and symbol columns - const uniqueColors = colorColumn - ? Array.from(new Set(points.map((p) => p.color).filter(Boolean))) - : []; - const uniqueSymbols = symbolColumn - ? Array.from(new Set(points.map((p) => p.symbol).filter(Boolean))) - : []; - const uniqueLines = lineColumn - ? Array.from(new Set(points.map((p) => p.line).filter(Boolean))) - : []; - - // Create color and symbol mappings - const colorMap = new Map( - uniqueColors.map((color, index) => [ - color, - OBSERVABLE_COLORS[index % OBSERVABLE_COLORS.length], - ]), - ); - - const symbolMap = new Map( - uniqueSymbols.map((symbol, index) => [ - symbol, - AVAILABLE_SYMBOLS[index % AVAILABLE_SYMBOLS.length], - ]), - ); - - const lineMap = new Map(uniqueLines.map((line, index) => [line, index])); - // Assign colors and symbols to points while preserving original values - return points.map((point) => ({ - ...point, - ...(colorColumn && - point.color && { - originalColor: point.color, - color: colorMap.get(point.color), - }), - ...(symbolColumn && - point.symbol && { - originalSymbol: point.symbol, - symbol: symbolMap.get(point.symbol), - }), - ...(lineColumn && - point.line && { - originalLine: point.line, - line: lineMap.get(point.line), - }), - })); -} - export function assignAbbreviationColorsAndSymbols( points: T[], colorColumn?: string, @@ -548,6 +321,7 @@ export function getColorMapping( } export function PlotTitle({ title }: { title: string }) { + const theme = usePlotTheme(); return (
@@ -555,7 +329,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} @@ -563,3 +338,175 @@ export function PlotTitle({ title }: { title: string }) {
); } + +export const MARGIN = { top: 60, right: 60, bottom: 60, left: 60 }; + +export interface VisxPlotProps { + width: number; + height: number; + data: DataPoint[]; +} + +export interface TooltipData { + x: number; + y: number; + content: React.ReactNode; +} + +export function getScaleConfig( + definition: Extract, + data: DataPoint[], + width: number, + height: number, +) { + const xValues = data.map((d) => Number(d.x)).filter((x) => !isNaN(x)); + const yValues = data.map((d) => Number(d.y)).filter((y) => !isNaN(y)); + + const xDomain = definition.xAxis.domainTickOptions + ? [ + definition.xAxis.domainTickOptions.min, + definition.xAxis.domainTickOptions.max, + ] + : (extent(xValues) as [number, number]) || [0, 1]; + + const yDomain = definition.yAxis.domainTickOptions + ? [ + definition.yAxis.domainTickOptions.min, + definition.yAxis.domainTickOptions.max, + ] + : (extent(yValues) as [number, number]) || [0, 1]; + + // Only add padding if no custom domain is set + const padding = 0.05; // 5% padding + const xRange = xDomain[1] - xDomain[0]; + const yRange = yDomain[1] - yDomain[0]; + + const xScale = scaleLinear({ + domain: definition.xAxis.domainTickOptions + ? xDomain + : [xDomain[0] - xRange * padding, xDomain[1] + xRange * padding], + range: [0, width - MARGIN.left - MARGIN.right], + reverse: definition.xAxis.reversed, + }); + + const yScale = scaleLinear({ + domain: definition.yAxis.domainTickOptions + ? yDomain + : [yDomain[0] - yRange * padding, yDomain[1] + yRange * padding], + range: [height - MARGIN.top - MARGIN.bottom, 0], + reverse: definition.yAxis.reversed, + }); + + return { + xScale, + yScale, + xAxis: { + scale: xScale, + label: definition.xAxis.label || definition.xAxis.column, + domainTickOptions: definition.xAxis.domainTickOptions, + }, + yAxis: { + scale: yScale, + label: definition.yAxis.label || definition.yAxis.column, + domainTickOptions: definition.yAxis.domainTickOptions, + }, + }; +} + +export const VISX_SYMBOLS = { + circle: GlyphCircle, + cross: GlyphCross, + diamond: GlyphDiamond, + square: GlyphSquare, + star: GlyphStar, + triangle: GlyphTriangle, + wye: GlyphWye, +} as const; + +export type SymbolType = keyof typeof VISX_SYMBOLS; + +export function getColorScale(data: DataPoint[]) { + // First, collect all unique color values and their custom colors + const colorMap = new Map(); + const processedColors = new Set(); + let defaultColorIndex = 0; + + data.forEach((point) => { + if (point.originalColor && !processedColors.has(point.originalColor)) { + processedColors.add(point.originalColor); + + // If the point has a custom color from abbreviation, use it + if (point.colorObject?.color) { + colorMap.set(point.originalColor, point.colorObject.color); + } else { + // Otherwise, use the next color from our default palette + colorMap.set( + point.originalColor, + OBSERVABLE_COLORS[defaultColorIndex % OBSERVABLE_COLORS.length], + ); + defaultColorIndex++; + } + } + }); + + // Create a scale that uses our color map + return scaleOrdinal({ + domain: Array.from(colorMap.keys()), + range: Array.from(colorMap.values()), + }); +} + +export function getSymbolScale(data: DataPoint[]) { + const uniqueSymbols = Array.from( + new Set(data.map((d) => d.originalSymbol).filter(Boolean)), + ); + + return scaleOrdinal({ + domain: uniqueSymbols.filter((s): s is string => typeof s === "string"), + range: Object.keys(VISX_SYMBOLS), + }); +} + +export function PlotContainer({ + children, + width, + height, + className, +}: { + children: React.ReactNode; + width: number | string; + height: number; + className?: string; +}) { + return ( +
+
+ {children} +
+
+ ); +} + +// Helper for exporting plots +export interface LegendConfig { + width: number; + left: number; +} + +export function getLegendConfig(containerWidth: number): LegendConfig { + const MAX_WIDTH = 1200; + const legendWidth = Math.min(containerWidth * 2, MAX_WIDTH); + const left = Math.max(-containerWidth / 2, -(MAX_WIDTH - containerWidth) / 2); + + return { + width: legendWidth, + left, + }; +} diff --git a/packages/app/src/components/data/plot/plots/dimensions.ts b/packages/app/src/components/data/plot/plots/dimensions.ts new file mode 100644 index 00000000..ebe525a4 --- /dev/null +++ b/packages/app/src/components/data/plot/plots/dimensions.ts @@ -0,0 +1,72 @@ +import { getLegendHeight } from "./svg-legend"; +import { PlotDefinition } from "@common/db/schema/plot"; +import { DataPoint, getUniqueValues } from "./common"; + +interface PlotDimensions { + // Total dimensions including margins, legend, etc. + totalWidth: number; + totalHeight: number; + // Dimensions of just the axis area + axisWidth: number; + axisHeight: number; +} + +export function calculatePlotDimensions( + availableWidth: number, + availableHeight: number, + plot: PlotDefinition, + data: unknown[], + sizePreset: "square" | "fit", +): PlotDimensions { + const TITLE_HEIGHT = 30; + const MARGIN = { top: 60, right: 60, bottom: 60, left: 60 }; + const TOTAL_VERTICAL_MARGIN = MARGIN.top + MARGIN.bottom + TITLE_HEIGHT; + + // First, calculate the axis area dimensions + const availableAxisHeight = availableHeight - TOTAL_VERTICAL_MARGIN; + const availableAxisWidth = availableWidth - MARGIN.left - MARGIN.right; + + let axisWidth: number; + let axisHeight: number; + + if (sizePreset === "square") { + // For square, make the axis area a perfect square using the smaller dimension + const size = Math.min(availableAxisWidth, availableAxisHeight); + axisWidth = size; + axisHeight = size; + } else { + // For fit, use 16:10 aspect ratio for axis area if possible + axisHeight = Math.min(availableAxisHeight, (availableAxisWidth * 10) / 16); + axisWidth = Math.min(availableAxisWidth, (axisHeight * 16) / 10); + } + + // Calculate total plot width (without legend) + const plotWidth = axisWidth + MARGIN.left + MARGIN.right; + + // Calculate legend height using double the plot width for better horizontal distribution + const legendWidth = Math.max(plotWidth * 2, availableWidth); + const legendHeight = plot.grouping + ? getLegendHeight( + plot.grouping.color?.column + ? getUniqueValues(data as DataPoint[], "color") + : [], + plot.grouping.symbol?.column + ? getUniqueValues(data as DataPoint[], "symbol") + : [], + legendWidth, // Use wider width for legend + Boolean(plot.grouping.color?.label), + Boolean(plot.grouping.symbol?.label), + ) + : 0; + + // Calculate total dimensions + const totalWidth = plotWidth; // Keep total width same as plot width + const totalHeight = axisHeight + TOTAL_VERTICAL_MARGIN + legendHeight; + + return { + totalWidth, + totalHeight, + axisWidth, + axisHeight, + }; +} 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 b6c35041..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,147 +1,256 @@ -import { - type Plot as PlotType, - type PlotDefinition, -} from "@common/db/schema/plot"; -import * as Plot from "@observablehq/plot"; -import { toCamelCase } from "drizzle-orm/casing"; -import { cn } from "@/lib/utils"; -import { - CommonPlotProps, - getPlotOptions, - PLOT_CONTAINER_CLASSES, - PLOT_CLASSES, - assignAbbreviationColorsAndSymbols, - transformData, - useFilteredData, - getUniqueValues, - getCommonMarks, - getColorMapping, - PlotTitle, -} from "./common"; -import { PlotLegend } from "./legend"; -import { useRef, useEffect } from "react"; +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"; +import { PlotWrapper } from "./plot-wrapper"; +import { bin, extent } from "d3-array"; +import { scaleLinear } from "@visx/scale"; +import { localPoint } from "@visx/event"; +import { createTooltipProps } from "./tooltip/tooltip-helpers"; +import { TooltipData } from "./tooltip/plot-tooltip"; -interface Props extends CommonPlotProps { - plot: PlotType & { - definition: Extract; +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; } -export function HistogramPlot({ - plot, +interface Props extends CommonPlotProps { + plot: Plot & { definition: Extract }; +} + +interface BinGroup { + color: string; + count: number; + points: DataPoint[]; +} + +interface StackedBin { + x0: number; + x1: number; + groups: BinGroup[]; + total: number; +} + +function BaseHistogramPlot({ + width, + height, data, - className, - height = 400, - width = "100%", -}: Props) { - const containerRef = useRef(null); + plot, + showTooltip, + hideTooltip, +}: { + width: number; + height: number; + data: DataPoint[]; + plot: Props["plot"]; + showTooltip: (_args: { + tooltipLeft: number; + tooltipTop: number; + tooltipData: any; + }) => void; + hideTooltip: () => void; +}) { + const theme = usePlotTheme(); const { xAxis, grouping } = plot.definition; + const colorScale = getColorScale(data); - const xColumn = xAxis.column; - const colorColumn = grouping?.color?.column; + // Create base scales + const xValues = data.map((d) => Number(d.x)).filter((x) => !isNaN(x)); + const xDomain = xAxis.domainTickOptions + ? [xAxis.domainTickOptions.min, xAxis.domainTickOptions.max] + : (extent(xValues) as [number, number]); - const xColumnCamel = xColumn ? toCamelCase(xColumn) : undefined; - const colorColumnCamel = colorColumn ? toCamelCase(colorColumn) : undefined; + // Add padding to domain only if no custom domain is set + const xRange = xDomain[1] - xDomain[0]; + const padding = xAxis.domainTickOptions ? 0 : xRange * 0.05; + const paddedDomain: [number, number] = [ + xDomain[0] - padding, + xDomain[1] + padding, + ]; - if (!xColumnCamel) { - throw new Error("xAxis column is not defined"); - } + // Create histogram bins + const binner = bin() + .value((d) => Number(d.x)) + .domain(paddedDomain) + .thresholds(plot.definition.numBins); - // Transform data into points with proper numeric values - const points = transformData(data, { - xColumn: xColumnCamel, - colorColumn: colorColumnCamel, - }); - - // Assign consistent colors - const pointsWithColors = assignAbbreviationColorsAndSymbols( - points, - colorColumn, - ); + // Group data by color if grouping is enabled + const colorGroups = new Map(); + if (grouping?.color) { + // First pass: collect all unique colors + const uniqueColors = Array.from( + new Set(data.map((d) => String(d.originalColor || ""))), + ).filter(Boolean); - // Get unique values for legends - const uniqueColors = colorColumn - ? getUniqueValues(pointsWithColors, "color") - : []; - - // Get color mapping for legend - const colorMapping = colorColumn - ? getColorMapping(pointsWithColors) - : undefined; - - const { filteredPoints, filteredColors, handleColorClick } = - useFilteredData(pointsWithColors); - - useEffect(() => { - if (!containerRef.current || !filteredPoints.length) return; - - // Clear previous content - containerRef.current.innerHTML = ""; - - const plotOptions = getPlotOptions(plot); - - // Create the main chart - const chart = Plot.plot({ - ...plotOptions, - y: { - label: "Count", - grid: true, - }, - color: colorColumn - ? { - scheme: "spectral", - } - : undefined, - marks: getCommonMarks(plot, [ - Plot.rectY( - filteredPoints, - Plot.binX( - { y: "count" }, - { - x: "x", - thresholds: plot.definition.numBins, - // @ts-expect-error - fill is not a valid property - but it works! - fill: colorColumn ? "color" : undefined, - }, - ), - ), - ]), - width: - typeof width === "number" ? width : containerRef.current.clientWidth, - height: - typeof height === "number" ? height : containerRef.current.clientHeight, + // Second pass: group data + data.forEach((point) => { + const colorKey = String(point.originalColor || uniqueColors[0] || ""); + const group = colorGroups.get(colorKey) || []; + group.push(point); + colorGroups.set(colorKey, group); }); + } else { + // If no grouping, use a single group + colorGroups.set(theme.primary, data); + } - // Add data-plot attribute to the SVG - chart.setAttribute("data-plot", "true"); + // Create stacked bins + const stackedBins: StackedBin[] = binner(data).map((bin) => { + const groups: BinGroup[] = []; + let total = 0; - containerRef.current.append(chart); + // Calculate counts for each color group in this bin + colorGroups.forEach((groupPoints, colorKey) => { + const pointsInBin = groupPoints.filter( + (d) => Number(d.x) >= (bin.x0 ?? 0) && Number(d.x) < (bin.x1 ?? 0), + ); + if (pointsInBin.length > 0) { + groups.push({ + color: colorKey, + count: pointsInBin.length, + points: pointsInBin, + }); + total += pointsInBin.length; + } + }); - return () => { - chart.remove(); + return { + x0: bin.x0 ?? 0, + x1: bin.x1 ?? 0, + groups, + total, }; - }, [points, width, height, plot, xAxis.domainTickOptions, colorColumn]); + }); + + // 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({ + domain: paddedDomain, + range: [0, plotWidth], + reverse: xAxis.reversed, + }); + + // Calculate y scale from total bin counts + const yMax = Math.max(...stackedBins.map((b) => b.total)); + const yScale = scaleLinear({ + domain: [0, yMax], + range: [plotHeight, 0], + }); return ( -
- -
+ - -
+ yAxis={{ + scale: yScale, + label: "Count", + }} + > + {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; + }); + })} + + + ); +} + +export function HistogramPlot(props: Props) { + return ( + ( + + )} + /> ); } diff --git a/packages/app/src/components/data/plot/plots/legend.tsx b/packages/app/src/components/data/plot/plots/legend.tsx deleted file mode 100644 index f19df26a..00000000 --- a/packages/app/src/components/data/plot/plots/legend.tsx +++ /dev/null @@ -1,328 +0,0 @@ -import { AVAILABLE_SYMBOLS, OBSERVABLE_COLORS } from "./common"; -import type { SymbolType } from "@observablehq/plot"; - -interface LegendItemProps { - label: string; - color?: string; - symbol?: SymbolType; - isFiltered: boolean; - onClick?: () => void; - x: number; - y: number; -} - -const ITEM_HEIGHT = 24; -const ITEM_WIDTH = 120; -const SYMBOL_SIZE = 16; -const TEXT_OFFSET = 26; -const SECTION_HEADER_PADDING = 16; - -function LegendItem({ - label, - color, - symbol, - isFiltered, - onClick, - x, - y, -}: LegendItemProps) { - return ( - - {/* Background for hover state */} - - - {/* Color or Symbol indicator */} - {color && ( - - )} - {symbol && ( - - {symbol === "circle" && } - {symbol === "cross" && ( - <> - - - - )} - {symbol === "diamond" && ( - - )} - {symbol === "square" && ( - - )} - {symbol === "star" && ( - - )} - {symbol === "triangle" && ( - - )} - {symbol === "wye" && ( - - )} - - )} - - {/* Label */} - - {label} - - - ); -} - -interface ColorLegendProps { - colors: string[]; - label: string; - schemeType?: "categorical" | "continuous"; - onColorClick?: (_color: string) => void; - filteredColors?: Set; - colorMapping?: Map; // Add color mapping prop - x?: number; - y?: number; -} - -function ColorLegend({ - colors, - label, - onColorClick, - filteredColors = new Set(), - colorMapping, - x = 0, - y = 0, -}: ColorLegendProps) { - if (!colors.length) return null; - - // Use provided color mapping or fall back to default colors - const colorMap = - colorMapping || - new Map( - colors.map((color, index) => [ - color, - OBSERVABLE_COLORS[index % OBSERVABLE_COLORS.length], - ]), - ); - - const ITEMS_PER_ROW = 3; - - return ( - - - {label} - - {colors.map((color, i) => ( - onColorClick?.(color)} - x={(i % ITEMS_PER_ROW) * (ITEM_WIDTH + 8)} - y={ - Math.floor(i / ITEMS_PER_ROW) * ITEM_HEIGHT + - SECTION_HEADER_PADDING + - 16 - } - /> - ))} - - ); -} - -interface SymbolLegendProps { - symbols: string[]; - label: string; - onSymbolClick?: (_symbol: string) => void; - filteredSymbols?: Set; - x?: number; - y?: number; -} - -function SymbolLegend({ - symbols, - label, - onSymbolClick, - filteredSymbols = new Set(), - x = 0, - y = 0, -}: SymbolLegendProps) { - if (!symbols.length) return null; - - const ITEMS_PER_ROW = 2; - - return ( - - - {label} - - {symbols.map((symbol, i) => ( - onSymbolClick?.(symbol)} - x={(i % ITEMS_PER_ROW) * (ITEM_WIDTH + 8)} - y={ - Math.floor(i / ITEMS_PER_ROW) * ITEM_HEIGHT + - SECTION_HEADER_PADDING + - 16 - } - /> - ))} - - ); -} - -interface PlotLegendProps { - colorDomain?: (string | undefined)[] | undefined; - colorLabel?: string; - symbolDomain?: (string | undefined)[] | undefined; - symbolLabel?: string; - colorSchemeType?: "categorical" | "continuous"; - onColorClick?: (_color: string) => void; - onSymbolClick?: (_symbol: string) => void; - filteredColors?: Set; - filteredSymbols?: Set; - showColorLegend?: boolean | undefined | null; - showSymbolLegend?: boolean | undefined | null; - colorMapping?: Map; // Add color mapping prop -} - -export function PlotLegend({ - showColorLegend = true, - showSymbolLegend = true, - colorDomain, - colorLabel, - symbolDomain, - symbolLabel, - colorSchemeType = "categorical", - onColorClick, - onSymbolClick, - filteredColors = new Set(), - filteredSymbols = new Set(), - colorMapping, -}: PlotLegendProps) { - const colors = (colorDomain?.filter(Boolean) as string[]) || []; - const symbols = (symbolDomain?.filter(Boolean) as string[]) || []; - - if (!colors.length && !symbols.length) return null; - - const colorLegendHeight = colors.length - ? Math.ceil(colors.length / 3) * ITEM_HEIGHT + 24 - : 0; - const symbolLegendHeight = symbols.length - ? Math.ceil(symbols.length / 2) * ITEM_HEIGHT + 24 - : 0; - const totalHeight = - colorLegendHeight + - symbolLegendHeight + - (colors.length && symbols.length ? 16 : 0) + - 16; - - const totalWidth = - Math.max(colors.length ? 3 : 0, symbols.length ? 2 : 0) * (ITEM_WIDTH + 8); - - return ( -
- - - {showColorLegend && colors.length > 0 && colorLabel && ( - - )} - {showSymbolLegend && symbols.length > 0 && symbolLabel && ( - - )} - - -
- ); -} 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 24944fec..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,164 +1,159 @@ -import { - type Plot as PlotType, - type PlotDefinition, -} from "@common/db/schema/plot"; -import * as Plot from "@observablehq/plot"; -import { toCamelCase } from "drizzle-orm/casing"; -import { cn } from "@/lib/utils"; -import { - CommonPlotProps, - getPlotOptions, - PLOT_CONTAINER_CLASSES, - PLOT_CLASSES, - assignAbbreviationColorsAndSymbols, - transformData, - useFilteredData, - getUniqueValues, - getCommonMarks, - getColorMapping, - PlotTitle, -} from "./common"; -import { useRef, useEffect } from "react"; -import { PlotLegend } from "./legend"; +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"; +import { PlotWrapper } from "./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: PlotType & { definition: Extract }; + plot: Plot & { definition: Extract }; } -export function LinePlot({ - plot, - data, - className, - height = 400, - width = "100%", -}: Props) { - const containerRef = useRef(null); - const { xAxis, yAxis, grouping } = plot.definition; +interface LineGroup { + color: string; + points: DataPoint[]; +} - const xColumn = xAxis.column; - const yColumn = yAxis.column; - const colorColumn = grouping?.color?.column; - const lineColumn = grouping?.line?.column; - const xColumnCamel = xColumn ? toCamelCase(xColumn) : undefined; - const yColumnCamel = yColumn ? toCamelCase(yColumn) : undefined; - const colorColumnCamel = colorColumn ? toCamelCase(colorColumn) : undefined; - const lineColumnCamel = lineColumn ? toCamelCase(lineColumn) : undefined; - if (!xColumnCamel || !yColumnCamel) { - throw new Error("xAxis or yAxis column is not defined"); - } +export function getLineTooltipData(point: DataPoint): TooltipData { + return { + x: point.x, + y: point.y, + color: point.originalColor as string | undefined, + }; +} - // Transform data into points with proper numeric values - const points = transformData(data, { - xColumn: xColumnCamel, - yColumn: yColumnCamel, - colorColumn: colorColumnCamel, - lineColumn: lineColumnCamel, - }); +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 theme = usePlotTheme(); + const { grouping } = plot.definition; + const scaleConfig = getScaleConfig(plot.definition, data, width, height); + const { xAxis, yAxis } = scaleConfig; + const colorScale = getColorScale(data); + + // Group data by color if color grouping is enabled + const dataByColor: LineGroup[] = grouping?.color?.column + ? Array.from( + data.reduce((groups, point) => { + 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: theme.primary, points: data }]; - // Assign consistent colors - const pointsWithColors = assignAbbreviationColorsAndSymbols( - points, - colorColumn, + return ( + <> + + {dataByColor.map(({ color, points }) => ( + xAxis.scale(Number(d.x)) ?? 0} + y={(d) => yAxis.scale(Number(d.y)) ?? 0} + stroke={colorScale(color)} + strokeWidth={2} + curve={ + plot.definition.curve === "natural" ? curveNatural : undefined + } + onMouseMove={(event) => { + const coords = localPoint(event.target as SVGPathElement, event); + if (coords) { + const tooltipData = getLineTooltipData({ + x: (xAxis.scale as any).invert(coords.x), + y: (yAxis.scale as any).invert(coords.y), + originalColor: color, + }); + showTooltip(createTooltipProps(tooltipData, plot, coords)); + } + }} + onMouseLeave={hideTooltip} + /> + ))} + + {/* Add dots if showDots is true */} + {plot.definition.showDots && + data.map((point, i) => ( + { + const coords = localPoint( + event.target as SVGCircleElement, + event, + ); + if (coords) { + const tooltipData = getLineTooltipData(point); + showTooltip(createTooltipProps(tooltipData, plot, coords)); + } + }} + onMouseLeave={hideTooltip} + style={{ cursor: "pointer" }} + /> + ))} + + ); +} - // Get unique values for legends - const uniqueColors = colorColumn - ? getUniqueValues(pointsWithColors, "color") - : []; - - // Get color mapping for legend - const colorMapping = colorColumn - ? getColorMapping(pointsWithColors) - : undefined; - - const { filteredPoints, filteredColors, handleColorClick } = - useFilteredData(pointsWithColors); - - useEffect(() => { - if (!containerRef.current || !filteredPoints.length) return; - - // Clear previous content - containerRef.current.innerHTML = ""; - - const plotOptions = getPlotOptions(plot); - - // Create line marks - const lineMarks = grouping?.color?.column - ? Array.from(new Set(filteredPoints.map((p) => p.originalColor))) - .filter((color): color is string => !!color) - .map((colorValue) => - Plot.line( - filteredPoints.filter((p) => p.originalColor === colorValue), - { - x: "x", - y: "y", - stroke: "color", - title: (d) => - `x: ${d.x}, y: ${d.y}${ - d.originalColor - ? `, ${grouping?.color?.label || grouping?.color?.column}: ${d.originalColor}` - : "" - }`, - }, - ), - ) - : [ - Plot.line(filteredPoints, { - x: "x", - y: "y", - stroke: "black", - z: grouping?.line?.column ? (p) => p.line : undefined, - }), - ]; - - // Create the main chart - const chart = Plot.plot({ - ...plotOptions, - marks: getCommonMarks(plot, lineMarks), - width: - typeof width === "number" ? width : containerRef.current.clientWidth, - height: - typeof height === "number" ? height : containerRef.current.clientHeight, - }); - - // Add data-plot attribute to the SVG - chart.setAttribute("data-plot", "true"); - - containerRef.current.append(chart); - - return () => { - chart.remove(); - }; - }, [ - filteredPoints, - width, - height, - plot, - xAxis.domainTickOptions, - yAxis.domainTickOptions, - grouping, - ]); - +export function LinePlot(props: Props) { return ( -
- -
- -
+ ( + + )} + /> ); } diff --git a/packages/app/src/components/data/plot/plots/plot-annotations.tsx b/packages/app/src/components/data/plot/plots/plot-annotations.tsx new file mode 100644 index 00000000..68926cfb --- /dev/null +++ b/packages/app/src/components/data/plot/plots/plot-annotations.tsx @@ -0,0 +1,73 @@ +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; + xEnd: number; + yStart: number; + yEnd: number; + color?: string | null; + dashed?: boolean; +} + +interface ReferenceText { + x: number; + y: number; + text: string; + color?: string | null; + fontSize?: number | null; + rotation?: number | null; +} + +interface PlotAnnotationsProps { + referenceLines?: ReferenceLine[] | null; + textLabels?: ReferenceText[] | null; + xScale: AxisScale; + yScale: AxisScale; +} + +export function PlotAnnotations({ + referenceLines, + textLabels, + xScale, + yScale, +}: PlotAnnotationsProps) { + const theme = usePlotTheme(); + return ( + + {/* Reference Lines */} + {referenceLines?.map((line, i) => ( + + ))} + + {/* Text Labels */} + {textLabels?.map((label, i) => ( + + {label.text} + + ))} + + ); +} diff --git a/packages/app/src/components/data/plot/plots/plot-wrapper.tsx b/packages/app/src/components/data/plot/plots/plot-wrapper.tsx new file mode 100644 index 00000000..035b82b2 --- /dev/null +++ b/packages/app/src/components/data/plot/plots/plot-wrapper.tsx @@ -0,0 +1,295 @@ +import { Group } from "@visx/group"; +import { ParentSize } from "@visx/responsive"; +import { Plot, PlotDefinition } from "@common/db/schema/plot"; +import { useTooltip } from "@visx/tooltip"; +import { + CommonPlotProps, + transformData, + assignAbbreviationColorsAndSymbols, + PlotTitle, + getUniqueValues, + DataPoint, + OBSERVABLE_COLORS, +} from "./common"; +import { PlotContainer } from "./common"; +import { SVGLegend, getLegendHeight } from "./svg-legend"; +import { usePlotTheme } from "@/hooks/use-plot-theme"; + +export interface PlotWrapperProps extends CommonPlotProps { + plot: Plot & { + definition: Extract< + PlotDefinition, + { type: "scatter" | "line" | "bar" | "histogram" | "box" | "violin" } + >; + }; + renderContent: (_props: { + processedData: DataPoint[]; + width: number; + height: number; + showTooltip: (_args: { + tooltipLeft: number; + tooltipTop: number; + tooltipData: any; + }) => void; + hideTooltip: () => void; + }) => React.ReactNode; + showBorder?: boolean; +} + +export function PlotWrapper({ + plot, + data: rawData, + className, + height = 400, + width = "100%", + renderContent, + showBorder = true, +}: PlotWrapperProps) { + const { xAxis, grouping } = plot.definition; + const yAxis = "yAxis" in plot.definition ? plot.definition.yAxis : undefined; + + const xColumn = xAxis.column; + const yColumn = yAxis?.column; + const colorColumn = grouping?.color?.column; + const symbolColumn = grouping?.symbol?.column; + + if (!xColumn) { + throw new Error("xAxis column is not defined"); + } + if (plot.definition.type !== "histogram" && !yColumn) { + throw new Error("yAxis column is not defined"); + } + + // Debug raw data structure + + // 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: xColumn, + yColumn: yColumn, + colorColumn: colorColumn, + symbolColumn: symbolColumn, + xAxisType, + }); + + // Assign colors and symbols + const processedPoints = assignAbbreviationColorsAndSymbols( + points as DataPoint[], + colorColumn, + symbolColumn, + ); + + // Get unique values for legends + const uniqueColors = colorColumn + ? getUniqueValues(processedPoints, "color") + : []; + const uniqueSymbols = symbolColumn + ? getUniqueValues(processedPoints, "symbol") + : []; + + // Get color and symbol mappings for legend + const colorMapping = colorColumn + ? new Map( + processedPoints + .filter((p) => p.originalColor) + .map( + (p) => + [ + p.originalColor!, + p.colorObject?.color || p.color || OBSERVABLE_COLORS[0], + ] as [string, string], + ), + ) + : undefined; + + const symbolMapping = symbolColumn + ? new Map( + processedPoints + .filter((p) => p.originalSymbol && p.symbol) + .map((p) => [p.originalSymbol!, p.symbol!] as [string, string]), + ) + : undefined; + + // Calculate the space needed for the legend + const legendHeight = getLegendHeight( + uniqueColors, + uniqueSymbols, + width === "100%" ? 800 : (width as number), + Boolean(grouping?.color?.label || grouping?.color?.column), + Boolean(grouping?.symbol?.label || grouping?.symbol?.column), + ); + + const theme = usePlotTheme(); + const { + showTooltip, + hideTooltip, + tooltipOpen, + tooltipData, + tooltipLeft = 0, + tooltipTop = 0, + } = useTooltip<{ content: React.ReactNode }>(); + + return ( + + + + {({ width: containerWidth, height: containerHeight }) => { + // Calculate the natural width needed for the legend + const LEGEND_ITEM_WIDTH = 140; + const LEGEND_PADDING = 40; // Increased padding + const LEGEND_SPACING = 20; // Space between legend items + const LEGEND_ITEM_HEIGHT = 24; + const LEGEND_SECTION_GAP = 16; + const LEGEND_LABEL_HEIGHT = 20; + + const totalItems = uniqueColors.length + uniqueSymbols.length; + + // Calculate how many items can fit in one row based on container width + const maxItemsPerRow = Math.floor( + (containerWidth - LEGEND_PADDING * 2) / + (LEGEND_ITEM_WIDTH + LEGEND_SPACING), + ); + const itemsPerRow = Math.min(maxItemsPerRow, totalItems); + + // Calculate the natural legend width + const naturalLegendWidth = + itemsPerRow * (LEGEND_ITEM_WIDTH + LEGEND_SPACING) - + LEGEND_SPACING + + LEGEND_PADDING * 2; + + // Calculate the effective width needed for both plot and legend + const effectiveWidth = + Math.max(containerWidth, naturalLegendWidth) + 80; // Extra padding + + // Calculate the actual plot width + const actualPlotWidth = Math.min(containerWidth, effectiveWidth - 80); + + // Calculate legend height based on number of rows needed + const colorRows = Math.ceil(uniqueColors.length / itemsPerRow); + const symbolRows = Math.ceil(uniqueSymbols.length / itemsPerRow); + + const colorHeight = uniqueColors.length + ? colorRows * LEGEND_ITEM_HEIGHT + + (grouping?.color?.label ? LEGEND_LABEL_HEIGHT : 0) + : 0; + + const symbolHeight = uniqueSymbols.length + ? symbolRows * LEGEND_ITEM_HEIGHT + + (grouping?.symbol?.label ? LEGEND_LABEL_HEIGHT : 0) + : 0; + + const calculatedLegendHeight = + colorHeight + + symbolHeight + + (uniqueColors.length && uniqueSymbols.length + ? LEGEND_SECTION_GAP + : 0) + + LEGEND_PADDING * 2; + + // Use the larger of the calculated heights + const finalLegendHeight = Math.max( + legendHeight, + calculatedLegendHeight, + ); + const plotHeight = containerHeight - finalLegendHeight; + + return ( +
+
+ {/* Added horizontal padding */} + + + {showBorder && ( + <> + {/* Border around main plot */} + + {/* Border around legend area - only if legend exists */} + {(uniqueColors.length > 0 || + uniqueSymbols.length > 0) && ( + + )} + + )} + {/* Main plot */} + + {renderContent({ + processedData: processedPoints, + width: actualPlotWidth, + height: plotHeight, + showTooltip, + hideTooltip, + })} + + {/* Legend */} + + + + + + {tooltipOpen && tooltipData && ( +
+ {tooltipData.content} +
+ )} +
+
+ ); + }} +
+
+ ); +} 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 46ead33f..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,183 +1,135 @@ +import { Plot, PlotDefinition } from "@common/db/schema/plot"; +import { DataPoint } from "./common"; +import { usePlotTheme } from "@/hooks/use-plot-theme"; import { - type Plot as PlotType, - type PlotDefinition, -} from "@common/db/schema/plot"; -import * as Plot from "@observablehq/plot"; -import { toCamelCase } from "drizzle-orm/casing"; -import { cn } from "@/lib/utils"; -import { - CommonPlotProps, - getPlotOptions, - PLOT_CONTAINER_CLASSES, - PLOT_CLASSES, - assignAbbreviationColorsAndSymbols, - transformData, - useFilteredData, - getUniqueValues, - getCommonMarks, - getReferenceLineMarks, - getTextLabelMarks, - getColorMapping, - PlotTitle, + getColorScale, + getScaleConfig, + getSymbolScale, + VISX_SYMBOLS, + type SymbolType, } from "./common"; -import { useRef, useEffect } from "react"; -import { PlotLegend } from "./legend"; - -const DEFAULT_COLOR = "black"; +import { CommonPlotProps } from "./common"; +import { BaseCartesianPlot } from "./base-plot"; +import { PlotWrapper } from "./plot-wrapper"; +import { PlotAnnotations } from "./plot-annotations"; +import { localPoint } from "@visx/event"; +import { createTooltipProps } from "./tooltip/tooltip-helpers"; +import { TooltipData } from "./tooltip/plot-tooltip"; interface Props extends CommonPlotProps { - plot: PlotType & { definition: Extract }; + plot: Plot & { definition: Extract }; } -export function ScatterPlot({ - plot, - data, - className, - height = 400, - width = "100%", -}: Props) { - const containerRef = useRef(null); - const { xAxis, yAxis, grouping } = plot.definition; +export function getScatterTooltipData(point: DataPoint): TooltipData { + const tooltipData: TooltipData = { + x: point.x, + y: point.y, + }; - const xColumn = xAxis.column; - const yColumn = yAxis.column; - const colorColumn = grouping?.color?.column; - const symbolColumn = grouping?.symbol?.column; - - const xColumnCamel = xColumn ? toCamelCase(xColumn) : undefined; - const yColumnCamel = yColumn ? toCamelCase(yColumn) : undefined; - const colorColumnCamel = colorColumn ? toCamelCase(colorColumn) : undefined; - const symbolColumnCamel = symbolColumn - ? toCamelCase(symbolColumn) - : undefined; - - if (!xColumnCamel || !yColumnCamel) { - throw new Error("xAxis or yAxis column is not defined"); + if (point.originalColor) { + tooltipData.color = point.originalColor; } - // Transform data into points with proper numeric values - const points = transformData(data, { - xColumn: xColumnCamel, - yColumn: yColumnCamel, - colorColumn: colorColumnCamel, - symbolColumn: symbolColumnCamel, - }); - - // Assign consistent colors and symbols - const pointsWithColorsAndSymbols = assignAbbreviationColorsAndSymbols( - points, - colorColumn, - symbolColumn, - ); - - // Get unique values for legends - const uniqueColors = colorColumn - ? getUniqueValues(pointsWithColorsAndSymbols, "color") - : []; - const uniqueSymbols = symbolColumn - ? getUniqueValues(pointsWithColorsAndSymbols, "symbol") - : []; - - // Get color mapping for legend - const colorMapping = colorColumn - ? getColorMapping(pointsWithColorsAndSymbols) - : undefined; - - const { - filteredPoints, - filteredColors, - filteredSymbols, - handleColorClick, - handleSymbolClick, - } = useFilteredData(pointsWithColorsAndSymbols); - - useEffect(() => { - if (!containerRef.current || !filteredPoints.length) return; - - // Clear previous content - containerRef.current.innerHTML = ""; - - const plotOptions = getPlotOptions(plot); - - // Create reference line marks if they exist - - // Create dot marks - const dotMarks = [ - Plot.dot(filteredPoints, { - x: "x", - y: "y", - fill: colorColumn ? "color" : DEFAULT_COLOR, - symbol: symbolColumn ? "symbol" : "circle", - r: 4, - title: (d) => - `x: ${d.x}, y: ${d.y}${ - d.originalColor - ? `, ${grouping?.color?.label || grouping?.color?.column}: ${d.originalColor}` - : "" - }${ - d.originalSymbol - ? `, ${grouping?.symbol?.label || grouping?.symbol?.column}: ${d.originalSymbol}` - : "" - }`, - }), - ]; + if (point.originalSymbol) { + tooltipData.symbol = point.originalSymbol; + } - // Create the main chart - const chart = Plot.plot({ - ...plotOptions, - marks: [ - ...getCommonMarks(plot), - ...getTextLabelMarks(plot), - ...getReferenceLineMarks(plot), - ...dotMarks, - ], - width: - typeof width === "number" ? width : containerRef.current.clientWidth, - height: - typeof height === "number" ? height : containerRef.current.clientHeight, - }); + return tooltipData; +} - // Add data-plot attribute to the SVG - chart.setAttribute("data-plot", "true"); +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 theme = usePlotTheme(); + const { referenceLines, textLabels } = plot.definition; + const scaleConfig = getScaleConfig(plot.definition, data, width, height); + const { xAxis, yAxis } = scaleConfig; + const colorScale = getColorScale(data); + const symbolScale = getSymbolScale(data); - containerRef.current.append(chart); + return ( + + {/* Reference Lines and Text Labels */} + - return () => { - chart.remove(); - }; - }, [ - filteredPoints, - width, - height, - plot, - xAxis.domainTickOptions, - yAxis.domainTickOptions, - plot.definition.referenceLines, - ]); + {/* Data Points */} + {data.map((point, i) => { + const x = xAxis.scale(Number(point.x)); + const y = yAxis.scale(Number(point.y)); + const color = point.originalColor + ? colorScale(String(point.originalColor)) + : theme.primary; + const symbolType = (symbolScale(String(point.originalSymbol || "")) || + "circle") as SymbolType; + const Glyph = VISX_SYMBOLS[symbolType]; + + return ( + { + const coords = localPoint(event.target as SVGElement, event); + if (coords) { + const tooltipData = getScatterTooltipData(point); + showTooltip(createTooltipProps(tooltipData, plot, coords)); + } + }} + onMouseLeave={hideTooltip} + style={{ cursor: "pointer" }} + > + + + ); + })} + + ); +} +export function ScatterPlot(props: Props) { return ( -
- -
- -
+ ( + + )} + /> ); } diff --git a/packages/app/src/components/data/plot/plots/svg-legend.tsx b/packages/app/src/components/data/plot/plots/svg-legend.tsx new file mode 100644 index 00000000..f97f242a --- /dev/null +++ b/packages/app/src/components/data/plot/plots/svg-legend.tsx @@ -0,0 +1,159 @@ +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[]; + colorLabel?: string; + symbolDomain?: string[]; + symbolLabel?: string; + colorMapping?: Map; + symbolMapping?: Map; + width: number; +} + +export function SVGLegend({ + colorDomain = [], + colorLabel, + symbolDomain = [], + symbolLabel, + colorMapping, + 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 = 16; + const SECTION_GAP = 16; + const ITEMS_PER_ROW = Math.floor((width - 20) / LEGEND_ITEM_WIDTH); + + // Calculate heights + const colorRows = Math.ceil(colorDomain.length / ITEMS_PER_ROW); + const colorHeight = colorDomain.length + ? colorRows * LEGEND_ITEM_HEIGHT + (colorLabel ? 20 : 0) + : 0; + + return ( + + {/* Color Legend */} + {colorDomain.length > 0 && ( + + {colorLabel && ( + + {colorLabel} + + )} + + {colorDomain.map((value, i) => { + const row = Math.floor(i / ITEMS_PER_ROW); + const col = i % ITEMS_PER_ROW; + const x = + width / 2 - + (ITEMS_PER_ROW * LEGEND_ITEM_WIDTH) / 2 + + col * LEGEND_ITEM_WIDTH; + const y = row * LEGEND_ITEM_HEIGHT; + const color = colorMapping?.get(value) || OBSERVABLE_COLORS[0]; + + return ( + + + + {value} + + + ); + })} + + + )} + + {/* Symbol Legend */} + {symbolDomain.length > 0 && ( + + {symbolLabel && ( + + {symbolLabel} + + )} + + {symbolDomain.map((value, i) => { + const row = Math.floor(i / ITEMS_PER_ROW); + const col = i % ITEMS_PER_ROW; + const x = + width / 2 - + (ITEMS_PER_ROW * LEGEND_ITEM_WIDTH) / 2 + + col * LEGEND_ITEM_WIDTH; + const y = row * LEGEND_ITEM_HEIGHT; + + const symbolType = (symbolMapping?.get(value) || + "circle") as SymbolType; + const Glyph = VISX_SYMBOLS[symbolType]; + + return ( + + + + {value} + + + ); + })} + + + )} + + ); +} + +export function getLegendHeight( + colorDomain: string[] = [], + symbolDomain: string[] = [], + width: number, + hasColorLabel = false, + hasSymbolLabel = false, +): number { + if (!colorDomain.length && !symbolDomain.length) return 0; + + const LEGEND_ITEM_HEIGHT = 24; + const LEGEND_ITEM_WIDTH = 140; + const SECTION_GAP = 16; + const ITEMS_PER_ROW = Math.floor((width - 20) / LEGEND_ITEM_WIDTH); + + const colorRows = Math.ceil(colorDomain.length / ITEMS_PER_ROW); + const symbolRows = Math.ceil(symbolDomain.length / ITEMS_PER_ROW); + const colorHeight = colorDomain.length + ? colorRows * LEGEND_ITEM_HEIGHT + (hasColorLabel ? 20 : 0) + : 0; + const symbolHeight = symbolDomain.length + ? symbolRows * LEGEND_ITEM_HEIGHT + (hasSymbolLabel ? 20 : 0) + : 0; + + return ( + colorHeight + + symbolHeight + + (colorDomain.length && symbolDomain.length ? SECTION_GAP : 0) + ); +} 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..e87f9f21 --- /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..7302f2e2 --- /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 { MARGIN } from "../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/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/app/src/components/data/query/computed-column-help.tsx b/packages/app/src/components/data/query/computed-column-help.tsx new file mode 100644 index 00000000..923a988b --- /dev/null +++ b/packages/app/src/components/data/query/computed-column-help.tsx @@ -0,0 +1,86 @@ +"use client"; + +import { HelpCircle } from "lucide-react"; +import { Button } from "@/components/ui/button"; +import { + Dialog, + DialogContent, + DialogHeader, + DialogTitle, +} from "@/components/ui/dialog"; +import { useState } from "react"; + +export function ComputedColumnHelp() { + const [isOpen, setIsOpen] = useState(false); + + return ( + <> + + + + + + Function body help + +
+
+

Basic syntax

+
+                {`// Return a single value
+return value1 + value2
+
+// Use if statements
+if (value > 10) {
+  return "High"
+} else {
+  return "Low"
+}`}
+              
+
+ +
+

Available variables

+
    +
  • + All column names from your query are available as variables +
  • +
  • + Use camelCase for column names (e.g., sampleDepth, testType) +
  • +
  • Values will be the correct type (number, string, etc.)
  • +
+
+ +
+

Examples

+
+                {`// Combine strings
+return firstName + " " + lastName
+
+// Math operations
+return depth * 3.28084  // m to ft
+
+// Conditional logic
+if (moisture < 0.2) {
+  return "Dry"
+} else if (moisture < 0.4) {
+  return "Moist"
+} else {
+  return "Wet"
+}`}
+              
+
+
+
+
+ + ); +} diff --git a/packages/app/src/components/data/query/computed-columns-tab.tsx b/packages/app/src/components/data/query/computed-columns-tab.tsx new file mode 100644 index 00000000..865513f5 --- /dev/null +++ b/packages/app/src/components/data/query/computed-columns-tab.tsx @@ -0,0 +1,529 @@ +"use client"; + +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 { Save, Trash2, Database, Plus, Loader2 } from "lucide-react"; +import { + Form, + FormControl, + FormField, + FormItem, + FormLabel, + FormMessage, +} from "@/components/ui/form"; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/components/ui/select"; +import { Input } from "@/components/ui/input"; +import { + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, +} from "@/components/ui/dialog"; + +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 { 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({ + name: z.string().min(1, "Column name is required"), + functionBody: z.string().min(1, "Function body is required"), +}); + +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, + placeholder, + completions, +}: { + field: { + value: string; + onChange: (_value: string) => void; + }; + placeholder?: string; + completions: string[]; +}) { + const editorRef = useRef(null); + const viewRef = useRef(null); + + function myCompletions(context: CompletionContext) { + const before = context.matchBefore(/\w+/); + if (!context.explicit && !before) return null; + return { + from: before ? before.from : context.pos, + options: completions.map((completion) => ({ + label: completion, + type: "variable", + })), + validFor: /^\w*$/, + }; + } + + useEffect(() => { + if (!editorRef.current || viewRef.current) return; + + const state = EditorState.create({ + doc: + field.value || + placeholder || + "// Enter function body for computed column", + extensions: [ + basicSetup, + javascript({ typescript: true }), + syntaxHighlighting(defaultHighlightStyle), + autocompletion({ override: [myCompletions] }), + EditorView.updateListener.of((update) => { + if (update.docChanged) { + field.onChange(update.state.doc.toString()); + } + }), + EditorView.theme({ + "&": { + fontSize: "13px", + fontFamily: + "ui-monospace, SFMono-Regular, 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace", + height: "100%", + }, + ".cm-content": { + padding: "8px", + height: "100%", + color: "hsl(var(--foreground))", + }, + ".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", + boxShadow: "none", + }, + ".cm-scroller": { + height: "100%", + overflow: "auto", + }, + ".cm-gutters": { + backgroundColor: "hsl(var(--background))", + border: "none", + borderRight: "1px solid hsl(var(--border))", + }, + ".cm-gutter": { + padding: "0 8px", + }, + ".cm-gutterElement": { + color: "hsl(var(--muted-foreground))", + }, + ".cm-line": { + padding: "0 8px", + }, + ".cm-activeLineGutter": { + backgroundColor: "transparent", + }, + ".cm-activeLine": { + backgroundColor: "hsl(var(--muted) / 0.1)", + }, + ".cm-selectionBackground": { + backgroundColor: "hsl(var(--primary) / 0.2) !important", + }, + ".cm-matchingBracket, .cm-nonmatchingBracket": { + backgroundColor: "hsl(var(--primary) / 0.2)", + outline: "1px solid hsl(var(--primary) / 0.4)", + }, + ".cm-foldPlaceholder": { + backgroundColor: "transparent", + border: "none", + color: "hsl(var(--muted-foreground))", + }, + }), + ], + }); + + const view = new EditorView({ + state, + parent: editorRef.current, + }); + + viewRef.current = view; + + return () => { + view.destroy(); + viewRef.current = null; + }; + }, []); + + // 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: field.value, + }, + }); + viewRef.current.dispatch(transaction); + } + }, [field.value]); + + return ( +
+ ); +} + +export function ComputedColumnsTab({ + query, + projectId, + + completions, +}: QuerySidebarProps) { + const [selectedColumnId, setSelectedColumnId] = useState(null); + const [isSubmitting, setIsSubmitting] = useState(false); + const [isCreating, setIsCreating] = useState(false); + const [isDeleteDialogOpen, setIsDeleteDialogOpen] = useState(false); + const [columnToDelete, setColumnToDelete] = useState( + null, + ); + + const form = useForm({ + resolver: zodResolver(computedColumnSchema), + defaultValues: { + name: "", + functionBody: defaultFunctionBody, + }, + }); + + const hasComputedColumns = + Array.isArray(query.computedColumns) && query.computedColumns.length > 0; + + // Set default column on component load + useEffect(() => { + if (hasComputedColumns && !selectedColumnId) { + const firstColumn = query.computedColumns[0]; + handleEditColumn(firstColumn); + } + }, [hasComputedColumns, selectedColumnId]); + + const handleEditColumn = (column: ComputedColumn) => { + setSelectedColumnId(column.id); + form.reset({ + name: column.name, + functionBody: column.functionBody, + }); + }; + + const handleNewColumn = async () => { + setIsCreating(true); + + // 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); + } + + setIsCreating(false); + }; + + const handleCancelEdit = () => { + setSelectedColumnId(null); + form.reset(); + }; + + const handleDeleteColumn = async (columnId: string) => { + const column = query.computedColumns.find((col) => col.id === columnId); + if (!column) return; + setColumnToDelete(column); + setIsDeleteDialogOpen(true); + }; + + const confirmDelete = async () => { + if (!columnToDelete) return; + try { + await deleteComputedColumnAction(projectId, query.id, columnToDelete.id); + + // Clear form after successful deletion + setSelectedColumnId(null); + form.reset(); + setIsDeleteDialogOpen(false); + setColumnToDelete(null); + } catch (error) { + console.error("Failed to delete computed column:", error); + } + }; + + const onSubmit = async (data: ComputedColumnFormData) => { + 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 { + 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); + } + } + + setIsSubmitting(false); + }; + + return ( +
+ + + + Delete computed column + + Are you sure you want to delete the computed column " + {columnToDelete?.name}"? This action cannot be undone. + + + + + + + + + +
+
+ {/* 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 + +
+ +
+ +
+
+ +
+ )} + /> + + {/* Action Buttons */} +
+ {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 new file mode 100644 index 00000000..4e99b32c --- /dev/null +++ b/packages/app/src/components/data/query/query-definition-tabs.tsx @@ -0,0 +1,79 @@ +"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"; +import { Card } from "@/components/ui/card"; + +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..a5baa95a 100644 --- a/packages/app/src/components/data/query/query-definition.tsx +++ b/packages/app/src/components/data/query/query-definition.tsx @@ -1,23 +1,41 @@ "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 { QueryPreviewPlaceholder } from "./query-preview-placeholder"; 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 +43,11 @@ export function QueryDefinition({ query, tableCounts, projectId, + completions, + columns, + zones, + totalRowCount, + maxRows, }: Props) { const [definition, setDefinition] = useState( query.definition || {}, @@ -40,28 +63,59 @@ 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 ( -
-
-

- Select the data you want to query, by selecting the tables and columns - you want to include. -

+
+ {/* Preview Table at the top */} +
+
+
+

Preview

+

+ Live preview of your query results +

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

+ Query definition +

+

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

-
diff --git a/packages/app/src/components/data/query/query-glide.tsx b/packages/app/src/components/data/query/query-glide.tsx index 37839e91..940872c2 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( @@ -68,35 +79,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 +163,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/components/data/query/query-layout-client.tsx b/packages/app/src/components/data/query/query-layout-client.tsx new file mode 100644 index 00000000..f2424033 --- /dev/null +++ b/packages/app/src/components/data/query/query-layout-client.tsx @@ -0,0 +1,71 @@ +"use client"; + +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 { ResizablePanel, ResizablePanelGroup } from "@/components/ui/resizable"; +import { Query } from "@common/db/schema/query"; + +function QueryLayoutClient({ + projectId, + queryId, + query, + definitionConfigured, + + children, +}: { + projectId: string; + queryId: string; + query: Query; + definitionConfigured: boolean; + children: React.ReactNode; +}) { + return ( +
+ + +
+ {/* Header with name input, breadcrumbs, and toggle button */} +
+
+ + +
+
+ + + +
+
+ {children} +
+
+
+
+ ); +} + +export { QueryLayoutClient }; 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.tsx b/packages/app/src/components/data/query/query-sidebar.tsx new file mode 100644 index 00000000..3215c972 --- /dev/null +++ b/packages/app/src/components/data/query/query-sidebar.tsx @@ -0,0 +1,539 @@ +"use client"; + +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 { X, Save, Trash2, Database, Plus, Loader2 } from "lucide-react"; +import { + Form, + FormControl, + FormField, + FormItem, + FormLabel, + FormMessage, +} from "@/components/ui/form"; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/components/ui/select"; +import { Input } from "@/components/ui/input"; +import { + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, +} from "@/components/ui/dialog"; + +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 { 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"; + +// 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; + +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; + onClose: () => void; + completions: string[]; +}; + +// Custom CodeMirror form control component +function CodeMirrorFormField({ + field, + placeholder, + completions, +}: { + field: { + value: string; + onChange: (_value: string) => void; + }; + placeholder?: string; + completions: string[]; +}) { + const editorRef = useRef(null); + const viewRef = useRef(null); + + function myCompletions(context: CompletionContext) { + const before = context.matchBefore(/\w+/); + if (!context.explicit && !before) return null; + return { + from: before ? before.from : context.pos, + options: completions.map((completion) => ({ + label: completion, + type: "variable", + })), + validFor: /^\w*$/, + }; + } + + useEffect(() => { + if (!editorRef.current || viewRef.current) return; + + const state = EditorState.create({ + doc: + field.value || + placeholder || + "// Enter function body for computed column", + extensions: [ + basicSetup, + javascript({ typescript: true }), + syntaxHighlighting(defaultHighlightStyle), + autocompletion({ override: [myCompletions] }), + EditorView.updateListener.of((update) => { + if (update.docChanged) { + field.onChange(update.state.doc.toString()); + } + }), + EditorView.theme({ + "&": { + fontSize: "13px", + fontFamily: + "ui-monospace, SFMono-Regular, 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace", + height: "100%", + }, + ".cm-content": { + padding: "8px", + height: "100%", + color: "hsl(var(--foreground))", + }, + ".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", + boxShadow: "none", + }, + ".cm-scroller": { + height: "100%", + overflow: "auto", + }, + ".cm-gutters": { + backgroundColor: "hsl(var(--background))", + border: "none", + borderRight: "1px solid hsl(var(--border))", + }, + ".cm-gutter": { + padding: "0 8px", + }, + ".cm-gutterElement": { + color: "hsl(var(--muted-foreground))", + }, + ".cm-line": { + padding: "0 8px", + }, + ".cm-activeLineGutter": { + backgroundColor: "transparent", + }, + ".cm-activeLine": { + backgroundColor: "hsl(var(--muted) / 0.1)", + }, + ".cm-selectionBackground": { + backgroundColor: "hsl(var(--primary) / 0.2) !important", + }, + ".cm-matchingBracket, .cm-nonmatchingBracket": { + backgroundColor: "hsl(var(--primary) / 0.2)", + outline: "1px solid hsl(var(--primary) / 0.4)", + }, + ".cm-foldPlaceholder": { + backgroundColor: "transparent", + border: "none", + color: "hsl(var(--muted-foreground))", + }, + }), + ], + }); + + const view = new EditorView({ + state, + parent: editorRef.current, + }); + + viewRef.current = view; + + return () => { + view.destroy(); + viewRef.current = null; + }; + }, []); + + // 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: field.value, + }, + }); + viewRef.current.dispatch(transaction); + } + }, [field.value]); + + return ( +
+ ); +} + +export function QuerySidebar({ + query, + projectId, + onClose, + completions, +}: QuerySidebarProps) { + const [selectedColumnId, setSelectedColumnId] = useState(null); + const [isSubmitting, setIsSubmitting] = useState(false); + const [isCreating, setIsCreating] = useState(false); + const [isDeleteDialogOpen, setIsDeleteDialogOpen] = useState(false); + const [columnToDelete, setColumnToDelete] = useState( + null, + ); + + const form = useForm({ + resolver: zodResolver(computedColumnSchema), + defaultValues: { + name: "", + functionBody: defaultFunctionBody, + }, + }); + + const hasComputedColumns = + Array.isArray(query.computedColumns) && query.computedColumns.length > 0; + + // Set default column on component load + useEffect(() => { + if (hasComputedColumns && !selectedColumnId) { + const firstColumn = query.computedColumns[0]; + handleEditColumn(firstColumn); + } + }, [hasComputedColumns, selectedColumnId]); + + const handleEditColumn = (column: ComputedColumn) => { + setSelectedColumnId(column.id); + form.reset({ + name: column.name, + functionBody: column.functionBody, + }); + }; + + const handleNewColumn = async () => { + setIsCreating(true); + + // 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); + } + + setIsCreating(false); + }; + + const handleCancelEdit = () => { + setSelectedColumnId(null); + form.reset(); + }; + + const handleDeleteColumn = async (columnId: string) => { + const column = query.computedColumns.find((col) => col.id === columnId); + if (!column) return; + setColumnToDelete(column); + setIsDeleteDialogOpen(true); + }; + + const confirmDelete = async () => { + if (!columnToDelete) return; + try { + await deleteComputedColumnAction(projectId, query.id, columnToDelete.id); + + // Clear form after successful deletion + setSelectedColumnId(null); + form.reset(); + setIsDeleteDialogOpen(false); + setColumnToDelete(null); + } catch (error) { + console.error("Failed to delete computed column:", error); + } + }; + + const onSubmit = async (data: ComputedColumnFormData) => { + 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 { + 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); + } + } + + setIsSubmitting(false); + }; + + return ( +
+ + + + Delete computed column + + Are you sure you want to delete the computed column " + {columnToDelete?.name}"? This action cannot be undone. + + + + + + + + + +
+

Computed columns

+ +
+ +
+
+ {/* 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 + +
+ +
+ +
+
+ +
+ )} + /> + + {/* Action Buttons */} +
+ {selectedColumnId && ( + + )} + + {selectedColumnId && ( + + )} + + +
+ + +
+
+
+ ); +} diff --git a/packages/app/src/components/data/templates/templates-modal.tsx b/packages/app/src/components/data/templates/templates-modal.tsx index 84c69753..5ad1b435 100644 --- a/packages/app/src/components/data/templates/templates-modal.tsx +++ b/packages/app/src/components/data/templates/templates-modal.tsx @@ -115,6 +115,7 @@ export function TemplatesModal({ ? selectedTemplate.plotDefinition || undefined : undefined, folderId: undefined, + queryCustomColumns: selectedTemplate.queryCustomColumns, }); toast.success( @@ -252,7 +253,7 @@ export function TemplatesModal({
  • • All configuration settings from the template
  • • Custom name and description
  • -
  • • No data source (you'll need to select one)
  • + {selectedTemplate.isPlot && (
  • • Plot type and visualization settings
  • )} 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< , +): Promise { + const existing = await readQuery(queryId); + if (!existing) { + throw new Error("Query not found"); + } + + const id = nanoId(); + + const updatedComputedColumns = [ + ...(existing.computedColumns ?? []), + { ...newComputedColumn, id }, + ]; + + const [updated] = await db + .update(query) + .set({ computedColumns: updatedComputedColumns }) + .where(eq(query.id, queryId)) + .returning(); + + const createdComputedColumn = updated.computedColumns.find( + (col) => col.id === id, + ); + + if (!createdComputedColumn) { + throw new Error("Computed column not found"); + } + + return createdComputedColumn; +} + +export async function updateComputedColumn( + queryId: string, + columnId: string, + updatedColumn: Omit, +): Promise { + const existing = await readQuery(queryId); + if (!existing) { + throw new Error("Query not found"); + } + + const updatedComputedColumns = (existing.computedColumns ?? []).map((col) => + col.id === columnId ? { ...updatedColumn, id: col.id } : col, + ); + + const [updated] = await db + .update(query) + .set({ computedColumns: updatedComputedColumns }) + .where(eq(query.id, queryId)) + .returning(); + + const updatedComputedColumn = updated.computedColumns.find( + (col) => col.id === columnId, + ); + + if (!updatedComputedColumn) { + throw new Error("Computed column not found"); + } + + return updatedComputedColumn; +} + +export async function deleteComputedColumn( + queryId: string, + columnId: string, +): Promise { + const existing = await readQuery(queryId); + if (!existing) { + throw new Error("Query not found"); + } + + const updatedComputedColumns = (existing.computedColumns ?? []).filter( + (col) => col.id !== columnId, + ); + + const [updated] = await db + .update(query) + .set({ computedColumns: updatedComputedColumns }) + .where(eq(query.id, queryId)) + .returning(); + + return updated; +} diff --git a/packages/app/src/db/crud/template.ts b/packages/app/src/db/crud/template.ts index b253ce49..6d7d1bab 100644 --- a/packages/app/src/db/crud/template.ts +++ b/packages/app/src/db/crud/template.ts @@ -160,6 +160,7 @@ export async function readTemplatesWithSearchAndFilters( description: template.description, isPlot: template.isPlot, scope: template.scope, + queryCustomColumns: template.queryCustomColumns, // Owner information ownerFirstName: user.firstName, ownerLastName: user.lastName, diff --git a/packages/app/src/hooks/queries/use-query-data.tsx b/packages/app/src/hooks/queries/use-query-data.tsx index 5dc016d7..8fb55d44 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; +export 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 + */ +export 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 */ @@ -96,7 +203,7 @@ export function useQueryData( zoneIds, }; - return useQuery({ + const queryResult = useQuery({ queryKey: getQueryDataQueryKey(params), queryFn: () => fetchQueryData(params), staleTime: 1000 * 60 * 5, // 5 minutes @@ -107,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, + }; } 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..8d2d042c --- /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; +} 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..7c0d77a4 --- /dev/null +++ b/packages/app/src/hooks/use-plot-theme.ts @@ -0,0 +1,29 @@ +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 + containerBorder: isDark ? "#ffffff" : "#000000", // --border + }; +} diff --git a/packages/app/src/lib/dal/plots.ts b/packages/app/src/lib/dal/plots.ts index d087748b..1d1b9d50 100644 --- a/packages/app/src/lib/dal/plots.ts +++ b/packages/app/src/lib/dal/plots.ts @@ -77,6 +77,7 @@ export function getColumnsForPlot( ): { id: string; name: string; + label: string; table: string; }[] { if (!plot.definition?.dataSource) { @@ -88,13 +89,51 @@ export function getColumnsForPlot( if (dataSource.isQuery === true) { const query = queries.find((table) => table.id === dataSource.queryId); if (query && query.definition) { - return Object.entries(query.definition).flatMap(([tableName, def]) => - def.columns.map((column) => ({ - id: column, - name: column, - table: tableName, - })), - ); + // Get regular columns from query definition + + const regularColumns: { + id: string; + name: string; + label: string; + table: string; + }[] = []; + + Object.entries(query.definition).forEach(([tableName, def]) => { + def.columns.map((column) => { + const table = schemaConfig.find( + (table) => table.dbName === tableName, + ); + const colInSchema = table?.columns.find( + (col) => col.dbName === column, + ); + + if (regularColumns.find((col) => col.id === column)) { + return; + } + + if (!colInSchema) { + throw new Error(`Column ${column} not found in schema`); + } + + regularColumns.push({ + id: column, + name: colInSchema.nameCamelCase, + label: colInSchema.label, + table: tableName, + }); + }); + }); + + // Get computed columns + const computedColumns = (query.computedColumns || []).map((col) => ({ + id: col.name, + name: col.name, + label: col.name, + table: "Computed", // Special table name for computed columns + })); + + // Combine regular and computed columns + return [...regularColumns, ...computedColumns]; } } else if (dataSource.isQuery === false) { const table = schemaConfig.find( @@ -103,7 +142,8 @@ export function getColumnsForPlot( if (table) { return table.columns.map((column) => ({ id: column.dbName, - name: column.label, + name: column.nameCamelCase, + label: column.label, table: table.dbName, })); } 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/0013_shiny_risque.sql b/packages/common/drizzle/0013_shiny_risque.sql new file mode 100644 index 00000000..2f126f2c --- /dev/null +++ b/packages/common/drizzle/0013_shiny_risque.sql @@ -0,0 +1 @@ +ALTER TABLE "template" ADD COLUMN "query_custom_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/0013_snapshot.json b/packages/common/drizzle/meta/0013_snapshot.json new file mode 100644 index 00000000..e652a9ca --- /dev/null +++ b/packages/common/drizzle/meta/0013_snapshot.json @@ -0,0 +1,26248 @@ +{ + "id": "b371c451-5fe4-4982-af33-0f1d47ca18dc", + "prevId": "b5fe3590-29cf-484b-8faf-83c102d5b1f9", + "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'" + }, + "query_custom_columns": { + "name": "query_custom_columns", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + } + }, + "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..cb476d2c 100644 --- a/packages/common/drizzle/meta/_journal.json +++ b/packages/common/drizzle/meta/_journal.json @@ -85,6 +85,20 @@ "when": 1755186301694, "tag": "0011_colossal_doorman", "breakpoints": true + }, + { + "idx": 12, + "version": "7", + "when": 1756239983420, + "tag": "0012_great_white_tiger", + "breakpoints": true + }, + { + "idx": 13, + "version": "7", + "when": 1756393758856, + "tag": "0013_shiny_risque", + "breakpoints": true } ] } \ No newline at end of file diff --git a/packages/common/src/db/schema/common.ts b/packages/common/src/db/schema/common.ts index 9b8a2e8e..a1ae76bd 100644 --- a/packages/common/src/db/schema/common.ts +++ b/packages/common/src/db/schema/common.ts @@ -36,12 +36,12 @@ export const polygon = customType<{ data: Coordinate[][]; driverData: string }>( }, fromDriver(data: string) { const geoJson = Geometry.parse( - Buffer.from(data, "hex"), + Buffer.from(data, "hex") ).toGeoJSON() as GeoJsonPolygon; return geoJson.coordinates; }, - }, + } ); export const linestring = customType<{ @@ -59,7 +59,7 @@ export const linestring = customType<{ }, fromDriver(data: string) { const geoJson = Geometry.parse( - Buffer.from(data, "hex"), + Buffer.from(data, "hex") ).toGeoJSON() as GeoJsonLineString; return geoJson.coordinates; @@ -68,13 +68,14 @@ export const linestring = customType<{ export const schemaConfig = schemaConfigAsset as GroupConfig[]; const schemaConfigMap = new Map( - schemaConfig.map((config) => [config.dbName, config]), + schemaConfig.map((config) => [config.dbName, config]) ); export function getTableConfig(dbName: TableName) { return schemaConfigMap.get(dbName); } +export const nanoId = customAlphabet(NANOID_ALPHABET, NANOID_LENGTH); export function idColumn() { return varchar("id", { length: NANOID_LENGTH }) .$defaultFn(() => customAlphabet(NANOID_ALPHABET, NANOID_LENGTH)()) @@ -82,7 +83,7 @@ export function idColumn() { } export function sanitizeDataForInsert>( - data: T, + data: T ): Omit { if ("id" in data) { delete data.id; diff --git a/packages/common/src/db/schema/plot.ts b/packages/common/src/db/schema/plot.ts index c53e5c23..116cb139 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), +}); + +const axisSchemaCategoryStrict = axisSchemaCategory.extend({ column: z.string().min(1), }); -export type AxisConfig = z.infer; +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,20 @@ export const appearanceSchema = z.object({ export type AppearanceSettings = z.infer; +const plotTypeSchema = z.enum([ + "scatter", + "line", + "histogram", + "bar", + "box", + "violin", +]); +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 +154,54 @@ 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(), +}); + +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; @@ -167,12 +216,24 @@ 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" || + definition.type === "violin" + ) { + 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 +253,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 +270,7 @@ export function validateReferenceLines( } export function getSectionValidationStatus( - definition: PlotDefinition | null, + definition: PlotDefinition | null ): Record { return { general: validateGeneral(definition), @@ -224,9 +285,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 +304,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 +314,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,10 +324,27 @@ export const defaultAxis: AxisConfig = { scale: "linear", }; +export const defaultAxisCategory: AxisCategoryConfig = { + column: "", + label: null, + unit: null, + type: "category", +}; + 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 }, @@ -302,7 +381,7 @@ export const defaultPlotDefinitions: Record< }, bar: { type: "bar", - xAxis: { ...defaultAxis }, + xAxis: { ...defaultAxisCategory }, yAxis: { ...defaultAxis }, grouping: null, orientation: "vertical", @@ -311,4 +390,14 @@ export const defaultPlotDefinitions: Record< tableName: "", }, }, + box: { + type: "box", + xAxis: { ...defaultAxisCategory }, + yAxis: { ...defaultAxis }, + grouping: null, + dataSource: { + isQuery: false, + tableName: "", + }, + }, }; diff --git a/packages/common/src/db/schema/query.ts b/packages/common/src/db/schema/query.ts index 06dca3f5..824a1c2f 100644 --- a/packages/common/src/db/schema/query.ts +++ b/packages/common/src/db/schema/query.ts @@ -43,6 +43,12 @@ export type QueryDefinition = Partial< > >; +export type ComputedColumn = { + id: string; + name: string; + functionBody: string; +}; + export const query = pgTable("custom_table", { id: idColumn(), name: varchar("name").notNull(), @@ -53,6 +59,10 @@ export const query = pgTable("custom_table", { onDelete: "set null", }), definition: jsonb("definition").$type(), + computedColumns: jsonb("computed_columns") + .$type() + .default([]) + .notNull(), createdAt: createdAt(), updatedAt: updatedAt(), }); @@ -72,7 +82,7 @@ export type QueryInsert = typeof query.$inferInsert; // Type guard for foreign key configurations type ForeignKeyConfig = (typeof foreignKeys)[keyof typeof foreignKeys]; function hasParentTable( - config: ForeignKeyConfig, + config: ForeignKeyConfig ): config is Extract { return "parentTable" in config; } @@ -95,7 +105,7 @@ export function getAncestorTables(tableName: TableName): TableName[] { // Helper function to find the common ancestor between two tables function findCommonAncestor( table1: TableName, - table2: TableName, + table2: TableName ): TableName | null { const table1Ancestors = [table1, ...getAncestorTables(table1)]; const table2Ancestors = [table2, ...getAncestorTables(table2)]; @@ -112,7 +122,7 @@ function findCommonAncestor( // Check if two tables can be joined as siblings export function canJoinAsSiblings( table1: TableName, - table2: TableName, + table2: TableName ): boolean { // Tables cannot be siblings with themselves if (table1 === table2) return false; @@ -150,7 +160,7 @@ export function canJoinTables(table1: TableName, table2: TableName): boolean { // Check if a table can be added to a set of existing tables export function canAddTable( newTable: TableName, - existingTables: TableName[], + existingTables: TableName[] ): boolean { // If no existing tables, any table can be added if (existingTables.length === 0) return true; diff --git a/packages/common/src/db/schema/template.ts b/packages/common/src/db/schema/template.ts index d343a886..5b60b71e 100644 --- a/packages/common/src/db/schema/template.ts +++ b/packages/common/src/db/schema/template.ts @@ -12,7 +12,7 @@ import { createdAt, idColumn, idReference, updatedAt } from "./common"; import { user } from "./user"; import { SQL, sql } from "drizzle-orm"; -import { QueryDefinition } from "./query"; +import { QueryDefinition, ComputedColumn } from "./query"; import { PlotDefinition } from "./plot"; import { TableName } from "./data"; export const scope = pgEnum("scope", ["public", "private"]); @@ -43,6 +43,10 @@ export const template = pgTable("template", { )` ), scope: scope("scope").notNull().default("private"), + queryCustomColumns: jsonb("query_custom_columns") + .$type() + .default([]) + .notNull(), }); export const templateTag = pgTable("template_tag", {