Saltcorn 0.4.0: discover tables, external tables, flexible primary keys

By Tom Nielsen
Published on 

Saltcon 0.4.0 has been released with an emphasis on giving more flexibility to tables. Much of the code related to tables has been generalised to allow the following features:

  • Primary key flexibility: previously, all primary keys were named ID and were of the auto incrementing integer type. We now support primary keys of any name and any type (but not yet composite primary keys). You can change the type of primary key in a table if it is empty; just click on the ID field (which is now in the list of fields for a table) if the table is empty. 
  • Discover tables: if you have an existing database in PostgreSQL, you can now quickly import these tables into Saltcorn - We called this feature "Table discovery". Saltcorn Is now the fastest way to build a user interface to an existing database!
  • Tableless views: Views are no longer necessarily tied to tables. Sometimes it just doesn't make sense to associate a view with a table. A viewtemplate can now declare that it is tableless. This is used in the stripe plug-in, and in the data visualisation plug-in "visualize" which now contains a data explorer that can create plots from different tables of different plot types
  • External tables: Plug-ins can now supply external tables that are treated similarly to Saltcorn tables. An example is the systems-info plugin, which supplies a table of processes on the current computer. External tables have fields of which one must be the primary key and appear in the table list; you can build views to external tables. Some limitations are that tables are read-only. In the future we will allow external tables with write access and allow for a synchronisation between Saltcorn tables and external tables.

One additional feature is not related to tables: 

  • The email settings form now has a button to send a test email. There is now also a Wiki page on how to use Gmail to send emails.



Recent posts