Retool Database - Editing a field, Unique: false reverts to true after save

  • Goal: Create a Retool Database table with a composite primary key (supplier_id[UUID], channel_id[UUID], date[DATE])

  • Steps: I have been able to create the table in Retool Database, and the composite primary key; however, there is a uniqueness constraint on the date[Date] column that I cannot disable. Switching "Unique" in the date field settings to false, then hitting save, and re-opening the field settings, shows a "Unique" setting of true.

This is an issue for me because I'm looking to insert multiple rows with the same channel_id and supplier_id value, but different date values.

  • Details: Retool Cloud

  • Screenshots:
    Setting Unique on the "date" column to false, then hit "Save"

Re-opening the settings on the "date" column; Unique is set to true.

1 Like

Hey @gkahen - welcome back to the forum. :wave:

This is an interesting one - thanks for bringing it to our attention! I did some testing and am pretty confident that this is just a visual bug. All three columns in the table I made below are showing as Unique: true but I am able to insert records with duplicate data, nonetheless.

I'm guessing that either:

  • the Retool frontend sees that the column is tagged as a primary key and assumes that it is unique, as a result; or
  • this is Retool telling us that the composite key is unique.

Either way, there's room for improvement! I'll report this as a bug and provide an update here as soon as I can. In the meantime, you should be able to move forward with the development of your app!

1 Like