create table sorts ( property text not null, direction text references sort_directions not null ); comment on table sorts is ' Single property to sort by. '; comment on column sorts.property is ' The property by which the results should be sorted. '; comment on column sorts.direction is ' The direction in which the results should be sorted. ';