Commit graph

799 commits

Author SHA1 Message Date
Zach Daniel
252acd423a chore: don't use deprecated function 2024-07-14 22:11:06 -04:00
Zach Daniel
da925604a8 improvement: use latest type casting code from ash 2024-07-14 11:44:33 -04:00
Zach Daniel
cef4c8fce0 improvement: support new type determination code 2024-07-14 09:25:49 -04:00
Zach Daniel
00a9db3cc0 improvement: detect more cases when detecting types in expressions 2024-07-13 15:11:38 -04:00
Zach Daniel
ef58c78313 test: add more tests for atomic update interactions
chore: get build passing
2024-07-12 23:23:42 -04:00
Zach Daniel
7dcf19e895 fix: update ash_sql to fix select_merge behavior 2024-07-11 08:58:13 -04:00
Zach Daniel
63324c19e9 fix: properly interpolate module names in installer 2024-07-10 08:47:06 -04:00
Zach Daniel
a085303da8 chore: fix build 2024-07-09 20:52:25 -04:00
Zach Daniel
ca27613f9f chore: remove unused function 2024-07-09 20:42:04 -04:00
Zach Daniel
5b9d0ea18a
improvement: add DataCase creation for igniter installer (#346)
* improvement: add DataCase creation for igniter installer

* chore: remove kind favoring path

---------

Co-authored-by: Igor Barakaiev <ibarakaiev@gmail.com>
2024-07-09 20:40:05 -04:00
Zach Daniel
cdbb5e294f chore: ensure proper return value for installer 2024-07-09 20:28:30 -04:00
Alessio Montagnani
72b029be21
improvement: add support for :uuid_v7 type (#333) 2024-07-09 19:57:38 -04:00
Zach Daniel
7dae2408d4 chore: choose a shorter name for mix task 2024-07-09 17:43:06 -04:00
Zach Daniel
24576c168c fix: ensure that we return {:ok, zipper} from find_and_update_or_create_module
closes #345
2024-07-09 07:54:50 -04:00
Zach Daniel
d293d0f302 improvement: use Ash.Igniter.codegen 2024-07-08 15:56:58 -04:00
Barnabas Jovanovics
3385bd21f1
improvement: add storage type option (#342)
---------

Co-authored-by: Zach Daniel <zach@zachdaniel.dev>
2024-07-08 09:54:50 -04:00
Zach Daniel
f0d07a3a4d fix: ensure that from_many? relationships in lateral join are limited 2024-07-06 06:38:31 -04:00
Riccardo Binetti
3741bbc0b3
chore: fix 1.17 warning (#343) 2024-07-05 12:29:23 -04:00
Rebecca Le
afe4a657e9
docs: Add note that nulls_distinct requires PostgreSQL 15 (#341)
Unfortunately it's not an option on indexes in PostgreSQL 14 :( 

https://www.postgresql.org/docs/14/sql-createindex.html
2024-07-04 07:45:42 -04:00
Igor Barakaiev
ffbfc1c23a
fix: default_repo_contents in ash_postgres.install (#340) 2024-07-03 12:12:37 -04:00
Zach Daniel
e42be38183 chore: update to latest igniter goodies 2024-07-02 18:07:50 -04:00
Dmitry Maganov
ead7db2af7
improvement: order keys in snapshot json (#339) 2024-06-29 09:20:41 -04:00
Igor Barakaiev
58311f7152
fix: check for existing installed_extensions/0 in ash_postgres.install (#338) 2024-06-27 17:05:53 -04:00
Zach Daniel
844d9b0717 chore: fix 1.17 warning 2024-06-27 13:49:03 -04:00
Igor Barakaiev
75a87e854a
fix: typo in configure_runtime/3 (#336) 2024-06-26 11:40:17 -04:00
Igor Barakaiev
278b2a31a5
fix: configure_runtime/3 in ash_postgres.install (#335) 2024-06-26 08:00:35 -04:00
Zach Daniel
c31c8685b9 docs: remove unused code from docs 2024-06-25 08:25:17 -04:00
Zach Daniel
e520ddfc35 chore: get build passing
fix: properly delete args passed from migrate to ecto
2024-06-24 10:20:16 -04:00
Zach Daniel
6b1f6bae2a improvement: add mix ash_postgres.install (mix igniter.install ash_postgres) 2024-06-21 19:49:47 -04:00
Zach Daniel
bd8657e593 fix: only add references indexes if they've changed 2024-06-20 17:32:04 -04:00
Zach Daniel
b53ef4f281 chore: update docs description 2024-06-20 12:02:47 -04:00
Zach Daniel
95a3ff3c00 fix: store fallback_basis for type detection 2024-06-19 19:49:33 -04:00
Zach Daniel
10f106490c fix: rework expression type detection 2024-06-19 19:30:36 -04:00
Emad Shaaban
8bf1e2ede9
fix: ensure index keys are atoms in generated migrations (#332)
---------

Co-authored-by: Zach Daniel <zach@zachdaniel.dev>
2024-06-19 14:22:21 -04:00
Zach Daniel
526020e26c improvement: better type handling using new type inference 2024-06-18 16:37:32 -04:00
Zach Daniel
cacf71cd55 fix: ensure that parens are always added to calculation generated SQL 2024-06-17 15:34:05 -04:00
Zach Daniel
2287b45a59 chore: don't wrap the sql in parens 2024-06-17 15:26:04 -04:00
Zach Daniel
54c88a882c fix: properly get calculation sql 2024-06-17 15:07:05 -04:00
Zach Daniel
97e538bf63 improvement: identities w/ calculations and where clauses in upserts 2024-06-17 11:39:26 -04:00
Jechol Lee
a3a2905c68
Fix Elixir 1.17 warnings (#326) 2024-06-13 19:54:22 -04:00
Zach Daniel
c753a37cfe fix: fix invalid select on sorting by some calculations 2024-06-13 09:41:13 -04:00
Zach Daniel
85620a0f89 improvement: don't sort identity keys.
There are important implications here, specifically that there are
optimizations that can be had based on what the first column in a
unique constraint is, and we want to make sure that can be taken advantage of.

closes #313
2024-06-10 15:59:05 -04:00
Zach Daniel
49db2be6b2 fix: fix error message displaying in identity verifier
closes #320
2024-06-10 15:57:04 -04:00
Zach Daniel
8e32e0ab9a fix: ensure that context multitenancy is properly applied to lateral many-to-many joins 2024-06-10 12:49:04 -04:00
Zach Daniel
2c31b3e167 fix: don't assume old snapshots have index? key for attributes 2024-06-10 11:10:19 -04:00
Zach Daniel
f0779580b3 fix: list_tenants -> all_tenants
fix: when checking for roll back-able migrations, only check `Path.basename`
2024-06-10 09:09:10 -04:00
Robert Timis
6c81699b0d
feat: autogenerate index in references (#321)
* feat: autogenerate index in references

* check if old had index
2024-06-10 08:43:24 -04:00
Zach Daniel
4b5d980c69 chore: undo accidental git stash for previous commit 2024-06-06 14:34:01 -04:00
Zach Daniel
df250964e0 fix: ensure that all current attribute values are selected on bulk update shifted root query
closes #314
2024-06-02 12:35:57 -04:00
Zach Daniel
cf9f6ec60a test: add test reproducing related aggregate reference 2024-06-02 12:35:57 -04:00
Zach Daniel
ff47ff0e06 fix: properly support aggregate references in atomic updates
(yes, you read that right)
2024-05-29 12:30:16 -04:00
Zach Daniel
9f1936aef4 fix: ensure that identities are dropped when where/nils_distinct? are changed
fix: ensure that `where` is wrapped in parenthesis
2024-05-28 13:52:53 -04:00
Zach Daniel
f8916c14ca improvement: require clarification of index names > 63 characters
closes #304
2024-05-28 13:32:20 -04:00
Zach Daniel
284928e5c1 chore: always reselect primary key on updates 2024-05-28 00:08:34 -04:00
Zach Daniel
4fbd821ee3 fix: support old/new parameterized type format
closes #308
2024-05-27 12:15:56 -04:00
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