Skip to content

Commit 1ca4191

Browse files
committed
chore: move to typed ecto schema
Changes capabilities to use a typed ecto schema instead of a simple ecto schema Signed-off-by: Luca Zaninotto <luca.zaninotto@secomind.com>
1 parent d58c621 commit 1ca4191

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [1.3.0] - unreleased
8+
### Added
9+
- Device capabilities
10+
- Device capability `purge_property_compression_format`
11+
712
## [1.2.0] - 2024-07-01
813

914
## [1.2.0-rc.0] - 2024-05-28
1015
### Added
1116
- Function for translating realm to keyspace, to support multiple Astarte
1217
instances sharing the same database
13-
- Added device capabilities
14-
- Added device capability `purge_property_compression_format`
1518

1619
### Changed
1720
- Bump Elixir to 1.15.7.

lib/astarte_core/device/capabilities.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#
2020

2121
defmodule Astarte.Core.Device.Capabilities do
22-
use Ecto.Schema
22+
use TypedEctoSchema
2323
import Ecto.Changeset
2424

2525
alias Astarte.Core.Device.Capabilities
@@ -29,7 +29,7 @@ defmodule Astarte.Core.Device.Capabilities do
2929
@permitted_fields [:purge_properties_compression_format] ++ @required_fields
3030

3131
@primary_key false
32-
embedded_schema do
32+
typed_embedded_schema do
3333
field :purge_properties_compression_format, Ecto.Enum,
3434
values: [zlib: 0, plaintext: 1],
3535
default: :zlib

0 commit comments

Comments
 (0)