Creating tables
Create a table
To create a new table, you need to be logged in as a user with administrative privileges.
Therer 2 options to create table:
- Using table fields editor (Described in this wiki page)
- Using import of CSV file (described in Create table from CSV)
Menu > Tables > New table >Table name > Create
First, define table name. Table names MUST start with a letter and can include any alphanumeric characters and spaces.
Example of valid names:
- Customers
- Service Contract
- B123
Saltcorn automatically adds the ID field to make each table unique.
Table settings
Fields
Here you add fields to table. More information:
Note: Saltcorn automatically adds a primary key field ID when you create a new table.
You can use this field as normal field everywhere for example in Views.
You cannot delete ID field.
Edit table properties
Minimum roles to read and write
These are the minimum roles needed to Read and Write to the table.
Examples:
A public blog written by a team: minimum Read role will be Public, and minimum Write will be Staff.
A to do list for the team: minimum Read role will be Staff, and minimum Write will be Staff.
Blog comments: minimum Read role will be Public, and minimum Write will be Public.
Version history
Only the admin can revert to a previous version of a table row.
For example if you have a public Wiki, the admin can replace the new version of the information with a previous version.
The user cannot revert to a previous version, but can edit.
Under the hood, Saltcorn creates additional tables to store the history of your table.
Note: that when you turn off version history for an existing table you will lose previous version history for that table.