Skip to main content

sql-expanders


4.2.0 (2024-08-12)

Changed

  • Updated expander dependency:
    • net.democritus:Expanders: 6.6.1 > 7.4.5
    • net.democritus:prime-core: 2024.1.1 > 2024.4.5

4.1.0 (2024-04-09)

Changed

  • Updated expander dependency:
    • net.democritus:Expanders: 6.5.0 > 6.6.1
    • net.democritus:prime-core: 2024.0.4 > 2024.1.1

Removed

  • Removed expander comment from all expanded sql files.

4.0.1 (2024-02-21)

Fixed

  • (SQL-23) Fixed maximum size of bigstring to 4000 characters for Oracle, assuming no extended strings are used.

4.0.0 (2024-02-15)

Fixed

  • Initial data files for MariaDB used MySQL dialect.
  • Legacy OpenJPA id generation strategy (sequence tables) did not correctly generate ids for insert statements.
  • Hibernate sequence id generation strategy (where sequence tables are used instead of native sequences) did not correctly generate ids for insert statements.
  • MariaDB did not use the correct syntax to grab a new identifier for a global sequence with OpenJPA. (We do not officially support this configuration.)
  • MariaDB did not use the correct syntax to grab a new identifier for a global sequence with Hibernate. (We do not officially support this configuration.)
  • Correctly allocate sequence blocks for MariaDB and MySQL when using sequence tables for Hibernate 5.
  • Fixed support for Hibernate 5 sequence strategy with MySQL.
  • Fixed support for OpenJPA sequence tables with MySQL. (We do not officially support this configuration.)
  • Inserts statements for Oracle databases were changed so they are once again single inserts, as the standard multi-insert syntax is not supported.

Added

  • Added feature anchor to MariaDB table script to add native sequences.

Changed

  • The expanders, as well as the sql-expanders-dataxml library now target Java 17.
  • The fieldConditions map in ElementLinkedField is now a list of FieldCondition, which contains ValueFieldCondition instances.
  • The ElementLinkedField.getFieldConditions() method now returns List<? extends FieldCondition>.
  • ElementLinkedField.setFieldConditions(Map<String, String>) is now deprecated in favor of setFieldConditions(List<? extends FieldCondition>).
  • Optimized queries for Hibernate 5 sequence strategy with MariaDB.
  • Optimized queries for OpenJPA sequence tables with MariaDB. (We do not officially support this configuration.)

Removed

  • Removed implementation for deprecated option experimental.valueFieldType.storageType.

3.1.0 (2024-02-05)

Fixed

  • Initial data files for Oracle used Postgres dialect.

Changed

  • Updated expander dependency:
    • net.democritus:Expanders: 5.28.1 > 6.5.0
    • net.democritus:prime-core: 2023.5.2 > 2024.0.4
  • Updated libraries:
    • net.democritus:nsx-runtime: 2023.4.0 > 2023.9.0

3.0.1 (2023-07-11)

Fixed

  • The type for Double in SQL Server was incorrectly ported from ValueFieldType to DECIMAL(19, 2) instead of FLOAT.

3.0.0 (2023-07-03)

Changed

  • Switched from ValueFieldType to ValueType for all expanders.

Removed

  • Removed support for experimental option experimental.openjpa.CharacterColumnSize. Use ValueTypes instead.

2.8.0 (2023-02-13)

Fixed

  • Hashed name of foreign keys was not correctly generated for Hibernate 5.

Added

  • Added support for unique constraints on DataElements.

Changed

  • Updated expander dependency:
    • net.democritus:Expanders: 5.15.1 > 5.17.1
  • Updated libraries:
    • net.democritus:nsx-runtime: 2022.5.0 > 2022.5.2

Removed

  • Removed support for Hibernate 4.

2.7.0 (2022-11-30)

Changed

  • Updated expander dependency:
    • net.democritus:Expanders: 5.12.1 > 5.15.1
  • Updated libraries:
    • net.democritus:nsx-runtime: 2022.2.0 > 2022.5.0

2.6.0 (2022-08-25)

Fixed

  • String fields with a max data length greater than 8000 is now set to VARCHAR(MAX) for SQL Server.
  • Initial data for SQL Server used TRUE/FALSE for Boolean (BIT) field instead of 1/0.

Added

  • Added option types as data resource to allow the micro-radiant to pick them up dynamically.
  • Added option sql.structureFile.name to set the name of the SQL file that initializes the database structure.

Changed

  • Updated expander dependency:
    • net.democritus:Expanders: 4.13.5 > 5.12.1
  • Updated libraries:
    • net.democritus:nsx-runtime: 2022.0.2 > 2022.2.0

2.5.0 (2022-04-22)

Changed

  • Syntax of data XML files has been greatly simplified.
  • (SQL-10) Generate multi-line inserts in all SQL dialects.

2.4.1 (2022-04-06)

Fixed

  • Calculated fields were added to insert statements for initial data.
  • Implicit name fields were not processed for initial data.

2.4.0 (2021-07-20)

Fixed

  • (SQL-18) Strings in link constraint definitions were not escaped.

Added

  • Support for scripted value UUID::new in initial data scripts for fields with type String.

2.3.0 (2021-06-24)

Fixed

  • Enable condition for legacy hibernate sequence feature.

Added

  • Mappings for numeric and decimal storage types to a decimal with size 19 and precision 2, as is the default for Hibernate.

2.2.0 (2021-06-21)

Changed

  • (SQL-5) The initial data file for application no longer has to have the version of the application in its filename. If it is not found without, the expander will still try to get the file with the version in the name for backwards compatibility.

2.1.1 (2021-06-14)

Fixed

  • Added namespace to dataInstances root element in data xml writer.
  • The initial data library was not correctly bundled into the expanders.

2.1.0 (2021-06-11)

Added

  • (SQL-16) DataInstanceXmlWriter class to for external use.
  • (SQL-16) Moved pojos and XML IO classes for init data to new sql-expanders-dataxml module.

2.0.7 (2021-06-10)

Fixed

  • Both Hibernate and OpenJPA default to identity columns for HSQLDB.

2.0.6 (2021-06-08)

Fixed

  • SQL Server CREATE SEQUENCE statements cannot contain IF EXISTS.

2.0.5 (2021-06-08)

Fixed

  • SQL Server sequences section was missing.

2.0.4 (2021-06-07)

Fixed

  • Changed syntax of id sequence table update statements to a more widely supported format. HSQLDB did not accept the previous syntax.

2.0.3 (2021-05-28)

Fixed

  • (SQL-13) Timestamp value fields in initial data were not put in quotes.
  • (SQL-12) String value fields in initial data were not escaped.

2.0.2 (2021-05-27)

Fixed

  • Added COMMIT statements to Oracle initial data script.

2.0.1 (2021-05-07)

Fixed

  • Initial data scripts for MariaDB and Mysql didn't update the correct sequence table when experimental.persistence.defaultIdentifier was set to sequence.

2.0.0 (2021-05-06)

caution

This version contains some breaking changes. Please refer to the migration guide in the documentation for more information about this change and what code is affected.

Added

  • (SQL-3) Generate initial data script from a common XML data format.
  • (SQL-4) Support for Oracle databases.

1.5.0 (2021-04-23)

Fixed

  • SQL Server:
    • DROP statements included CASCADE, which is not part of the SQL Server syntax.
    • Schema names were not escaped for sequences.

Added

  • Added support for HyperSQL (SQL scripts, not database script files).
  • (SQL-1) Added support for identity columns and sequences with the options experimental.persistence.defaultIdentifier, experimental.persistence.sequence.defaultSchema and experimental.persistence.sequence.defaultName introduced in Expanders 4.15.0.
  • Support for foreign key constraint names generated by Hibernate 4 and Hibernate 5 in HyperSQL where it is strongly enforced by the frameworks.
  • Added support for options experimental.valueFieldType.storageType and experimental.openjpa.CharacterColumnSize in Expanders 4.14.0.
  • (SQL-2) Added support for isDetails option.

Changed

  • Updated expander dependency:
    • net.democritus:Expanders: 4.4.12 > 4.13.5

1.4.0 (2020-12-04)

Added

  • Added anchors to all relevant script expanders:
    • custom-before-cleanup
    • custom-cleanup
  • Added feature anchors expanders:
    • before-cleanup
    • cleanup
    • databases
    • foreign-keys
    • join-tables
    • schemas
    • sequences
    • tables
  • Generate OpenJPA sequence tables when native sequences are not enabled.

Changed

  • Updated expander dependency:
    • net.democritus:Expanders: 4.1.1 > 4.4.12
  • Moved sequence generation statements to individual feature expanders for each persistence provider.

1.3.1 (2020-05-07)

Fixed

  • Schema names were escaped incorrectly for Postgres.

1.3.0 (2020-05-07)

Added

  • Statements to remove all schemas and sequence generated by the script to empty the database before provisioning.
  • ApplicationInstance option sql.cleanup.disabled to disable the DROP statements.

Changed

  • Scripts for MySQL and MariaDB now use the DATABASE keyword instead of SCHEMA.

1.2.1 (2020-05-04)

Added

  • Fields with value types other than basic string types which were stored as strings now map correctly.

1.2.0 (2020-04-08)

Added

  • Support for noDataLayer option on Component and DataElement level.
  • Support for native sequence with Hibernate.

1.1.1 (2020-01-28)

Changed

  • PRIMARY KEY is now listed as a table constraint instead of column constraint.

Fixed

  • Columns now sorted alphabetically to avoid issues with OpenJPA.

1.1.0 (2020-01-23)

Added

  • Support for Microsoft SQL Server (Transact-SQL)
  • Support for MySQL
  • Support for MariaDB

Fixed

  • DataElements with no fields now generate correct SQL.
  • Implicit name fields are now also added, with support for nameNotWanted option.
  • Foreign key constraint names removed, will be generated by database.
  • Primary keys were missing NOT NULL constraint.
  • Fixed anchors for join tables.