better to use id here (especially when you group by like in my proposition (no need for extra join to get extra cost type name)), ex:
```
tmpl = 'extra_cost_{}'
...
schema[tmpl.format(extra_cost_type.id)] = {
    ...
}
```