Commit graph

67 commits

Author SHA1 Message Date
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
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
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
Jechol Lee
603d9c8cc6
fix: merge base_filter and custom index's where correctly (#219) 2024-03-06 19:33:10 -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
Dmitry Maganov
8f3100a381
fix: keep fields of custom_index in format that they were provided (#195) 2024-01-22 11:32:34 -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
Riccardo Binetti
021b7e4233
improvement: allow specifying multi-column foreign keys (#180)
* improvement: add match_with option on references
* improvement: add match_type option on references
2023-11-20 16:52:50 -05:00
Alessio Montagnani
0adec1d163
* improvement: in multitenant resources migration's generation, check if the relationship points at the primary key of the target then not adding the multitenancy attribute (#144 and #157) 2023-09-25 15:33:28 -04:00
Zach Daniel
b4879beb86 improvement: support deferrable option in migration generator 2023-07-14 16:24:57 -04:00
Dmitry Maganov
29815eb6ec
fix: interpolate table names with inspect in generated migrations (#152) 2023-06-07 10:37:10 -04:00
Zach Daniel
805de0f2f1 improvement: support locking 2023-04-27 21:49:13 -04:00
Zach Daniel
525dcc9f91 improvement: use digraph for operation ordering
fix: handle primary key changes properly

Doing this involves dropping all foreign keys using it, and dropping the existing
primary key before creating the new one.
2023-04-11 17:41:53 -04:00
Zach Daniel
9d6996be25 fix: make migration generator work better for umbrellas 2022-12-13 13:31:57 -05:00
Zach Daniel
059837651d improvement: add unique constraints to changeset for custom unique indexes
improvement: separate out concurrent index creations and do them in a separate transaction
2022-11-25 14:06:22 -05:00
Zach Daniel
db3166ff88 Revert "improvement: use uuid_generate_v4() to eliminate need for uuid-ossp just for uuid defaults"
This reverts commit e0d7f0d0c0.
2022-11-21 02:42:26 -05:00
Zach Daniel
e0d7f0d0c0 improvement: use uuid_generate_v4() to eliminate need for uuid-ossp just for uuid defaults
Thanks to @sevenseacat for pointing this out!
2022-11-21 02:14:47 -05:00
Zach Daniel
79879e0bd6 fix: keep unique index keys in order in migrations
closes #109
2022-09-10 01:41:25 -04:00
Zach Daniel
4a69edce2d important: update to ash 2.0 branch 2022-08-24 12:07:38 -04:00
Zach Daniel
0fe770b9ea fix: include prefix in the proper place when renaming attributes
closes: #104
2022-08-09 16:37:20 -04:00
Zach Daniel
e20e68e73a improvement: add custom_statements to migration generator 2022-07-21 13:34:38 -04:00
Rebecca Le
c54c67af9d
fix: rename attributes correctly in down migration (#98) 2022-05-31 12:14:05 -04:00
Zach Daniel
6c5ee9aae5 improvement: add static schema specification in DSL
improvement: support static schema specification in migration generator
2022-05-13 17:41:30 -04:00
Zach Daniel
97bd185c17 feat: support cast_in_query?/0 and source 2022-02-14 11:39:50 -05:00
Zach Daniel
2258e6f749 all green on dynamic refactor 2022-02-07 15:35:18 -05:00
Zach Daniel
af97c549c5 improvement: add custom migration types, and repo level override 2021-11-10 04:18:36 -05:00
Michael St Clair
4307415cca
handle when no opts are passed to custom index (#72) 2021-09-25 20:02:00 -04:00
Zach Daniel
be1fbd6137 improvement: support custom_indexes 2021-09-20 16:38:36 -04:00
Zach Daniel
981f6c8ccd improvement!: update to latest ash/ecto versions w/ parameterized types 2021-09-13 12:58:23 -04:00
Zach Daniel
548f0f4eba improvement: use match: :full on attr multitenancy 2021-07-26 18:02:30 -04:00
Zach Daniel
5e5b5f3fc0 fix: interaction w/ attribute and context tenancy 2021-07-24 11:28:58 -04:00
Zach Daniel
1b23bb3ccc fix: always add nullability flag 2021-06-15 16:04:17 -04:00
Zach Daniel
3e50a0d119 fix: generate multitenant foreign keys properly 2021-06-06 03:31:22 -04:00
Zach Daniel
84fe7a4822 fix: set prefix to "public" for fkeys to public schema
improvement: set explicit prefix on join filters
2021-05-22 23:56:52 -04:00
Zach Daniel
b7efe6e078 improvement: custom index names
fix: simpler index names
2021-04-27 17:16:56 -04:00
Zach Daniel
41e95af715 fix: don't prefix unique indices with prefix() 2021-04-27 16:15:55 -04:00
Zach Daniel
e9222bebfa fix: include type in references (because it is *not* automatic) 2021-04-19 17:28:00 -04:00
Zach Daniel
1f6621b852 feat: add check_constraints, both for validation and migrations 2021-04-19 14:26:41 -04:00
Zach Daniel
250f8b195c fix: always drop constraints before modifying
fix: properly compare old references and new references
2021-04-13 12:19:50 -04:00
Zach Daniel
4417eaa6a1 improvement: default integers to :bigint
fix: don't explicitly set type in `references`
2021-04-12 14:13:23 -04:00
WolfDan
ac0b18c72b
improvement: primary autoincrement key as bigserial (#54) 2021-04-12 12:30:30 -04:00
Zach Daniel
2d0245e368 chore: open up some migration APIs for experimentation purposes 2021-04-04 16:09:26 -04:00
Zach Daniel
4d2d29d976 feat: support configuring references
feat: support configuring polymorphic references
feat: support `distinct` Ash queries
2021-04-01 02:19:30 -04:00
Zach Daniel
830a4ca6ee improvement: consistent foreign key names
fix: force create extensions snapshot
improvement: support custom foreign key error messages
2021-03-19 18:42:10 -04:00