You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: bulk_create with upsert now updates update_timestamp fields (#207)
Ports ash-project/ash_postgres#697 to ash_sqlite. update_timestamp
attributes (e.g. updated_at) were never included in the ON CONFLICT
DO UPDATE SET clause because they have writable?: false. Now fields
with update_defaults are always included when an upsert modifies
fields. Can be disabled via context:
%{data_layer: %{touch_update_defaults?: false}}
Copy file name to clipboardExpand all lines: documentation/dsls/DSL-AshSqlite.DataLayer.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ end
35
35
36
36
| Name | Type | Default | Docs |
37
37
|------|------|---------|------|
38
-
|[`repo`](#sqlite-repo){: #sqlite-repo .spark-required} |`atom`|| The repo that will be used to fetch your data. See the `AshSqlite.Repo` documentation for more |
38
+
|[`repo`](#sqlite-repo){: #sqlite-repo .spark-required} |`module \| (any, any -> any)`|| The repo that will be used to fetch your data. See the `AshSqlite.Repo` documentation for more. Can also be a function that takes a resource and a type `:read \| :mutate` and returns the repo.|
39
39
|[`migrate?`](#sqlite-migrate?){: #sqlite-migrate? } |`boolean`|`true`| Whether or not to include this resource in the generated migrations with `mix ash.generate_migrations`|
40
40
|[`migration_types`](#sqlite-migration_types){: #sqlite-migration_types } |`keyword`|`[]`| A keyword list of attribute names to the ecto migration type that should be used for that attribute. Only necessary if you need to override the defaults. |
41
41
|[`migration_defaults`](#sqlite-migration_defaults){: #sqlite-migration_defaults } |`keyword`|`[]`| A keyword list of attribute names to the ecto migration default that should be used for that attribute. The string you use will be placed verbatim in the migration. Use fragments like `fragment(\\"now()\\")`, or for `nil`, use `\\"nil\\"`. |
0 commit comments