Commit graph

756 commits

Author SHA1 Message Date
Zach Daniel
09b19c8bfd improvement: add like and ilike 2022-12-21 16:12:49 -05:00
Zach Daniel
5a9abdc69c fix: properly skip unique indexes when configured 2022-12-21 02:16:30 -05:00
Zach Daniel
a5b1bc8a3f fix: properly add aggregates to query when referenced from calculations
fixes: #127
2022-12-18 02:23:39 -05:00
Zach Daniel
bfefef7fd5 improvement: distinct on source of query, not relationship destination 2022-12-15 17:16:53 -05:00
Zach Daniel
5987515b8d fix: properly combine sort + to many join filter 2022-12-14 22:37:10 -05:00
Zach Daniel
46f3676e9a improvement: udpate to latest ash, fix array issues 2022-12-14 21:47:50 -05:00
Zach Daniel
10fe4541d5 fix: pattern match error in lazy_non_matching_defaults/1 2022-12-13 17:17:57 -05:00
Zach Daniel
87bada531f fix: use attribute name not attribute for default funs 2022-12-13 17:14:12 -05:00
Zach Daniel
891974caf3 fix: *actually* fix default_fun upserts 2022-12-13 17:12:06 -05:00
Zach Daniel
cdca33a5ff fix: fix upserting update_defaults 2022-12-13 17:06:39 -05:00
Zach Daniel
98418599f9 chore: release version v1.2.0 2022-12-13 14:55:26 -05:00
Zach Daniel
9d6996be25 fix: make migration generator work better for umbrellas 2022-12-13 13:31:57 -05:00
Zach Daniel
70645af88f fix: don't make migration generation recursive 2022-12-10 18:54:09 -05:00
Zach Daniel
48cfadc1fc fix: nevermind, can't make migrate recursive 2022-12-10 16:20:41 -05:00
Zach Daniel
eebd40459a improvement: make migrate task recursive as well 2022-12-10 16:17:10 -05:00
Zach Daniel
9a7626ab46 improvement: mark generate_migrations as recursive for umbrellas 2022-12-10 16:13:25 -05:00
Zach Daniel
68c6d7aaf8 improvement: better error messages from mix tasks
fix: various broken behavior from new aggregate work
improvement: validate that references refer to relationships

closes #99
2022-12-10 15:59:50 -05:00
Zach Daniel
d832e9a4ef fix: forgot a 2022-12-07 21:44:19 -05:00
Zach Daniel
e271a27d3c improvement: avg/min/max/custom aggregate support
fix: fix various problems with the model behind aggregates
2022-12-07 20:32:38 -05:00
Zach Daniel
ee8e77dca4 fix: properly set binding names for many to many join filters 2022-12-04 15:01:24 -05:00
Zach Daniel
3e3740c6f9 improvement: fix lateral many to many joins 2022-12-04 13:16:45 -05:00
Zach Daniel
52fcba79ac improvement: inform users about postgres incompatibility with multidimensional arrays 2022-12-01 20:24:49 -05:00
Zach Daniel
2b986863ff docs: document on_transaction_begin 2022-11-30 20:52:36 -05:00
Zach Daniel
c035eed21a fix: properly turn custom index keys into atoms
improvement: support new transaction info with hooks
2022-11-30 19:06:51 -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
061a1993e3 chore: format/lint 2022-11-21 03:08:04 -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
8f064db2f0 chore: work on tests for migration_defaults 2022-11-21 02:39:57 -05:00
Zach Daniel
26668df73d improvement: add migration_defaults for customizing default values 2022-11-21 02:38:00 -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
9b97556335 wip 2022-11-21 02:14:47 -05:00
Zach Daniel
45356d6cce WIP 2022-11-21 02:14:47 -05:00
Zach Daniel
63d007131f
fix: don't use hard-coded join assoc name (#118) 2022-11-13 11:38:00 -05:00
Kyle Grinstead
a88687c1d5
fix: && operator in expressions to point to ash_elixir_and (#115) 2022-10-24 22:13:12 -06:00
Zach Daniel
e3db7d2fa9 improvement: add check for unsupported expression 2022-10-20 01:20:09 -04:00
Zach Daniel
13413d3cc7 feat: support now() in latest Ash 2022-10-20 01:08:35 -04:00
Zach Daniel
5222e1e755 improvement: handle UUID types better 2022-10-17 08:40:32 -05:00
Zach Daniel
fb8a13f33d improvement: set lateral join source for latest ash
improvement: use `prepend?: true` option when applying relationship sorts
2022-10-15 00:03:16 -05:00
Zach Daniel
a8b44fef0f fix: no unnecessary type cast on count/sum aggregates 2022-10-10 12:12:17 -04:00
Zach Daniel
7fd1e73baa fix: don't apply filter to array_agg 2022-10-10 12:06:54 -04:00
Zach Daniel
b7b5758134 improvement: update to the latest ash
improvement: remove the need to dynamically expand fragments
2022-10-07 15:50:20 -04:00
Zach Daniel
435d5216b8 fix: handle custom calculation selects properly
improvement: when casting string to uuid, dump to binary
2022-10-05 15:06:09 -04:00
Zach Daniel
94edf64322 fix: use attribute source for identity fields 2022-10-04 16:13:52 -04:00
Zach Daniel
3b1b90d7ab chore: add mix tasks to doc index 2022-09-28 23:27:46 -04:00
Zach Daniel
12cf97d89e fix: never attempt to group custom operations 2022-09-28 22:21:37 -04:00
Zach Daniel
fd5ac60072 improvement: exists filters necessitate multiple aggregate joins (for now) 2022-09-28 18:01:20 -04:00
Zach Daniel
49732b42e2 fix: wrap case statement in parens 2022-09-28 16:47:07 -04:00
Zach Daniel
6ad57501ff improvement: upgrade to new exists usage 2022-09-25 14:41:29 -04:00
Zach Daniel
e8643d4aa0 fix: properly type cast top level fragments
chore: update tests not to use deprecated helper
2022-09-21 13:36:18 -04:00
Zach Daniel
31d0ec20ac improvement: support latest ash 2022-09-20 23:00:29 -04:00
Darren Black
b0292d66f8
improvement: implement Length function (#111) 2022-09-15 16:51:49 -04:00
Zach Daniel
7fc6c91cac improvement: support manual relationships with joins 2022-09-13 16:40:12 -04: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
170b9fc9e7 improvement: support latest ash exists/2 expr 2022-09-06 18:33:17 -04:00
Zach Daniel
30dd7ca2de fix: make fragment private 2022-08-30 16:50:48 -06:00
Zach Daniel
85bef20c50 chore: fix typo 2022-08-24 12:07:38 -04:00
Zach Daniel
385214694d docs: total docs reorg 2022-08-24 12:07:38 -04:00
Zach Daniel
7d7d95db13 chore: update docs & spark 2022-08-24 12:07:38 -04:00
Zach Daniel
552dbf9c0d fix: do float division when appropriate 2022-08-24 12:07:38 -04:00
Zach Daniel
3c8ce4c5ba fix: properly rewrite keys 2022-08-24 12:07:38 -04:00
Zach Daniel
a563786218 chore: rewrite keys properly 2022-08-24 12:07:38 -04:00
Zach Daniel
4a69edce2d important: update to ash 2.0 branch 2022-08-24 12:07:38 -04:00
Zach Daniel
0772c6ea2d fix: always install intended extensions in migration generator 2022-08-24 12:07:00 -04:00
James Harton
b561c4f8d4
fix: Squash dashes in migration names. (#105) 2022-08-15 12:29:01 -04:00
Zach Daniel
1cf6e0dcb1 fix: check for join bindings before aggregate bindings 2022-08-14 11:56:36 -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
eb2bd267cb improvement: fix typecasting for calculations & embed access
chore: rebuild test migrations
2022-08-05 15:27:22 -04:00
Zach Daniel
778641fb28 fix: properly order check constraints 2022-07-22 00:50:19 -04:00
Zach Daniel
968fb45b4e fix: remove check constraints before adding them 2022-07-22 00:45:49 -04:00
Zach Daniel
e20e68e73a improvement: add custom_statements to migration generator 2022-07-21 13:34:38 -04:00
Zach Daniel
16c0497916 chore: update docs 2022-07-20 14:25:47 -04:00
Zach Daniel
98c521eff3 chore: update docs 2022-07-20 14:20:05 -04:00
Zach Daniel
0f9a433c95 improvement: support || and && 2022-07-20 14:19:06 -04:00
Zach Daniel
559f60c339 improvement: add default guide, and empty ash postgres guide 2022-07-14 12:13:54 -04:00
Zach Daniel
c52917bca1 improvement: set update_defaults on upsert results 2022-07-06 14:44:18 -04:00
Zach Daniel
c352a1f1fa fix: support upsert_identity with base_filter 2022-07-01 19:12:14 -04:00
Zach Daniel
da07ed7b6c fix: handle various join bugs 2022-06-29 15:08:49 -04:00
Zach Daniel
71ddb28332 fix: use attribute.name if attribute.source is nil 2022-06-28 15:57:30 -04:00
Zach Daniel
d023949667 fix: set attribute source properly 2022-06-28 15:10:26 -04:00
Zach Daniel
abf5fdf346 fix: ensure source is always set on attributes in snapshots 2022-06-21 22:33:24 -04:00
Zach Daniel
5d435d92b6 fix: handle paths for aggregates w/ > 2 relationships 2022-06-16 00:00:45 -04:00
Rebecca Le
d30dce6e91
docs: Fix docs for name option to generate_migrations (#100) 2022-06-15 10:29:49 -04:00
Zach Daniel
10c7e75f4a chore: small cleanups 2022-06-04 16:58:03 -04:00
Rebecca Le
c54c67af9d
fix: rename attributes correctly in down migration (#98) 2022-05-31 12:14:05 -04:00
Josh Price
ff3039ee32
improvement: handle fallback ecto migration default elegantly (#94) 2022-05-24 12:11:32 -04:00
Zach Daniel
fbb7477f13 chore: fix build, remove IO.inspect 2022-05-24 02:14:58 -04:00
Zach Daniel
10038dd8dd improvement: add ignore? option to references 2022-05-24 02:11:54 -04:00
Zach Daniel
eb61c2562a fix: don't generate modify commands for attributes due to schema changes 2022-05-24 00:38:13 -04:00
Zach Daniel
7798721858 fix: default schema to primary schema 2022-05-24 00:03:16 -04:00
Zach Daniel
d04fd201f2 fix: test and confirm behavior of schemas 2022-05-22 18:30:20 -04:00
Zach Daniel
be15257531 fix: use correct bindings for filtered relationships 2022-05-22 02:12:07 -04:00
Zach Daniel
d2e5c71a6b fix: cast calcs in query expressions 2022-05-20 13:42:20 -04:00
Zach Daniel
4ec454d4f1 fix: explicitly type cast aggregate/calc selects 2022-05-20 13:22:32 -04:00
Zach Daniel
5a61409e56 fix: don't try and match reference schema to table schema 2022-05-18 13:47:08 -04:00
Zach Daniel
2a5c7ac4a2 improvement: check_migrations, rename to --check
fix: don't use `table` where we should use `schema` in migration generator
2022-05-18 13:21:58 -04:00
Zach Daniel
ff05084b8f improvement: add explicit timeout capability declaration 2022-05-14 02:58:04 -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
4e85466724 fix: handle combinations of distinct & sort
closes #93
2022-05-10 22:48:04 -04:00
Zach Daniel
5f5eabce27 fix: only rename schema when necessary 2022-05-02 19:30:01 -04:00
Zach Daniel
a916e2c470 fix: inspect un-defaultable value in error message 2022-05-02 18:02:19 -04:00
Josh Price
09475e408e
improvement: implement decimal ecto migration default (#91) 2022-04-28 10:48:44 -04:00
Josh Price
157a5b33e3
improvement: support float as Ecto migration default (#89) 2022-04-27 17:10:51 -04:00
Zach Daniel
575d838d72 improvement: add atom impl for EctoMigrationDefault 2022-04-21 10:36:34 -04:00
Zach Daniel
0c757d5049 chore: update for latest ash changes 2022-04-19 11:08:44 -04:00
Josh Price
a9b2fc83df
improvement: Add EctoMigrationDefault protocol and implement defaults (#87) 2022-04-19 00:06:02 -04:00
Zach Daniel
973ec590f9 improvement: update ecto, fix dialyzer 2022-04-18 11:39:30 -04:00
Zach Daniel
662bf421c4 improvement: support new timeouts 2022-04-18 00:23:09 -04:00
Zach Daniel
b77ad2c808 improvement: make select unique before running query 2022-04-07 19:59:43 -04:00
Zach Daniel
48c6142040 chore: clean up docs for new docs site 2022-03-28 22:30:27 -04:00
Zach Daniel
b75532f64e chore: there is no use DocIndex 2022-03-26 14:58:14 -04:00
Zach Daniel
de2502c208 improvement: add doc_index 2022-03-26 14:28:12 -04:00
kernel-io
ed8d4f29f2
improvement: add exclusion_constraint_names (#83) 2022-03-20 20:35:30 -04:00
Zach Daniel
28cab457fe fix: select custom aggregates properly 2022-03-09 20:53:59 -05:00
Zach Daniel
f57a77f912 fix: don't add reference when renaming column if unnecessary
fix: don't cast `nil` to `""`
2022-02-18 22:30:12 -05:00
Zach Daniel
f801fd8598 fix: !is_atom/1 -> !is_boolean/1 2022-02-16 22:35:05 -05:00
Zach Daniel
b99da803bc fix: sanitize lists to stringify atoms 2022-02-16 22:30:19 -05:00
Zach Daniel
957c99414d fix: cast embedded atoms to strings first 2022-02-16 22:20:32 -05:00
Zach Daniel
375f00de85 fix: don't cast {:in, :any} types 2022-02-16 22:17:39 -05:00
Zach Daniel
fedd35fa32 fix: more don't cast any types 2022-02-16 22:14:17 -05:00
Zach Daniel
de8aa43ad6 fix: don't cast if there is no type 2022-02-16 22:04:54 -05:00
Zach Daniel
efaa7c6cc6 fix: properly handle relationship filter bindings
fix: don't consider fields changed with only source -> name changes
2022-02-14 17:44:17 -05:00
Zach Daniel
973a73e18c fix: handle name -> source change in more places 2022-02-14 16:30:25 -05:00
Zach Daniel
6c20f593b0 fix: handle name -> source rename in operation ordering 2022-02-14 15:38:16 -05:00
Zach Daniel
97bd185c17 feat: support cast_in_query?/0 and source 2022-02-14 11:39:50 -05:00
Zach Daniel
e6ff1d8b4b fix: fix aggregate/base filters 2022-02-11 16:06:51 -05:00
Zach Daniel
cd9701a6ea improvement: support referencing aggregates from aggregate filters
fix: don't select more fields than necessary
2022-02-09 11:49:19 -05:00
Zach Daniel
e2bd3c5aec improvement: support access syntax 2022-02-07 16:48:36 -05:00
Zach Daniel
079eb2e08d fix: don't call ecto_type twice when resolving types 2022-02-07 15:35:18 -05:00
Zach Daniel
00d937cfa8 fix: place expressions in the proper order in selects 2022-02-07 15:35:18 -05:00
Zach Daniel
928e31a3d3 fix: match on count in expr 2022-02-07 15:35:18 -05:00
Zach Daniel
4c0fc23074 fix: remove incorrect param count tracking 2022-02-07 15:35:18 -05:00
Zach Daniel
a8ab857611 fix: properly track param count 2022-02-07 15:35:18 -05:00
Zach Daniel
96c70fcaff fix: properly reverse parameters before/after expansion 2022-02-07 15:35:18 -05:00
Zach Daniel
e034e70b91 fix: don't use the base ecto type 2022-02-07 15:35:18 -05:00
Zach Daniel
2258e6f749 all green on dynamic refactor 2022-02-07 15:35:18 -05:00
Zach Daniel
fcee70b2f7 WIP 2022-02-07 15:35:18 -05:00
Zach Daniel
e19a44d7d9 WIP on dynamic refactor 2022-02-07 15:35:16 -05:00
Zach Daniel
1dcef728fe fix: don't sort when joining 2022-01-18 18:50:14 -05:00
kernel-io
4a1f1880ff
bugfix: ensure repo is compiled (#80) 2021-12-21 14:19:33 -05:00
Zach Daniel
d7874c5ecd fix: properly construct nested join relationships 2021-12-20 23:12:28 -05:00
Zach Daniel
912fab9a96 fix: use CiStringWrapper type in ash_postgres 2021-12-17 13:25:14 -05:00
kernel-io
2790a725cc
fix: ensure we are returning * on upserts (#79)
Co-authored-by: kernel-io <kernel>
2021-11-25 21:35:26 -05:00
kernel-io
df62c35801
improvement: don't upsert defaults on conflict (#77)
Co-authored-by: kernel-io <kernel>
2021-11-24 19:31:59 -05:00
Zach Daniel
98004f3251 fix: handle new if types
improvement: relax ash version requirement
2021-11-13 14:48:14 -05:00
Zach Daniel
af97c549c5 improvement: add custom migration types, and repo level override 2021-11-10 04:18:36 -05:00
kernel-io
5a0d145249
fix: copy query prefix to newly created query (#74) 2021-11-02 17:00:13 -04:00
Zach Daniel
4c4af7ebfa fix: use proper ecto types everywhere 2021-11-01 04:41:41 -04:00
Zach Daniel
ff261d75bb fix: try to fix missing paren issue in array_agg 2021-10-26 17:01:57 -04:00
Zach Daniel
2fdcea7ef8 improvement: support default on aggregates
chore: update to latest ash patterns for testing
2021-10-25 18:53:34 -04:00
kernel-io
e4de6f59f6
bugfix: fix can? for :joins (#73) 2021-10-07 04:16:33 -04: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
3f0aa74db2 fix: remove unused default value 2021-09-21 15:28:45 -04:00
Zach Daniel
b9dfc20bf6 fix: use proper identity names for polymorphic resources 2021-09-21 15:10:25 -04:00
Zach Daniel
b2350a5d6b fix: set identity names propertly for polymorphic resources 2021-09-21 13:41:58 -04:00
Zach Daniel
b9afd37eb7 fix: handle nil values in snapshots better 2021-09-20 20:48:19 -04:00
Zach Daniel
9204ec0121 fix: remove unused field from snapshot parsing 2021-09-20 20:40:13 -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
zimt28
e6a68f10d0
improvement: Support default tenant migration path in releases (#69) 2021-07-30 12:22:39 -04:00
Zach Daniel
54765f300a fix: set subquery prefix properly 2021-07-27 23:03:39 -04:00
Zach Daniel
dc054e09fb chore: undo unnecessary expr casting 2021-07-27 19:15:28 -04:00
Zach Daniel
e6ec25ec64 improvement: info on migration generator output 2021-07-27 18:35:14 -04:00
Zach Daniel
c6841c9e72 fix: set subquery source correctly
fix: create parameter for ci strings
2021-07-27 18:35:14 -04:00
Zach Daniel
548f0f4eba improvement: use match: :full on attr multitenancy 2021-07-26 18:02:30 -04:00
Zach Daniel
7d9d7611cb fix: explicitly set prefix at each level 2021-07-24 16:59:23 -04:00
Zach Daniel
5e5b5f3fc0 fix: interaction w/ attribute and context tenancy 2021-07-24 11:28:58 -04:00
Zach Daniel
85f27337d6 improvement: upgrade ash dep
chore: remove comment
test: add a sort test
2021-07-22 15:23:38 -04:00
Zach Daniel
17efc83eaa fix: don't add a non-list to a list 2021-07-19 17:12:01 -04:00
Zach Daniel
487c9f32d6 improvement: fix significant performance issue in lateral joins
fix: ensure source table is sorted in lateral join
2021-07-19 13:56:36 -04:00
Zach Daniel
aa334eb152 improvement: support default_prefix configuration 2021-07-12 02:43:39 -04:00
Zach Daniel
95be84f734 improvement: --name when generating migrations 2021-07-08 14:52:53 -04:00
Zach Daniel
ddbd43b611 fix: fix migrator mix tasks w/ only/except tenants
fix: drop foreign keys after table create properly
2021-07-08 13:35:16 -04:00
Zach Daniel
7f5a56d9bd improvement: add mix ash_postgres.rollback
fix: drop foreign keys before dropping table
2021-07-08 11:37:33 -04:00
Zach Daniel
be7e2a89bc fix: left_lateral_join for many_to_many aggregates
fix: properly reference nested aggregate fields for join
fix: properly determine fallback table for polymorphic resources
2021-07-05 14:12:21 -04:00
Zach Daniel
a67c8b4e11 fix: ensure non-tenant resources can be aggregates 2021-07-02 23:43:30 -04:00
Zach Daniel
f13f31330f fix: properly set aggregate query sources 2021-07-02 12:41:44 -04:00
Zach Daniel
2b2f5f1646 fix: retain parent as bindings 2021-07-02 11:08:31 -04:00
Zach Daniel
a82325e28d fix: don't add rel_source at all 2021-07-02 01:50:41 -04:00
Zach Daniel
ba0c66e395 fix: properly build atoms list 2021-07-02 01:08:53 -04:00
Zach Daniel
ad497f0182 fix: horribly hack ecto for dynamic bindings 2021-07-02 01:01:56 -04:00
Zach Daniel
46744c5d4a fix: properly coalesce aggregate values 2021-07-01 15:28:27 -04:00
Zach Daniel
576c317b68 improvement: leverage new private_vars for errs 2021-06-23 17:21:09 -04:00
Zach Daniel
1b23bb3ccc fix: always add nullability flag 2021-06-15 16:04:17 -04:00
Zach Daniel
da9d24c96f fix: sort references only after other same-table ops 2021-06-08 17:41:35 -04:00
Zach Daniel
3e50a0d119 fix: generate multitenant foreign keys properly 2021-06-06 03:31:22 -04:00
Zach Daniel
5583270426 improvement: support calculation sorts 2021-06-05 18:13:20 -04:00
Zach Daniel
dae39f5fda feat: support expression based calculations
feat: support concat + if expressions
improvement: various other improvements
2021-06-04 01:48:35 -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
c2fca09e2d improvement: support new ash upsert specifying targets 2021-05-18 23:04:37 -04:00
Zach Daniel
f0b901173c fix: properly group many_to_many aggregates 2021-05-12 13:17:26 -04:00
Zach Daniel
7911de61a5 improvement: support latest ash/filtering on related aggregates 2021-05-08 23:25:28 -04:00
Zach Daniel
e6e5ca8165 fix: properly construct sources for lateral joins 2021-05-07 12:09:09 -04:00
Zach Daniel
8f80c89db9 improvement: update to latest ash 2021-05-07 12:00:52 -04:00
Zach Daniel
ea26d3f432 fix: copy the correct data for lateral join queries 2021-05-07 11:04:09 -04:00
Zach Daniel
f82e2d44c8 fix: better errors in error cases 2021-05-07 03:09:49 -04:00
Zach Daniel
48c3830209 fix: don't cast booleans to string in last_ditch_cast 2021-05-07 01:49:04 -04:00
Zach Daniel
f28ee00d68 improvement: support latest ash version resource sorts 2021-05-07 01:12:13 -04:00
Zach Daniel
29956794ff improvement: update to latest ash
chore: add aggregate test
chore: small experimental interface change
2021-05-06 17:37:29 -04:00
Zach Daniel
7b37042817 test: more lateral join testing
fix: join to join table in lateral join query
2021-05-04 02:14:24 -04:00
Zach Daniel
ebde2b620e fix: multitenancy + lateral join sources
fix: don't distinct in lateral joins
2021-05-04 01:36:25 -04:00
Jeremy Ward
11665e0784
fix: fix fragment processing broken (#64) 2021-05-01 10:05:12 -04:00
Zach Daniel
7115bec586 feat: support new side load improvements 2021-04-29 17:31:34 -04:00
zimt28
fe7d188e26
improvement: Preserve attribute order (#63) 2021-04-28 17:23:24 -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
ae3f2c0b07 fix: sort index operations last 2021-04-27 16:08:16 -04:00
Zach Daniel
07244d66a8 fix: remove inspects that were left in by accident 2021-04-27 13:16:44 -04:00
Zach Daniel
79cba4553b fix: type cast atoms to strings in last ditch cast 2021-04-27 13:03:02 -04:00
Zach Daniel
0e235a6ded fix: properly type cast 2021-04-27 12:09:21 -04:00
zimt28
eba0878895
fix: Remove duplicate file extension (#60) 2021-04-27 10:52:47 -04:00
Zach Daniel
1cce277e7d improvement: support list aggregate 2021-04-26 16:45:47 -04:00
Zach Daniel
8bcc2a16eb fix: stringify struct defaults in migration generator 2021-04-26 13:21:57 -04:00
zimt28
04190e18e2
fix: properly comment out extension uninstallation code 2021-04-25 20:29:05 -04:00
Zach Daniel
301f05604c improvement: support ash enums 2021-04-21 13:50:11 -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
aa49b0f4ea chore: fix default foreign key name 2021-04-13 12:38:39 -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
737a6a5442 improvement: support new ash select feature 2021-04-09 00:53:50 -04:00
Zach Daniel
2d0245e368 chore: open up some migration APIs for experimentation purposes 2021-04-04 16:09:26 -04:00
Michael St Clair
cf92fe14a5
improvement: add sum aggregate (#53) 2021-04-04 16:05:41 -04:00
Zach Daniel
30223a1f9b fix: raise when all_tenants/0 default impl is called 2021-04-02 10:24:42 -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
e2eb2d4483 improvement: only count resources w/ create action for nullability 2021-03-29 09:27:18 -04:00
Simon Bergström
dc628c32ca
fix: Made AshPostgres.Repo.init/2 overridable (#51) 2021-03-22 13:07:01 -04:00
Zach Daniel
6414bed5d8 improvement: better error message on missing table 2021-03-21 17:58:47 -04:00
Zach Daniel
2280b1e439 fix: reroute Ash.Type.UUID to :uuid in migrations 2021-03-21 13:23: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
Zach Daniel
99d4095d26 fix: more conservative inner join checks 2021-03-04 22:54:40 -05:00
Zach Daniel
0b7817e420 fix: add back in inner join detection logic 2021-03-04 22:50:12 -05:00
Zach Daniel
6453cb8bf6 fix: don't start the whole app in migrate 2021-03-02 12:47:13 -05:00
Zach Daniel
4be11ffc70 feat: automatically install extensions from repo 2021-03-02 12:33:24 -05:00
Zach Daniel
ef9ddd9c54 fix: typo in references for multitenancy
fix: `null: true` when attr isn't on all resources for a table
2021-03-02 11:38:12 -05:00
Zach Daniel
eb703efe6f fix: better embedded filters, switch to latest ash 2021-02-24 13:59:49 -05:00
Zach Daniel
33a84e1799 improvement: support latest ash 2021-02-22 23:53:18 -05:00
Zach Daniel
0ce0cc9d09 fix: trim when choosing new attribute name 2021-02-08 15:29:52 -05:00
Zach Daniel
3fa60c68ea fix: don't reference polymorphic tables to belongs_to relationships 2021-02-06 16:03:06 -05:00
Zach Daniel
5cb77c757a chore: format + test 2021-02-06 15:52:47 -05:00
Zach Daniel
1386d06bf7 fix: set up references properly 2021-02-06 15:44:00 -05:00
Zach Daniel
b800b2c984 chore: format 2021-02-06 15:21:52 -05:00
Zach Daniel
cb6943b233 fix: reference the configured table if set 2021-02-06 15:05:37 -05:00
Zach Daniel
70568c43c0 feat: support polymorphic relationships 2021-02-05 18:59:33 -05:00
Zach Daniel
c5f69eaa69 chore: WIP on polymorphic associations 2021-01-31 16:39:59 -05:00
Zach Daniel
9d5583cce7 chore: WIP on polymorphic relationships 2021-01-28 19:42:55 -05:00
Zach Daniel
4c29969509 fix: actually insert the tracking row 2021-01-26 19:37:32 -05:00
Zach Daniel
fbc42ce87a fix: rework the way multitenant migrations work
feat: add `mix ash_postgres.create`

feat: add `mix ash_postgres.migrate`

feat: add `mix ash_postgres.migrate --tenants`

feat: add `mix ash_postgres.drop`
2021-01-26 19:16:29 -05:00
Zach Daniel
7f8aa98f24 improvement: better errors for multitenant unique constraints
fix: un-break the `in` filter type casting code

test: add tests for untested features
2021-01-26 15:07:26 -05:00
Zach Daniel
d8b3db7bf1 fix: ago was adding, not subtracting 2021-01-24 13:24:43 -05:00
Zach Daniel
5b3fd3f144 feat: support latest ash + contains 2021-01-23 22:45:15 -05:00
Zach Daniel
a2a88c661c docs: update --apis docs 2021-01-22 16:47:24 -05:00
Zach Daniel
80e63f9067 feat: support fragments
feat: support type casting

feat: update to latest ash to support expressions
2021-01-22 16:47:24 -05:00
Frank Dugan III
f7c826bc01
chore: fix typos (#46) 2021-01-22 15:49:34 -05:00
zimt28
f29ed6a014
Fix incorrect joins (#45) 2021-01-15 21:17:39 -05:00
zimt28
38bf555867
feat: Add check_migrated option to migration generator (#40) (#43) 2021-01-12 20:47:17 -05:00
Zach Daniel
d3ae6f634b fix: rename out of phase, small migration fix 2021-01-12 14:21:44 -05:00
zimt28
6a3ebe83db
Remove parentheses (#39) 2021-01-11 13:15:21 -05:00
zimt28
618d16d5d1
improvement: Use ecto_sql formatter settings (#38) 2021-01-10 10:59:33 -05:00
zimt28
f5d51ecdb0
improvement: Omit field opts if they are default values (#37) 2021-01-09 19:52:19 -05:00
Zach Daniel
f3d1d5f48d improvement: support latest ash 2021-01-08 12:14:41 -05:00
Darren Black
650896a7ea
Make integer serial if generated (#36)
Co-authored-by: Darren Black <darren@ifixsystems.com.au>
2021-01-07 22:53:16 -05:00
Zach Daniel
7af29756fa
feat: retain snapshot history 2021-01-07 00:37:41 -05:00
Darren Black
29da1cf522
improvement: Add :binary migration type (#33)
Co-authored-by: Darren Black <darren@ifixsystems.com.au>
2021-01-06 21:47:32 -05:00
Zach Daniel
b2428213c7 feat: support latest Ash version 2020-12-28 19:26:04 -05:00
Zach Daniel
8e321af566 chore: update to latest ash 2020-12-27 01:20:12 -05:00
Zach Daniel
e8dde8b2ff feat: support refs on both sides of operators 2020-12-23 14:46:49 -05:00
Zach Daniel
20cbfaa650 fix: properly accept the tenant_migration_path 2020-12-05 20:17:39 -05:00
Zach Daniel
055e22f3b7 fix: set default properly when modifying 2020-12-01 01:54:20 -05:00
Zach Daniel
595ad71891 fix: various migration generator bug fixes 2020-11-24 18:11:02 -05:00
Zach Daniel
06c2753abe feat: don't drop columns unless explicitly told to 2020-11-19 22:09:26 -05:00
Zach Daniel
f0898ae1c3
fix: drop constraints outside of phases (#29) 2020-11-17 18:35:57 -05:00
Zach Daniel
6634f22685 docs: update repo docs 2020-11-17 00:37:04 -05:00
Zach Daniel
e4f053d639
chore: fix lint 2020-11-07 00:01:18 -05:00
Zach Daniel
b11f505f2c
fix: only alter the things that have changed 2020-11-07 00:00:41 -05:00
Zach Daniel
aaeca65df4
improvement: add utc_datetime migration type 2020-11-05 21:19:51 -05:00
Zach Daniel
f9101be69b
chore: remove IO.inspect 2020-11-03 00:41:38 -05:00
Zach Daniel
ec03af83b8
fix: access data_layer_query with function 2020-11-02 22:59:51 -05:00
Zach Daniel
53d06867dc
improvement: mark repo as not requiring compile-time dep 2020-10-29 00:17:48 -04:00
Zach Daniel
7e29c38c7f
fix: verify repo using ensure_compiled 2020-10-29 00:03:43 -04:00
Zach Daniel
35b9cae6d1
docs: update docs 2020-10-28 23:56:59 -04:00
Zach Daniel
4267d0165d
chore: uppdate docs/add guide 2020-10-28 23:53:28 -04:00
Zach Daniel
03510dae24
feat: multitenancy (#25) 2020-10-28 22:26:45 -04:00
Zach Daniel
9eb703437d
feat: support latest ash 2020-10-17 19:13:51 -04:00
Zach Daniel
dcce3f51fe
chore: updated ash to latest version, fix compiler warnings (#24) 2020-10-07 01:45:58 -04:00
Zach Daniel
493cfb7754
feat: update to latest ash, trigram filter 2020-10-06 01:39:47 -04:00
Zach Daniel
e9b3e26ea0
WIP 2020-10-05 01:08:38 -04:00
Zach Daniel
817e6cc5d8
WIP 2020-10-05 01:08:13 -04:00
Zach Daniel
80230b65df
WIP 2020-10-05 01:08:13 -04:00
Zach Daniel
3848566ca8
fix: don't group alters with creates (#22) 2020-09-30 22:43:33 -04:00
Zach Daniel
64fa0a7f2e
docs: add guidance to use ash_postgres dep 2020-09-30 09:08:16 -04:00
Zach Daniel
5004b2f380
feat: fix error when filtering with true 2020-09-23 21:04:43 -04:00
Zach Daniel
3304807dfc
fix: broken types for in operator 2020-09-23 21:04:43 -04:00
Zach Daniel
51cb9c1a68
feat: support base_filter (#18) 2020-09-19 18:08:09 -04:00
Zach Daniel
4299cbaa05
docs: link to migration generator docs 2020-09-10 23:53:43 -04:00
Zach Daniel
ed1fe9bd24
fix: document/update migration path logic 2020-09-10 23:47:14 -04:00
Zach Daniel
24b743d31b
feat: snapshot-based migration generator 2020-09-10 20:26:47 -04:00
Zach Daniel
60c18dd149
test: Start test suite (#16) 2020-09-03 04:18:11 -04:00
Zach Daniel
52a39d0597
feat: support inner joins when possible (#15)
fix: better support for aggregates/calculations when delegating
2020-09-02 00:01:34 -04:00
Zach Daniel
ed0f3027b8
fix: don't fail w/ no extensions configured 2020-08-27 22:51:43 -04:00
Zach Daniel
8cadfc937d
feat: update to ash 1.11 (#13) 2020-08-26 00:28:55 -04:00
Zach Daniel
2a89070594
feat: support Ash v1.10 (#12)
* feat: support latest ash

* feat: update to latest ash
2020-08-24 14:06:41 -04:00
Zach Daniel
f81f78bbea
fix: fix compile/dialyzer issues 2020-08-19 01:18:52 -04:00
Zach Daniel
63563a7091
feat: update to latest ash 2020-08-19 00:52:23 -04:00
Zach Daniel
e03cd0cd52
feat: support ash 1.7 2020-08-17 02:46:59 -04:00
Zach Daniel
ac0568b9fe
feat: support named aggregates 2020-08-08 16:19:18 -04:00
Zach Daniel
09aff5f29d
feat: support latest ash 2020-07-24 19:27:34 -04:00
Zach Daniel
8526b48772
fix: add can? for :aggregate 2020-07-24 18:00:57 -04:00
Zach Daniel
4e64a01d22
fix: typespecs, errant IO.inspect 2020-07-23 01:38:38 -04:00
Zach Daniel
3a994e735a
feat: support ash 13.0 aggregates 2020-07-23 01:13:47 -04:00
Zach Daniel
f9d3f5f51f
feat: update to latest ash 2020-07-15 01:42:12 -04:00
Zach Daniel
f8148ae1bb
feat: update to latest ash 2020-07-13 00:41:38 -04:00
Zach Daniel
8c40079e1f
feat: update to latest ash, add docs 2020-07-07 20:01:01 -04:00
Zach Daniel
26028774da
feat: update to ash 0.9.1 for transactions 2020-06-30 00:16:17 -04:00
Zach Daniel
507ff2ab6b
feat: update to latest ash 2020-06-28 23:47:07 -04:00
Zach Daniel
3151e3d279
feat: upgrade to latest ash 2020-06-28 22:29:38 -04:00
Zach Daniel
8e303beb5d
feat: update to latest ash 2020-06-27 15:11:28 -04:00
Zach Daniel
b077520935
feat: New filter style (#10) 2020-06-18 23:04:41 -04:00
Zach Daniel
6c5265b4a1
feat: use the new DSL builder for config (#7) 2020-06-14 03:04:18 -04:00
Zach Daniel
7f47addd15
fix: account for removal of name 2020-06-04 23:24:01 -04:00
Zach Daniel
6626ba8d17
docs: add simple repo explanation 2020-06-04 01:27:26 -04:00
Zach Daniel
ea6e55de96
chore: fix lint issues 2020-06-02 23:29:11 -04:00
Zach Daniel
34e5880dcd
chore: fix credo warnings 2020-06-02 22:48:12 -04:00
Zach Daniel
2de79b1a86
fix: impossible join removal 2020-06-02 18:25:55 -04:00
Zach Daniel
458db18570
chore: remove ashton in favor of nimble_options 2020-06-01 01:14:49 -04:00
Zach Daniel
1bc961e56c
fix: pg_trgm config bug 2020-05-31 01:54:56 -04:00
Zach Daniel
e4d6381428
feat: add trigram search 2020-05-31 01:51:41 -04:00
Zach Daniel
9765d58277
fix: use destination fields for joins 2020-05-27 23:56:46 -04:00
Zach Daniel
81a3401146
fix: update to newer can? syntax 2020-05-27 22:32:10 -04:00
Zach Daniel
865485922e
feat: upserts 2020-05-14 18:02:15 -04:00
Zach Daniel
e3d6af9b20
feature: update to honor new ands on filter 2020-05-13 12:43:58 -04:00
Zach Daniel
60163202f3
fix: adjust to new sorts 2020-05-09 22:26:13 -04:00
Andrew Callahan
7ce79eff5e generate resources 2020-05-03 08:32:56 -05:00
Andrew Callahan
4c072b8736 add concept of postgres_table 2020-05-03 08:30:10 -05:00
Zach Daniel
864f83cbde
WIP 2020-05-02 05:02:31 -04:00
Zach Daniel
8f34ad892f
WIP 2020-04-05 06:24:01 -04:00
Zach Daniel
00c8ae8941
WIP 2020-04-03 23:42:15 -04:00
Zach Daniel
ceb5b4069f
WIP 2020-01-17 12:24:07 -05:00
Zach Daniel
cd579efbae
WIP 2019-12-08 14:02:30 -05:00
Zach Daniel
b33945d166
WIP 2019-12-05 13:45:42 -05:00
Zach Daniel
fe3d81c606
fix typo 2019-12-04 15:18:18 -05:00
Zach Daniel
87cd754b5a
WIP 2019-12-04 10:27:20 -05:00
Zach Daniel
ea5c0edc87
WIP 2019-12-04 09:58:46 -05:00
Zach Daniel
dc94994ea3
WIP 2019-12-04 09:58:20 -05:00
Zach Daniel
1b61705e43
WIP 2019-12-03 01:48:04 -05:00
Zach Daniel
dd42c0e6a0
WIP 2019-12-02 17:01:22 -05:00
Zach Daniel
f5f3c75941
WIP 2019-11-29 11:38:14 -05:00
Zach Daniel
114ba29410
WIP 2019-11-29 01:54:57 -05:00
Zach Daniel
e7edb42aa4
WIP 2019-11-28 00:27:12 -05:00
Zach Daniel
260693e2d4
WIP 2019-11-27 16:36:49 -05:00
Zach Daniel
5527c31687
WIP 2019-11-26 17:33:52 -05:00
Zach Daniel
a52218b772
WIP 2019-11-24 19:01:54 -05:00
Zach Daniel
cd4d39f535
WIP 2019-11-22 15:22:46 -05:00
Zach Daniel
088c34551a
stateful relationship actions 2019-11-02 16:37:13 -04:00
Zach Daniel
f30cbfc79e
work on separation lines 2019-10-30 11:13:22 -04:00
Zach Daniel
5749aa363c
move datalayer stuff into its own repo 2019-10-06 16:36:18 -04:00