Database configuration
The database schema is held in a series of files in the tables directory. There is one per file (table/collection). For example, the subjects schema is here.
The format is based on the JSON Schema standard. There are additional items covering things like permission sets, listing parameters and so on as described below.
- Friendly name, Used in the database report
- Description, Used in the database report.
- Permission: Permission sets for different operations (view, edit, delete, all, none)
- List: configures a normal table list. The columns array lists the fields to be included.
- In a structured record, only the top level fields are included. The subsidiary fields will be listed in a column - example here. Results details are all in the results column.
- Stringify: When any record is described. this column will be used to characterise it. This can be a function to combine columns. Defaults to the primary key.
- Groups: Divides the fields into groups for presentation and editing. Any fields not included get included in an 'other' group.
- Columns: The fields in the group listed in an array.
- Static: (true/false) This group is 'above the fold' and does not change as you switch groups.
- Record types: Optionally indicates that this group is only relevent to the stated record types..
- Subschema
- Key: The name of the field that determines which subschema record is used.
- Children Files that are children of this file, with details of the foreign key in that file and how the child records are to be listed in the parent detail page.
- Properties: This is a list of objects to describe the fields in the document/table. See the next page.
Next: properties in detail