Zach Daniel
33cfbd1cc4
chore: drop columns by default, change CLI option to dont-drop-columns
...
closes #307
2024-05-27 11:44:27 -04:00
Dmitry Maganov
06752d37e4
improvement: add ash_postgres.squash_snapshots
mix task ( #302 )
2024-05-27 09:45:02 -04:00
Zach Daniel
8ad92cc3c0
improvement: update ash
and support new identity
features
2024-05-24 01:14:55 -04:00
Zach Daniel
083807888c
fix: ensure update's reselect all changing values
...
test: add calculation tests
2024-05-23 18:42:06 -04:00
Zach Daniel
264f4c0bac
fix: handle complex maps/list on update
...
fix: support anonymous aggregates in sorts
fix: ensure parent_as bindings properly reference binding names
closes #296
closes #297
closes #298
2024-05-22 17:47:10 -04:00
Davide Briani
814e7de496
improvement: support on_delete: :nilify
for specific columns ( #289 )
2024-05-16 19:18:17 -05:00
Zach Daniel
d5c55f6b10
fix: add and remove custom indexes in tandem properly
2024-05-16 00:14:38 -05:00
Zach Daniel
6d825792b3
fix: rework the update and destroy query builder to support multiple kinds of joining
2024-05-15 11:15:34 -04:00
Sucipto
555a737493
fix: remove duplicate repo flags ( #285 )
2024-05-15 07:22:28 -04:00
Zach Daniel
d0c7984a89
test: add tests for action filters in bulk update/destroy
...
fix: ensure filter is included in stale record error message
2024-05-12 16:28:48 -04:00
Zach Daniel
2421e6fc2c
fix: properly parse previous version from migration generation
2024-05-12 12:51:13 -04:00
Zach Daniel
590fb64db3
fix: ensure that codegen
dry run works
2024-05-09 14:31:54 -04:00
Zach Daniel
f6b1aa3d29
fix: ensure we don't duplicate selects on destroy_query calls
...
we fixed this by combining the logic for query building for bulk destroys
and bulk updates
2024-05-06 11:27:13 -04:00
Jechol Lee
459d853d28
fix: resolve_renames that keeps columns to be renamed in list of columns to add ( #269 )
2024-05-06 09:02:34 -04:00
Zach Daniel
3334999eb1
fix: properly pass old version in when migrating extensions
2024-05-05 11:40:07 -04:00
Zach Daniel
4dd588c043
fix: honor dry_run option in extension migrations
2024-05-05 11:13:30 -04:00
Frank Dugan III
bc02a4d23c
feat: add timestamptz types ( #266 )
2024-05-05 06:08:21 -04:00
Zach Daniel
8eef44951c
test additional bulk action tests
2024-05-03 21:26:08 -04:00
Zach Daniel
77b824e23d
fix: update ash & fix subquery sort references
2024-05-03 00:02:04 -04:00
Zach Daniel
56f3a5eb2f
fix: fix calculate when exprs aren't dynamics
...
test: add test for datetimes
2024-05-02 21:29:21 -04:00
Zach Daniel
c26fdf358f
chore: update documentation with new standards
2024-05-01 14:40:16 -04:00
Zach Daniel
8ca1383b7b
improvement: support latest ash & calculate/3 capability
2024-04-29 17:05:23 -04:00
Zach Daniel
203b4ca287
fix: ensure limit/offset triggers joining for update/destroy query
2024-04-27 09:49:47 -04:00
Zach Daniel
c8d9dfa826
fix: only reference sub
if a subquery is created
2024-04-27 09:44:35 -04:00
Riccardo Binetti
4bad5990c8
fix: fix argument order in AshSql.Bindings.default_bindings/4 ( #251 )
2024-04-26 19:32:42 -04:00
Zach Daniel
1524501236
fix: properly honor limit
in bulk operations
2024-04-24 10:17:05 -04:00
Zach Daniel
673cd0312f
fixs: fix dialyzer warning
2024-04-23 14:15:33 -04:00
Zach Daniel
1ad3cd4ba0
fix: undo change that expresses that atomics cant be done without ash-functions
2024-04-23 10:30:13 -04:00
Zach Daniel
3c4a3d30a5
fix: handle missing aggregate relationships and fields better in transformers
...
fix: update ash_sql for bug fixes
2024-04-22 20:42:11 -04:00
Zach Daniel
d26a189946
improvement: warn on missing ash-functions at compile time
...
closes #242
2024-04-22 12:08:30 -04:00
Zach Daniel
7f3661ce42
chore: support adapter
option to use AshPostgres.Repo
2024-04-21 11:11:00 -04:00
Zach Daniel
e976ae5794
fix: update ash_sql, fix credo
2024-04-11 11:39:49 -04:00
Zach Daniel
14edb8ec36
chore: small formatting for task output fix
2024-04-09 20:51:24 -04:00
Zach Daniel
6d4c642522
docs: update docs for mix tasks
2024-04-09 20:49:39 -04:00
Zach Daniel
38eec0ba86
docs: reformat docs and revisit certain guides
...
improvement: support `mix ash.rollback` with interactive rollback
2024-04-09 20:21:04 -04:00
Zach Daniel
cfaf1f8201
test: fix test application in CI
...
fix: use proper sql implementation in `default_bindings`
2024-04-06 10:12:31 -04:00
Zach Daniel
5c877137dc
improvement: don't fetch version in agent when using sandbox
2024-04-05 14:46:38 -04:00
Zach Daniel
7d83cecad7
fix: don't wait for shell input when checking migrations
2024-04-02 23:03:57 -04:00
Zach Daniel
eb08fed28b
improvement: fixes for 3.0 changes and AshSql changes
2024-04-01 13:58:44 -04:00
Zach Daniel
efcc1a651b
improvement: move many internals out to AshSql
package
2024-03-31 22:38:12 -04:00
Zach Daniel
a96df174bb
fix: properly handle non-filter aggregate filters
2024-03-28 09:18:57 -04:00
Zach Daniel
f03647825c
fix: ensure timestamps are present in extension migrations
2024-03-27 21:30:42 -04:00
Zach Daniel
3647fc42ee
improvement: add default implementation for pg_version, and rename to min_pg_version
2024-03-27 19:20:49 -04:00
Zach Daniel
804482b8ac
improvement!: change defaults for uuids to gen_random_uuid()
2024-03-27 17:20:07 -04:00
Rebecca Le
c436973e9f
fix!: Use UTC for default generated timestamps ( #131 )
...
In cases where the database server is not set to UTC, this fixes timezone inconsistencies when adding timestamp columns to tables with existing data, that would then have their timestamps set to non-UTC times.
2024-03-27 17:07:33 -04:00
bcksl
b66427e9bd
feat: add create?
and drop?
callbacks to AshPostgres.Repo
( #143 )
...
Co-authored-by: Zach Daniel <zach@zachdaniel.dev>
2024-03-27 17:05:14 -04:00
Zach Daniel
3ad3f5f5d6
chore: update ash, resources and an error message
2024-03-27 17:03:16 -04:00
Zach Daniel
37cc01957d
improvement!: 3.0 ( #227 )
...
* WIP
* chore: fix mix.lock merge issues
* improvement: upgrade to 3.0
* chore: remove `repo.to_tenant`
* chore: continue removal of unnecessary helper
* chore: use `Ash.ToTenant`
2024-03-27 16:52:28 -04:00
Zach Daniel
ec75b41dbe
improvement: properly show unsupported error expression
2024-03-22 14:20:38 -04:00
Zach Daniel
5a513a82c2
fix: handle fully fleshed out aggregate fields
2024-03-22 02:13:07 -04:00
Zach Daniel
a0e2693998
fix: don't fail on aggregate query generation
...
fixes #225
2024-03-20 18:37:38 -04:00
Zach Daniel
adac811c79
fix: properly format migrations
...
fix: ensure exists aggregates have filters included
2024-03-20 16:18:27 -04:00
Jinkyou Son
b60f680ab3
Fix: undo default of nulls_distinct option to true ( #223 )
2024-03-20 12:01:53 -04:00
Minsub Kim
0c3b4e5425
fix: generate correct custom index name in down migration function ( #222 )
2024-03-20 08:36:44 -04:00
Zach Daniel
2c1381d5e6
fix: encode maps on update using fragments
2024-03-19 00:06:15 -04:00
Jinkyou Son
e27ce5e074
improvement: Add nulls_distinct option to CustomIndex ( #221 )
2024-03-12 20:22:34 -04:00
Zach Daniel
ea853e5171
improvement: properly format generated migrations
2024-03-11 22:09:05 -04:00
Zach Daniel
2a326ea6bd
chore: fix dialyzer/mix.lock
2024-03-11 11:34:40 -04:00
Zach Daniel
abcdc05202
improvement: don't select fields in exists subquery
2024-03-11 11:20:50 -04:00
Zach Daniel
3c2b8912d0
fix: don't reuse binding in many to many aggregate joins
2024-03-07 11:33:39 -05:00
Robert Graff
842f16a2fa
fix: typo in extension generator creates invalid drop
2024-03-06 20:54:08 -08:00
Jechol Lee
603d9c8cc6
fix: merge base_filter and custom index's where correctly ( #219 )
2024-03-06 19:33:10 -05:00
Zach Daniel
c2aacc65db
chore: only cast embedded maps statically
2024-03-06 08:30:41 -05:00
Zach Daniel
40481a17a0
fix: prevent ecto/pg from getting confused about the type of maps
2024-03-06 08:23:56 -05:00
Zach Daniel
70af9ee5bd
fix: always exclude :order_by
on bulk updateable query
2024-03-05 09:19:55 -05:00
Zach Daniel
fce0fefe72
fix: don't apply join relationship sort for lateral join
...
fixes #218
2024-03-04 00:10:57 -05:00
Zach Daniel
ec122c61d6
improvement: don't double cast to the same type
...
improvement: detect more types
2024-03-01 13:06:14 -05:00
Zach Daniel
cea4b70a51
improvement: no need for subquery for simple table aliases
2024-02-29 20:20:33 -05:00
Zach Daniel
43deb00e36
fix: properly handle multiple sorts in aggregate
2024-02-29 13:42:42 -05:00
Zach Daniel
2c8c993cf9
chore: optimization/cleanups
2024-02-29 13:01:53 -05:00
Zach Daniel
4db1b80eb1
fix: ensure that from_many?
joins are properly limited
...
fix: ensure that lateral joins are properly filtered
2024-02-29 09:22:37 -05:00
Zach Daniel
b0cd8381c4
chore: remove unnecessary function head
2024-02-29 00:21:28 -05:00
Zach Daniel
cfebfa278a
chore: fix dialyzer issue
2024-02-29 00:07:56 -05:00
Zach Daniel
d8baa64527
improvement: optimize more cases for simple join aggregates
...
fixes #215
2024-02-29 00:03:29 -05:00
Zach Daniel
bc9718d063
chore: fix dialyzer
2024-02-28 23:42:48 -05:00
Zach Daniel
f716e3bb69
fix: simplify(and fix) exists subquery generation
2024-02-28 22:55:53 -05:00
Zach Daniel
23dd650100
test: test improvements, regression test
2024-02-28 21:24:31 -05:00
Zach Daniel
2b3b6b0bc9
fix: properly leverage subqueries throughout relationship joining
2024-02-28 21:22:54 -05:00
Zach Daniel
61045700a2
chore: clarify join semantics
2024-02-28 21:22:54 -05:00
Robert Graff
b44d8cdc55
Fix: migration generator extensions in multiple repos ( #214 )
...
* Fix: Migration generator for extensions in multiple repos
* Do not rename legacy file on dry_run
2024-02-27 20:23:18 -05:00
Zach Daniel
735d7a202f
chore: fix syntax error from unsaved file
2024-02-26 15:56:46 -05:00
Zach Daniel
480eadccf1
fix: fix error when encoding vectors
2024-02-26 15:46:29 -05:00
Zach Daniel
6455bef6ed
fix: ensure select is applied (or not) properly in bulk update/destroys
2024-02-25 21:35:33 -05:00
Zach Daniel
b6b2dd1dc6
fix: handle more subquery filter cases for aggregates
2024-02-24 20:20:52 -05:00
Zach Daniel
98f24b1923
Revert "fix: remove buggy global filter extraction"
...
This reverts commit 7c3b60b942
.
2024-02-24 17:35:43 -05:00
Zach Daniel
7c3b60b942
fix: remove buggy global filter extraction
2024-02-24 17:20:03 -05:00
Zach Daniel
8fa10ac6ec
fix: only apply filters inside aggregate subquery
2024-02-24 17:10:01 -05:00
Zach Daniel
37cb3825f1
fix: properly handle complex types in lists
2024-02-23 20:53:19 -05:00
Zach Daniel
5052463767
fix: properly apply lateral join conditions to left lateral joins
2024-02-22 07:31:06 -05:00
Zach Daniel
c185ba80e8
fix: ensure select is properly set on delete_all
2024-02-21 16:37:28 -05:00
Zach Daniel
d0041ce88d
improvement: optimize aggregate query filtering
2024-02-21 14:03:28 -05:00
Zach Daniel
2b91ebe488
fix: ensure proper return value for single aggregate runs
2024-02-21 09:56:33 -05:00
Zach Daniel
6e81afb24b
fix: don't sort a query that will be used with delete_all
...
fix: ensure that `exists?` aggregates use `repo.exists?`
2024-02-21 07:54:58 -05:00
Zach Daniel
b5b1077032
chore: fix recursion error in to_many_path?
2024-02-20 22:13:23 -05:00
Zach Daniel
38d1beb0d8
fix: properly handle to_many joins in aggregates
...
fix: honor aggregate query filters
2024-02-20 18:38:35 -05:00
Dmitry Maganov
46928521c0
fix: use proper tables in joins originating from polymorphic resource ( #211 )
2024-02-20 11:15:56 -05:00
Dmitry Maganov
d2500b25f3
fix: properly transfer table names to non-inner wrapper queries ( #210 )
2024-02-20 11:15:06 -05:00
Zach Daniel
40522aadd8
chore: properly set __ash_bindings__ on bulk updatable query
2024-02-19 13:49:11 -05:00
Zach Daniel
f9a59cc5f6
chore: update style for credo
2024-02-19 13:35:36 -05:00
Zach Daniel
557bc6019c
fix: handle non-inner joins in delete_all
...
fix: handle non-inner joins in update
2024-02-19 13:29:41 -05:00