Commit graph

210 commits

Author SHA1 Message Date
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
a085303da8 chore: fix build 2024-07-09 20:52:25 -04:00
Alessio Montagnani
72b029be21
improvement: add support for :uuid_v7 type (#333) 2024-07-09 19:57:38 -04:00
Dmitry Maganov
ead7db2af7
improvement: order keys in snapshot json (#339) 2024-06-29 09:20:41 -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
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
cacf71cd55 fix: ensure that parens are always added to calculation generated SQL 2024-06-17 15:34:05 -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
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
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
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
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
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
2421e6fc2c fix: properly parse previous version from migration generation 2024-05-12 12:51: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
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
f03647825c fix: ensure timestamps are present in extension migrations 2024-03-27 21:30:42 -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
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
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
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
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
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
2d18c9cbeb fix: properly alter renaming attributes in migration generator
fixes #207
2024-02-15 09:23:48 -05:00
Zach Daniel
8f10c9b824 chore: update credo 2024-02-14 12:12:54 -05:00
Zach Daniel
1ea360d15c improvement: detect bigserial when altering attributes
closes #204
2024-02-07 14:39:38 -05:00
Zach Daniel
809cd5582f improvement: don't drop primary key in case of removal 2024-02-04 10:12:39 -05:00
Eduardo B. A
a8b7f3b3e7
feat: Make MigrationGenerator accept atoms (#201)
Co-authored-by: Eduardo B. Alexandre <sezdocs@github.com>
2024-02-02 12:25:02 -05:00
Zach Daniel
5952889ac7 chore: remove IO.inspect 2024-01-29 10:25:27 -05:00
Zach Daniel
2b813c8975 chore: consider ignore_fields when comparing custom indexes 2024-01-27 10:56:11 -05:00
Dmitry Maganov
8f3100a381
fix: keep fields of custom_index in format that they were provided (#195) 2024-01-22 11:32:34 -05:00
Zach Daniel
97847da734 fix: include explicit schema in snapshot folder name
closes #193
2024-01-16 23:44:49 -05:00
Jechol Lee
62a640ecb7
fix: Support all_tenants? in custom index (#194) 2024-01-15 05:40:05 -05:00
Zach Daniel
b93b1d722b improvement: support all_tenants? option for identities
improvement: support `all_tenants?` option for custom indexes
2024-01-12 10:11:16 -05:00
Zach Daniel
c0c9621534 improvement: support new bulk operations
fix: support encoding errors with expressions in them
2023-12-31 08:40:30 -05:00
Zach Daniel
ac980a2163 chore: fix error expression 2023-12-15 08:48:20 -05:00
Zach Daniel
407a7163ed improvement: support for error/2 expression 2023-12-14 17:10:11 -05:00