Skip to content

v1.3.0

Choose a tag to compare

@Taure Taure released this 27 Feb 14:22
· 96 commits to main since this release
25b6ba4

Breaking Changes

  • Removed primary_key/0 callback from kura_schema behaviour. The primary key is now derived from #kura_field{primary_key = true} in your fields/0 definition. Remove the primary_key/0 export and function from your schema modules.

Migration guide

Before:

-export([table/0, fields/0, primary_key/0]).

primary_key() -> id.
fields() ->
    [#kura_field{name = id, type = id, primary_key = true},
     #kura_field{name = name, type = string}].

After:

-export([table/0, fields/0]).

fields() ->
    [#kura_field{name = id, type = id, primary_key = true},
     #kura_field{name = name, type = string}].

New API

  • kura_schema:primary_key/1 — returns the primary key field name for a schema module