ash_postgres/CHANGELOG.md

444 lines
14 KiB
Markdown
Raw Permalink Normal View History

2020-06-01 17:36:43 +12:00
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](Https://conventionalcommits.org) for commit guidelines.
<!-- changelog -->
2024-09-17 02:21:50 +12:00
## [v2.4.1](https://github.com/ash-project/ash_postgres/compare/v2.4.0...v2.4.1) (2024-09-16)
### Bug Fixes:
* ensure that returning is not an empty list
* match on table schema as well as table name
2024-09-14 07:11:36 +12:00
## [v2.4.0](https://github.com/ash-project/ash_postgres/compare/v2.3.1...v2.4.0) (2024-09-13)
### Features:
2024-09-14 07:12:00 +12:00
- Implement Ltree Type (#385)
2024-09-14 07:11:36 +12:00
### Improvements:
2024-09-14 07:12:00 +12:00
- update ash to latest version
2024-09-14 07:11:36 +12:00
2024-09-14 07:12:00 +12:00
- remove LEAKPROOF from function to prevent migration issues
2024-09-14 07:11:36 +12:00
2024-09-14 07:12:00 +12:00
- support upcoming `action_select` options
2024-09-14 07:11:36 +12:00
2024-09-14 07:12:00 +12:00
- ensure `Repo` is started after telemetry in igniter installer
2024-09-14 07:11:36 +12:00
2024-09-14 07:12:00 +12:00
- update to latest igniter functions
2024-09-14 07:11:36 +12:00
2024-09-06 04:54:43 +12:00
## [v2.3.1](https://github.com/ash-project/ash_postgres/compare/v2.3.0...v2.3.1) (2024-09-05)
### Improvements:
2024-09-06 04:55:37 +12:00
- [`mix ash_postgres.gen.migrations`] better imported index names
2024-09-06 04:54:43 +12:00
2024-09-06 04:55:37 +12:00
- [`mix ash_postgres.gen.migrations`] add `--extend` option, forwarded to generated resource
2024-09-06 04:54:43 +12:00
2024-09-05 17:21:09 +12:00
## [v2.3.0](https://github.com/ash-project/ash_postgres/compare/v2.2.5...v2.3.0) (2024-09-05)
### Features:
2024-09-06 04:55:37 +12:00
- [`mix ash_postgres.gen.resources`] Add `mix ash_postgres.gen.resources` for importing tables from an existing database as resources
2024-09-05 17:21:09 +12:00
2024-09-04 14:26:46 +12:00
## [v2.2.5](https://github.com/ash-project/ash_postgres/compare/v2.2.4...v2.2.5) (2024-09-04)
### Improvements:
2024-09-04 14:27:30 +12:00
- [`AshPostgres.DataLayer`] support ash main upsert_condition logic
2024-09-04 14:26:46 +12:00
2024-09-03 17:57:31 +12:00
## [v2.2.4](https://github.com/ash-project/ash_postgres/compare/v2.2.3...v2.2.4) (2024-09-03)
### Bug Fixes:
2024-09-04 14:27:30 +12:00
- [`AshPostgres.DataLayer`] ensure default bindings are present on data layer
2024-09-03 17:57:31 +12:00
2024-09-04 14:27:30 +12:00
- [`AshPostgres.DataLayer`] properly traverse newtypes when determining types
2024-09-03 17:57:31 +12:00
2024-08-18 23:45:39 +12:00
## [v2.2.3](https://github.com/ash-project/ash_postgres/compare/v2.2.2...v2.2.3) (2024-08-18)
### Bug Fixes:
2024-08-18 23:46:11 +12:00
- [`mix ash_postgres.install`] was not adding ash_functions/min_pg_version
2024-08-18 23:45:39 +12:00
2024-08-18 04:09:09 +12:00
## [v2.2.2](https://github.com/ash-project/ash_postgres/compare/v2.2.1...v2.2.2) (2024-08-17)
### Bug Fixes:
- [`mix ash_postgres.install`] properly handle new igniter installer functions
2024-08-17 07:42:34 +12:00
## [v2.2.1](https://github.com/ash-project/ash_postgres/compare/v2.2.0...v2.2.1) (2024-08-16)
### Bug Fixes:
2024-08-17 07:45:38 +12:00
- [`AshPostgres.DataLayer`] set a proper default for `skip_unique_indexes`
2024-08-17 07:42:34 +12:00
### Improvements:
2024-08-17 07:45:38 +12:00
- [`mix ash_postgres.install`] include `min_pg_version` in new generators
2024-08-17 07:42:34 +12:00
2024-08-14 01:58:42 +12:00
## [v2.2.0](https://github.com/ash-project/ash_postgres/compare/v2.1.19...v2.2.0) (2024-08-13)
### Bug Fixes:
2024-08-14 02:03:37 +12:00
- [`AshPostgres.Repo`] remove `Agent` "convenience" for determining min pg version
2024-08-14 01:58:42 +12:00
2024-08-14 02:03:37 +12:00
We need to require that users provide this function. To that end we're
adding a warning in a minor release branch telling users to define this.
The agent was acting as a bottleneck that all queries must go through,
causing nontrivial performance issues at scale.
2024-08-14 01:58:42 +12:00
2024-08-14 02:03:37 +12:00
- [upserts] handle filter condition on create (#368)
2024-08-14 01:58:42 +12:00
2024-08-13 06:25:42 +12:00
## [v2.1.19](https://github.com/ash-project/ash_postgres/compare/v2.1.18...v2.1.19) (2024-08-12)
### Bug Fixes:
2024-08-14 02:03:37 +12:00
- [ecto compatibility] we missed a change when preparing for ecto 3.12 parameterized type changes
2024-08-13 06:25:42 +12:00
2024-08-14 02:03:37 +12:00
- [exists aggregates] update ash_sql for exists aggregate fixes
2024-08-13 06:25:42 +12:00
2024-08-10 08:10:21 +12:00
## [v2.1.18](https://github.com/ash-project/ash_postgres/compare/v2.1.17...v2.1.18) (2024-08-09)
### Improvements:
2024-08-14 02:03:37 +12:00
- [`ash_postgres.gen.migration`] dynamically select and allow setting a repo
2024-08-10 08:10:21 +12:00
2024-07-28 09:13:49 +12:00
## [v2.1.17](https://github.com/ash-project/ash_postgres/compare/v2.1.16...v2.1.17) (2024-07-27)
### Improvements:
2024-08-14 02:03:37 +12:00
- [`ash_sql`] update ash & ash_sql for various fixes
2024-07-28 09:13:49 +12:00
2024-07-26 08:17:08 +12:00
## [v2.1.16](https://github.com/ash-project/ash_postgres/compare/v2.1.15...v2.1.16) (2024-07-25)
2024-07-24 00:11:00 +12:00
### Bug Fixes:
2024-07-26 08:17:08 +12:00
- [updates] don't overwrite non-updated fields on update
2024-07-24 00:11:00 +12:00
2024-07-26 08:17:08 +12:00
- [`mix ash_postgres.generate_migrations`] ensure app is compiled before using repo modules
2024-07-24 00:11:00 +12:00
### Improvements:
2024-07-26 08:17:08 +12:00
- [`ash_sql`] update ash_sql for cleaner queries
2024-07-24 00:11:00 +12:00
2024-07-26 08:17:08 +12:00
## [v2.1.15](https://github.com/ash-project/ash_postgres/compare/v2.1.14...v2.1.15) (2024-07-23)
2024-07-24 00:11:00 +12:00
2024-07-26 08:17:08 +12:00
### Bug Fixes:
2024-07-24 00:11:00 +12:00
2024-07-26 08:17:08 +12:00
- [query building] use a subquery if any exists aggregates are in play
2024-07-24 00:11:00 +12:00
2024-07-23 07:41:55 +12:00
## [v2.1.14](https://github.com/ash-project/ash_postgres/compare/v2.1.13...v2.1.14) (2024-07-22)
2024-07-23 03:50:22 +12:00
### Bug Fixes:
2024-07-23 07:41:55 +12:00
- [multitenancy] properly convert tenant to string when building lateral join
2024-07-23 03:50:22 +12:00
2024-07-23 07:41:55 +12:00
## [v2.1.13](https://github.com/ash-project/ash_postgres/compare/v2.1.12...v2.1.13) (2024-07-22)
2024-07-23 03:50:22 +12:00
2024-07-23 07:41:55 +12:00
### Bug Fixes:
2024-07-23 03:50:22 +12:00
2024-07-23 07:41:55 +12:00
- [atomic validations] update ash & ash_sql for fixes, test atomic validations in destroys
2024-07-23 03:50:22 +12:00
2024-07-20 07:12:46 +12:00
## [v2.1.12](https://github.com/ash-project/ash_postgres/compare/v2.1.11...v2.1.12) (2024-07-19)
### Bug Fixes:
2024-07-23 07:41:55 +12:00
- [`mix ash_postgres.install`] properly add prod config in installer
2024-07-20 04:35:44 +12:00
### Bug Fixes:
2024-07-23 07:41:55 +12:00
- [`mix ash_postgres.install`] properly perform or don't perform configuration modification code
2024-07-20 04:35:44 +12:00
2024-07-23 07:41:55 +12:00
- [`has_many` relationships] allow non-unique has_many source_attributes (#355)
2024-07-20 04:35:44 +12:00
### Improvements:
2024-07-23 07:41:55 +12:00
- [`mix ash_postgres.install`] prepend `:postgres` to section order
2024-07-20 04:35:44 +12:00
2024-07-23 07:41:55 +12:00
- [`mix ash.patch.extend`] pluralize table name in extender
2024-07-20 04:35:44 +12:00
2024-07-19 10:48:40 +12:00
## [v2.1.10](https://github.com/ash-project/ash_postgres/compare/v2.1.9...v2.1.10) (2024-07-18)
### Bug Fixes:
2024-07-19 10:51:04 +12:00
- [lateral joins] allow non-unique has_many source_attributes (#355)
2024-07-19 10:48:40 +12:00
2024-07-19 04:57:04 +12:00
## [v2.1.9](https://github.com/ash-project/ash_postgres/compare/v2.1.8...v2.1.9) (2024-07-18)
### Bug Fixes:
### Improvements:
2024-07-19 10:51:04 +12:00
- [`mix ash.gen.resource`] pluralize table name in extender
2024-07-19 04:57:04 +12:00
2024-07-17 15:01:10 +12:00
## [v2.1.8](https://github.com/ash-project/ash_postgres/compare/v2.1.7...v2.1.8) (2024-07-17)
### Bug Fixes:
2024-07-17 15:10:18 +12:00
- [aggregates] update ash_sql & ash for include_nil? fix (and test it)
2024-07-17 15:01:10 +12:00
2024-07-17 15:10:18 +12:00
- [aggregates] ensure synthesized query aggregates have context set
2024-07-17 15:01:10 +12:00
### Improvements:
2024-07-17 15:10:18 +12:00
- [installers] update igniter dependencies
2024-07-17 15:01:10 +12:00
2024-07-17 15:10:18 +12:00
- [expressions] add `binding()` expression, for referring to the current table
2024-07-17 15:01:10 +12:00
## [v2.1.7](https://github.com/ash-project/ash_postgres/compare/v2.1.6...v2.1.7) (2024-07-17)
### Bug Fixes:
2024-07-17 15:10:18 +12:00
- update to latest ash version for aggregate fix
2024-07-17 15:10:18 +12:00
- update ash_sql for include_nil? fix and test it
2024-07-17 15:10:18 +12:00
- ensure synthesized query aggregates have context set
### Improvements:
2024-07-17 15:10:18 +12:00
- update ash/igniter dependencies
2024-07-17 15:10:18 +12:00
- add `binding()` expression
2024-07-17 15:10:18 +12:00
- use latest type casting code from ash
2024-07-17 15:10:18 +12:00
- support new type determination code
2024-07-16 14:01:45 +12:00
## [v2.1.6](https://github.com/ash-project/ash_postgres/compare/v2.1.5...v2.1.6) (2024-07-16)
### Bug Fixes:
2024-07-17 15:10:18 +12:00
- ensure synthesized query aggregates have context set
2024-07-16 14:01:45 +12:00
### Improvements:
2024-07-17 15:10:18 +12:00
- update ash/igniter dependencies
2024-07-16 14:01:45 +12:00
2024-07-17 15:10:18 +12:00
- add `binding()` expression
2024-07-16 14:01:45 +12:00
2024-07-17 15:10:18 +12:00
- use latest type casting code from ash
2024-07-16 14:01:45 +12:00
2024-07-17 15:10:18 +12:00
- support new type determination code
2024-07-16 14:01:45 +12:00
2024-07-16 05:53:00 +12:00
## [v2.1.5](https://github.com/ash-project/ash_postgres/compare/v2.1.4...v2.1.5) (2024-07-15)
### Bug Fixes:
2024-07-16 05:54:29 +12:00
- ensure synthesized query aggregates have context set
2024-07-16 05:53:00 +12:00
### Improvements:
2024-07-16 05:54:29 +12:00
- [`Ash.Expr`] add `binding()` expression to refer to current table
2024-07-16 05:53:00 +12:00
2024-07-16 05:54:29 +12:00
- [`Ash.Expr`] use latest type casting code from ash
2024-07-16 05:53:00 +12:00
2024-07-15 03:45:10 +12:00
## [v2.1.4](https://github.com/ash-project/ash_postgres/compare/v2.1.3...v2.1.4) (2024-07-14)
### Improvements:
2024-07-16 05:54:29 +12:00
- [`Ash.Expr`] use latest type casting code from ash
2024-07-15 03:45:10 +12:00
2024-07-15 01:26:37 +12:00
## [v2.1.3](https://github.com/ash-project/ash_postgres/compare/v2.1.2...v2.1.3) (2024-07-14)
### Improvements:
2024-07-16 05:54:29 +12:00
- [`Ash.Expr`] support new type determination code
2024-07-15 01:26:37 +12:00
2024-07-14 08:15:55 +12:00
## [v2.1.2](https://github.com/ash-project/ash_postgres/compare/v2.1.1...v2.1.2) (2024-07-13)
2024-07-14 08:16:44 +12:00
- [query builder] update ash & improve type casting behavior
2024-07-14 08:15:55 +12:00
2024-07-11 00:47:31 +12:00
## [v2.1.1](https://github.com/ash-project/ash_postgres/compare/v2.1.0...v2.1.1) (2024-07-10)
### Bug Fixes:
2024-07-14 08:16:44 +12:00
- [mix ash_postgres.install] properly interpolate module names in installer
2024-07-11 00:47:31 +12:00
2024-07-10 12:53:31 +12:00
## [v2.1.0](https://github.com/ash-project/ash_postgres/compare/v2.0.12...v2.1.0) (2024-07-10)
### Features:
- [AshPostgres.DataLayer] add `storage_types` configuration (#342)
- [generators] add `mix ash_postgres.install` (`mix igniter.install ash_postgres`)
### Bug Fixes:
- [AshPostgres.DataLayer] ensure that `from_many?` relationships in lateral join have a limit applied
- [migration generator] properly delete args passed from migrate to ecto
### Improvements:
- [Ash.Type.UUIDv7] add support for `:uuid_v7` type (#333)
- [migration generator] order keys in snapshot json (#339)
2024-06-21 09:43:05 +12:00
## [v2.0.12](https://github.com/ash-project/ash_postgres/compare/v2.0.11...v2.0.12) (2024-06-20)
### Bug Fixes:
2024-06-21 09:43:20 +12:00
- [migration generator] only add references indexes if they've changed
2024-06-21 09:43:05 +12:00
2024-06-20 12:03:27 +12:00
## [v2.0.11](https://github.com/ash-project/ash_postgres/compare/v2.0.10...v2.0.11) (2024-06-19)
### Bug Fixes:
2024-06-19 08:37:56 +12:00
2024-06-20 12:03:27 +12:00
- [AshPostgres.DataLayer] rework expression type detection
2024-06-19 08:37:56 +12:00
2024-06-20 12:03:27 +12:00
- [migration generator] ensure index keys are atoms in generated migrations (#332)
2024-06-19 08:37:56 +12:00
2024-06-20 12:03:27 +12:00
## [v2.0.10](https://github.com/ash-project/ash_postgres/compare/v2.0.9...v2.0.10) (2024-06-18)
2024-06-19 08:37:56 +12:00
### Bug Fixes:
2024-06-20 12:03:27 +12:00
- [AshPostgres.DataLayer] update ash_sql to fix query generation issues
2024-06-19 08:37:56 +12:00
2024-06-20 12:03:27 +12:00
- [migration generator] ensure that parens are always added to calculation generated SQL
2024-06-19 08:37:56 +12:00
2024-06-20 12:03:27 +12:00
- [migration generator] properly get calculation sql
2024-06-19 08:37:56 +12:00
### Improvements:
2024-06-20 12:03:27 +12:00
- [AshPostgres.DataLayer] better type handling using new type inference
2024-06-19 08:37:56 +12:00
2024-06-20 12:03:27 +12:00
- [identities] identities w/ calculations and where clauses in upserts
2024-06-19 08:37:56 +12:00
2024-06-14 01:54:16 +12:00
## [v2.0.9](https://github.com/ash-project/ash_postgres/compare/v2.0.8...v2.0.9) (2024-06-13)
### Features:
2024-06-20 12:03:27 +12:00
- [migration generator] autogenerate index in references (#321)
2024-06-14 01:54:16 +12:00
### Bug Fixes:
2024-06-20 12:03:27 +12:00
- [AshPostgres.DataLayer] fix invalid select on sorting by some calculations
2024-06-14 01:54:16 +12:00
2024-06-20 12:03:27 +12:00
- [AshPostgres.DataLayer] fix error message displaying in identity verifier
2024-06-14 01:54:16 +12:00
2024-06-20 12:03:27 +12:00
- [lateral joining] ensure that context multitenancy is properly applied to lateral many-to-many joins
2024-06-14 01:54:16 +12:00
2024-06-20 12:03:27 +12:00
- [migration generator] don't assume old snapshots have `index?` key for attributes
2024-06-14 01:54:16 +12:00
2024-06-20 12:03:27 +12:00
- [ash.rollback] `list_tenants` -> `all_tenants`
2024-06-14 01:54:16 +12:00
2024-06-20 12:03:27 +12:00
- [ash.rollback] when checking for roll back-able migrations, only check `Path.basename`
2024-06-14 01:54:16 +12:00
### Improvements:
2024-06-20 12:03:27 +12:00
- [migration generator] don't sort identity keys.
2024-06-14 01:54:16 +12:00
2024-06-07 06:35:46 +12:00
## [v2.0.8](https://github.com/ash-project/ash_postgres/compare/v2.0.7...v2.0.8) (2024-06-06)
2024-06-07 05:10:33 +12:00
## [v2.0.7](https://github.com/ash-project/ash_postgres/compare/v2.0.6...v2.0.7) (2024-06-06)
### Bug Fixes:
2024-06-07 05:10:59 +12:00
- [fix] update ash_sql and fix issues retaining lateral join context
2024-06-07 05:10:33 +12:00
2024-06-07 05:10:59 +12:00
- [fix] ensure that all current attribute values are selected on bulk update shifted root query
2024-06-07 05:10:33 +12:00
2024-05-30 04:32:23 +12:00
## [v2.0.6](https://github.com/ash-project/ash_postgres/compare/v2.0.5...v2.0.6) (2024-05-29)
### Bug Fixes:
- [atomic updates] properly support aggregate references in atomic updates
- [migration generator] ensure that identities are dropped when where/nils_distinct? are changed
- [migration generator] ensure that `where` is wrapped in parenthesis
- [ecto compatibility] support old/new parameterized type format
### Improvements:
- [identities] require clarification of index names > 63 characters
- [mix ash_postgres.squash_snapshots] add `ash_postgres.squash_snapshots` mix task (#302)
2024-05-24 17:15:50 +12:00
## [v2.0.5](https://github.com/ash-project/ash_postgres/compare/v2.0.4...v2.0.5) (2024-05-24)
### Improvements:
- [idenities] update `ash` and support new `identity` features
2024-05-24 10:42:16 +12:00
## [v2.0.4](https://github.com/ash-project/ash_postgres/compare/v2.0.3...v2.0.4) (2024-05-23)
### Bug Fixes:
[updates] ensure update's reselect all changing values
2024-05-24 10:42:16 +12:00
2024-05-23 09:49:49 +12:00
## [v2.0.3](https://github.com/ash-project/ash_postgres/compare/v2.0.2...v2.0.3) (2024-05-22)
### Bug Fixes:
[updates] handle complex maps/list on update
2024-05-23 09:49:49 +12:00
[Ash.Query] support anonymous aggregates in sorts
2024-05-23 09:49:49 +12:00
[exists] ensure parent_as bindings properly reference binding names
2024-05-23 09:49:49 +12:00
[migration generator] add and remove custom indexes in tandem properly
2024-05-23 09:49:49 +12:00
### Improvements:
[references] support `on_delete: :nilify` for specific columns (#289)
2024-05-23 09:49:49 +12:00
2024-05-16 09:53:32 +12:00
## [v2.0.2](https://github.com/ash-project/ash_postgres/compare/v2.0.1...v2.0.2) (2024-05-15)
### Bug Fixes:
- [update_query/destroy_query] rework the update and destroy query builder to support multiple kinds of joining
2024-05-16 09:53:32 +12:00
- [mix ash_postgres.migrate] remove duplicate repo flags (#285)
2024-05-16 09:53:32 +12:00
- [Ash.Error.Changes.StaleRecord] ensure filter is included in stale record error messages we return
2024-05-16 09:53:32 +12:00
- [AshPostgres.MigrationGenerator] properly parse previous version from migration generation
2024-05-16 09:53:32 +12:00
2024-05-13 04:50:58 +12:00
## [v2.0.1](https://github.com/ash-project/ash_postgres/compare/v2.0.0...v2.0.1) (2024-05-12)
### Bug Fixes:
- [AshPostgres.MigrationGenerator] properly parse previous version of custom extensions when generating migrations
2024-05-09 10:40:08 +12:00
## [v2.0.0](https://github.com/ash-project/ash_postgres/compare/v2.0.0...2.0)
2024-04-13 01:08:49 +12:00
2024-05-09 10:40:08 +12:00
The changelog is starting over. Please see `/documentation/1.0-CHANGELOG.md` in GitHub for previous changelogs.
2024-03-28 10:29:10 +13:00
2024-03-28 10:30:30 +13:00
### Breaking Changes:
2024-03-28 10:29:10 +13:00
2024-05-09 10:40:08 +12:00
- [Ash.Type.UUID] change defaults in migrations for uuids to `gen_random_uuid()`
- [Ash.Type.DateTime] Use UTC for default generated timestamps (#131)
- [AshPostgres.DataLayer] must now know the min_pg_version that will be used. By default we check this at repo startup by asking the database, but you can also define it yourself.
- [AshPostgres.DataLayer] Now requires postgres version 14 or higher
2024-03-28 10:29:10 +13:00
### Features:
2024-05-09 10:40:08 +12:00
- [AshPostgres.Timestamptz] add timestamptz types (#266)
- [AshPostgres.Repo] add `create?` and `drop?` callbacks to `AshPostgres.Repo` (#143)
- [AshPostgres.DataLayer] support `c:AshDataLayer.calculate/3` capability
2024-03-06 03:20:32 +13:00
### Bug Fixes:
2024-05-09 10:40:08 +12:00
- [AshPostgres.MigrationGenerator] honor dry_run option in extension migrations
- [AshPostgres.MigrationGenerator] don't wait for shell input when checking migrations
- [AshPostgres.DataLayer] ensure limit/offset triggers joining for update/destroy query
- [AshPostgres.DataLayer] properly honor `limit` in bulk operations
- [AshPostgres.DataLayer] ensure that `exists` with a filter paired with `from_many?` functions properly
2024-03-01 14:20:47 +13:00
### Improvements:
2024-05-09 10:40:08 +12:00
- [AshPostgres.Repo] warn on missing ash-functions at compile time
- [AshPostgres.Repo] add default implementation for pg_version, and rename to `min_pg_version`
- [mix ash.rollback] support `mix ash.rollback` with interactive rollback
- [AshSql] move many internals out to `AshSql` package to be shared