You should reconsider whether your table really needs the id field. It seems that code could serve that purpose just as well.
Regardless, if you wish to add the unique constraint on code, and assuming you're using HSQL (the embedded DBMS provided with Tersus Studio), you will need to add it manually as follows:
If you try to use Database/Insert with a non-unique value, it will exit through the <Duplicate> exit (if defined) or issue a duplicate key error message (if not)
If you try to use a Database/Update with a non-unique value, it will always issue a duplicate key error message. If you wish to handle this case through modeling (instead of the automatic error message), do the following:
We hope to provide an easier solution to adding a relevant property in a future release.
For best results, use the Firefox browser..