Correspondance of Data Structures between Logiak and Supabase

Logiak Objects and Supabase Tables must align

The decoupling of Logiak and backends gives the user a lot of freedom and 100% control.

Success integration means though that a Logiak Project and a Supabase Project must be aligned when it comes to the definition of data structures.

Basically, to deploy a version of a Logiak Project succesfully, the Supabase Project must have a table corresponding to each Object (excepting State Objects) defined in the Logiak Project.

Objects/Tables tab automates the check

In a Supabase Deployment, there is a tab called Objects/Tables which gives the Logiak Project administrator good support in ensuring this alignment.

Before deploying a version, the administrator should visit this tab, select the Project version to be deployed, and let Logiak

  • Query Supabase : find out what tables exist, and what columns they have
  • Compare with Objects in the Logiak Project Version
  • Show the administrator results of this comparison
  • And offers the administrator buttons which will allow mismatches to be corrected in Supabase automatically.

Here is a video showing an example where Supabase contained no Project tables, and the administrator checks version 2 of the Project.

Logiak reports that four tables are missing.

The administrator clicks on a button, and the tables are defined in Supabase, with columns corresponding to Fields in the Logiak objects.

Objects / Tables automatic alignment

Mapping: Unique field -> Primary Key

Unique key in Logiak object

Becomes primary key in Supabase table)

Mapping: Relationship -> Foreign key

Relationship in Logiak object

Becomes foreign key in Supabase table

Type determined by primary key of customer table

Mapping: Date fields -> timestamp columns

Date fields in Logiak

Become timestamp columns in Supabase table)

Mapping: True/false fields -> bool columns

True/False fields in Logiak

Become boolean columns in Supabase table)

Mapping: Number and text fields -> numeric and text columns

Number and text fields in Logiak

Become numeric and text columns in Supabase table)