# Change Log

All notable changes to this project will be documented in this file
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
This project adheres to [Semantic Versioning](http://semver.org/).

## 6.0.2 - 2026-06-10

* Update dependency mocha to v11.7.6 [balena-renovate[bot]]

## 6.0.1 - 2026-05-16

* Pin dependencies [balena-renovate[bot]]

## 6.0.0 - 2026-04-06

* Drop support for nodejs < 22.2.0 [Thodoris Greasidis]
* Replace attribute check with single this.tables lookup [jaomaloy]

## 5.0.31 - 2026-04-06

* Add test for Term Form Resource with FK + Field composite natural key [Thodoris Greasidis]

## 5.0.30 - 2026-03-26

* Revert flowzone pinning to master [Kyle Harding]

## 5.0.29 - 2026-03-26

* Update product-os/flowzone digest to 8ea01d3 [balena-renovate[bot]]

## 5.0.28 - 2026-03-26

* Update product-os/flowzone digest to 3eb3c97 [balena-renovate[bot]]

## 5.0.27 - 2026-03-26

* Update product-os/flowzone digest to 7b49c1e [balena-renovate[bot]]

## 5.0.26 - 2026-03-26

* Update product-os/flowzone digest to 8d926e2 [balena-renovate[bot]]

## 5.0.25 - 2026-03-26

* Update product-os/flowzone digest to 20a58d6 [balena-renovate[bot]]

## 5.0.24 - 2026-03-26

* Update product-os/flowzone digest to 7b1359d [balena-renovate[bot]]

## 5.0.23 - 2026-03-26

* Update product-os/flowzone digest to 7b87702 [balena-renovate[bot]]

## 5.0.22 - 2026-03-26

* Update product-os/flowzone digest to cc9836f [balena-renovate[bot]]

## 5.0.21 - 2026-03-26

* Update product-os/flowzone digest to b79645a [balena-renovate[bot]]

## 5.0.20 - 2026-03-26

* Update product-os/flowzone digest to 4815186 [balena-renovate[bot]]

## 5.0.19 - 2026-03-26

* Update product-os/flowzone digest to 267495d [balena-renovate[bot]]

## 5.0.18 - 2026-03-25

* Update product-os/flowzone digest to f955793 [balena-renovate[bot]]

## 5.0.17 - 2026-03-25

* Update product-os/flowzone digest to 8674dc5 [balena-renovate[bot]]

## 5.0.16 - 2026-03-25

* Update product-os/flowzone digest to eb703ea [balena-renovate[bot]]

## 5.0.15 - 2026-03-24

* Pin product-os/flowzone action to a53cf4b [balena-renovate[bot]]

## 5.0.14 - 2026-02-24

* Fix rule info table name for term forms [Pagan Gazzard]

## 5.0.13 - 2026-02-19

* Add id-token: write permission for NPM OIDC publishing [Kyle Harding]

## 5.0.12 - 2025-09-11

* Update dependency chai to v6 [balena-renovate[bot]]

## 5.0.11 - 2025-08-01

* Add tests for JSON fields [Thodoris Greasidis]

<details>
<summary> Update @balena/sbvr-types to 11.1.0 [Thodoris Greasidis] </summary>

> ### sbvr-types-11.1.0 - 2025-08-01
> 
> * Add the 'is represented by Text' property to the JSON type [Thodoris Greasidis]
> 
> ### sbvr-types-11.0.0 - 2025-07-15
> 
> * Update DateTime to include time zone information [Josh Bowling]
> 
> ### sbvr-types-10.1.0 - 2025-06-19
> 
> * Extend webresource write type with File api [Otavio Jacobi]
> 
> ### sbvr-types-10.0.0 - 2025-06-19
> 
> * Drop support for no longer maintained node 16 & 18 [Otavio Jacobi]
> 
> ### sbvr-types-9.2.6 - 2025-06-07
> 
> * Update dependency lint-staged to v16 [balena-renovate[bot]]
> 
> ### sbvr-types-9.2.5 - 2025-04-11
> 
> * Update dependency bcryptjs to v3 [balena-renovate[bot]]
> 
> ### sbvr-types-9.2.4 - 2025-04-10
> 
> * Update @balena/lint to 9.x [Pagan Gazzard]
> 
> ### sbvr-types-9.2.3 - 2025-04-09
> 
> * Update dependency mocha to v11 [balena-renovate[bot]]
> 
> ### sbvr-types-9.2.2 - 2025-03-24
> 
> * Update dependency @balena/abstract-sql-compiler to v10 [balena-renovate[bot]]
> 
> ### sbvr-types-9.2.1 - 2025-03-24
> 
> * Update dependency @types/chai-datetime to v1 [balena-renovate[bot]]
> 
> ### sbvr-types-9.2.0 - 2025-02-24
> 
> * Use big integer for webresource casting type [Otavio Jacobi]
> 
> ### sbvr-types-9.1.0 - 2024-10-24
> 
> * Add `is case insensitively equal to` for Text types [Otavio Jacobi]
> 
> ### sbvr-types-9.0.2 - 2024-09-17
> 
> * Change the exported Types to an interface so that they can be augmented [Thodoris Greasidis]
> 
> ### sbvr-types-9.0.1 - 2024-08-05
> 
> * Update @balena/lint to v8.2.7 [Josh Bowling]
> 

</details>

* Add vscode profiler launch.json [Thodoris Greasidis]

## 5.0.10 - 2025-07-29

* Switch `ProcessAtomicFormulationsRecurse` to use a breadth first search [Pagan Gazzard]

## 5.0.9 - 2025-06-24

* Add test for multiple Necessities on the same name/type [Thodoris Greasidis]

## 5.0.8 - 2025-06-20

* Update dependency chai to v5 [balena-renovate[bot]]

## 5.0.7 - 2025-06-20

* Support multiple attributes of the same name/type [Pagan Gazzard]

## 5.0.6 - 2025-04-11


<details>
<summary> Update dependency @balena/sbvr-types to v9 [balena-renovate[bot]] </summary>

> ### sbvr-types-9.2.2 - 2025-03-24
> 
> * Update dependency @balena/abstract-sql-compiler to v10 [balena-renovate[bot]]
> 
> ### sbvr-types-9.2.1 - 2025-03-24
> 
> * Update dependency @types/chai-datetime to v1 [balena-renovate[bot]]
> 
> ### sbvr-types-9.2.0 - 2025-02-24
> 
> * Use big integer for webresource casting type [Otavio Jacobi]
> 
> ### sbvr-types-9.1.0 - 2024-10-24
> 
> * Add `is case insensitively equal to` for Text types [Otavio Jacobi]
> 
> ### sbvr-types-9.0.2 - 2024-09-17
> 
> * Change the exported Types to an interface so that they can be augmented [Thodoris Greasidis]
> 
> ### sbvr-types-9.0.1 - 2024-08-05
> 
> * Update @balena/lint to v8.2.7 [Josh Bowling]
> 
> ### sbvr-types-9.0.0 - 2024-08-02
> 
> * Update BigInteger and BigSerial TsTypes [Josh Bowling]
> 

</details>

## 5.0.5 - 2025-04-10


<details>
<summary> Update dependency @balena/sbvr-types to v8 [balena-renovate[bot]] </summary>

> ### sbvr-types-8.0.0 - 2024-06-12
> 
> * Improve BigInteger and BigSerial support [Josh Bowling]
> 

</details>

## 5.0.4 - 2025-04-02

* Update dependency mocha to v11 [balena-renovate[bot]]

## 5.0.3 - 2024-12-03

* Add multiple vocabulary ternary FactType test [Otavio Jacobi]
* Only force the first term on a tertiary fact type to not be an attribute [Otavio Jacobi]

## 5.0.2 - 2024-03-05


<details>
<summary> Update `@balena/sbvr-types` devDependency [Harald Fischer] </summary>

> ### sbvr-types-7.0.1 - 2024-03-04
> 
> * Update dependency @balena/abstract-sql-compiler to v9 [Self-hosted Renovate Bot]
> 
> ### sbvr-types-7.0.0 - 2024-03-04
> 
> * Return `ISODateString` instead of `date` [fisehara]
> 
> ### sbvr-types-6.1.1 - 2024-01-02
> 
> * Update dependency @types/chai-datetime to ^0.0.39 [Self-hosted Renovate Bot]
> 
> ### sbvr-types-6.1.0 - 2023-10-03
> 
> * Add checksum to WebResource [Otávio Jacobi]
> 
> ### sbvr-types-6.0.0 - 2023-08-09
> 
> * Change contents to snake_case [Otávio Jacobi]
> 
> ### sbvr-types-5.2.0 - 2023-08-08
> 
> * Expose WebResource as WebResourceType [Otávio Jacobi]
> 
> ### sbvr-types-5.1.0 - 2023-08-03
> 
> * Adds WebResource type [Otávio Jacobi]
> 

</details>

## 5.0.1 - 2023-05-16


<details>
<summary> Update @balena/sbvr-types to 5.0.0 [Pagan Gazzard] </summary>

> ### sbvr-types-5.0.0 - 2023-05-16
> 
> * Switch from `export =` to `export default` [Pagan Gazzard]
> 
> ### sbvr-types-4.0.2 - 2023-05-03
> 
> * Improve typings [Pagan Gazzard]
> 
> ### sbvr-types-4.0.1 - 2023-05-02
> 
> * boolean: Avoid unnecessary array creation to reduce GCs [Thodoris Greasidis]
> 
> ### sbvr-types-4.0.0 - 2023-04-26
> 
> * Add test cases for Objects in JSON validate [fisehara]
> * Drop `require-npm4-to-publish` devDependency [fisehara]
> * Set minimum supported nodejs version to 16.13.0 and tsconfig to es2021 [Pagan Gazzard]
> * Switch `JSON` to use `JSON` db type instead of `TEXT` [Pagan Gazzard]
> * Switch `Boolean` to use `BOOLEAN` db type instead of `INTEGER` [Pagan Gazzard]
> * Assert that JSON input typeof is object [Josh Bowling]
> 
> ### sbvr-types-3.5.0 - 2023-03-21
> 
> * Add Big Serial type [Josh Bowling]
> 
> ### sbvr-types-3.4.19 - 2022-12-08
> 
> * Flowzone: Allow external contributions [Josh Bowling]
> 

</details>

## 5.0.0 - 2023-02-10

* Expand `lfInfo` to also include the root table name [Carol Schulze]

## 4.7.0 - 2022-12-14

* Empty commit to force a new version to be generated [Carol Schulze]
* Add an `lfInfo` entry in the results object [Carol Schulze]

## 4.6.0 - 2022-12-08

* Switch UniversalQuantification from NOT EXISTS to COUNT(*) = 0 [Pagan Gazzard]

## 4.5.7 - 2022-12-08

* Flowzone: Allow external contributions [Josh Bowling]

## 4.5.6 - 2022-11-29

* Stop using legacy/deprecated format for table aliases [Pagan Gazzard]

## 4.5.5 - 2022-11-17

* Update @balena/sbvr-parser from 1.4.1 to 1.4.2 [Josh Bowling]

## 4.5.4 - 2022-11-17

* Add .npmrc [Josh Bowling]

## 4.5.3 - 2022-11-17

* Bump dev dependencies [Josh Bowling]

## 4.5.2 - 2022-10-14

* Switch from balenaCI to flowzone [Pagan Gazzard]

## 4.5.1 - 2022-04-08


<details>
<summary> Update dependencies [Pagan Gazzard] </summary>

> ### sbvr-parser-1.4.1 - 2022-04-08
> 
> * Update dependencies [Pagan Gazzard]
> * Remove circleci [Pagan Gazzard]
> 
</details>

* Remove circleci [Pagan Gazzard]

## 4.5.0 - 2022-02-16

* Reference property type for informative references [Harald Fischer]

## 4.4.1 - 2021-12-16

* Respect negated verbs for link tables and foreign keys [Pagan Gazzard]

## 4.4.0 - 2021-12-06

* Support the join optimization for `AND` clauses [Pagan Gazzard]

## 4.3.0 - 2021-07-06

* Add an automatic `is of` reverse relationship for concept types [Pagan Gazzard]

## 4.2.2 - 2021-06-30

* Delete CODEOWNERS [Thodoris Greasidis]

## 4.2.1 - 2021-02-17

* Correctly use the native name result in the generated abstract sql [Pagan Gazzard]

## 4.2.0 - 2021-02-05


<details>
<summary> Add support for native `Name`s from sbvr-types [Pagan Gazzard] </summary>

> ### sbvr-parser-1.2.0 - 2021-02-05
> 
> * Add support for a `Name` role binding in the lf validator [Pagan Gazzard]
> 
</details>

## 4.1.1 - 2020-11-25


<details>
<summary> Update dependencies [Pagan Gazzard] </summary>

> ### sbvr-parser-1.1.1 - 2020-10-07
> 
> * Update dependencies [Pagan Gazzard]
> 
> ### sbvr-parser-1.1.0 - 2020-10-07
> 
> * Add support for negative numbers for embedded data [Pagan Gazzard]
> 
> ### sbvr-types-3.1.2 - 2020-11-25
> 
> * Add a `castType` property to type functions [Pagan Gazzard]
> 
> ### sbvr-types-3.1.1 - 2020-11-25
> 
> * Update dependencies [Pagan Gazzard]
> 
> ### sbvr-types-3.1.0 - 2020-06-17
> 
> * Update dependencies [Pagan Gazzard]
> 
</details>

## 4.1.0 - 2020-10-02

* Omit AbstractSqlField props when null to match the expected types [Pagan Gazzard]
* Convert tests from coffeescript to javascript [Pagan Gazzard]

## 4.0.0 - 2020-05-11

* Include linting as part of the tests [Pagan Gazzard]
* Convert from UMD module to commonjs module [Pagan Gazzard]
* Rename to @balena/lf-to-abstract-sql [Pagan Gazzard]
* Drop support for node 8 [Pagan Gazzard]
* Move @balena/sbvr-parser to production dependencies [Pagan Gazzard]

## 3.2.6 - 2020-05-11


<details>
<summary> Update to @balena/sbvr-parser [Pagan Gazzard] </summary>

> ### sbvr-parser-1.0.1 - 2020-05-11
> 
> * Update to mocha 7.x [Pagan Gazzard]

> ### sbvr-parser-1.0.0 - 2020-05-08
> 
> * Convert coffeescript tests to javascript [Pagan Gazzard]
> * Drop support for node 6/8 [Pagan Gazzard]
> * Rename to @balena/sbvr-parser [Pagan Gazzard]

> ### sbvr-parser-0.2.11 - 2020-05-08
> 
> * CI: Add nodejs 14 to the test matrix [Pagan Gazzard]
> * CI: Remove circleci publishing in favor of balenaCI [Pagan Gazzard]

> ### sbvr-parser-0.2.10 - 2020-05-08
> 
> * Update to to @balena/sbvr-types [Pagan Gazzard]

> ### sbvr-parser-0.2.9 - 2020-05-08
> 
> * Update to @balena/lint 5.x [Pagan Gazzard]

> ### sbvr-parser-0.2.8 - 2020-04-27
> 
> * Reduce lodash usage [Pagan Gazzard]
</details>

## 3.2.5 - 2020-05-08

* CI: Add nodejs 14 to the test matrix [Pagan Gazzard]

## 3.2.4 - 2020-05-08


<details>
<summary> Update to @balena/sbvr-types 3.0.0 [Pagan Gazzard] </summary>

> ### sbvr-types-3.0.0 - 2020-05-08
> 
> * Convert `fetchProcessing` to synchronous functions [Pagan Gazzard]
> * Update to bcrypt 4.x [Pagan Gazzard]
> * Enable strict tsconfig [Pagan Gazzard]
> * Make use of `import type` where relevant [Pagan Gazzard]
> * Update to balena-lint 5.x [Pagan Gazzard]
> * Rename to @balena/sbvr-types [Pagan Gazzard]
> * Drop node 8 support [Pagan Gazzard]
> * Update tsconfig target to es2018 [Pagan Gazzard]
> * Convert all returned promises to native promises instead of bluebird [Pagan Gazzard]

> ### sbvr-types-2.0.9 - 2020-05-07
> 
> * Switch to balena-lint [Pagan Gazzard]

> ### sbvr-types-2.0.8 - 2020-05-05
> 
> * Improve typings [Pagan Gazzard]

> ### sbvr-types-2.0.7 - 2020-04-30
> 
> * Remove unused imports [Pagan Gazzard]

> ### sbvr-types-2.0.6 - 2020-04-27
> 
> * Remove production lodash dependency [Pagan Gazzard]
</details>

## 3.2.3 - 2020-04-20

* Switch to native some [Pagan Gazzard]
* Switch to native findIndex [Pagan Gazzard]
* Switch to native every [Pagan Gazzard]
* Switch to native find [Pagan Gazzard]
* Switch to native forEach where possible [Pagan Gazzard]
* Switch to native includes [Pagan Gazzard]
* Switch to native array type checking [Pagan Gazzard]
* Switch to native string type checking [Pagan Gazzard]
* Switch to native Object.assign [Pagan Gazzard]

## 3.2.2 - 2020-04-16

* Always treat numbered terms as if they're used [Pagan Gazzard]

## 3.2.1 - 2020-04-14


<details>
<summary> Update dependencies [Pagan Gazzard] </summary>

> ### sbvr-types-2.0.5 - 2020-03-17
> 
> * CI: Remove circleci deploy in favor of balenaCI [Pagan Gazzard]
> * CI: Add node 12 to the test matrix [Pagan Gazzard]
> * CI: Remove node 6 from the test matrix [Pagan Gazzard]
> * Update dependencies and use resin-lint for automatic lint fixes [Pagan Gazzard]

> ### sbvr-types-2.0.4 - 2020-01-22
> 
> * Add node 12 to the test matrix [Pagan Gazzard]
> * Update dependencies [Pagan Gazzard]
> * Add CODEOWNERS [Pagan Gazzard]

> ### sbvr-parser-0.2.7 - 2020-01-22
> 
> * Add CODEOWNERS [Pagan Gazzard]

> ### sbvr-parser-0.2.6 - 2019-12-30
> 
> * Add support for using `of` instead of `that is of` [Pagan Gazzard]

> ### sbvr-parser-0.2.5 - 2019-12-30
> 
> * Add support for `a given` as a universal quantification [Pagan Gazzard]

> ### sbvr-parser-0.2.4 - 2019-12-27
> 
> * Allow including terms as part of a verb by using `[]` brackets [Pagan Gazzard]
</details>

## 3.2.0 - 2020-04-13

* Only add the destination of a link table if it's actually necessary [Pagan Gazzard]

## 3.1.2 - 2020-02-26

* CI: Remove circleci publishing in favor of balenaCI [Pagan Gazzard]

## 3.1.1 - 2020-01-22

* Add CODEOWNERS [Pagan Gazzard]

## 3.1.0 - 2019-11-01

* Add support for enum definitions on fact types [Pagan Gazzard]

## 3.0.2 - 2019-06-14

* Fix `updateModifiedAt` formatting [Pagan Gazzard]

## 3.0.1 - 2019-05-08

* Add node 12 tests [Pagan Gazzard]
* Add repo.yml for upstream changelogs [Pagan Gazzard]
* Add .versionbot/CHANGELOG.yml for downstream changelogs [Pagan Gazzard]

## 3.0.0 - 2019-03-08

* Add automatic modified at fields [Pagan Gazzard]

## v2.1.0 - 2018-11-03

* Switch to using a prepare script so npm git installs can work [Pagan Gazzard]
* Switch to generating commonjs format [Pagan Gazzard]

## v2.0.8 - 2018-10-10

* Update dependencies [Pagan Gazzard]

## v2.0.7 - 2018-09-18

* Keep the index intact when replacing the id field [Pagan Gazzard]

## v2.0.6 - 2018-09-07

* Resolve synonyms for link tables, fixing term forms on term forms [Pagan Gazzard]

## v2.0.5 - 2018-06-04

* Ensure the correct FK field name is used in link table rules #19 [Tim Perry]

## v2.0.4 - 2018-05-10

* Update dependencies #17 [Pagan Gazzard]

## v2.0.3 - 2018-05-10

* Require npm 4+ to publish, to avoid issues with publishing #16 [Pagan Gazzard]

## v2.0.2 - 2018-05-07

* Make sure the canonical fact types for term forms include the linked verb. This fixes issues where the wrong attribute name would be used when generating the abstract sql using those relationships #15 [Pagan Gazzard]

## v2.0.1 - 2018-04-30

* Add node 10 to the circleci tests #14 [Pagan Gazzard]
* Move circle.yml to .circleci/config.yml #14 [Pagan Gazzard]

## v2.0.0 - 2018-04-25

* Switch references to use the `resourceName` which is the lookup key for the `tables` entry of the abstract sql model, and will allow for much easier lookups. #13 [Pagan Gazzard]

## v1.0.4 - 2017-12-11

* Set up circleci auto-publishing #12 [Pagan Gazzard]

## v1.0.3 - 2017-10-03

* Include the full relationship which includes the first term for all foreign keys, rather than just term forms. #11 [Pagan Gazzard]

## v1.0.2 - 2017-09-21

* Add relationship info for concept types #10 [Pagan Gazzard]

## v1.0.1 - 2017-09-19

* Added versionist [Giovanni Garufi]
* Added negation across all factTypes [Giovanni Garufi]

## v1.0.0

* Switched relationships info to terminate with a $ property, this fixes cases where one relationship is a subset of another
* Stopped adding a alias for the term form of a fact type to the returned tables list and instead consistently use the original resource name via synonym resolution - this also fixes an issue where relationships info for foreign keys of term form tables was incorrect
* Updated to sbvr-parser ^0.1.0 so we can rely on the `has`/`is of` synonymous forms being in the LF.
* Added relationship info from the term form of a fact type to it's component terms
* Added relationship info from the first term of a synonymous form to the fact type table
* Added relationship info from the first term of a fact type to the fact type table
* Removed 'BooleanAttribute'/'Attribute'/'ForeignKey' placeholder tables from the output.
* Added relationship info for synonymous form relationships
* Added a list of synonyms to the result
* Added relationship info for attributes, foreign keys, boolean attributes, and from link tables (fact types) to its component terms.
* Added `modelName` to the table info
* Switched to generating field names as "verb-term" (except when the verb is 'has') so that it is possible to differentiate relationships between terms. eg 'pilot copilots for pilot' and 'pilot trained pilot'
* Changed table names to keep spaces in terms and verbs, but `-` between them, matching fields, eg 'pilot-can fly-plane'
* Removed tables that should not exist from the output.

## v0.0.19

* Switched to only adding concept type joins if they're actually needed.
* Added a test for a self-referential fact type and synonymous form.

## v0.0.18

* Added support for concept type on term form fact types.
* Added a synonymous form test.

## v0.0.17

* Fixed non-primitive concept types.

## v0.0.16

* Updated lodash to ^4.0.0

## v0.0.15

* Updated ometa-js

## v0.0.14

* Added a `created at` field by default that is a `TIMESTAMP` with `DEFAULT CURRENT_TIMESTAMP`.

## v0.0.10

* Updated lodash to ^3.0.0

## v0.0.9

* Added support for making unique fields of a term form nullable.
