Correspondance of Data Structures between Logiak and Supabase

Logiak Objects and Supabase Tables must align

The decoupling of Logiak and the Supabase backend gives you a lot of freedom and 100% control.

However, a successful integration means 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 successfully,

the Supabase Project must have a table corresponding to each Object (excepting State Objects) defined in the Logiak Project.

Happily, we think we have made this very simple for you -

Objects/Tables tab AUTOMATES the check

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

Before deploying a version, visit this tab, select the Project version to be deployed, and Logiak will do the following:

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

Example

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.

Once a button is clicked, the missing 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)