v1.3.0
Breaking Changes
- Removed
primary_key/0callback fromkura_schemabehaviour. The primary key is now derived from#kura_field{primary_key = true}in yourfields/0definition. Remove theprimary_key/0export 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