Using an existing table with Bracket
How to successfully design a Postgres table that meets Bracket’s criteria
General requirements
-
A unique identifier (we recommend snake case field names), and our default table generation creates a field called
bracket_pkey
. -
To be able to insert into postgres, you must have a default value. We recommend using the builtin function
gen_random_uuid()
. -
In order to leverage the a more efficient polling mechanism where only recently updated/inserted records are polled, you must include a field that tracks when records were modified. When Bracket builds a base for you, we create a field called
bracket_last_modified
and add a trigger/function that updates that field’s value whenever the record is updated.
Here’s some default SQL that can help you get started:
Event driven requirements
Please see the requirements for the streaming sync methods here