You need to restart the ID counting sequence (Postgres lingo). The syntax is:
ALTER SEQUENCE [schema].[sequence_name] RESTART WITH 1;
r3 uses sq_
+ the ID of the relation as sequence name. An example where the app is called app1
and the relation has the ID 115245f4-3ecf-4174-b98c-a430e3f86a71
:
ALTER SEQUENCE app1."sq_115245f4-3ecf-4174-b98c-a430e3f86a71" RESTART WITH 1;
This will reset the ID counter to 1. If you still have data in the relation, this can result in duplicate primary key errors.
To execute the SQL, you can either connect to the database system, or run it in a backend function directly in r3.